Revision as of 10:25, 13 January 2009 by David Hagood (Talk | contribs) (Thanks for the response)

Jump to: navigation, search

There are a couple of problems with the instructions:

  1. The section on building the system under QEMU does not specify that all the tasks must be conducted UNDER QEMU, nor does it spell out what set up is needed for QEMU.
  2. The section on building a custom kernel doesn't work if building on the target - it insists upon using the cross-compiler, which does not exist.
  3. The kernel image pulled from GIT is NOT the source used to build the kernel binary images, as it does not have the resolution selection code in it.
  4. The configuration for the kernel image should be linked to from the WIKI, so that we have an exact image of what needs to be built.

David Hagood 19:18, 12 January 2009 (UTC)

Hi David,

(PS, hopefully you don't view this as too 'long', but since I first wrote this in mid august, I've been trying to get some feedback..)

Thanks for you feedback, the "Debian" and "Mojo" topics (in the end they are the same) really need someone with fresh eye's to go over the install procedures. I have a couple ideas of where to go with this wiki, but would like other people's opinion.

1. QEMU <- I'd like to delete this whole section.  (all subsections of '3')

History: When I first started writing this wiki, the only method of install was using debian's 'debootstrap' tool and QEMU. (this creates one nasty 'almost finished' system.) Since that time the wiki has transitioned from "QEMU + debootstrap" -> "QEMU + debian-installer" -> "Native + debian-installer." The "QEMU + deboostrap" has since been long deleted, and the "QEMU + debian-installer" is only useful if you don't have a compatible usb-network device. (In the case of "Mojo", and the current "hasty" revision, the debian-installer is waiting for an upstream mmc patch to do a native install. In theory Mojo's Icy should already have this patch... just isn't built yet..)


I can't remember what package forced me to do this, (make-kpkg, the kernel sources, etc...). Too actually use a "native" arm "GCC" on an 'armel/arm' system when building an 'arm/armel' kernel, you must pass "CROSS_COMIPLE= " (space in there), otherwise the build system would append, arm-linux-*, armel-linux-*, etc.

3. The kernel image pulled from GIT...

Yes and No, All "Debian" and "Mojo" kernels are based off that git tree along with patches from Koen's excellent kernel work. The "Linux Kernel" topic on the wiki is just a short example, but for clarification here's my current build script:

1. Link between "Debian" and "Mojo" build version and Koen's Angstrom Kernel's (Note, all 'gitweb' links are broken since switching to 'cgit', so this 'version' i'm using as an example might not be uploaded yet. (it's building))

kernel-image/headers (2.6.27 oer12-1.0)

  * OE r12 Release, 2.6.27 + Patches
  - fix usb RX TX bug

 -- Robert Nelson <robertcnelson+deb<at>gmail<dot>com> Mon Jan 12 08:41:38 CST 2009


We see we are using git: 2a3408be17f287fdb5809c9b6c68e7ad96d25b74 of 2.6.27

So from: git://


cd ~/git_repo/linux-omap-2.6/
git pull
git checkout ${COMMIT}
git checkout -b ${KERNEL}
git archive --format=tar --prefix=${KERNEL}/ ${KERNEL} | gzip > ../${KERNEL}.tar.gz
git checkout master
git branch ${KERNEL} -D
cd ..

Next we apply all the 'patches', (from here again: ( I'm not going to break this down line by line since there are many, but my build system relies on a single 'diff'.

This kernel, patch, and defconfig is stored on my home server (be nice to my slow cable modem) about a foot from a dedicated beagle builder here:

The beagle builder is basically a beagleboard with a 80Gb USB harddrive with every debian chroot I've ever used.. (from Mojo's first frisky release to a test icy, to ubuntu's jaunty, to debian lenny and sid..)

This is the current, build script as of January 12, 2009, it works thru many odd 'bugs', with using chroot's, usb transfer issues (should be now fixed with 2.6.27-oer12), dns network failures (when the cable modem locks) and power failures...

cd /mnt/debian/
echo "date"
schroot -c ${DIST} -u voodoo -- ls
schroot -c ${DIST} -u voodoo -- rm linux-image${FINAL_KER}.deb
schroot -c ${DIST} -u voodoo -- rm linux-headers${FINAL_KER}.deb
schroot -c ${DIST} -u voodoo -- rm ${KERNEL}-${OER_R}.diff
schroot -c ${DIST} -u voodoo -- rm defconfig
schroot -c ${DIST} -u voodoo -- rm -rfd ${KERNEL}
schroot -c ${DIST} -u voodoo -- rm ${KERNEL}.tar.gz
schroot -c ${DIST} -u voodoo -- sudo aptitude update
schroot -c ${DIST} -u voodoo -- sudo aptitude -y safe-upgrade
schroot -c ${DIST} -u voodoo -- sudo aptitude -y dist-upgrade
schroot -c ${DIST} -u voodoo -- sudo aptitude autoclean
schroot -c ${DIST} -u voodoo -- sudo aptitude -y install gcc wget kernel-package fakeroot build-essential bash apt-utils bzip2
schroot -c ${DIST} -u voodoo -- gcc -v
schroot -c ${DIST} -u voodoo -- wget --directory-prefix=/mnt/debian/${KERNEL}.tar.gz
schroot -c ${DIST} -u voodoo -- wget --directory-prefix=/mnt/debian/${KERNEL}-${OER_R}/${KERNEL}-${OER_R}.diff
rm ${KERNEL}-${OER_R}/${KERNEL}-${OER_R}.diff
wget --directory-prefix=/mnt/debian/${KERNEL}-${OER_R}/${KERNEL}-${OER_R}.diff
schroot -c ${DIST} -u voodoo -- wget --directory-prefix=/mnt/debian/${KERNEL}-${OER_R}/defconfig
schroot -c ${DIST} -u voodoo -- tar -xf /mnt/debian/${KERNEL}.tar.gz -C /mnt/debian
mkdir -p /mnt/debian/${KERNEL}
cd /mnt/debian/${KERNEL}
schroot -c ${DIST} -u voodoo -- patch -p1 < /mnt/debian/${KERNEL}-${OER_R}.diff
schroot -c ${DIST} -u voodoo -- make CROSS_COMPILE= distclean
schroot -c ${DIST} -u voodoo -- cp /mnt/debian/defconfig .config
cd /
schroot -c ${DIST} -u voodoo -- sudo patch -N -p1 < /mnt/debian/firmware-dir-fix.diff
schroot -c ${DIST} -u voodoo -- sudo patch -N -p1 < /mnt/debian/maintainer.diff
cd /mnt/debian/${KERNEL}
schroot -c ${DIST} -u voodoo -- make-kpkg --cross_compile - clean
time schroot -c ${DIST} -u voodoo -- fakeroot make-kpkg --append-to-version=-${OER_R} --revision=${BUILDREV}${DISTRO} --cross_compile - kernel_image kernel_headers
cd ..
schroot -c ${DIST} -u voodoo -- ls

cp /mnt/drive/chroot/${DIST}/mnt/debian/linux-image${FINAL_KER}.deb /mnt/debian/
curl --ftp-create-dirs -T linux-image${FINAL_KER}.deb -u ${BACKFTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
curl --ftp-create-dirs -T linux-image${FINAL_KER}.deb -u ${FTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
schroot -c ${DIST} -u voodoo -- rm linux-image${FINAL_KER}.deb
rm linux-image${FINAL_KER}.deb

cp /mnt/drive/chroot/${DIST}/mnt/debian/linux-headers${FINAL_KER}.deb /mnt/debian/
curl --ftp-create-dirs -T linux-headers${FINAL_KER}.deb -u ${BACKFTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
curl --ftp-create-dirs -T linux-headers${FINAL_KER}.deb -u ${FTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
schroot -c ${DIST} -u voodoo -- rm linux-headers${FINAL_KER}.deb
rm linux-headers${FINAL_KER}.deb

cp /mnt/drive/chroot/${DIST}/mnt/debian/${KERNEL}-${OER_R}.diff /mnt/debian/
curl --ftp-create-dirs -T ${KERNEL}-${OER_R}.diff -u ${BACKFTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
curl --ftp-create-dirs -T ${KERNEL}-${OER_R}.diff -u ${FTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
schroot -c ${DIST} -u voodoo -- rm ${KERNEL}-${OER_R}.diff
rm ${KERNEL}-${OER_R}.diff

cp /mnt/drive/chroot/${DIST}/mnt/debian/defconfig /mnt/debian/
curl --ftp-create-dirs -T defconfig -u ${BACKFTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
curl --ftp-create-dirs -T defconfig -u ${FTPUSER}${DISTRO}/${KERNEL}-${OER_R}/
schroot -c ${DIST} -u voodoo -- rm defconfig
rm defconfig

schroot -c ${DIST} -u voodoo -- rm -rfd ${KERNEL}
schroot -c ${DIST} -u voodoo -- rm ${KERNEL}.tar.gz
rm ${KERNEL}.tar.gz
rm -rfd  ${KERNEL}
echo "date"

Which is 'WAY' to over complicated for this wiki....

4. The configuration for the kernel image...

Right now the only link is: I haven't really moved beyond that, since my cable modem upload is so slow, (there goes hosting from and it would take too long to upload to --RobertCNelson 22:28, 12 January 2009 (UTC)

Thanks for the response

I understand what it is to want eyeballs to check your setup, hence why I posted. My biggest issue is needing to add some missing modules to the kernel (specifically the evtouch drivers for USB touchscreens) - hence why I needed an easy way to rebuild the kernel. I've fought with trying to get Openembedded to build, but for some reason the latest Bitbake is broken on my Debian Lenny workstation, and I've had zero luck getting anybody to give me the magic key to work through it, hence why I am trying Debian instead.

I've tried pulling the latest mainline kernel, but its build is also broken. (sigh). David Hagood 17:25, 13 January 2009 (UTC)