Rock Pi 4: Installation via manjaro-arm-installer on emmc fails in Rock Pi 4 Plus B

Hi!
first, thanks for your great work in this project. I got a new Rock Pi 4 Plus B with integrated emmc and just recently got to know Manjaro Linux. I am able to flash the Rock Pi 4B image on an SD card and can boot the OS from SD card. Then I wanted to install it on the integrated emmc via manjaro-arm-installer. I followed the instructions from the gitlab readme and everthing seemed to work fine. I chose /dev/mmcblk1 as installation device (mmcblk0 is the sd card, no idea what the mmcblk1boot0 device does) and two partitions are created. Uboot seems to be installed correctly, as I can boot without an SD card. But it fails and enters network boot stage. Here is the serial console output:

U-Boot TPL 2021.10-2 (Dec 30 2021 - 18:30:32)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM…

U-Boot SPL 2021.10-2 (Dec 30 2021 - 18:30:32 +0000)
Trying to boot from MMC2

U-Boot 2021.10-2 (Dec 30 2021 - 18:30:32 +0000) Manjaro Linux ARM

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM: 3.9 GiB
PMIC: RK808
MMC: mmc@fe310000: 2, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC… *** Warning - bad CRC, using default environment

In: serial
Out: vidconsole
Err: vidconsole
Model: Radxa ROCK Pi 4B
Net: eth0: ethernet@fe300000
Hit any key to stop autoboot: 0
Card did not respond to voltage select! : -110
rockchip_pcie pcie@f8000000: PCIe link training gen1 timeout!

Device 0: unknown device
starting USB…
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe800000: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fe900000: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices… 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices… 1 USB Device(s) found
scanning bus usb@fe800000 for devices… 1 USB Device(s) found
scanning bus usb@fe900000 for devices… 1 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found

Device 0: unknown device
rockchip_pcie pcie@f8000000: failed to find ep-gpios property
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.178.73 (6 ms)
*** Warning: no boot file name; using ‘C0A8B249.img’
Using ethernet@fe300000 device
TFTP from server 192.168.178.1; our IP address is 192.168.178.73
Filename ‘C0A8B249.img’.
Load address: 0x800800
Loading: T T T

I can confirm this also doesn’t work using
dd if=manjaro.img of=/dev/mmcblk1
There is something hanging during the boot process.
Due to this, you have to either erase or flash the emmc from usb for anything to boot anymore. When manjaro is on emmc I am no longer able to boot from sd card. I flashed debian from rockchip onto the emmc from usb and it worked fine. then reflashed manjaro onto sd card and it booted that up instead.
I don’t know what about flashing manjaro onto the emmc stops all booting from all devices but it does.

The SPI flash is irrelevant in my case. At first, I was trying with shorting pins 23 and 25 to bypass it. This didn’t work, so when I had Debian running I erased the SPI. Then tried manjaro again, nothing.

The rockchip wiki says that the spi erase script is included in Debian, which it’s not. So here it is in case someone needs it, it was hard to find

sudo ./thisscript.sh #related package: rockpi4b-rk-u-boot-latest

#!/bin/bash

set -eo pipefail

if [[ "$(id -u)" -ne "0" ]]; then
    echo "This script requires root."
    exit 1
fi

if ! which flash_erase &>/dev/null; then
    echo "Install mtd-utils with 'apt-get install mtd-utils'"
    exit 1
fi

echo "Doing this will overwrite data stored on SPI Flash"
echo "  and it will require that you use eMMC or SD"
echo "  as your boot device."
echo ""

while true; do
    echo "Type YES to continue or Ctrl-C to abort."
    read CONFIRM
    if [[ "$CONFIRM" == "YES" ]]; then
        break
    fi
done

if ! MTD=$(grep \"loader\" /proc/mtd | cut -d: -f1); then
    echo "loader partition on MTD is not found"
    return 1
fi

flash_erase "/dev/$MTD" 0 0

echo Done.

Another thing to note, from radxas wiki. Might be relevant.

Note: Normally the image name should ends with xxx-gpt.img. If the image name ends with xxx-rkupdate.img, you can not flash with this method.

wiki.radxa /Rockpi4/dev/usb-install

This should be fixed by the 2022.01-2 u-boot we now have. So the Manjaro ARM Installer should now install to eMMC fine.

it worked! thanks