0

After some time I booted up my Cubox i4 Pro. This microcomputer uses U-Boot, or at least, it should do that. The box doesn't boot, though.

When I connect my Mac over micro-USB, or a monitor over HDMI, I see this:

U-Boot SPL 2017.11-armbian (Jan 24 2018 - 22:39:16)
Trying to boot from MMC1


U-Boot 2017.11-armbian (Jan 24 2018 - 22:39:16 +0100)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 41C
Reset cause: POR
Board: MX6 Cubox-i
DRAM:  2 GiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment

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
907 bytes read in 98 ms (8.8 KiB/s)
## Executing script at 12000000
## Error: "autodetectfdt" not defined
** File not found /boot/dtb/ **
** Unrecognized filesystem type **
** File not found /dtb/ **
5783761 bytes read in 483 ms (11.4 MiB/s)
5546904 bytes read in 427 ms (12.4 MiB/s)
## Loading init Ramdisk from Legacy Image at 14800000 ...
Image Name:   uInitrd
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    5783697 Bytes = 5.5 MiB
Load Address: 00000000
Entry Point:  00000000
Verifying Checksum ... OK

And some more. I suspect that the Error: "autodetectfdt" not defined is the culprit for not being able to boot. Is there a way I could restore this autodetectfdt, preferably without flashing the SD whole card? There is some data on it that I would like to preserve...

0

After some help from Igor Pecovnik I was able to have my system boot again.

Preparations

First of all, you need a micro-USB cable. Connect it from your computer to the Cubox. After installing the Virtual COM port (VCP) driver for my computer, I did ls -l /dev/*usbserial* to find out that the serial line was available at /dev/cu.usbserial-DN00AZKZ. So I opened the serial line using screen /dev/cu.usbserial-DN00AZKZ 115200.

Troubleshooting

Next, I powered the Cubox and immediately pressed enter to prevent autoboot. As I wrote in the question, the only thing I had was

Error: "autodetectfdt" not defined

On GitHub, I found a definition for autodetectfdt. I ran it through the serial line, but it did nothing. I read the script:

if test ${cpu} = 6SOLO || test ${cpu} = 6DL;
then
    setenv fdt_prefix imx6dl;
else
    setenv fdt_prefix imx6q;
fi;

if test ${board} = mx6-cubox-i;
then
    setenv fdt_file ${fdt_prefix}-cubox-i.dtb;
else
    setenv fdt_file ${fdt_prefix}-hummingboard.dtb;
fi;

I tried to run it manually. printenv cpu gave me something that was neither 6SOLO nor 6DL, so I decided to run setenv fdt_prefix imx6q. Next, printenv board gave me mx6cuboxi, which I interpreted as mx6-cubox-i, so I ran setenv fdt_file imx6q-cubox-i.dtb. Finally, I did saveenv to persist my changes.

Resolution

Re-powering the system I saw the Linux kernel booting. After I logged in (still over the serial line) I issued sudo aptitude dist-upgrade. Igor had told me that v5.38 of U-Boot was broken, but he was working on a fix; and v5.44 was released that very same day. aptitude installed that version. Another reboot and the system now boots fine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.