Difference between revisions of "Talk:BeagleBoardDebian"

From eLinux.org
Jump to: navigation, search
m (Well, it worked sort of..)
(Thanks for the help, and more on usbtouchscreen)
Line 225: Line 225:
--[[User:RobertCNelson|RobertCNelson]] 15:04, 14 January 2009 (UTC)
--[[User:RobertCNelson|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. [[User:David Hagood|David Hagood]] 16:33, 14 January 2009 (UTC)

Revision as of 16:33, 14 January 2009

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 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 <robertcnelson+deb<at>gmail<dot>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


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"
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} 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}${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}${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}${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"

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
@@ -808,8 +808,40 @@
 # CONFIG_MOUSE_GPIO is not set
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_TSC2102 is not set
+# CONFIG_TOUCHSCREEN_UCB1400 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)


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)