Installation on Odroid XU4 eMMC (Guide)

Seems there has been a few threads here trying to do this with mixed results. I have figured out exactly what is going on and why there is a lot of confusion.

The XU4 can boot in two modes, from a SD card, or from eMMC.

When booting from SD, it loads u-boot from the SD card, which resides in the first 4MB of the image and life is good.

When booting from eMMC, it loads u-boot from a protected/hidden block on the device, which if you have never updated it, is from 2017 and is missing support for squashfs, and a few required commands such as fileenv

The HAOS not only requires fileenv, it also puts the kernel image (zImage) in partition 5, which is a squashfs filesystem.

If like me, you are using the eMMC->Flash adapter ODROID provided with these devices, you can not access the hidden boot block on the device to update it.

The solution thankfully is not too hard.

  1. As per normal, write the HAOS image to both the eMMC AND a sd-card.
  2. Set the odriod to boot off sd-card and install both the eMMC and sd-card.
  3. Boot HAOS, and when presented with the prompt switch to the next tty (Alt+Right), login as root, no password should be required
  4. Unlock the boot block on the eMMC so we can update it:
    echo 0 > /sys/block/mmcblk0boot0/force_ro
  5. Copy the updated uboot from the HAOS image on the eMMC to the boot block
    dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=512 skip=1
  6. Shutdown and unplug the power from the device
    poweroff
  7. Remove the sd-card and change the switch to boot from eMMC

It should now properly boot with the version of u-boot that HAOS is distributing with the image.

If you have the UART connected you should see something similar to the following, noting the U-Boot date is current:

U-Boot 2025.01 (Sep 08 2025 - 17:04:25 +0000) for ODROID-XU3/XU4/HC1/HC2

DRAM:  2 GiB
Core:  72 devices, 12 uclasses, devicetree: separate
MMC:   mmc@12200000: 0, mmc@12220000: 2
Loading Environment from MMC... Reading from MMC(0)... *** Warning - bad CRC, using default environment

Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Model: Odroid XU3/XU4/HC1/HC2 based on Exynos5422
Type:  xu4
Boot device: MMC(0)
Net:   No ethernet found.
Card did not respond to voltage select! : -110
MMC Device 1 not found
no mmc device at slot 1
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
2683 bytes read in 2 ms (1.3 MiB/s)
## Executing script at 50000000
switch to partitions #0, OK
mmc0(part 0) is current device
loading env...
MMC read: dev # 0, block # 1222656, count 32 ... 32 blocks read: OK
36 bytes read in 1 ms (35.2 KiB/s)
65191 bytes read in 4 ms (15.5 MiB/s)
Working FDT set to 43000000
Trying to boot slot A, 2 attempts remaining. Loading kernel ...
11891312 bytes read in 520 ms (21.8 MiB/s)
storing env...
MMC write: dev # 0, block # 1222656, count 32 ... 32 blocks written: OK
bootargs=zram.enabled=1 zram.num_devices=3 systemd.machine_id=019776a0cdff42469110bdcd5c5fdbfe fsck.repair=yes  root=PARTUUID=48617373-06
 ro rootwait rauc.slot=A console=ttySAC2,115200 console=tty0
Starting kernel
Kernel image @ 0x42000000 [ 0x000000 - 0xb57270 ]
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
Working FDT set to 43000000
   Loading Device Tree to 4ffed000, end 4ffffea6 ... OK
Working FDT set to 4ffed000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x100