Talk:BeagleBoardDebian

There are a couple of problems with the instructions:

David Hagood 19:18, 12 January 2009 (UTC)
 * 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.

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..)

2. CROSS_COMPILE=

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 http://www.rcn-ee.com/deb/kernel/changes.txt (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 - http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&id=59251a6dc6e2a75fd5306ae47f5db68c62b965eb - fix usb RX TX bug -- Robert Nelson gmail com> Mon Jan 12 08:41:38 CST 2009

From: http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&id=59251a6dc6e2a75fd5306ae47f5db68c62b965eb

We see we are using git: 2a3408be17f287fdb5809c9b6c68e7ad96d25b74 of 2.6.27

So from: git://git2.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git

COMMIT=2a3408b KERNEL=v2.6.27-2a3408b 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: http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&id=59251a6dc6e2a75fd5306ae47f5db68c62b965eb (linux-omap_2.6.27.bb)) 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: http://rcn-ee.homeip.net:81/dl/omap/beagle/

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" 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/ http://192.168.1.95:81/dl/omap/beagle/${KERNEL}.tar.gz schroot -c ${DIST} -u voodoo -- wget --directory-prefix=/mnt/debian/ http://192.168.1.95:81/dl/omap/beagle/${KERNEL}-${OER_R}/${KERNEL}-${OER_R}.diff rm ${KERNEL}-${OER_R}/${KERNEL}-${OER_R}.diff wget --directory-prefix=/mnt/debian/ http://192.168.1.95:81/dl/omap/beagle/${KERNEL}-${OER_R}/${KERNEL}-${OER_R}.diff schroot -c ${DIST} -u voodoo -- wget --directory-prefix=/mnt/debian/ http://192.168.1.95:81/dl/omap/beagle/${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} ftp://192.168.1.95/deb/kernel/beagle/${DISTRO}/${KERNEL}-${OER_R}/ curl --ftp-create-dirs -T linux-image${FINAL_KER}.deb -u ${FTPUSER} ftp://www.rcn-ee.com/deb/kernel/beagle/${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} ftp://192.168.1.95/deb/kernel/beagle/${DISTRO}/${KERNEL}-${OER_R}/ curl --ftp-create-dirs -T linux-headers${FINAL_KER}.deb -u ${FTPUSER} ftp://www.rcn-ee.com/deb/kernel/beagle/${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} ftp://192.168.1.95/deb/kernel/beagle/${DISTRO}/${KERNEL}-${OER_R}/ curl --ftp-create-dirs -T ${KERNEL}-${OER_R}.diff -u ${FTPUSER} ftp://www.rcn-ee.com/deb/kernel/beagle/${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} ftp://192.168.1.95/deb/kernel/beagle/${DISTRO}/${KERNEL}-${OER_R}/ curl --ftp-create-dirs -T defconfig -u ${FTPUSER} ftp://www.rcn-ee.com/deb/kernel/beagle/${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" date
 * 1) !/bin/sh

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

4. The configuration for the kernel image...

Right now the only link is: http://www.rcn-ee.com/deb/kernel/changes.txt I haven't really moved beyond that, since my cable modem upload is so slow, (there goes hosting from rcn-ee.homeip.net) and it would take too long to upload to rcn-ee.com --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)

Possible Patch
Hi David, I wasn't quite sure what module you needed to build, so I enabled all, as a test here is a cross compile'd uImage. Let me know if it works, if it does I'll change it to 'module' instead of built-in run a 'oer12.1' build across all distro's, have you test that and then email koen with the diff.

wget http://www.rcn-ee.com/deb/kernel/CC-v2.6.27-2a3408b-oer12 (rename as uImage)

Patch attempted:

--- /home/voodoo/work/work-ti/scripts/dl/defconfig	2009-01-12 08:50:01.000000000 -0600 +++ di-defconfig	2009-01-13 13:00:39.000000000 -0600 @@ -1,7 +1,7 @@ #  # Automatically generated make config: don't edit -# Linux kernel version: 2.6.27-omap1 -# Sun Jan 11 11:22:58 2009 +# Linux kernel version: 2.6.27 +# Tue Jan 13 13:00:39 2009 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -808,8 +808,40 @@ # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_MOUSE_GPIO is not set # CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=y +CONFIG_TABLET_USB_AIPTEK=y +CONFIG_TABLET_USB_GTCO=y +CONFIG_TABLET_USB_KBTAB=y +CONFIG_TABLET_USB_WACOM=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_TSC2005 is not set +# CONFIG_TOUCHSCREEN_TSC2102 is not set +# CONFIG_TOUCHSCREEN_TSC210X is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_TOUCHSCREEN_USB_COMPOSITE=y +CONFIG_TOUCHSCREEN_USB_EGALAX=y +CONFIG_TOUCHSCREEN_USB_PANJIT=y +CONFIG_TOUCHSCREEN_USB_3M=y +CONFIG_TOUCHSCREEN_USB_ITM=y +CONFIG_TOUCHSCREEN_USB_ETURBO=y +CONFIG_TOUCHSCREEN_USB_GUNZE=y +CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y +CONFIG_TOUCHSCREEN_USB_IRTOUCH=y +CONFIG_TOUCHSCREEN_USB_IDEALTEK=y +CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y +CONFIG_TOUCHSCREEN_USB_GOTOP=y +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set # CONFIG_INPUT_MISC is not set #

Well, it worked sort of..
It is working and booting, but for some reason the usbtouchscreen driver is not creating a device node (it is indeed seeing the hardware now).

I hate to bloat the kernel with things that aren't of general interest - how hard would it be to make a set of modules for things like this as a package separate but linked to the kernel package?

(addendum: the error seems to be the usbtouchscreen driver is hitting the hardware too quickly when it is in the kernel vs. being a module (the error I am seeing is ENODEV when the system tries to talk to it, so I'm guessing there needs to be a delay on the usbtouchscreen driver)).

David Hagood 19:46, 13 January 2009 (UTC)

Building...
I've got a 2.6.27-oer12.1 queued up, setting the devices to load as modules, just waiting for the build system to catch up. Turned out 2.6.27-oer12 with usb fix, didn't really fix the usb, downloading thru usb adapter to usb harddrive hard locked the builder while i was at work. So it's catching up to yesterday, and I moved it to a 2.6.28 final build.

--RobertCNelson 15:04, 14 January 2009 (UTC)

Thanks for the help, and more on usbtouchscreen
Thank you for your help in this - I greatly appreciate it. I've pulled the kernel + patches from your server and built it here, and was able to confirm there is a bug in the "usbtouchscreen" driver that causes it to fail if it is already loaded when the hardware is detected (bug report submitted to the kernel bugzilla). I can continue my testing with the driver as a module, so you've really helped me out. David Hagood 16:33, 14 January 2009 (UTC)

Failing "PC: Running Debian in QEMU (Optional)"
I followed your guide for a net install (thanks a lot for it btw) and ran into problems when trying to boot it from my pc. I got: List of all partitions: No filesystem could mount root, tried: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

The beagle could boot fine though so I knew it was around and working.

I tried a whole lot of things, not having any real experience with QEMU and what ended up being the trick was to copy initrd.img and the kernel from my SD card and use them when booting. Not sure the kernel mattered but guess it was the initrd that did. Then when doing:

qemu-system-arm -boot c -M versatileab -initrd initrd.img -kernel vmlinuz-2.6.26-1-versatile -m 256 -hda /dev/sdb -append "root=/dev/sda2 mem=256M"

It worked just fine. I don't know if I did something whacky (trying to use the initrd from installation only put me back in install mode) or if this is something you might want to add to the guide.

Reply: Failing "PC: Running Debian in QEMU (Optional)"
Not 100% sure what your trying to do. If you are trying to just run debian from qemu, otherwise that error occurs when your bootargs differ from your partitions setup. "rootfstype=ext3" can only mount ext3, and "rootfstype=ext2" can only mount ext2 etc..

This will allow you to install debian onto a mounted mmc card: sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-1-versatile -initrd initrd.gz -m 256 -hda /dev/sdX -append "root=/dev/ram mem=256M"

This will then allow you to 'run' your installed debian system from the mounted mmc card... sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-1-versatile -m 256 -hda /dev/sdX -append "root=/dev/sda2 mem=256M"

You'll need these to files, along with qemu.. It's really not recommend since it is very slow, even on a fast pc.. wget ftp://ftp.us.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/initrd.gz wget ftp://ftp.us.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/vmlinuz-2.6.26-1-versatile

You can read more here: http://www.aurel32.net/info/debian_arm_qemu.php

--RobertCNelson 22:43, 8 February 2009 (UTC)