Hi, there does not seem to be a updated tutorial for roc-rk3328-cc for flashing firmware into EMMC.
I tried the methods based on firefly wiki. I think your latest ubuntu-22-04-1-jammy-lts firmware is so-called RAW firmware so I flashed it that way. The RkDevTool provided does not contain the loader files, so I mananged to find one online here rk33 · master · zewanz / rkbin · GitLab .
I entered MASKROM successfully, and it flashed successfully, but it does not boot. What went wrong? (No serial cable at the moment, so not sure about uboot log)
Can you provide a workflow with all necessary files that works with your latest image? (BTW I really appricate your effort to update the images years after releasing the board. That is why I got a new board now despite having newer toys, good job!)
Also, a well written instruction that tell you how to flash it after booting with a SD card would also help. I see some discussion for the S905X board, but not one for RK3328 board. I imagine steps are similar but being a linux newbie I do not want to risk it.
How does one accomplish this task? I have a Renegade board on which I installed Armbian by flashing to an SD card. I then received a new 32 GB eMMC module for the Renegade board, installed it, then used the nand-sata-install utility to copy the SD card to the eMMC.
I have decided that I want to try the official Libre Computer Ubuntu distribution. I have a Windows 11 Pro PC on which I flashed the SD Card. Since (I believe) you have correctly characterized that the eMMC device is the preferred boot device on the renegade and I am not aware that the pyamlboot utilities would work from a Windows PC, are you aware of alternative methods one might use to properly erase the eMMC storage on the Renegade? Thank you in advance for your time and consideration.
sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=1 to erase the eMMC boot sector
It could be /dev/mmcblk0 or /dev/mmcblk1 depending on how Armbian is setup.
Then boot off the MicroSD card either Ubuntu or Raspbian and flash via sudo dd if=image.img of=/dev/mmcblk0 bs=1M
Reboot and remove the MicroSD card
Thank you, this worked for me. It seemed mysterious and like it should have been harder than wiping
the boot sector from the eMMC device to force things to load from the SD card. But hey - I am having fun learning how things work in the SoC world!
In case others might be wondering, here’s what my experience yielded:
Armbian’s installation (a nightly dev build based on Ubuntu running kernel version 5.19.90) on the eMMC device showed the eMMC as /dev/mmcblk1. So, the first dd command as suggested (ending in “count=1”) was indeed the correct device. Still, the ‘ls /dev/mmcblk*’ command should only come back with one root device matching with the device number (probably ‘0’ or ‘1’).
This forced a boot from the MicroSD card since there was no longer any boot loader capability from the point that the system starts to look for that information to find the boot loader (there seem to be tiny segments / lower level constructs on the eMMC device reserved for low level system use including a pointer to where the mass storage media first record is written)
Once I successfully booted and configured from the SD fresh install, I pulled the image I wanted to load onto the running SD card install and did the ls command above again to see that I had two different devices - /dev/mmcblk0 and /dev/mmcblk1.
For my own sanity, I wanted to be double-sure that I was writing to the right device before executing the dd command (please don’t see this as a lack of trust - but let’s just say I have learned the hard way at work to be careful with the dd tool - it saves time in not having to restore from backup!). I can tell which device is running the current OS from where the root and /boot filesystems are mounted. I want to target the eMMC. So, grepping the output of a mount command will tell me which device I do not want to write to (sudo mount -l | grep mmcblk). I confirmed that the command as listed is correct - the ‘of=/dev/mmcblk0’ segment of the dd command specifies the target I want, since / and /boot were mounted from the device labled /dev/mmcblk1 indicating the running system on the SD card.
Attempting the ‘dd’ command from Armbian using sudo did not work. I got permission denied. I had to fully login as root to run ‘dd’. So, I got a root prompt (i.e. sudo -s). Rather than decompress the image file, I chose to use xzcat to decompress and pipe it into dd (i.e. xzcat linux.img.xz | dd of=/dev/mmcblk0 bs=1M status=progress) and added progress reporting. It took about 400 seconds +/- to load the current Libre Computer Ubuntu 22.04.1 image on to the eMMC card.
Once the dd command was done, I logged out and powered off the system, removed the SD Card, and successfully booted the fresh and clean official image from the eMMC card.
Mission Accomplished! Again, a big thank you to librecomputer!
Flashing via Ubuntu, using a Libre branded eMMC module
Network Connection or USB flash drive with image
Flash a MicroSD card with Ubuntu.
Boot the Renegade with the MicroSD card.
a. go through the install sequence, but don’t bother with updates just yet.
b. Go into Settings / Power and set Screen Blank to Never.
Download or copy the image to the MicroSD card you are currently running on.
a. I copied from a USB3 stick in the USB3 port and it was fairly quick.
Extract the image.
Verify that the eMMC is blank. I installed gPartd and yes, it was.
Use dd or Gnome Disk Utility to flash the eMMC.
The eMMC should show up as /dev/mmcblk0.
For dd, sudo dd if=IMAGE of=/dev/mmcblk0 bs=1M. Replace IMAGE with the name of the extracted file.
The exact command for me was:
dd /home/user/Download/ubuntu-22.04.1-preinstalled-desktop-arm64+roc-rk3328-cc.img of=/dev/mmcblk0 bs=1M
For me, this completed a lot faster than I thought it would. It was faster than the copy of the img file from USB3 to MicroSD.
Shutdown / Power Off the Renegade.
Remove the MicroSD card. And in my case, also remove the USB3 stick.
Power on the Renegade and it should go through the OS install sequence from the eMMC now.
a. Restart after everything is finished. It would hang on updates without this restart.
b. Now is the time to perform the system updates.