Install Manjaro into eMMC

You can see what I did here.

I do notice that one of my Zero is having issue to boot from time to time. It can load boot.scr but fail when trying to load initrd/kernel. ls mmc 0:1 works fine in U-Boot. A workaround I saw people using was let it sit without power for a few minutes before plug in. I tried it a few times and it seems to work.

It is not very clear as you assume that ubuntu is being used.

Technically what I understand is that you flash the uboot using rz tools.
And then flash the os image on the emmc drive.

Correct ?

Yeah that part can be improved. Iā€™m just following the precedent that our documentation is targeting Ubuntu users.

The first image is not U-Boot. It is a piece of code that exposes the internal eMMC as a USB drive.

Ok then how is the uboot flashed?

I actually didnā€™t flash uboot manually. Just dd the whole image to eMMC and the image itself should contains the uboot at the head of the file.

Which image contains uboot ? AFAIR I never added uboot to Manjaro Radxa Zero image.

21.12 minimal. I had it listed in the GitHub as well. Iā€™ll do more testing on Monday to see whatā€™s going on.

So I read some documentation and it seems that we put bootloader in mmcblk1boot0 and mmcblk1boot1.

So I figured out my issue. I was indeed booting off from the leftover bootloader from our Android image. Iā€™ll update documentations to reflect that. I donā€™t see a download link for that bootloader so Iā€™ll get it uploaded tomorrow, along with how to flashing it without downloading flashing the whole Android image.

Normally we do it by taking a backup of the vendor uboot and reflashing it back.
You can find the command here

This is the install-emmc script I use and it works fine on other amlogic devices which I had tested but on radxa zero it have problem with emmc driver I suppose as it would timeout for some reason.

So this is something you run once you boot off microSD right? I think it is still gonna be handy to have the U-Boot file so people can install directly to eMMC.

Also do you know where did it timeout?

I can try it again and share the logs.

You can try it by flashing 21.12 image on sd card and booting into it.

Then run the install script in /boot/ as root.
While monitoring the uart logs.

Good luck.

Just did 2 runs and it worked fine for me. The only issue I had was that I need to run date -s 2022-01-01 first, otherwise tar will spam the console with future timestamp warning.

# Linux Host, Zero in mass storage bootrom
## Wipe mmcblk0 and install vendor U-Boot
sudo dd if=/dev/zero of=/dev/sdX bs=128M status=progress && \
sudo dd if=android-bootloader.img of=/dev/sdX bs=512 seek=1 && \
sync
# Now go to Zero's vendor U-Boot console
# WARNING
# If you have 3 devices instead of 2 listed by the command below,
# you are using upstream U-Boot.
# Change all `mmc dev 1 X` command to `mmc dev 2 X`
mmc list
## Wipe mmcblk0boot0
mmc dev 1 1
mmc erase 0 2000
## Wipe mmcblk0boot1
mmc dev 1 2
mmc erase 0 2000
reset
# Now boot into microSD to install

The vendor U-Boot is now on our website.

Edit: I might speak too soon. 2nd install completed without error but I canā€™t boot into eMMC. Might have something to do with how I flashed bootloader. However, the script itself gave no error for me.

Yes thatā€™s normal for any file transfer if your current date is old.

The script cannot detect if the existing uboot can work on emmc so yes the script will only show success.

I think an extra option like --warning=no-timestamp to suppress this message will be very helpful.

I wasnā€™t expecting the script to do that. I was talking about the timeout issue you were having. Right now I feel like you are having hardware issue, but Iā€™ll need the error message to check with our hardware engineer.

1 Like

Good idea.

Yes I suspect something similar.

I will try it out tonight and share the logs.

Hi,

I flashed Manjaro-ARM-minimal-radxa-zero-20220117.img.xz with the followig steps on windows:

  1. radxa-zero-erase-emmc.bin
  2. android-bootloader.img
  3. rz-udisk-loader.bin
    With etcher:
  4. Manjaro-ARM-minimal-radxa-zero-20220117.img.xz

Problem is I donā€™t get any HDMI output as it does not seem to boot.

What am I doing wrong?

Thanks.

This image is to be used with bsp uboot on emmc as the Manjaro Image does not have any uboot.

Please try this steps.

  1. Flash Android on eMMC.
  2. Boot into Android. (just to make sure it works)
  3. Flash Manjaro-ARM-minimal-radxa-zero-20220117.img.xz with etcher on sdcard.
  4. Insert SD Card and it should boot into Manjaro over sdcard.
  5. Test if everything that you want works on sdcard and make sure the time is synced to your current time.
  6. Run the Install emmc script as root. sudo /boot/install-aml-emmc.sh (This will install the same OS from SD Card to emmc).
  7. Reboot. (without sdcard to boot into emmc)

Future images will come with uboot in the Manjaro Images as we just discussed this today with Radxa team.

Hi, thanks a lot for your swift reply and advice.

Hm, no SD card here at hand :frowning:

Will maybe then wait for the release with the uboot!

Thanks again.

Try with usb. But you will need typec hub for it.

Ok will try to release one image with uboot.