AnsweredAssumed Answered

Booting Linux from a custom bootloader on IMX6DL

Question asked by Gennadiy Kiryukhin on Sep 1, 2017
Latest reply on Sep 3, 2017 by JayTu

Hello,

I'm working on a custom bootloader for Linux. The final product will not have any common data interfaces like a network, an SD card, USB. The firmware update will be loaded though custom communication channel and because of that my bootloader will have a custom firmware update process.

 

I've implemented my own programmer tool that boots from SD card and writes the included Kernel, device tree, and RootFS to an SPI flash. It works with no problems.

The kernel image and the device tree in my test load fine when loaded by u-boot on imx6dl-sdb board.

 

My bootloader is loaded at 0x11000000. If no updates are present in flash, the bootloader reads SPI flash and loads the kernel at address 0x12000000 and the device tree at 0x18000000. I've added a simple checksum calculation once the images are in RAM and the checksums match the original files so that data appears to be intact.

After the images are loaded I branch of to kernel using:

typedef void (*theKernel)(int zero, int arch, uint32_t params);
#define KERNEL_ADDR 0x12000000 // zImage
#define DEVTREE_ADDR 0x18000000 // .dtb

((theKernel) KERNEL_ADDR) (0, 0, DEVTREE_ADDR);

Nothing happens after the call.

I've tried appending the device tree to the kernel image (with the proper options enabled in the kernel configuration) and create a tag structure in memory to boot the old fashion way with the same results. I've added instruction cache invalidation commands before the call with no improvements.  I've added bootargs = "console=ttymxc0,115200 nosmp root=/dev/mmcblk2p2 rootwait rw"; to the device tree ... still nothing.

I known that u-boot may update some records in the device tree such as memory to set the proper memory size and location. In my case the memory parameters are already set in the device tree.

 

Are there any special configurations steps required for the kernel start loading and printing messages in the terminal?

 

Thank you in advance.

Outcomes