ARM – Odroid U3 Kernel Compilation..
This is a workflow for compilation of a kernel + device tree for the Odroid U3. There are other ways of doing this, but this one works, for me..
Compilation works fine on the device itself, so no need for cross-compilations..
This is for a device with root filesystem and boot partition on one SDcard..
Source from: https://github.com/tobiasjakobi/linux-odroid/tree/odroid-3.19.y
# git clone -b odroid-3.19.y --single-branch https://github.com/tobiasjakobi/linux-odroid
then:
# make exynos4412_defconfig (to get the base config...) << Updated March 3, 2015 - exynos4412_odroid_defconfig was only included with 3.19-rc7 source >>
# make xconfig... (make any changes, to add selinux, remove debugging, etc. if needed..)
# make zImage
# make dtbs
# rm -f /boot/uboot/zImage_old
# mv /boot/uboot/zImage /boot/uboot/zImage_old (save the previous kernel version, just in case..)
# cp arch/arm/boot/zImage /boot/uboot/zImage
# cp arch/arm/boot/zImage /boot/uboot/zImagep arch/arm/boot/dts/exynos4412-odroidu3.dtb /boot/uboot
# make modules
# make modules_install
# make firmware_install (if required..)
cp .config /home/<username>/kernel-config-319rc7 (if you want to save the config)
cp System.map /boot
Then reboot the device, with USB console connected (using putty or equivalent)
Uboot commands:
setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" setenv fb_x_res "1920" setenv fb_y_res "1080" setenv hdmi_phy_res "1080" setenv bootargs "console=tty1 console=ttySAC1,115200n8 fb_x_res=${fb_x_res} fb_y_res=${fb_y_res} hdmi_phy_res=${hdmi_phy_res} root=/dev/mmcblk0p3 rootfs=ext4 rootwait rw mem=2047M" setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x41f00000 exynos4412-odroidu3.dtb; bootz 0x40008000 - 0x41f00000" saveenv (only needed once, to save any changes) ...... boot
If all goes well:
.......... Kernel 3.19.0-rc7 on an armv7l (ttySAC1) [root@rgodroid ~]# uname -a Linux rgodroid 3.19.0-rc7 #2 SMP PREEMPT Wed Feb 4 19:47:36 EST 2015 armv7l armv7l armv7l GNU/Linux
Robert Gadsdon. February 8, 2014
Do we have to use USB console? Can’t we just use uboot config file?
Yes, you could, but I found it easier to just put the commands directly into UBoot once, and then save them ( saveenv )..
RG.
Do you know where i can get the configuration file? exynos4412_odroid_defconfig
I just checked, and the exynos4412_odroid_defconfig file was in the 3.19-rc7 tree at https://github.com/tobiasjakobi/linux-odroid, but is not in later trees.. I will alter the instructions to reflect this, and just refer to exynos_defconfig..
Thanks..
RG.
To boot kernel 3.19 or 4.x series on Odroid, is required a custom compile of uboot (from uboot git), or we can use the official release?
I used the custom UBoot from: https://github.com/tobiasjakobi/u-boot because I needed support for the cooling fan, which not all U3s have.. I had done this before I upgraded to 3.19, so am not sure whether the standard Hardernel UBoot would have supported device tree etc..
If you use the custom UBoot, you will need to read the odroid-specific instructions in the ../doc directory, as you need to copy a binary file from the ‘official’ Hardkernel UBoot tree..
RG