[beagleboard] how to create root file system?

It will take quite some work to create a working root file system. I did it once. When I saw OE did everything for me, it blew me away. No fuss, no mess with tool chain, libraries, make files, booting scripts for the newly made root file system.

I think I followed some info from here:

Building Embedded Linux Systems: Concepts, Techniques, Tricks, and Traps - Karim Yaghmour, Jon Masters, Gilad Ben-Yossef, Philippe Gerum - Google Books

and from a book I found laying around: “Embedded And Real-time Linux” by Kcomputing.com and some advices from my office mate :slight_smile:

I was glad I had a chance to do that because it really taught me a lot of things.

The basic idea is that you create a directory, then in there you populate all the directories with files you need (like /etc /dev, /bin, /sbin, etc.) The files in bin & sbin directory are mostly from busybox build. All the files that are executable & libraries have to be built with the tool chain. Once you have the directory stucture you want, you can run mkfs to create the file system type you want (in case you use some on board flash to store the file system), or you can copy your whole root file structure to the SD card.

It’s far more efficient to modify an existing root file system to suit your need though :slight_smile:


cheers

-Thanh


— On Fri, 5/29/09, chuqdd chuqdd@yahoo.com wrote:


> From: chuqdd chuqdd@yahoo.com
> Subject: [beagleboard] how to create root file system?
> To: “Beagle Board” beagleboard@googlegroups.com
> Date: Friday, May 29, 2009, 10:30 AM
>
> Hi, BB community,
>
> Please bear with me as linux layman (man still out of the door?)
>
> I tried to build the beagleboard linux kernel image following 2 ways:
>
> 1. following instruction of http://code.google.com/p/beagleboard/wiki/BeagleSoftCompile,
> using codesourcery to build demo image, I got uImage. u-boot.bin and
> x-
> load.bin, and use ramdisk.gz as root file system
> 2. following instruction of http://elinux.org/BeagleBoardAndOpenEmbeddedGit,
> using openembedded/bitbake to build console-image, I got uImage-
> beagleboard.bin, console-image-beagleboard.tar.bz2. Then I need to
> uImage in the 1st partition of SD card, and untar console-image-
> beagleboard.tar.bz2 onto the 2nd partition as root file system
>
> From either way, I lack the picture how to generate the root file
> system, like console-image-beagleboard.tar.bz2, after a lot of
> googling. I know “bitbake console-image” will generate everything for
> me if starting from scratch. But it seems a better approach for my
> specific project to manually compile the kernel first then build the
> file system, instead of the totally automatic process of “bitbake
> console-image”, in this way I have more control.
>
> Can anybody teach me how to generate the root file system (.tar.bz2)
> for a specific built uImage
>
> Thank you very much
>
> chuqdd

|