This documents how I compiled a more recent kernel for the ODROID-XU. The good news is the hardware is pretty fast, and it doesn’t take long to compile a kernel. The bad news is it doesn’t boot with the new kernel, and because of the complete lack of debuggability, it’s impossible to find out why.
I first checked out the hardkernel git repository’s 3.11-rc7 branch. Some explanation: The upstream Linux kernel doesn’t have support for the Exynos 5410 SoC, nor for many of the peripherals on this system, and so hardkernel (the makers of ODROID) maintain a set of patches on top of the upstream kernel which they rebase periodically. In this case there are approximately 60 extra patches on top of the upstream 3.11-rc7 kernel, starting with this patch to add basic support for the 5410 and continuing by adding more and more peripheral support.
(Note that this 3.11-rc7 branch is still missing support for important features like USB 3.0 and the GPU. Also this kernel is still using the ARM big.LITTLE switcher hack so still no KVM for you. YMMV)
After checking this out (on the ODROID) I did:
make odroidxu_defconfig make menuconfig
You can then build the kernel in the usual way:
Then install the modules (in this case to
sudo make modules_install sync
And make an initramfs:
mkinitrd ./initrd-3.11.0-rc7 3.11.0-rc7-66032-g4521a9d mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d initrd-3.11.0-rc7 uInitrd
Finally we can install the kernel and initrd into
/boot/uboot (the u-boot directory). But save a backup of the old kernel and initrd first. The following commands are run as root:
mv /boot/uboot/zImage /boot/uboot/zImage-official3.4.5 mv /boot/uboot/uInitrd /boot/uboot/uInitrd-official3.4.5 cp arch/arm/boot/zImage /boot/uboot/ cp uInitrd /boot/uboot/ sync
This is what the
/boot/uboot directory ends up looking like for me:
-rwxr-xr-x 1 root root 5510 Sep 27 03:14 boot.ini -rwxr-xr-x 1 root root 293168 Sep 27 03:14 u-boot.bin -rwxr-xr-x 1 root root 8104359 Nov 8 07:29 uInitrd -rwxr-xr-x 1 root root 6518598 Sep 27 03:14 uInitrd-official3.4.5 -rwxr-xr-x 1 root root 2113424 Nov 8 07:29 zImage -rwxr-xr-x 1 root root 5127832 Sep 27 03:13 zImage-official3.4.5
Note that the u-boot configuration shouldn’t need to be modified, and in any case the configuration is signed by hardkernel so it cannot be modified (GRRRRRR, another reason to hate this hardware).
And now reboot and hope for the best. If it doesn’t come up, then you have to pull the SD card, plug it into a real computer, and switch back to the
*-official* files that you backed up above. As discussed before there is no serial port or monitor, so these failures are not debuggable.