--- Heath H Holcomb <[EMAIL PROTECTED]> wrote: > #--------------------------------------------------------------------------------------- > # Embedded Gentoo How-To for x86 > # > # Commands to setup a Gentoo embedded environment, > you must be root. > # These commands are to be run on your developement > system, > # any x86 Gentoo Linux computer will do. The system > should be fast, > # to speed developement. The target can be any x86 > based SBC. I'm > # using a Geode based SBC. Latter I'll use a Via > based SBC. > # > # version 0.04 > # 2005.11.05 > # > # Heath Holcomb (heath at bulah.com) > # Lloyd Sargent (contributor) > # Ned Ludd (embedded Gentoo project lead, original > commands posted) > # Yuri Vasilevshi (contributor) > # Mike George (contributor) > # Kammi Cazze (contributor) > # > # development_rootfs = what you use to build the > embedded_rootfs > # embedded_rootfs = rootfs you deploy to the target > system > # SBC = single board computer (here it's an x86 > based) > # > # References > # http://www.gentoo.org/doc/en/handbook/index.xml > # http://www.epiawiki.org > # http://epia.kalf.org > # Gentoo embedded mailing list > ([email protected]) > # > # > #--------------------------------------------------------------------------------------- > > # create the development_rootfs > # I use i586 becasue of target is a Geode processor > mkdir -p /opt/i586-gentoo-uclibc-linux/usr/portage > > # download the latest stage 1 tarball > wget \ > http://gentoo.osuosl.org/experimental/x86/embedded/stages/stage1-x86-uclibc-2005.0.tar.bz2 > > # untar the stage to the development_rootfs > tar -xvjf stage1-x86-uclibc-2005.0.tar.bz2 -C > /opt/i586-gentoo-uclibc-linux/ > > # mount the development_rootfs proc and portage > directories > # don't understand this someone please add comments > mount --bind /proc > /opt/i586-gentoo-uclibc-linux/proc/ > mount --bind /usr/portage > /opt/i586-gentoo-uclibc-linux/usr/portage > > # copy over DNS information to the > development_rootfs > cp /etc/resolv.conf > /opt/i586-gentoo-uclibc-linux/etc/resolv.conf > > # chroot into the development_rootfs, create new > environment, > # load variables into memory > chroot /opt/i586-gentoo-uclibc-linux /bin/bash > --login > env-update > source /etc/profile > > # modify make.conf file to your liking > nano -w /etc/make.conf > # this is for my target, Geode x86 processor > USE="uclibc" > CHOST="i586-gentoo-linux-uclibc" > CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer > -mmmx" > CXXFLAGS="${CFLAGS}" > FEATURES="buildpkg" > > # start the bootstrip script > cd /usr/portage/scripts > ./bootstrap.sh -p -v > ./bootstrap.sh > > # emerge system for the development rootfs > emerge -e system > > # I'm bulding busybox and uclibc here, what you do > may vary > # build busybox and uclibc, put into the > embedded_rootfs (/embedded_rootfs) > # we emerge applications in our developement rootfs > and then > # emerge -K into our embedded rootfs, that way we > don't get the extra files > # created by the build/emerge process into our > embedded rootfs which needs > # to be as small as possible > mkdir /embedded_rootfs > cd /usr/portage/sys-apps/baselayout-lite/ > ROOT=/embedded_rootfs emerge > baselayout-lite-1.0_pre1.ebuild > ROOT=/embedded_rootfs emerge -K uclibc > emerge busybox > ROOT=/embedded_rootfs emerge -K busybox > > # emerge other software you need for you embedded > target > # this is very wildly depending on your needs > emerge foobar* > ROOT=/embedded_rootfs emerge -K foobar* > > # install a kernel into embedded_rootfs, 2.6.11.5 > for example > emerge vanilla-sources > cd /usr/src/ > ln -s linux linux-2.6.11.5 > cd linux > make menuconfig //configure your kernel for your > TARGET SBC here > cp /usr/src/linux/arch/i386/bzImage > /embedded_rootfs/boot/vmlinuz-2.6.11.5 > > # install a boot loader, grub for example > # once you copy/deploy your embedded rootfs program > to you target SBC > # you will have to run the gurb on the command line > to write to the master > # boot record (MBR) > emerge grub > ROOT=/embedded_rootfs emerge -K grub > > # set time zone in your embedded_rootfs > # see > http://leaf.sourceforge.net/doc/guide/buci-tz.html > for details > > > ......... more stuff here ........... > ......... install xorg-x11, less than 10MB hopefully > ......... install light window manager (blackbox, > windowmaker, ???) > ......... install very light X11 toolkit (?????) > ......... purge to the embedded_rootfs of unwanted > files and libaries rsync /embedded_rootfs /embedded_rootfs_clean Run cleaning script over /embedded_rootfs_clean
overlay configs or edit directly to /embedded_rootfs_clean > ......... edit all config files > ......... set up the test harddrive on the target > SBC > ......... install grub or lilo on the test harddrive > on the target SBC OR syslinux > ......... transfer embedded_rootfs to the test > harddrive on the target SBC > ......... debug system, and rebuild > ......... deploy embedded_rootfs from the test > harddrive to flash (DiskOnChip, > Compact Flash) > ......... tweak, rebuild, redeploy > > > > -- > Heath Holcomb > [EMAIL PROTECTED] > www.bulah.com > -- > [email protected] mailing list > > Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html -- [email protected] mailing list
