Jump to content

Cubox-i does not boot anymore after power shutdown


Recommended Posts

Posted

What I have done with my exercise is to approve that the 5.3.1 kernel is really broken and missing some proper build config.
See serial.log for reference.
As uboot, kernel and rootfs have no hard dependence they can be exchanged independently. I have replaced uboot with a fedora one, dropped in a fedora kernel and an 5.2.10 armbian one. With distro boot I can select witch kernel to use at boot time. The 5.3.0-rc1 fedora kernel approves that the rootfs is flawless working with HDMI support. My distribution of choice is fedora and I am used to build kernels that sometimes break, like just 5.4.0-rc1 recently. But as I keep always a working kernel in place, it is only a matter of reboot to recover.

serial.log uboot.tgz

Posted (edited)
7 hours ago, usual user said:

What I have done with my exercise is to approve that the 5.3.1 kernel is really broken and missing some proper build config.


Check images from download section. They are working fine for me, for example: https://dl.armbian.com/cubox-i/archive/Armbian_5.98_Cubox-i_Ubuntu_bionic_next_5.3.1_desktop.7z

Relevant commit:
https://github.com/armbian/build/commit/70e1e5882d7ea8ad7a61543070e6e00169401028

 

Edit: armbianmonitor logs http://ix.io/1XA7

Edited by Igor
Add boot logs
Posted

OK, figured what was going on.
First step was to reinstall the armbian uboot from /usr/lib/linux-u-boot-next-cubox-i_5.98_armhf again. It has full distro boot feature available. I was mislead by a comment (# next kernels have different u-boot without autodetection) in /boot/boot.cmd.
In the end uboot is setting up the boot parameters in a not suitable manner for my environment. And "Starting kernel ..." as the only feedback is not of much help to analyse the problem. I came up with the append line setup of the first boot stanza in /boot/extlinux/extlinux.conf to boot successful in my environment.
In serial.log you see an automatic recover from a failing boot.
Initially the fourth boot stanza is selected with boot parameters derived from /boot/boot.cmd. This is failing with "Starting kernel ...". After a while the watchdog kicks in and triggers a reset. Uboot restarts and autoboots the first boot stanza.
The attached extlinux.conf can be used for the Armbian_5.98_Cubox-i_Debian_buster_next_5.3.1_minimal.7z as is. For other images the PARTUUID has to be adopted. "blkid" will tell you the proper value of your rootfs partition.

serial.log extlinux.conf

Posted
On 10/4/2019 at 8:16 AM, Igor said:

They are working fine for me

Your log shows the device is equipped with 1G of RAM, hence no cma is reserved.
Etnaviv support should not be working, you probably need "cma=256M@1G" as a workaround.

Posted
On 10/4/2019 at 8:16 AM, Igor said:

Check images from download section. They are working fine for me, for example: https://dl.armbian.com/cubox-i/archive/Armbian_5.98_Cubox-i_Ubuntu_bionic_next_5.3.1_desktop.7z

Dropping the bare image on the micro SD starts with working HDMI support. Maybe it is the different content of the initrd as that is the only difference to the previous used image kernel wise. But it is loading the wrong DTB (for cubox-i, not for hummingboard) and there is no visible cursor in the VT. Dropping in the attached /boot/extlinux/extlinux.conf fixes this. The first boot stanza doesn't even matter as uboot recognizes the missing files and gracefully skips to the second stanza. This gives a nice snappy desktop.

extlinux.conf

Posted

I was able to get uboot updated. I copied the files from here https://apt.armbian.com/pool/main/l/linux-5.3.1-cubox/  to my SD card.

I am getting closer. Oh, this is a buster server deployment if that matters.

This is what I get now...

I have armbianEnv.txt with

```

verbosity=1

rootdev=/dev/mmcblk0p1

rootfstype=ext4

```

 

 

```

U-Boot SPL 2018.01-armbian (Sep 27 2019 - 23:10:03)
Trying to boot from MMC1


U-Boot 2018.01-armbian (Sep 27 2019 - 23:10:03 +0200)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 35C
Reset cause: POR
Board: MX6 Cubox-i
       Watchdog enabled
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
auto-detected panel HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   FEC
starting USB...
USB0:   Port not available.
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
1845 bytes read in 132 ms (12.7 KiB/s)
## Executing script at 12000000
0 bytes read in 101 ms (0 Bytes/s)
51 bytes read in 120 ms (0 Bytes/s)
37518 bytes read in 5767 ms (5.9 KiB/s)
** File not found /boot/uInitrd **
** Unrecognized filesystem type **
** File not found uInitrd **
5263872 bytes read in 408 ms (12.3 MiB/s)
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
SCRIPT FAILED: continuing...
MMC: no card present
mmc_init: -123, time 48

Device 0: device type unknown
... is now current device
** Bad device usb 0 **
** Bad device usb 0 **
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part
No port device detected!

Device 0: Model:  Firm:  Ser#:
            Type: Hard Disk
            Capacity: not available
... is now current device
** Bad device size - sata 0 **
FEC Waiting for PHY auto negotiation to complete........

```

Posted
On 10/2/2019 at 4:28 PM, dudepron said:

I tired to copy the files from a new SD install of 5.3.1

If you have copied in /boot/vmlinuz-5.3.1-cubox, /boot/initrd.img-5.3.1-cubox, /boot/dtb-5.3.1-cubox/ and /lib/modules/5.3.1-cubox/ from your new SD install of 5.3.1 your only missing part should be to copy in the attached /boot/extlinux/extlinux.conf.

extlinux.conf

Posted
On 10/1/2019 at 7:21 AM, Igor said:

As the error tells. You need to recreate it. Boot without is possible if you set root device to /dev/mmcblk01 and not UUID

Boot without initrd with the current config-5.3.1-cubox is not possible. In fedora config I need at least to flip CONFIG_MMC_BLOCK, CONFIG_MMC_SDHCI, CONFIG_MMC_SDHCI_PLTFM and CONFIG_MMC_SDHCI_ESDHC_IMX from module to buildin to be able to boot without initramfs from mmc.

Posted
23 minutes ago, usual user said:

Boot without initrd with the current config-5.3.1-cubox is not possible. In fedora config


Oh, yes, few things has to be build into the kernel to be able to boot that way. But I didn't pay attention to that since Armbian always boots with initrd. If you care, send a PR with changes to our config.

Posted

In fedora these changes can`t land since the kernel is universal and device specific buildins are not allowed to prevent vmlinuz bloat. An initramfs is only required if you have an encrypted rootfs or want to use UUID or LABEL for rootfs identification. For this to work you need user space tools. The initramfs is highly rootfs dependent hence it is almost ever created on the fly while kernel package installation in the running system. Doing it in an offline manner is quite difficult if not impossible. For a not encrypted rootfs with PARTUUID the kernel can always find the rootfs as long as it has buildin support to access the rootfs. No matter at what block device the rootfs resides the kernel will find it. IMHO a distribution building device dedicated kernels should try to avoid using an initramfs. Without an initramfs installing a kernel boils down to copy preassembled files in place and point the boot loader at them. It can be done easily in an offline manner to recover a system and is rootfs independent as long as the files are copied in the correct location. I have done it with the fedora kernel to bootstrap the minimal armbian image.

On 9/13/2019 at 9:50 PM, Igor said:

... and we are very limited with testings changes on hardware. I am the only one dealing with this. 

As a fly by, I thought I should report some observations. I don't care enough for armbian to get this included.
An armbian supporter has to take over here.

Posted (edited)

Does the image provided ---there---, put on a separate microSD with "xz -dcv Fedora-Minimal-armhfp-31-1.9-trial.raw.xz > /dev/sdX", boot for you properly?
"/dev/sdX" has to be replaced by the device where the separate microSD resides while the transfer.

Edited by usual user
Image no longer provided
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines