Apalis TK1 Documentation Query

I have some queries about the Apalis TK1 documentation, related to building the kernel.

The above link, under the Kernel Compilation section has the following script sample:

make -j3 uImage LOADADDR=0x80008000 2>&1 | tee build.log
make tegra124-apalis-eval.dtb

However, having downloaded the Apalis-TK1_LXDE-Image_2.8b6.184-20190401.tar.bz2 image, it the later versions use a zImage binary rather than a uImage. Also, the LOADADDR seems to be incorrect as in my other post from today, the ${loadaddr} looks to be 0x81000000.

Likewise, in the above script only one device tree is compiled and seems to be missing the tegra124-apalis-v1.2-eval.dtb file.

Can someone from Toradex clarify these points, please?

Finally, having extracted the Apalis-TK1_LXDE-Image_2.8b6.184-20190401.tar.bz2 image (no changes made) and deployed to my Apalis TK1 V1.2A module, I am unable to boot due the following issue:

[    6.761640] mmc2: new ultra high speed SDR104 SDHC card at address 0007
[    6.769590] mmcblk mmc2:0007: Card claimed for testing.
[    6.776184] mmcblk1: mmc2:0007 SD16G 14.5 GiB
[    6.780179] JBD2: Unrecognised features on journal
[    6.780186] EXT4-fs (mmcblk0p2): error loading journal
[    6.780425] List of all partitions:
[    6.780446] 0800       488386584 sda  driver: sd
[    6.780456] b300        15388672 mmcblk0  driver: mmcblk
[    6.780465]   b301           16384 mmcblk0p1 fd08c341-01
[    6.780473]   b302        15339520 mmcblk0p2 fd08c341-02
[    6.780483] b330            4096 mmcblk0rpmb  (driver?)
[    6.780491] b320            4096 mmcblk0boot1  (driver?)
[    6.780499] b310            4096 mmcblk0boot0  (driver?)
[    6.780504] No filesystem could mount root, tried:  ext4
[    6.780511] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[    6.780518] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.40-2.8.6+g2c7a3c3af726 #1
[    6.780555] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[    6.780573] [<c0012090>] (show_stack+0x18/0x1c) from [<c0742bcc>] (panic+0x8c/0x1d8)
[    6.780591] [<c0742bcc>] (panic+0x8c/0x1d8) from [<c0a27fc4>] (mount_block_root+0x1c0/0x220)
[    6.780602] [<c0a27fc4>] (mount_block_root+0x1c0/0x220) from [<c0a280dc>] (mount_root+0xb8/0x104)
[    6.780611] [<c0a280dc>] (mount_root+0xb8/0x104) from [<c0a2826c>] (prepare_namespace+0x144/0x184)
[    6.780622] [<c0a2826c>] (prepare_namespace+0x144/0x184) from [<c0a27c1c>] (kernel_init_freeable+0x164/0x1c4)
[    6.780632] [<c0a27c1c>] (kernel_init_freeable+0x164/0x1c4) from [<c073b3d8>] (kernel_init+0x10/0xe8)
[    6.780644] [<c073b3d8>] (kernel_init+0x10/0xe8) from [<c000e678>] (ret_from_fork+0x14/0x20)
[    6.780656] CPU1: stopping
[    6.780663] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.10.40-2.8.6+g2c7a3c3af726 #1
[    6.780684] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[    6.780696] [<c0012090>] (show_stack+0x18/0x1c) from [<c001455c>] (handle_IPI+0xe0/0x1a8)
[    6.780708] [<c001455c>] (handle_IPI+0xe0/0x1a8) from [<c00085b0>] (gic_handle_irq+0xc8/0x138)
[    6.780719] [<c00085b0>] (gic_handle_irq+0xc8/0x138) from [<c000e1c0>] (__irq_svc+0x40/0x70)
[    6.780723] Exception stack(0xee28bf28 to 0xee28bf70)
[    6.780730] bf20:                   00000000 000f4240 00005b87 00000000 00000000 c1e3b7c8
[    6.780738] bf40: 91525f1a 00000001 91525dcd 00000001 c1e393b0 00000000 01658aa4 ee28bf70
[    6.780743] bf60: c005f124 c00396c8 20000113 ffffffff
[    6.780758] [<c000e1c0>] (__irq_svc+0x40/0x70) from [<c00396c8>] (tegra_idle_enter_clock_gating+0x64/0x78)
[    6.780774] [<c00396c8>] (tegra_idle_enter_clock_gating+0x64/0x78) from [<c055f1b8>] (cpuidle_enter_state+0x40/0xdc)
[    6.780790] [<c055f1b8>] (cpuidle_enter_state+0x40/0xdc) from [<c055f438>] (cpuidle_idle_call+0x1e4/0x24c)
[    6.780802] [<c055f438>] (cpuidle_idle_call+0x1e4/0x24c) from [<c000f3ac>] (arch_cpu_idle+0x10/0x40)
[    6.780816] [<c000f3ac>] (arch_cpu_idle+0x10/0x40) from [<c009e884>] (cpu_startup_entry+0xfc/0x1f8)
[    6.780828] [<c009e884>] (cpu_startup_entry+0xfc/0x1f8) from [<8073d364>] (0x8073d364)
[    6.780834] CPU2: stopping
[    6.780842] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.10.40-2.8.6+g2c7a3c3af726 #1
[    6.780862] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[    6.780874] [<c0012090>] (show_stack+0x18/0x1c) from [<c001455c>] (handle_IPI+0xe0/0x1a8)
[    6.780885] [<c001455c>] (handle_IPI+0xe0/0x1a8) from [<c00085b0>] (gic_handle_irq+0xc8/0x138)
[    6.780895] [<c00085b0>] (gic_handle_irq+0xc8/0x138) from [<c000e1c0>] (__irq_svc+0x40/0x70)
[    6.780900] Exception stack(0xee28df28 to 0xee28df70)
[    6.780908] df20:                   00000000 000f4240 00002dcc 00000000 00000000 c1e447c8
[    6.780916] df40: 920500ec 00000001 9204fef8 00000001 c1e423b0 00000000 00b2ebc9 ee28df70
[    6.780921] df60: c005f124 c00396c8 20000113 ffffffff
[    6.780934] [<c000e1c0>] (__irq_svc+0x40/0x70) from [<c00396c8>] (tegra_idle_enter_clock_gating+0x64/0x78)
[    6.780948] [<c00396c8>] (tegra_idle_enter_clock_gating+0x64/0x78) from [<c055f1b8>] (cpuidle_enter_state+0x40/0xdc)
[    6.780961] [<c055f1b8>] (cpuidle_enter_state+0x40/0xdc) from [<c055f438>] (cpuidle_idle_call+0x1e4/0x24c)
[    6.780974] [<c055f438>] (cpuidle_idle_call+0x1e4/0x24c) from [<c000f3ac>] (arch_cpu_idle+0x10/0x40)
[    6.780986] [<c000f3ac>] (arch_cpu_idle+0x10/0x40) from [<c009e884>] (cpu_startup_entry+0xfc/0x1f8)
[    6.780996] [<c009e884>] (cpu_startup_entry+0xfc/0x1f8) from [<8073d364>] (0x8073d364)
[    7.577984] CPU3: stopping
[    7.585873] CPU: 3 PID: 100 Comm: kworker/u8:3 Not tainted 3.10.40-2.8.6+g2c7a3c3af726 #1
[    7.604345] Workqueue: kmmcd mmc_rescan
[    7.613306] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[    7.631920] [<c0012090>] (show_stack+0x18/0x1c) from [<c001455c>] (handle_IPI+0xe0/0x1a8)
[    7.650251] [<c001455c>] (handle_IPI+0xe0/0x1a8) from [<c00085b0>] (gic_handle_irq+0xc8/0x138)
[    7.668978] [<c00085b0>] (gic_handle_irq+0xc8/0x138) from [<c000e1c0>] (__irq_svc+0x40/0x70)
[    7.687573] Exception stack(0xed061cf0 to 0xed061d38)
[    7.697814] 1ce0:                                     c0b9a548 60000193 c0b26a2c 60000113
[    7.716015] 1d00: 00000000 00000022 00000001 c0b26a24 00000006 00000006 00000003 ed060000
[    7.734248] 1d20: 00000000 ed061d38 c005a3fc c005a40c 60000113 ffffffff
[    7.746080] [<c000e1c0>] (__irq_svc+0x40/0x70) from [<c005a40c>] (vprintk_emit+0x328/0x440)
[    7.764528] [<c005a40c>] (vprintk_emit+0x328/0x440) from [<c0742d7c>] (printk+0x38/0x48)
[    7.782755] [<c0742d7c>] (printk+0x38/0x48) from [<c05711c4>] (mmc_blk_probe+0xf4/0x274)
[    7.800770] [<c05711c4>] (mmc_blk_probe+0xf4/0x274) from [<c0411a28>] (driver_probe_device+0x1d8/0x330)
[    7.820300] [<c0411a28>] (driver_probe_device+0x1d8/0x330) from [<c040fe9c>] (bus_for_each_drv+0x8c/0x94)
[    7.840018] [<c040fe9c>] (bus_for_each_drv+0x8c/0x94) from [<c04117e0>] (device_attach+0x78/0x90)
[    7.859080] [<c04117e0>] (device_attach+0x78/0x90) from [<c0410c7c>] (bus_probe_device+0x30/0xa0)
[    7.863984] SMP: failed to stop secondary CPUs
[    7.886208] [<c0410c7c>] (bus_probe_device+0x30/0xa0) from [<c040f17c>] (device_add+0x3a8/0x588)
[    7.905304] [<c040f17c>] (device_add+0x3a8/0x588) from [<c0565cc4>] (mmc_add_card+0xe0/0x1e0)
[    7.924160] [<c0565cc4>] (mmc_add_card+0xe0/0x1e0) from [<c056a478>] (mmc_attach_sd+0x134/0x1dc)
[    7.943191] [<c056a478>] (mmc_attach_sd+0x134/0x1dc) from [<c05654c4>] (mmc_rescan+0x2bc/0x30c)
[    7.962169] [<c05654c4>] (mmc_rescan+0x2bc/0x30c) from [<c0075518>] (process_one_work+0x278/0x3ec)
[    7.981540] [<c0075518>] (process_one_work+0x278/0x3ec) from [<c00764cc>] (worker_thread+0x1b0/0x328)
[    8.001457] [<c00764cc>] (worker_thread+0x1b0/0x328) from [<c007c1a4>] (kthread+0xc0/0xcc)
[    8.020463] [<c007c1a4>] (kthread+0xc0/0xcc) from [<c000e678>] (ret_from_fork+0x14/0x20)
[   36.080167] ------------[ cut here ]------------
[   36.093779] WARNING: at /workdir/oe/tmp-glibc/work-shared/apalis-tk1/kernel-source/kernel/watchdog.c:270 watchdog_timer_fn+0x178/0x26c()
[   36.123786] Watchdog detected hard LOCKUP on cpu 1
[   36.128662] Modules linked in:
[   36.148988] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.40-2.8.6+g2c7a3c3af726 #1
[   36.173663] [<c00154c8>] (unwind_backtrace+0x0/0x120) from [<c0012090>] (show_stack+0x18/0x1c)
[   36.199380] [<c0012090>] (show_stack+0x18/0x1c) from [<c00584a0>] (warn_slowpath_common+0x54/0x74)
[   36.225211] [<c00584a0>] (warn_slowpath_common+0x54/0x74) from [<c00584f4>] (warn_slowpath_fmt+0x34/0x44)
[   36.252146] [<c00584f4>] (warn_slowpath_fmt+0x34/0x44) from [<c00c6214>] (watchdog_timer_fn+0x178/0x26c)
[   36.278810] [<c00c6214>] (watchdog_timer_fn+0x178/0x26c) from [<c007f5c4>] (__run_hrtimer+0x16c/0x264)
[   36.305544] [<c007f5c4>] (__run_hrtimer+0x16c/0x264) from [<c007ffcc>] (hrtimer_interrupt+0x158/0x270)
[   36.332322] [<c007ffcc>] (hrtimer_interrupt+0x158/0x270) from [<c0588de8>] (arch_timer_handler_phys+0x30/0x38)
[   36.359814] [<c0588de8>] (arch_timer_handler_phys+0x30/0x38) from [<c00c9e4c>] (handle_percpu_devid_irq+0xe0/0x188)
[   36.387829] [<c00c9e4c>] (handle_percpu_devid_irq+0xe0/0x188) from [<c00c6638>] (generic_handle_irq+0x28/0x38)
[   36.415338] [<c00c6638>] (generic_handle_irq+0x28/0x38) from [<c000ef04>] (handle_IRQ+0x80/0x98)
[   36.441642] [<c000ef04>] (handle_IRQ+0x80/0x98) from [<c0008534>] (gic_handle_irq+0x4c/0x138)
[   36.467784] [<c0008534>] (gic_handle_irq+0x4c/0x138) from [<c000e1c0>] (__irq_svc+0x40/0x70)
[   36.494078] Exception stack(0xee0fbe58 to 0xee0fbea0)
[   36.507876] be40:                                                       00000000 00000000
[   36.533456] be60: ff691f00 00001d50 1b83e68f 00002edf 00006e28 00006ef0 00000063 c0b3e6ec
[   36.558982] be80: 3ffffcc8 c08de921 00000000 ee0fbea0 c02e10ac c02e1110 80000113 ffffffff
[   36.584459] [<c000e1c0>] (__irq_svc+0x40/0x70) from [<c02e1110>] (__timer_delay+0x4c/0x50)
[   36.609926] [<c02e1110>] (__timer_delay+0x4c/0x50) from [<c0742cec>] (panic+0x1ac/0x1d8)
[   36.635263] [<c0742cec>] (panic+0x1ac/0x1d8) from [<c0a27fc4>] (mount_block_root+0x1c0/0x220)
[   36.660966] [<c0a27fc4>] (mount_block_root+0x1c0/0x220) from [<c0a280dc>] (mount_root+0xb8/0x104)
[   36.686970] [<c0a280dc>] (mount_root+0xb8/0x104) from [<c0a2826c>] (prepare_namespace+0x144/0x184)
[   36.713191] [<c0a2826c>] (prepare_namespace+0x144/0x184) from [<c0a27c1c>] (kernel_init_freeable+0x164/0x1c4)
[   36.740430] [<c0a27c1c>] (kernel_init_freeable+0x164/0x1c4) from [<c073b3d8>] (kernel_init+0x10/0xe8)
[   36.767105] [<c073b3d8>] (kernel_init+0x10/0xe8) from [<c000e678>] (ret_from_fork+0x14/0x20)
[   36.792819] ---[ end trace e9d24bb11016888a ]---

I have reset the environment vars (using env default -a) and I have verified that I can browse the eMMC file system.

Any help would be greatly received. I don’t think I have mis-read any documentation but there is always that chance.

Hi @kwebster83!

There’s a list of image versions and their targets (kernel image and device tree) here in the same article. You should always refer to that to know the kernel image format and the device tree targets.
I agree, however, that the documentation is outdated. I’ll make sure to get that up-to-date.

The boot log you presented seems to indicate some kind of flash corruption. Can you please try to erase the flash either via U-Boot or by using the Toradex Easy Installer and then reinstall the image?

Best regards,
Gustavo.

Hi @gustavo.tx,

I think I’m correct regarding the kernel image formats and device tree (zImage format and both tegra124-apalis-v1.2-eval.dtb and tegra124-apalis-eval.dtb) as I’m using the following image versions:

U-Boot 3.0 (toradex_2019.07) (which incidentally also fails to build)
Tegra K1 Linux Kernel 3.0 (toradex_tk1_l4t_r21.7)

Maybe there is some documentation missing against u-boot compilation too.

@gustavo.tx Also, how can I erase the flash via u-boot?

@kwebster83 To erase the flash via U-Boot, please follow these instructions.

About your U-Boot build, could you please try building it in the 2016.11-toradex branch? The toradex_2019.07 branch has some more recent and active development (while it should be compatible with the toradex_tk1_l4t_r21.7 kernel).

@gustavo.tx Ok, so I have erased the flash and now nothing… how can I get u-boot back onto the device?!

@kwebster83 I suggest you to flash a new image using the Toradex Easy Installer. After loading the installer and with the board connected to the internet, you can select the same LXDE image and install it directly from our servers.

@gustavo.tx But I have no u-boot console from which to start the installer…

@kwebster83 You don’t necessarily need the U-Boot console. You can use a hardware mechanism to start the module into Recovery Mode and then load the installer.

@gustavo.tx Unfortunately removing the TK1 module is a total pain in our hardware setup as it requires a complete hardware strip down to access the module.

So, as it stands, the latest TK1 image does not work on the TK1 (same error as in my original post). I have just flashed the Apalis-TK1_LXDE-Image_2.8b6.184-20190401.tar.bz2 image onto a TK1 on the Ixora carrier board.

Can I get any more direct assistance in getting this to work?

@kwebster83 I’ll give this same image a try and get back to you in a bit.

@gustavo.tx Thank you, that’s greatly appreciated.

The only things I’ve done to recreate this are:

  1. Download the following image: https://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Apalis-TK1_LXDE-Image_2.8b6.184-20190401.tar.bz2
  2. Extract (as sudo) to a directory
  3. Run ./update.sh -m 2 -o /media/user/micro-sd-card
  4. Put microSD card into the microSD socket
  5. Halt u-boot
  6. Run the following commands run setupdate and run update
  7. After reboot, run env default -a
  8. Run boot

After about 6.8 seconds, the crash will occur.

The Apalis-TK1_LXDE-Image_2.7b5-20171201.tar.bz2 also does not work on a TK1 V1.2A - same issue.

Apalis-TK1_LXDE-Image_2.7b2-20170410.tar.bz2 runs fine but without the V1.2A changes (no device tree for V1.2A, etc)

Please note that one may, unfortunately, not successfully boot after doing env default -a due to some required programmatically set stuff then being missing. Please try the following instead:

env default -a
saveenv
reset

Apalis-TK1_LXDE-Image_2.7b4-20171007.tar.bz2 does not work (but has V1.2A device tree, etc)

Apalis-TK1_LXDE-Image_2.7b3-20170630.tar.bz2 also works fine (without V1.2A device tree, etc).

Something to do with the V1.2A update which is causing issues.

V1.2 hardware support got only introduced with BSP 2.7b5 so no earlier version will ever work properly, sorry.

@kwebster83 I was able to reproduce the issue when flashing the most recent 2.8 image via U-Boot. The same doesn’t seem to happen when flashing via Toradex Easy Installer.

@marcel.tx Unfortunately I’ve already tried that sequence and it doesn’t work.

@gustavo.tx I don’t think the EasyInstaller is an option for us as we need to make changes to drivers in the kernel source and hence need to build our own custom kernel. I don’t think the EasyInstaller supports this capability.