Trying to boot custom kernel on Wink Hub (i.MX28)

Fabio Estevam festevam at gmail.com
Fri Jun 23 00:43:19 CEST 2023


Hi Rogan,

On Thu, Jun 22, 2023 at 7:09 PM Rogan Dawes <rogan at dawes.za.net> wrote:
>
> I tried to follow your suggestion, but so far I have been unsuccessful.
>
> I cloned Linus' latest source code, and then did:
>
> make ARCH=arm mxs_defconfig
> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
> cat arch/arm/boot/zImage ./arch/arm/boot/dts/imx28-evk.dtb > arch/arm/boot/zImage_with_dtb

Do you have access to the Wink Hub v1 board schematics? What about the
original U-Boot and kernel source?

You are using imx28-evk.dtb here, but not sure if the console pins are
the same for the two boards.

It is better to create a minimal devicetree specific for Wink Hub v1.
To start with, you can only describe the duart node there.

> cd arch/arm/boot
> mkimage -T kernel -A arm -O linux -a 0x40008000 -e 0x40008000 -C none -d ./zImage_with_dtb uImage_with_dtb
>
> then copied onto the Wink hub and did:
>
> flash_erase /dev/mtd4 0 0
> nandwrite -p -m /dev/mtd4 uImage_with_dtb
> reboot
>
> I then interrupted u-boot, and had to update the number of bytes read from the mtd4 partition (was 0x00400000, now 0x00600000), as the new kernel was about 4 times larger than the vendor kernel, and I was getting checksum errors due to only partial read of the image.
>
> setenv app_boot 'run appboot_args && nand read ${loadaddr} app-kernel 0x00600000 && bootm ${loadaddr}'
> run app_boot
>
> NAND read: device 0 offset 0x2b00000, size 0x600000
>  6291456 bytes read: OK
> ## Booting kernel from Legacy Image at 42000000 ...
>    Image Name:
>    Created:      2023-06-22  21:37:11 UTC
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    6279041 Bytes = 6 MiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
>
> Starting kernel ...
>
> And it stopped there after dumping some garbage to the screen.

You should also pass the kernel command line: console=ttyAMA0,115200n8

As far as I recall, the 2.6.35 kernel used a different console device.

Can you share the U-Boot log of the board booting the 2.6.35 kernel?

> I did note that the mxs_defconfig did not define the appended DTB config, so I updated my .config as follows:
>
> $ grep DTB .config
> CONFIG_ARM_APPENDED_DTB=y
> CONFIG_ARM_ATAG_DTB_COMPAT=y
> CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
> # CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set

One thing you could also try is to load U-Boot via USB using this tool:
https://source.denx.de/denx/mxsldr

To build U-Boot for mx28, please check:

https://source.denx.de/u-boot/u-boot/-/blob/master/doc/imx/common/mxs.txt


More information about the U-Boot mailing list