Now that I finally have some rudimentary competence in creating Yocto recipes for an i.MX6 system, it's time to get the kernel ready for our custom board.
First problem is that the source code kicked out by the IOMux tool (the tool the HW designers use to make pin assignments) bears no resemblance whatsoever to the extant code in the kernel (or U-Boot, apparently). It looks like I can translate it by hand, however. (Actually, now that I think about it, I might even be able to auto-translate it. Hmm; must look into that...)
...Where was I? Oh, yes. I've been following the directions in the "i.MX 6Solo/6DualLite BSP Porting Guide." I've successfully cloned an existing U-Boot config, which will become the config for our board. So that's building and running. Things go pear-shaped, however, when I try to assign a new MACH_TYPE value. The BSP Porting Guide says:
The first board dependent function inside init_sequence array is board_init(). board_init() is implemented inside board/freescale/mx6_<custom board name>.c. At this point the most important tip is the following line of code:
gd->bd->bi_arch_number = MACH_TYPE_MX6_<reference board name>; /* board id for Linux */
To customize your board ID, go to the registration process at http://www.arm.linux.org.uk/developer/machines/
I temporarily created a new MACH_TYPE definition out of thin air, giving it the value 8192 (well out of the way of all other existing values).
The moment I do this, the kernel fails to boot. U-Boot loads it and decompress it but, after that, nothing.
The BSP Porting Guide discusses cloning configs for U-Boot, but is less than forthcoming on how to create custom Linux board configs (and no, I've never done this before). Further, the defconfig files found in FSL's Yocto recipes are somewhat confusing. For example, the defconfig for the 'imx6dlsabresd' board contains the following entries:
This basically invokes four different board definitions in the kernel build (board-mx6q_arm2.c, board-mx6q_sabrelite.c, board-mx6q_sabresd.c, board-mx6q_sabreauto.c). As such, it's unclear which one I should be cloning for our board. My attempts so far have been unsuccessful.
Can anyone point me as some resources that will help me create a custom Linux board config?