Setting up basic build environment:
There is a nice package, called "build-essential", by installing which you should have all the tools needed to compile and packed applications/kernels from their respective sources:sudo apt-get install build-essential libncurses5-dev(You would want to have libncurses5-dev - without it, you would be unable to run "menuconfig".)
If that didn't work, use this:
sudo apt-get install gcc g++ make libncurses5-dev
Building your kernel: (with enabled WiFi, Bluetooth, etc)
There are very nice tutorials provided by armin76 about installing and configuring Gentoo Linux on Pandaboard. (http://dev.gentoo.org/~armin76/arm/pandaboard/) They had really helped me.
We will use the kernel source of Ubuntu Precise (we obviously want hard float).
(Run everything in this paragraph as a normal user - non-root. Don't use su.)
Step-by-step process: (Skip it, if you just want to build the kernel, without running menuconfig.)
1) Download the kernel source:KERNELVERSION="3.2.0-1416.22"
cd2) Extract:
wget --no-check-certificate wget --no-check-certificate https://launchpad.net/ubuntu/precise/+source/linux-ti-omap4/$KERNELVERSION/+files/linux-ti-omap4_$KERNELVERSION.tar.gz
tar zxvf linux-ti-omap4_$KERNELVERSION.tar.gz3) Change to ubuntu-precise directory:
cd ubuntu-precise4) Download a nice .config, provided again by armin76.
wget http://dev.gentoo.org/~armin76/arm/pandaboard/kconfig -O .config5) Solve annoying CONFIG_SCSI_WAIT_SCAN=m "damn persistent module" problem (will set it as built-in - will explain why we want this):
sed -i 's/default m/default y/g' drivers/scsi/Kconfig6) Force the kernel to built no modules (not even that scsi_wait_scan.ko module):
sed -i 's/=m/=y/g' .configSo, why do we need this ? Well, having no modules around makes the installation process hell like easy. More importantly, however, as reported by a number of users, is that you need to have modules built into your kernel or use initrd to have a normal booting procedure. (http://groups.google.com/group/pandaboard/browse_thread/thread/236f7df1572fc6d5 - post by Pavol Cupka)
(By the way, the kernel that armin76 provides didn't boot for me on Debian - waited 15 mins - no login, no read/write activity. In fact it happened on Angstrom also. The reason, I think, is that it fails to find a number of modules and stops booting. My usb keyboard + mouse were completely unresponsive. But then it works just fine on Gentoo ... I don't get it.)
7) Edit your kernel configuration (optional):
make menuconfig(Make sure NOT to disable debug in display section. My picture was a mess after I disabled it.)
8) Build you kernel:
make -j2 ARCH=arm uImageThis will take a while. Find something to do for an hour or so. (Depends on your card speed.) After that you will get your uImage file (this is our new kernel).
Single-step process: (No menuconfig - will just build the kernel.)
Run this:and you should get your uImage.KERNELVERSION="3.2.0-1416.22"wget --no-check-certificate https://launchpad.net/ubuntu/precise/+source/linux-ti-omap4/$KERNELVERSION/+files/linux-ti-omap4_$KERNELVERSION.tar.gz && tar zxvf linux-ti-omap4_$KERNELVERSION.tar.gz && cd ubuntu-precise && wget http://dev.gentoo.org/~armin76/arm/pandaboard/kconfig -O .config && sed -i 's/default m/default y/g' drivers/scsi/Kconfig && sed -i 's/=m/=y/g' .config && make -j2 ARCH=arm uImage
Installing your kernel:
sudo mv -f /boot/uboot/MLO /boot/uboot/u-boot.img /boot/uboot/zImage /boot/uboot/initrd.img /boot/uboot/uEnv.txt /boot/uboot/SOC.sh /boot/uboot/backup2) Restore MLO and u-boot.img:
sudo cp -f /boot/uboot/backup/MLO /boot/uboot/backup/u-boot.img /boot/uboot3) Install your new kernel (make sure you are in ubuntu-precise directory):
sudo cp -f arch/arm/boot/uImage /boot/uboot4) Just reboot the system:
sudo rebootNOTE: It could take 2 - 4 minutes before you get to the login screen with the new kernel. During this time, you may or may not have video signal. If you have a signal, you will most likely see only 2 penguins on a black background, with no other output.
My comments about my new kernel:
- Boot time with this kernel (from cold to login screen): 2 - 4 minutes
- HDMI out: yes, 1080p - default, but can change if you disconnect and then reconnect the cable or change the source from your TV (tested with fbdev video driver). Ony one resolution is available.
- DVI out: not tested
- Bluetooth: not tested
- Wifi: Works
- Ethernet: Not tested, should work
- SGX drivers: Work, but with issues, more to come ...
- Audio: Not tested
- CPU frequency scaling: Not tested
After running menuconfig to disable some unnecessary wireless drivers, I got following message:
ReplyDeletewarning: (VIDEO_OMAP2_VOUT && DRM_OMAP) selects OMAP2_DSS which has unmet direct dependencies (HAS_IOMEM && ARCH_OMAP2PLUS)
Can I ignore this warning, or did I maybe break something in menuconfig?
Sorry for the late replay ... A video output related warning - I don't think you should ignore it. But I can't say for sure, because I will need to compile the kernel again to see for myself
ReplyDeleteAwesome tutorial! Thanks!
ReplyDeleteHaha, glad you found it useful :) Too bad I couldn't finish the graphics part ...
Deletegreat work i really like this more than ubuntu..is faster
ReplyDeleteSame, I love Debian speed. I wonder what the latest kernel is like though ...
Delete