Jump to content

Recommended Posts

Posted (edited)

Is there a github repo for armbian-install? On the RockPi-S with both eMMC and SD cards installed, it's showing the devices backwards or un-named in the menu. I'd like to open an issue report to see if it can be fixed.

Edited by Meestor_X
Posted

Can someone explain these lines?

	# find real mmcblk device numbered 0, 1, 2 for eMMC, SD
	for ret in $(find /dev -name 'mmcblk[0-2]' -and -type b)
	do
		if [ -b ${ret}boot0 ];then
			emmc_dev=$ret
		else
			sd_dev=$ret
		fi
	done


On the RockPi-S, $ret would equal mmcblk0 and mmcblk1 which are the eMMC and SD card, respectively. There's no device called "mmcblk0boot0" or "mmcblk1boot0".

Posted
16 часов назад, Meestor_X сказал:

Is there a github repo for armbian-install? On the RockPi-S with both eMMC and SD cards installed, it's showing the devices backwards or un-named in the menu. I'd like to open an issue report to see if it can be fixed.

Please post the output of the df -h and lsblk commands here.

Which image are you using and which version of u-boot is running on your board? (this can be seen in the UART console)

Posted
df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            159M     0  159M   0% /dev
tmpfs            47M  4.8M   42M  11% /run
/dev/mmcblk1p1   58G  3.4G   53G   7% /
tmpfs           234M   76K  233M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           234M  4.0K  234M   1% /tmp
/dev/zram1       47M  2.4M   42M   6% /var/log
/dev/mmcblk0p1  3.4G  2.0G  1.3G  62% /media/emmc
tmpfs            47M     0   47M   0% /run/user/0
 

 

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mmcblk1     179:0    0  59.6G  0 disk 
└─mmcblk1p1 179:1    0    59G  0 part /var/log.hdd
                                      /
mmcblk0     179:32   0   3.6G  0 disk 
└─mmcblk0p1 179:33   0   3.5G  0 part /media/emmc
zram0       252:0    0 233.1M  0 disk [SWAP]
zram1       252:1    0    50M  0 disk /var/log
zram2       252:2    0     0B  0 disk 

 

lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Armbian 25.8.1 bookworm
Release:	12
Codename:	bookworm

uname -r
6.12.44-current-rockchip64

 

I don't have an easy way to do the serial terminal thing to check U-Boot. I have updated it to the "latest" using armbian-install, however...

Posted
1 час назад, Meestor_X сказал:
mmcblk1     179:0    0  59.6G  0 disk 
└─mmcblk1p1 179:1    0    59G  0 part /var/log.hdd

Is this your SD card?

 

1 час назад, Meestor_X сказал:
mmcblk0     179:32   0   3.6G  0 disk 
└─mmcblk0p1 179:33   0   3.5G  0 part /media/emmc

This is your eMMC just 3.6G in size.
This is the first time I have met this variant.
We need to think about whether it is possible to add an exception for this case.

 

Posted
18 часов назад, Meestor_X сказал:

If I understood a bit better what the script is doing, i.e. this part: 

 

Then maybe I could help with updating it to work with the Radxa products.

 

On 99% of the devices I know, eMMC is initialized in the OS as /dev/mmcblk0, but there are cases when this is not the case.

# find real mmcblk device numbered 0, 1, 2 for eMMC, SD
	for ret in $(find /dev -name 'mmcblk[0-2]' -and -type b)
	do
		if [ -b ${ret}boot0 ];then
			emmc_dev=$ret
		else
			sd_dev=$ret
		fi
	done

This part of the code was implemented due to the fact that on some eMCC platforms there can be

both /dev/mmsblk0 and /dev/mmcblk1(2)

This works for chips that provide boot0\boot1 partitions to write the bootloader.

 

I think we can add more sophisticated logic to handle this exception for these chips.

You can add here the name of the chip on your device.
The translation may not be accurate. Please specify if something is not clear.

Posted
1 час назад, Meestor_X сказал:

What do you suggest I do?
I'm not sure that the "update bootloader" choices are showing the correct devices either.

Please show screenshots of the selection menu step by step when you are trying to install the OS on eMMC.
Show me what you see that I cannot see.

Posted
06.10.2025 в 03:32, Meestor_X сказал:

Can someone explain these lines?

	# find real mmcblk device numbered 0, 1, 2 for eMMC, SD
	for ret in $(find /dev -name 'mmcblk[0-2]' -and -type b)
	do
		if [ -b ${ret}boot0 ];then
			emmc_dev=$ret
		else
			sd_dev=$ret
		fi
	done


On the RockPi-S, $ret would equal mmcblk0 and mmcblk1 which are the eMMC and SD card, respectively. There's no device called "mmcblk0boot0" or "mmcblk1boot0".

 

Copy armbian-install to bin home directory

Цитата

cd $HOME

mkdir -p bin

cp /usr/bin/armbian-install $HOME/bin/

 

nano ./bin/armbian-install

Please replace line 839 as indicated here:

Цитата

@@ -836,7 +836,7 @@ main()
       # find real mmcblk device numbered 0, 1, 2 for eMMC, SD
       for ret in $(find /dev -name 'mmcblk[0-2]' -and -type b)
       do
-               if [ -b ${ret}boot0 ];then
+               if [ -b ${ret}boot0 ] || [  "${emmccheck}" == "$ret"  ]; then
                       emmc_dev=$ret
               else
                       sd_dev=$ret
 

 

Run the corrected version of the script.

Цитата

sudo ./bin/armbian-install

 

If everything works correctly for you, confirm it here.
I will add a correction to the next pull request.

Posted

That seems to work!
image.png.4dd49aa886e7e5839cad4c63c597b474.png

 

Let me ask you this, though. Can you clarify what selection #2 means?
Selection #1 will copy the eMMC image to the SD card.
Selection #3 will copy the SD card to the eMMC (shouldn't the text read "Boot from eMMC - system on SD Card, SATA, USB or NVMe")

What is selection #2 for?
 

Posted
19 минут назад, Meestor_X сказал:

What is selection #2 for?

see:

/usr/bin/armbian-install

The create_armbian function takes different arguments depending on the selection number.

 

49 минут назад, Meestor_X сказал:

That seems to work!
image.png.4dd49aa886e7e5839cad4c63c597b474.png

Everything looks right on this selection screen.
But it seems to me that we see an excessive selection offer in the next selection step and this is misleading.
But on other platforms where loading is possible only from a soldered chip, which is defined by the kernel as /dev/mtd,

the selection screen will look logical.

 

Try installing the OS on an eMMC or on an SSD connected to the device via a USB-SATA adapter using various options.
Experiment.
If you find illogical options, then feel free to write your opinion here.

 

 

Posted

Ok, I only use this utility on Radxa products ATM, and AFAIK they can't boot from USB without a bootloader on the eMMC or SD card.
If I had an image on a USB flash drive attached to the SBC, where would armbian-install expect to find it mounted? And then, would choice #1 or #3 use the SD card or the USB image?

Also, should option #2 not show? I don't know how it would copy from the eMMC to the eMMC...

 

The operation of the script works well, but the menu could be much clearer for the Radxa products.

Posted
2 часа назад, Meestor_X сказал:

If I had an image on a USB flash drive attached to the SBC

Sorry, I don't have this device.
Try inserting a USB flash drive into the USB connector and installing the OS from the SD card on it.
Try the available options. And choose focusing on your own real logic.

 

Of particular interest and attention if you install the OS on eMMC.

Then boot from the eMMC without an SD card connected.

And then insert the card into the SD connector and run $HOME/bin/armbian-install.
What do you see in the selection window?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines