OE4T/tegra-demo-distro

boot failed after adding rsync (dunfell-l4t-r32.5.0, jetson-xavier-nx-devkit, tegrademo-mender)

maggu2810 opened this issue · 2 comments

Hi,
I use the branch "dunfell-l4t-r32.5.0" for tests as I need JetPack 4.5 for the moment.

  • I switched the working copy with all submodules to the specific branch.
  • After that I setup the environment for machine "jetson-xavier-nx-devkit" and distribution "tegrademo-mender".
  • I did a build for "demo-image-full"
  • Boot the device into recovery mode
  • I flashed the device using ./doflash
  • The device works as expected

Because I am missing "rsync" I edit conf/local.conf and added the line

IMAGE_INSTALL += "rsync"

After that I tried to update the device using mender.
The device does not boot correctly anymore using the new slot and rollback to the previous slot after some attempts.
Because of this I flashed the device with the new image and to start with a "clean environment".
The device run into the same error on boot:

[    6.522339] tegra-ivc ivc-bc00000.rtcpu:echo@0: echo: ver=0 grp=1 RX[16x64]=0x1000-0x1480 TX[16x64]=0x1480-0x1900
[    6.522682] tegra-ivc ivc-bc00000.rtcpu:dbg@1: dbg: ver=0 grp=1 RX[1x384]=0x1900-0x1b00 TX[1x384]=0x1b00-0x1d00
[    6.523093] tegra-ivc ivc-bc00000.rtcpu:dbg@2: dbg: ver=0 grp=1 RX[1x8192]=0x1d00-0x3d80 TX[1x8192]=0x3d80-0x5e00
[    6.523680] tegra-ivc ivc-bc00000.rtcpu:ivccontrol@3: ivccontrol: ver=0 grp=1 RX[64x320]=0x5e00-0xae80 TX[64x320]=0xae80-0xff00
[    6.523996] tegra-ivc ivc-bc00000.rtcpu:ivccapture@4: ivccapture: ver=0 grp=1 RX[512x64]=0xff00-0x17f80 TX[512x64]=0x17f80-0x20000
[    6.524449] tegra186-cam-rtcpu bc00000.rtcpu: using cam RTCPU IRQ (65)
[    6.524581] tegra186-cam-rtcpu bc00000.rtcpu: tegra_camrtc_mon_create is successful
[    6.525691] tegra186-cam-rtcpu bc00000.rtcpu: firmware version cpu=rce cmd=5 sha1=cf2bef3ad10e437272857b76308abef8ffb80bda
[    6.534770] Wake83 for irq=211
[    6.537494] gpio tegra-gpio wake67 for gpio=48(G:0)
[    6.542384] gpio tegra-gpio-aon wake29 for gpio=36(EE:4)
[    6.548022] input: gpio-keys as /devices/gpio-keys/input/input4
[    6.584340] tegra_rtc c2a0000.rtc: setting system clock to 2000-01-01 01:05:10 UTC (946688710)
[    6.585074] mmcblk mmc0:aaaa: Card claimed for testing.
[    6.623785] bpmp: mounted debugfs mirror
[    6.630788] ALSA device list:
[    6.630910]   #0: tegra-hda-xnx at 0x3518000 irq 64
[    6.631029]   #1: jetson-xaviernx-ape
[    6.633668] Freeing unused kernel memory: 11136K
[    8.195870] random: crng init done
[   10.386087] EXT4-fs (mmcblk0p1): couldn't mount as ext3 due to feature incompatibilities
[   10.386794] EXT4-fs (mmcblk0p1): couldn't mount as ext2 due to feature incompatibilities
[   10.465615] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[   10.490699] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[   10.490699] 
[   10.490893] CPU: 3 PID: 1 Comm: switch_root Not tainted 4.9.201-l4t-r32.5+gc68230c5b46a #1
[   10.491044] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[   10.491158] Call trace:
[   10.491217] [<ffffff800808bc88>] dump_backtrace+0x0/0x178
[   10.491316] [<ffffff800808be24>] show_stack+0x24/0x30
[   10.491413] [<ffffff80084578a4>] dump_stack+0xa4/0xc8
[   10.491506] [<ffffff80081c6ae0>] panic+0x128/0x28c
[   10.491598] [<ffffff80080b7dc4>] do_exit+0xa34/0xa58
[   10.491688] [<ffffff80080b7e74>] do_group_exit+0x3c/0xa0
[   10.491787] [<ffffff80080b7ef8>] __wake_up_parent+0x0/0x40
[   10.491884] [<ffffff8008083900>] el0_svc_naked+0x34/0x38
[   10.491983] SMP: stopping secondary CPUs
[   10.492237] Kernel Offset: disabled
[   10.492501] Memory Limit: none
[   10.492771] trusty-log panic notifier - trusty version Built: 08:56:10 Jul  9 2021 [   10.500464] Rebooting in 5 seconds..

I do not understand why "switch_root" fails just because rsync (and if I realized the build output correctly some other recipe has been build) is added to the image.

Anyone can help?

Because I am missing "rsync" I edit conf/local.conf and added the line

IMAGE_INSTALL += "rsync"

You probably wanted to use either IMAGE_INSTALL_append = " rsync" or, better yet, CORE_IMAGE_EXTRA_INSTALL = "rsync" (so it only goes into the real rootfs image instead of being added to all images that might get built).

By using += in your local.conf, what you've likely done is to change the contents of the rootfs image to be only rsync. switch_root then can't find init in the just-mounted rootfs (exit code 0x100 (256) indicates that), and exits. It's generally a bad idea to use += operators in config files to affect recipe-specific variables due to the order in which bitbake processes config files and recipes.

Serial console output would likely have helped in troubleshooting the problem. You can also check the image .manifest file generated to see what packages were installed into your image, and compare before vs. after your change to see the effect. (You could also use bitbake -e demo-image-full before and after your change and compare the value of the IMAGE_INSTALL between them.)

Thanks a lot. I feel stupid now. 😉