Novena/Dual Core

From Studio Kousagi Wiki
Revision as of 04:55, 25 February 2014 by Bunnie (talk | contribs) (U-boot)
Jump to: navigation, search

Kernel

Currently, the kernel code for the dual core system is identical to the quad-core. The configuration for a particular core is done using device tree hacks.

The key statement to swap out is in the DTS file, change the line that says

#include "imx6q.dtsi"

to

#include "imx6dl.dtsi"

The other key change is, as noted below, the kernel must have the flag turned on to search for a DTS appended to a zImage.

U-boot

The i.MX6-DL chip that Novena works with only has 96kiB of internal SRAM available for u-boot.

This is very tricky, as it means we can't fit a proper u-boot that can read a full filesystem.

The current u-boot configured for the DL, as an interim solution, can read a zImage with DTS file concatenated to the end of it from a hard-coded offset off of the top of the boot media.

TODO: As of writing, there is one copy of a u-boot that works on the DL and we haven't checked it into git. We should really, really do that and put a link to it here. Bad bunnie, bad bad bunnie!

As a result, to initialize a blank media, you should place the u-boot and construct the kernel as follows:

dd if=u-boot.imx of=/dev/sdX seek=2  # place the u-boot at offset 0x400 == sector 0x2
cd arch/arm/boot
cat zImage dts/your-imx6dl.dtb > zImage.dl  # create a zImage + DTS combo file, kernel must be configured to support this
dd if=zImage.dl of=/dev/sdX seek=256 # place kernel at offset 0x20000 == sector 0x100

The u-boot is hard coded to suck in 0x8000 sectors of data (make sure your kernel is smaller than 0x8000 * 0x200 bytes in size) to offset 0x10008000 in RAM, and then jump to whatever is there (hopefully it's the zImage but you can replace it with other things for diagnostic purposes if you need to).