Subject: [alpine-devel] Request for pointers in porting alpine linux

From: Nathan Angelacos <[email-masked]>
Date: Fri, 17 Feb 2012 18:27:23 -0500

Looks like I'll be doing more work on ARM processors in the near future.

Anyone have any pointers wrt porting Alpine to a new architecture? 
Anything at all would be helpful.

Thanks.

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Timo Teras <[email-masked]>
Date: Sat, 18 Feb 2012 10:17:41 +0200

Hi,

> Anything at all would be helpful.

When we did the NPTL-update the steps were roughly:
 1. Build cross compiler tool chain
   - I used crosstool-NG [crosstool-ng.org]; it is also apk addable,
     but needs an update
 2. Using the cross compiler, build initial minimum build environment
   - I believe ncopa made a list of what to build and which order
     (basically need kernel, perl, openssl, apk-tools and alpine-sdk
     with their dependencies)
   - abuild called to build, with CROSS set to cross compiler prefix
   - abuild called so that dependencies are ignored, and no packages
     generated; everything was installed to same target dir
 3. Now we have minimum bootstrap environment for target; either boot
    on target machine, or QEMU
   - repeat step 2. but this time generate packages
 4. Now you have initial packages for install that you can use further;
    these can be used to setup the buildozer for the architecture

I afraid this is not very automated process. While the APKBUILDs do
contain $CROSS suppport in various places, it could be better. And
abuild should have better commands for it. Also the list of what to
build and in which order should be in git somewhere. Ncopa also had
some scripts for step 2.

Might be even nice to keep the known-to-work initial crosstool-NG
configurations, just in case.

For ARM, I think it might be an idea to setup the build environment
inside QEMU since it'd likely be way faster, and get a lot more RAM
than from any native, reasonable priced ARM box.

Cheers,
  Timo

---

---

From: Jeff Bilyk <[email-masked]>
Date: Fri, 17 Feb 2012 23:25:32 -0500

Hey Nathan,

I started some work on cross-compiling Alpine a little while back and my notes are still on the wiki.  I would imagine that once bootstrapping that toolchain is done, it'd make for a better long-term solution.  Nenolod mentioned a good point a while back wrt needing a fair amount of memory for some packages to build (freeswitch comes to mind of the top of my head, bit there are others too), which eliminates doing native building on most ARM systems, except for some tablets he had found that had a gig or so of RAM.  Once either a native build or cross-compiler are setup, the buildozer instructions on the wiki have been tested recently so having an official ARM builder connected to irc would be straightforward.  Anyways, those are my 0.02$ to add...

Jeff

On Feb 17, 2012, at 6:27 PM, Nathan Angelacos <[email-masked]> wrote:

> Anyone have any pointers wrt porting Alpine to a new architecture? Anything at all would be helpful.
> 
> Thanks.
> 
> 
> 
> ---

---