OE4T / tegra-demo-distro

Reference/demonstration distro for meta-tegra
MIT License
73 stars 74 forks source link

Mender update has no effect on Xavier NX (eMMC) #255

Closed Buanderie closed 1 year ago

Buanderie commented 1 year ago

Hello,

I've been working on the Xavier NX (eMMC) version of my embedded project.

mender install /data/myupdate.mender executes without error. I then commit using mender commit and reboot.

But the system still uses the same partition after that (mmcblk0p1). But it should uses mmblk0p11 :/

What do I do wrong ?

madisongh commented 1 year ago

When doing manual installs, you must reboot first. If the reboot into the new rootfs succeeds, then log in and commit the update.

Buanderie commented 1 year ago

I did it as you said, rebooting after install and then committing. But it still uses the old partition. INFO[0000] Mender running on partition: /dev/mmcblk0p1

dwalkes commented 1 year ago

Which branch are you using?

dwalkes commented 1 year ago

Also can you share the console output from mender install?

madisongh commented 1 year ago

And also check if the update actually succeeded... if the boot failed, it would fallback to the old partition.

Buanderie commented 1 year ago

Here it is:

root@jetcam:~# mender --log-level debug --log-file /data/mender_install.log install /data/jetcam-image-minimal-jetson-xavier-nx-devkit-emmc.mender 
Installing Artifact of size 123020800...
.............................................................. - 100 %
Use -commit to update, or -rollback to roll back the update.
At least one payload requested a reboot of the device it updated.

Also, the produced log: mender_install.log

It doesn't seem to have failed, from the look of it :/

Buanderie commented 1 year ago

Which branch are you using?

dunfell

Buanderie commented 1 year ago

And also check if the update actually succeeded... if the boot failed, it would fallback to the old partition.

As it does fallback to the old partition, I guess it failed to boot to the other one. But where should I look for the actual error message ? dmesg does not give me much (nothing out of the ordinary) information.

madisongh commented 1 year ago

I don't see the ArtfifactInstall_Leave_80_bl-update script getting executed. That script is the one that informs the bootloader of the slot switch (as well as updating the bootloader in the target slot).

Buanderie commented 1 year ago

Indeed. It doesn't seem to be present in the .mender file either...

madisongh commented 1 year ago

Check your build setup... that script gets deployed by the tegra-state-scripts recipe, and it sounds like that isn't getting built for some reason.

Buanderie commented 1 year ago

Check your build setup... that script gets deployed by the tegra-state-scripts recipe, and it sounds like that isn't getting built for some reason.

The script was indeed missing from the deploy directory. Weird though the build step went through without error... bitbake -c clean tegra-state-scripts; bitbake tegra-state-scripts did the job.

Thanks !