Linux kernel for IFC6410

Build device tree kernel

Kernel versions from v3.14 and above only support device trees, so to build a full booting kernel image you should build both zImage and dtbs. DTB should be appended to zImage for systems where the bootloader can not be updated to support new device tree protocol, such as on IFC6410.

Kernel should be build with CONFIG_ARM_APPENDED_DTB option to append DTB to zImage. Finally to generate a zImage with dtb appended:

cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb > zImage-dtb

From v3.17-rc7 there is a change in the way the kernel is prepared to boot on IFC6410.

The issue is that bootloaders on the IFC6410 use ATAGS to pass the memory information as we use CONFIG_ARM_ATAG_DTB_COMPAT config in kernel this option will extract the memory information from the ATAG list and store it at run time into the appended DTB.

But the LK booloader in this case passes a *incorrect* memory address for some reason, and the way it was fixed prior to this release is by adding some code in startup which will go and fix this before the kernel realizes it. This is kind of hack and we dont want to maintain such a code in future.

In the new method we prepend a binary blob before the kernel, and the responsibility of this binary blob is to fixup the wrong ATAGS. Qualcomm and Sony people are following this approch so I wanted it to be inline with them. So I added three new files in our kernel tree (https://git.linaro.org/?p=landing-teams/working/qualcomm/kernel.git;a=shortlog;h=refs/heads/integration-linux-qcomlt)namely fixup.bin, fixup.txt fixup.S

So to prepare a kernel just prepend fixup.bin to zImage.

cat fixup.bin arch/arm/boot/zImage
arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb  > zImage-dtb

Other important change in v3.14+ kernels is that the serial device node name is changed from ttyHSL to ttyMSM.

Boot custom kernel

To boot a custom zImage without flashing, you need to specify the following load address:

sudo fastboot boot -b 0x80200000 zImage

And if you want to change the bootargs, e.g. to mount rootfs on the userdata partition:

sudo fastboot boot -c "earlyprintk=serial,ttyHSL0,115200,n8 console=ttyHSL0,115200,n8 root=/dev/mmcblk0p13 rootwait rw" -b 0x80200000 zImage

Boards/IFC6410/LinuxKernel (last modified 2014-10-02 10:06:43)