Fenix image in EMMC for Edge V?

It seems that we are not able to bootup Ubuntu image on the Edge V EMMC.

  • We followed the documentation and burned the Fenix image, we tried both “edge-ubuntu-20.04-server-linux-5.18-fenix-1.1.1-220915-develop.img” and “edge-ubuntu-20.04-gnome-linux-5.18-fenix-1.1.1-220915-develop.img”
  • Images were burned to SD Card with Etcher
  • We are able to boot from SD card to these images by entering the Upgrade Mode (in the TST method)
  • We are able to run the “sudo emmc-install” to copy the image to the EMMC
  • However, after rebooting and taking out the SD card, the board does not boot into the OS, we just have a blank screen

Any ideas? Did anyone encounter something like this before? How would you troubleshoot it?

We will check what’s going wrong.

Hello @GuyGuy

We checked on our side to write image to eMMC with sudo emmc-install and it works after reboot.

Could you follow the documentation to setup the serial debug tool and provide the full boot log?

https://docs.khadas.com/linux/edge/#Edge

As I would like to use my Khadas Edge-V Pro, I did try same as @GuyGuy just using the images compiled by khadas.

Boot log can be found on this link. Password: khadas

#Boot ver: 2019-05-29#1.18
empty serial no.
normal boot.
checkKey
vbus = 0
no fuel gauge found
no fuel gauge found
read logo on state from dts [0]
no fuel gauge found
no fuel gauge found
Hit any key to stop autoboot:  0
bad image magic.
load boot image failed
ERROR: [rk_load_image_from_storage]: bootrk: bad boot or kernel image
Unable to boot:boot
try to start recovery
bad image magic.
load boot image failed
ERROR: [rk_load_image_from_storage]: bootrk: bad boot or kernel image
Unable to boot:recovery
try to start backup
bad image magic.
load boot image failed
ERROR: [rk_load_image_from_storage]: bootrk: bad boot or kernel image
Unable to boot:backup
try to start rockusb

Nothing else appears over serial.

In short:
downloaded image from dl.khadas.com - Index of /firmware/Edge/Ubuntu/SD_USB/ (the edge-ubuntu-20.04-server-linux-5.18-fenix-1.1.1-220725.img.xz ), wrote it by using balenaEtcher to mSD (16GB), after boot, login as root (over serial), used command emmc-install and selected first option "1 Boot from eMMC - system on eMMC (fully install to eMMC), after few steps got confirmation that "All done, power off and remove SD to boot from eMMC/USB/NVMe.

Thanks for feedback, we will also check on a Edge-V Pro board later.

My model is also Edge-V Pro. Let us know what are your findings @numbqq

Hello @GuyGuy

I ckecked on my side with image https://dl.khadas.com/firmware/Edge/Ubuntu/SD_USB/edge-ubuntu-20.04-gnome-linux-5.18-fenix-1.1.1-220725.img.xz on my Edge-V Pro, I can use sudo emmc-install to install the system to eMMC and bootup well.

root@Khadas:~# dmesg | grep mmc2
[    1.149020] mmc2: CQHCI version 5.10
[    1.171474] mmc2: SDHCI controller on fe330000.mmc [fe330000.mmc] using ADMA
[    1.237125] mmc2: Command Queue Engine enabled
[    1.237148] mmc2: new HS400 MMC card at address 0001
[    1.237818] mmcblk2: mmc2:0001 BJTD4R 29.1 GiB 
[    1.240756] mmcblk2boot0: mmc2:0001 BJTD4R 4.00 MiB 
[    1.242051] mmcblk2boot1: mmc2:0001 BJTD4R 4.00 MiB 
[    1.243585] mmcblk2rpmb: mmc2:0001 BJTD4R 4.00 MiB, chardev (234:0)
root@Khadas:~# 
root@Khadas:~# 
root@Khadas:~# free
              total        used        free      shared  buff/cache   available
Mem:        3923248      408080     3160948       57764      354220     3381308
Swap:             0           0           0
root@Khadas:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           384M  5.9M  378M   2% /run
/dev/mmcblk2p2   28G  4.2G   23G  16% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G  8.0K  1.9G   1% /tmp
/dev/mmcblk2p1  240M  166M   75M  70% /boot
tmpfs           384M   24K  384M   1% /run/user/118
tmpfs           384M     0  384M   0% /run/user/0

Hello @vrabac

I checked you log, the u-boot is till from android not from SD card image, are you sure the installation doesn’t have errors?

@numbqq
I did not see any error during emmc-install I saw there is an “emmc-install.log” in /var/log/ , if that is correct log for emmc-install command, there are also no error in it Password: khadas, just it have weird Date inside, so not sure if it’s from my emmc-install. I will check tonight again and delete that file perior emmc-install command.

Hello @vrabac

Can you try to flash a Ubuntu image to eMMC and then boot from SD card and execute sudo emmc-install?

@numbqq which image exactly? and to Flash it by using USB-C Cable and AndroidTool?

Hello @numbqq

I have performed the following -

  1. Downloaded your suggested image
  2. Burned it to an SD card with Etcher
  3. Used a new Edge-V Pro board
  4. Booted into the SD Card
  5. Run sudo emmc-install and install it on the EMMC - No errors
  6. After reboot, nothing shows up, blank screen
  7. I have rebooted again into the SD Card
  8. I have mounted the file system of the EMMC, and zipped all the /var/log folder. Please find it here -
    varlog.zip - Google Drive
  9. This contains relevant logs such as emmc-install.log and dmesg
  10. I have searched for the keyword “error”. Found the following -
    Dmesg -
[    6.127796] kernel: brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4359-sdio.khadas,edge-v.bin failed with error -2

[    6.156049] kernel: brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4359-sdio.khadas,edge-v.txt failed with error -2

kern.log

Jul 25 14:40:44 localhost kernel: [ 7.754626] rockchip-pcie: probe of f8000000.pcie failed with error -110

Syslog

Jul 25 14:40:59 localhost kernel: [   67.892220]  ff8a0000.i2s-i2s-hifi: __soc_pcm_open() failed (-22)

Jul 25 14:40:59 localhost kernel: [   67.893442] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported!

Jul 25 14:40:59 localhost kernel: [   67.894203] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22

Jul 25 14:40:59 localhost kernel: [   67.895047]  ff8a0000.i2s-i2s-hifi: __soc_pcm_open() failed (-22)

Please let me know your thoughts

@numbqq I flashed over USB-C cable this image (edge-ubuntu-18.04-server-linux-4.4-fenix-1.1.1-220725-emmc.img from your dl), which boots fine if normal Power Adapter is used (if usb-co to laptop usb-c, there is constant loop.

Any way seems with old Ubuntu Server there are emmc problems. Full boot log can be found here Password: khadas.

root@Khadas:~# dmesg | grep mmc2
[    5.442185] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    5.502995] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[    5.504675] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    5.506298] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    5.509239] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[    5.512911] mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[    5.567424] mmc_host mmc2: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[    5.824790] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[    5.824818] mmc2: new ultra high speed SDR104 SDIO card at address 0001
[    7.103361] mmc2:mmc host rescan start!
[   14.662917] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[   14.681858] mmc_host mmc2: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0)
[   14.736801] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[   14.740143] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[   14.743168] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[   14.749108] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[   14.755903] mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[   14.863948] mmc_host mmc2: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
root@Khadas:~# free
              total        used        free      shared  buff/cache   available
Mem:        3870484       85832     3654604       13744      130048     3739488
Swap:       1048560           0     1048560
root@Khadas:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           378M  5.6M  373M   2% /run
/dev/mmcblk1p7   29G  1.7G   27G   6% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           378M     0  378M   0% /run/user/0
root@Khadas:~#

Seems it works if I first flash that above EMMC Image to emmc (by using usb-c method), and then boot mSD and use emmc-install again.

Is it U-boot problem or what did cause this problem?

root@Khadas:~#
root@Khadas:~# uname -a
Linux Khadas 5.18.0 #1.1.1 SMP PREEMPT Mon Jul 25 22:27:42 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
root@Khadas:~# dmesg | grep mmc2
[    1.164137] mmc2: CQHCI version 5.10
[    1.190262] mmc2: SDHCI controller on fe330000.mmc [fe330000.mmc] using ADMA
[    1.255334] mmc2: Command Queue Engine enabled
[    1.255356] mmc2: new HS400 MMC card at address 0001
[    1.256154] mmcblk2: mmc2:0001 BJTD4R 29.1 GiB
[    1.258684] mmcblk2boot0: mmc2:0001 BJTD4R 4.00 MiB
[    1.259848] mmcblk2boot1: mmc2:0001 BJTD4R 4.00 MiB
[    1.260961] mmcblk2rpmb: mmc2:0001 BJTD4R 4.00 MiB, chardev (234:0)
root@Khadas:~# free
              total        used        free      shared  buff/cache   available
Mem:        3923248      132212     3665984       13856      125052     3705584
Swap:             0           0           0
root@Khadas:~#
root@Khadas:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           384M  5.7M  378M   2% /run
/dev/mmcblk2p2   28G  2.6G   24G  10% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
/dev/mmcblk2p1  240M  166M   75M  70% /boot
tmpfs           384M     0  384M   0% /run/user/0
root@Khadas:~#

Full boot log after emmc-install password: khadas.

Hello @GuyGuy

Such errors doesn’t matter, can you follow the steps above?

Need to check what’s going wrong. Could you tell me which android you used?

Not quite sure, the version you installed on shipping (my board was shipped on 13.07.2019), as I never replaced it on emmc.

Edit #1
here is the boot log from Android on emmc password: khadas, I am unable to figure out what version this could be, and now that have something else on emmc, I can not see what it is.

@GuyGuy maybe you know what have you had on emmc before emmc-install?

hey @vrabac

  1. I do not know what was the android verison there before… since it was erased from the EMMC. But for me it was also the default shipped with the device
  2. How did you flash the ubuntu image with the usb-c cable? the provided flash tools ( Upgrade Using a USB-C Cable | Khadas Documentation ) for both Windows and Ubuntu seem to only accept Android images. It does not accept when I select one of the Ubuntu images

I used edge-ubuntu-18.04-server-linux-4.4-fenix-1.1.1-220725-emmc.img.xz (unpacked, need to be .img file) from dl.khadas.com - Index of /firmware/Edge/Ubuntu/EMMC/ . I remember I need prior to flashing to EraseFlash, then after that Status was in “MaskRom”. Other then that was not needed.

Thank you @vrabac , my mistake was trying to burn without using the “EMMC” image

So finally, the flow that works is -

  1. Burn through USB C an undesired older Ubuntu “EMMC” image - http://dl.khadas.com/firmware/Edge/Ubuntu/EMMC/Edge_Ubuntu-server-bionic_Linux-4.4_arm64_EMMC_V1.0.10-220108.img.xz
  2. Burn to SD the desired “SD/USB” image - http://dl.khadas.com/firmware/Edge/Ubuntu/SD_USB/edge-ubuntu-20.04-server-linux-5.18-fenix-1.1.1-220725.img.xz
  3. Run the sudo emmc install command from SD
  4. Reboot and OS is running

@numbqq any ideas about the root cause? Also, can we please ask to upload an “EMMC” image of Ubuntu 20.04 Server 5.18 fenix 1.1.1 ?- Having to do “two burns” is not very scalable

Hello @numbqq any thoughts about uploading an “EMMC” image of Ubuntu 20.04 Server 5.18 fenix 1.1.1?

Hello @GuyGuy

For 5.x images, no plan to support eMMC installation.