The default precompiled kernel available for Odroid U2/U3, which comes from Hardkernel's 3.8.y tree, might not include some of the important, to us, features. Of course Hardkernel's sources are Open Sourced, which means you are free to go with its customization.

In this short post I'll present a tut on compiling a custom, 3.8.y kernel, for Odroid U2/U3 from Hardkernel's official sources. Also, please note that most of the commands are meant to be executed on your local machine (hopefully you are running Linux Fedora >=20 or equivalent), because kernel itself, in a help of Cross Compile toolchain (from this repository), will be build there (not directly on Odroid but that is ofc possible too).


$ - command ran as regular user,
# - command ran as root.

1) Get Hardkernel's 3.8.y sources.

$ git clone https://github.com/hardkernel/linux.git -b odroid-3.8.y

2) Install Cross Compile toolchain from an external repository. For Fedora "20" execute:

# curl -L -o /etc/yum.repos.d/gnueabi-toolchain-fedora-20.repo http://goo.gl/VfZeXV 
# yum install -y arm-linux-gnueabi-{binutils,gcc,glibc}

3) Export vars & prepare your kernel's config using make menuconfig (use equivalent if needed). Customize CORES variable, to reflect how many of them does your CPU have (potentially this can nicely reduce kernel's compilation time).

$ export CORES=4
$ export LOADADDR=40008000
$ export ARCH=arm
$ export CROSS_COMPILE=${CROSS_COMPILE:-arm-linux-gnueabi-}
$ cd kernel/
$ make odroidu_defconfig
$ make menuconfig

4) After config's customization start the cross compilation. Notice that we will build uImage & (legacy) zImage.

$ make -j${CORES} uImage zImage modules
$ mkdir modules
$ make modules_install INSTALL_MOD_PATH="modules/"

5) Pack kernel's modules, and then copy it to your Odroid along with kernel image.

$ tar -cf modules.tar modules/
$ tar -cf img.tar arch/arm/boot/{z,u}Image
$ scp modules.tar [email protected]
$ scp img.tar [email protected]

6) On Odroid now, unpack modules & imgs. I assume that your kernel images are located in /boot/uboot/.

$ tar -xf modules.tar
$ tar -xf img.tar
# mv modules/lib/modules/* /lib/modules/
# mkdir /boot/backup_imgs
# cp /boot/uboot/*image /boot/backup_imgs/
# mv arch/arm/boot/* /boot/uboot/

Note, that by default Fedora 20 image for Odroid U2/U3 is running from zImage, but if I remember correclty, the latest avail Ubuntu is booting from uImage instead. Having a quick look at boot.{txt,scr} should give you the right answer, which one it is.

Currently unrated


There are currently no comments

New Comment


required (not published)