Replace kernel with linux-toradex-mainline_4.14.bb for apalis t30

Dear Toradex,

I have seen that there is a recipe for a mainline kernel version 4.14 compatible with a machine apalis-t30-mainline. I have fumbled around in build/conf/local.conf, meta-toradex-tegra/conf/machine/apalis-t30.conf and then used

bitbake -c devshell virtual/kernel

to get a compiled uImage. I only got to the point where “starting kernel” is the last message over serial console and a black screnn over HDMI. I think that somehing has gone wrong somewhere. I also load over TFTP which adds some complexity sometimes.

What would be a normal procedure to replace the kernel compatible with apalis-t30-mainline instead of the apalis-t30? Are there any changes in u-boot necessary?

kind regards

Hi.

Are the device trees for the mainline or the old kernel?

I had the same issue in Apalis iMX6 which I solved by compiling the device trees in the kernel you want to run

Maybe that is my problem. I used the devshell for the config, and then compiled the kernel with bitbake virtual/kernel. How would you compile the device tree with bitbake?

just found hints pointing to

$ bitbake -f -c deploy

so would
$ bitbake virtual/kernel -f -c deploy
work?

The compilation of the kernel through bitbake should compile the device trees as well. The question is: Did you load those packed with the uImage or did u just update the uImage?

EDIT: Maybe for bitbake to output the device trees you might need to compile an image that uses that kernel (at least that is the solution I used so far, probably there is an easier solution).

hi

as Joao, the mainline kernel is using device tree files and downstream is not using any.
At the moment, we are not providing at the moment mainline bsp images, but this is planned for future. We did some tests with the mainline kernel and it was working on apalis-t30.

Dear Mr. Singh,

Thank you for the information.

I have first tried to follow this thread but I didn’t get further than “starting kernel”. so I thought to give this recipe a try:
linux-toradex-mainline_4.14.bb
I got to the same point but I am not convinced that I did everything right. i was more or less guessing how to get virtual/kernel recipe to compile the kernel for apalis-t30-mainline

I need to mention, that I am trying to boot the uImage I get from tftp / nfs. at least with that I have some experience as I have done so successfully with a mainline kernel on a colibri t30.

so maybe you can confirm the following:

  • for apalis t30, when compiling a mainline kernel outside my openembedded/bitbake environment, is LOADADDR=0x82008000 correct?

  • with a uimage compiled outside oe/bitbake in u-boot, my nfsboot command reads

    pci enum; usb start; run setup; setenv bootargs ${defargs} ${nfsargs} ${setupargs} ${vidargs} nfsroot=${serverip}:${nfsroot}; echo Booting from net …; run nfsdtbload; dhcp uImage && run fdt_fixup && bootm

(i copied this one from my working colibri t30 u-boot and added the first command and adapted the last), maybe you see an obvious error? I have my doubts about bootm maybe you can give me a hint whether it needs to be

bootm ${kernel_addr_r} - ${fdt_addr_r}'

and the values of these variables.

kind regards

The LOADADDR=0x80008000 just as e.g. noted in the following article on our developer website for Apalis TK1. This may also be queried from an existing uImage:

[user@host apalis-t30_bin]$ mkimage -l uImage--3.1.10+gitr0+7753763827-2.7.4-apalis-t30-20171005023218.bin 
Image Name:   Linux-3.1.10-2.7.4+g7753763
Created:      Thu Oct  5 05:08:01 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4243776 Bytes = 4144.31 KiB = 4.05 MiB
Load Address: 80008000
Entry Point:  80008000

You really would not need to mess with any of the U-Boot environment as our regular configuration is already prepared for booting either downstream without device tree or alternatively mainline with device tree.