[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: BeagleBone for ALSA & jackd
From:       Ed W <lists () wildgooses ! com>
Date:       2012-10-29 21:44:01
Message-ID: 508EF8A1.2080001 () wildgooses ! com
[Download RAW message or body]

Hi

> Get a Gentoo stage-3 image for your platform.  For best results, put 
> the stage-3 image on a nice file server and NFS-mount it onto the 
> target platform.  (which is a little involved, but worth it, IMHO. 
> This gives you an easy way to make backups and copies or even add it 
> to version control.)  chroot into it and emerge all the packages you 
> need.
>
> (trying to do the same on x86 and cross-compiling will waste a bunch 
> of your time and drive you slightly insane, unless you enjoy debugging 
> autoconf scripts)
>
> Once you have the chrooted Gentoo system behaving as you like, write a 
> perl script that copies out *only* the files you need, (excluding 
> binaries replaced by busybox) and place them into the mostly-empty 
> system you created earlier.  Gentoo has the nice /var/db/pkg files to 
> help you find all of a package's files. Exclude packages like 
> baselayout.  Then exclude some directories like /etc and 
> /usr/share/doc.  (you want to very carefully craft your own /etc)
>
> Then take the result and copy it to a USB stick, and boot off of it.

If compiling your own kernel holds no fear then you can do something 
like this using aufs.  In fact I use this to generate our embedded modules.

- Mount some writeable filesystem over the top of your read-only system 
and it effectively holds only the changes you make to your read-only system

- Rather than copying stuff out of a live system, simply build a new 
system using the saved packages. Caveat that some ordering might be 
necessary with the system level packages and also you may need to 
pretend you have some packages installed since they are already provided 
by busybox.

So move it to the gentoo list, but it's pretty simple to do something 
like "ROOT=blah -vk emerge stuff". Keep a package cache and now the -k 
means you use the packages to rebuild quickly. Probably take you an hour 
or two to get the minimal set of packages correct, but with squashfs you 
can have a full gentoo build (openrc, even udev, etc) in a couple of MB

I then mount that dir somewhere, mount an aufs over the top, emerge 
further packages and keep that incremental build as a seperate module.  
Remount all these slices on your target and you have a cool modular 
system a la Slax. Gets complicated though...

I am happy to share (but lets take it elsewhere), but I then prepare a 
"target" build by taking this source ROOT and excluding a bunch of files 
(doc, man, etc), mangling other files (reducing sizes), then copying in 
some template overlay files.  This is a script and gets the size down 
and allows minor fixups to ebuilds without needing to write new ones.

Good luck

Ed W
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic