poweroff/reboot issues with i.MX6ULL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

poweroff/reboot issues with i.MX6ULL

Jump to solution
2,395 Views
JohnKlug
Senior Contributor I

It appears that root is mounted read-only, so I suspect there errors are innocuous, but they do not occur when booting from SD card.

The same board does not do this when the rootfs is on an SD card.  But with NAND flash I get errors in shutdown, and the device does not reboot.  Here is reboot (the watchdog does eventually force a reboot):

 

 

[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped target Swap.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped File System Check on Root Device.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Started Reboot.
[  OK  ] Reached target Reboot.
[   30.298812] watchdog: watchdog0: watchdog did not stop!
[   30.309501] printk: systemd-shutdow: 37 output lines suppressed due to ratelimiting
[   30.630011] systemd-shutdown[1]: Syncing filesystems and block devices.
[   30.652468] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   30.679080] systemd-journald[136]: Received SIGTERM from PID 1 (systemd-shutdow).
[   30.709891] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   30.731786] systemd-shutdown[1]: Hardware watchdog 'imx2+ watchdog', version 0
[   30.745943] systemd-shutdown[1]: Unmounting file systems.
[   30.758328] [283]: Remounting '/' read-only in with options 'chk_data_crc,assert=read-only,ubi=0,vol=0'.
[   30.771369] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
[   30.781459] systemd-shutdown[1]: All filesystems unmounted.
[   30.787421] systemd-shutdown[1]: Deactivating swaps.
[   30.792791] systemd-shutdown[1]: All swaps deactivated.
[   30.799319] systemd-shutdown[1]: Detaching loop devices.
[   30.816595] systemd-shutdown[1]: All loop devices detached.
[   30.834744] cfg80211: failed to load regulatory.db
[   30.855362] imx2-wdt 20bc000.wdog: Device shutdown: Expect reboot!
[   30.865480] ci_hdrc ci_hdrc.1: remove, state 4
[   30.869972] usb usb1: USB disconnect, device number 1
[   30.876914] ci_hdrc ci_hdrc.1: USB bus 1 deregistered
[   30.887468] reboot: Restarting system
[   32.391675] Reboot failed -- System halted

 

 

Compare with SD card, which looks the same without the "Reboot failed" message, and it starts U-Boot right away:

 

 

[   43.503153] reboot: Restarting system


U-Boot 2020.04-5.4.24-2.1.0+g4979a99482 (Apr 12 2021 - 17:57:42 +0000)

CPU:   i.MX6ULL rev1.1 528 MHz (running at 396 MHz)

 

 

Here is poweroff (root is mounted read-only, so the flash is handled properly):

 

 

[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped File System Check on Root Device.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Started Power-Off.
[  OK  ] Reached target Power-Off.
[   44.179558] printk: systemd-shutdow: 37 output lines suppressed due to ratelimiting
[   44.479384] systemd-shutdown[1]: Syncing filesystems and block devices.
[   44.501136] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   44.527783] systemd-journald[136]: Received SIGTERM from PID 1 (systemd-shutdow).
[   44.559543] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   44.589169] systemd-shutdown[1]: Unmounting file systems.
[   44.601495] [310]: Remounting '/' read-only in with options 'chk_data_crc,assert=read-only,ubi=0,vol=0'.
[   44.614811] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
[   44.625121] systemd-shutdown[1]: All filesystems unmounted.
[   44.630768] systemd-shutdown[1]: Deactivating swaps.
[   44.636416] systemd-shutdown[1]: All swaps deactivated.
[   44.641696] systemd-shutdown[1]: Detaching loop devices.
[   44.660140] systemd-shutdown[1]: All loop devices detached.
[   44.666118] systemd-shutdown[1]: Detaching DM devices.
[   44.683401] cfg80211: failed to load regulatory.db
[   44.716087] ci_hdrc ci_hdrc.1: remove, state 1
[   44.720582] usb usb1: USB disconnect, device number 1
[   44.725855] usb 1-1: USB disconnect, device number 2
[   44.731779] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[   44.740150] option 1-1:1.0: device disconnected
[   44.746031] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[   44.754163] option 1-1:1.1: device disconnected
[   44.759945] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[   44.768239] option 1-1:1.2: device disconnected
[   44.773889] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[   44.782192] option 1-1:1.3: device disconnected
[   44.787965] option1 ttyUSB4: GSM modem (1-port) converter now disconnected from ttyUSB4
[   44.796288] option 1-1:1.4: device disconnected
[   44.803532] ci_hdrc ci_hdrc.1: USB bus 1 deregistered
[   44.814239] reboot: Power down
[   45.817878] Unable to poweroff system
[   45.821576] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[   45.829261] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 ]---

 

 

 Compare with SD card which does not have the "Unable to poweroff system" message:

 

 

[   37.284828] option 1-1:1.3: device disconnected
[   37.290659] option1 ttyUSB4: GSM modem (1-port) converter now disconnected from ttyUSB4
[   37.298970] option 1-1:1.4: device disconnected
[   37.306387] ci_hdrc ci_hdrc.1: USB bus 1 deregistered
[   37.317092] reboot: Power down

 

 

 

0 Kudos
Reply
1 Solution
2,321 Views
JohnKlug
Senior Contributor I

It turns out that the idea I had that this problem was caused by ubifs is wrong.  The actual problem was in the U-Boot environment.

I started out with an SD card boot, since that is the default (we have a board based on the board MCIMX6ULL-EVK with SD card boot).

I could not use the WEIM NAND settings because our NAND is smaller. One of the things I did while setting up the U-Boot environment for NAND was to set tee=no in U-Boot, since I was not planning on using optee, at least until I investigated it further.  So if one sets optee to no, and has a build with optee, rebooting will not work.  If I set tee=yes, then reboots work.

View solution in original post

0 Kudos
Reply
4 Replies
2,322 Views
JohnKlug
Senior Contributor I

It turns out that the idea I had that this problem was caused by ubifs is wrong.  The actual problem was in the U-Boot environment.

I started out with an SD card boot, since that is the default (we have a board based on the board MCIMX6ULL-EVK with SD card boot).

I could not use the WEIM NAND settings because our NAND is smaller. One of the things I did while setting up the U-Boot environment for NAND was to set tee=no in U-Boot, since I was not planning on using optee, at least until I investigated it further.  So if one sets optee to no, and has a build with optee, rebooting will not work.  If I set tee=yes, then reboots work.

0 Kudos
Reply
2,334 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Can you check if your nand SLC/ MLC? L5.4 doesn't support MLC

0 Kudos
Reply
2,360 Views
JohnKlug
Senior Contributor I

The article is on file systems becoming read-only due to an error.  In this case, the shutdown process changes the file system to read-only, because root cannot be unmounted if shutdown is to proceed.  This is normal, and it happens even when I use an SD card and the reboot works.  The question is why does the reset get an error when using NAND flash?

0 Kudos
Reply
2,367 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 Kudos
Reply