Skip to content

armbian-install: eMMC install leaves /boot empty on single-partition sunxi boards (unbootable) #10099

Description

@igorpecovnik

Describe the bug

armbian-install (nand-sata-install) can leave /boot empty on the eMMC target, producing an unbootable install. The rootfs is copied fine, but there is no kernel / boot.scr / dtb/ under /boot, so u-boot finds nothing to boot and falls through to the network/DHCP fallback.

This was found while testing the sunxi u-boot v2026.07 migration (#10089), but it is not a u-boot bug — u-boot behaves correctly. Reproduced on Orange Pi PC Plus (H3); the same eMMC-boot symptom was also seen on Banana Pi M3 (A83T).

Evidence (from the u-boot console on the "failed" eMMC boot)

eMMC is mmc 1, it initialises fine, the rootfs is present, but /boot is empty:

=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
=> ls mmc 1:1 /
   ... (full rootfs: /armbian, /boot, /etc, ...)   3 file(s), 23 dir(s)
=> ls mmc 1:1 /boot
   ./
   ../
   0 file(s), 2 dir(s)      <-- empty: no boot.scr, no zImage, no dtb/

At runtime u-boot then scans the eMMC, finds no boot script, and gives up:

Scanning mmc 1:1...
...
EFI boot manager: Cannot load any image
sun8i_emac_eth_start: Timeout
BOOTP broadcast 1 ...

Root cause (analysis)

In packages/bsp/common/usr/bin/armbian-install:

  1. packages/bsp/common/usr/lib/armbian-install/exclude.txt excludes /boot/* from the rootfs rsync (used at armbian-install:259, :274, :326). So the rootfs copy intentionally skips /boot.
  2. The kernel/boot files are re-populated only by cp -R /boot "${TempDir}"/bootfs (armbian-install:404), inside the Boot from eMMC block.
  3. bootfs is only mounted onto the eMMC when a separate boot device $1 is provided (armbian-install:196, mount "$1" "${TempDir}"/bootfs).

For the single-partition sunxi layout (typical H3/A83T boards — one ext4 partition, /boot lives inside the rootfs, no dedicated boot partition), $1 is not a separate partition, so bootfs is not mounted onto the eMMC. The cp -R /boot …/bootfs at line 404 then writes to an unmounted temp dir instead of the eMMC's /boot, and because the rsync already excluded /boot/*, the target ends up with an empty /boot.

Expected behaviour

After installing to eMMC, the eMMC /boot should contain the kernel, boot.scr/boot.cmd, armbianEnv.txt, and dtb/, and the board should boot from eMMC.

Suggested fix (direction)

For the single-partition case (no separate boot partition, $1 unset or $1 == $2), ensure /boot is populated on the eMMC — e.g. copy /boot into "${TempDir}"/rootfs/boot (drop the /boot/* exclusion, or add an explicit cp -R /boot "${TempDir}"/rootfs/ step) rather than into the unmounted bootfs. The separate-boot-partition path ($1 set / bind-mount at armbian-install:427) already works.

How to reproduce

  1. Boot a sunxi single-partition board (e.g. Orange Pi PC Plus, H3) from SD.
  2. Run armbian-install, choose "boot from eMMC / system on eMMC".
  3. Power off, remove SD, boot from eMMC → u-boot falls through to network boot.
  4. On the u-boot console: mmc dev 1; ls mmc 1:1 /boot → empty.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions