Rock64 Debian 11 (Bullseye) install problem
#1
I have a Rock64-2GB (V3.0).  Following these instructions (https://wiki.pine64.org/wiki/ROCK64_Soft...ses#Debian), I downloaded and burned a Debian 11 (Bullseye) installer to a microSd.

I don't have eMMC, so I installed a blank microSD into a USB3 adapter, and with the installer in the microSD slot and the target in the USB3 slot, I ran the installer, selecting sda as the target.

It took a while, but when it finished and started to reboot, I powered off, removed the installer, and put the newly installed microSD in the microSD slot.

It didn't boot.  I even tried using an HDMI head, but to no avail.

To temporarily continue with my work, I am running Armian (Bullseye), but that has it's own issues and I need to get the stock Debian working.

Can anyone offer help or suggestions?
  Reply
#2
If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".
  Reply
#3
(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Wow, I was so close.  Thanks for your reply.

So I have a fully built microSD that won't boot.  Can you tell me how I can "apt install u-boot-rockchip" on it?

Is there a "boot-to" program that I can run from my Armian microSD to boot the USB3 (SDA) image?
  Reply
#4
Well, I spent half a day on this and in the end found several solutions.

The solution that worked best for me in the end was:
  • Download, burn, and install Armbian_21.08.1_Rock64_bullseye_current_5.10.60.img.xz to a microSD as a "rescue image".
  • Insert the newly installed/created (but not yet bootable) Debian 11 microSD into a USB adapter and inert in Rock64.
  • Power up and boot Armbian "rescue image."
  • Log in as root and:
  •     apt install -y u-boot-rockchip
  •     u-boot-install-rockchip /dev/sda
That's it.  The new Debian 11 microSD in the USB adapter is now bootable.  Move it to the microSD slot and reboot.

There are also some "side-boot", what I referred to as "boot to" (and flashing) programs available:
  • apt install -y python3-pip rkflashtool
  • pip3 install pyamlboot

Thanks as365n4 for pointing me to the u-boot-install-rockchip package.

The main issue I was having was either booting my new image, or booting an image I could use to write the u-boot partition.
  Reply
#5
Rockchip's 'u-boot' requires 16MB of free space at the top of the media for installation.
On the other hand, the 'partitioning-tools' included with 'debian-installer' does not take any of the above requirements into account.
As with a standard x86-PC, only 1MB of space is allocated at the top of the media.

Allocation of 'u-boot' space must be done intentionally by the user at the time of partitioning.

----
In short, unless you do something about it, you will end up with a partition allocation that has no space for the 'u-boot' installation.
If the 'u-boot' installation operation is performed on media configured as described above, the original data will of course be destroyed.

As an example, 'debian-installer' or 'Armbian' or 'Other-distribution' are all partitioned with the first 16MB of free space on the media.
We recommend that you compare this with the image you have created.
  Reply
#6
(07-05-2022, 04:46 PM)t4_4t Wrote: Rockchip's 'u-boot' requires 16MB of free space at the top of the media for installation.
On the other hand, the 'partitioning-tools' included with 'debian-installer' does not take any of the above requirements into account.
As with a standard x86-PC, only 1MB of space is allocated at the top of the media.

Allocation of 'u-boot' space must be done intentionally by the user at the time of partitioning.

----
In short, unless you do something about it, you will end up with a partition allocation that has no space for the 'u-boot' installation.
If the 'u-boot' installation operation is performed on media configured as described above, the original data will of course be destroyed.

As an example, 'debian-installer' or 'Armbian' or 'Other-distribution' are all partitioned with the first 16MB of free space on the media.
We recommend that you compare this with the image you have created.


Thanks for the info.  I used the (Debian Bulseye) debian-installer and apparently only 1MB precedes the /boot partition.

It seems to boot and run fine; what do you suggest?

My partition info:
Code:
# fdisk -l
Disk /dev/mmcblk1: 29.11 GiB, 31255953408 bytes, 61046784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 296D4F2A-EF97-4DC6-B59D-80AFCF64E47A

Device            Start      End  Sectors  Size Type
/dev/mmcblk1p1    2048  999423  997376  487M Linux filesystem
/dev/mmcblk1p2  999424 59043839 58044416 27.7G Linux filesystem
/dev/mmcblk1p3 59043840 61044735  2000896  977M Linux swap

(07-05-2022, 04:46 PM)t4_4t Wrote: Rockchip's 'u-boot' requires 16MB of free space at the top of the media for installation.
On the other hand, the 'partitioning-tools' included with 'debian-installer' does not take any of the above requirements into account.
As with a standard x86-PC, only 1MB of space is allocated at the top of the media.

Allocation of 'u-boot' space must be done intentionally by the user at the time of partitioning.

----
In short, unless you do something about it, you will end up with a partition allocation that has no space for the 'u-boot' installation.
If the 'u-boot' installation operation is performed on media configured as described above, the original data will of course be destroyed.

As an example, 'debian-installer' or 'Armbian' or 'Other-distribution' are all partitioned with the first 16MB of free space on the media.
We recommend that you compare this with the image you have created.

I went back and examined what u-boot-install-rockchip does on my Rock64.  And it does indeed require at least the first 8,467,720 bytes.

So it looks like I'm starting over from scratch.  Thanks for bringing this to my attention.
  Reply
#7
(07-04-2022, 06:35 PM)jbize Wrote: Well, I spent half a day on this and in the end found several solutions.

The solution that worked best for me in the end was:
  • Download, burn, and install Armbian_21.08.1_Rock64_bullseye_current_5.10.60.img.xz to a microSD as a "rescue image".
  • Insert the newly installed/created (but not yet bootable) Debian 11 microSD into a USB adapter and inert in Rock64.
  • Power up and boot Armbian "rescue image."
  • Log in as root and:
  •     apt install -y u-boot-rockchip
  •     u-boot-install-rockchip /dev/sda
That's it.  The new Debian 11 microSD in the USB adapter is now bootable.  Move it to the microSD slot and reboot.

There are also some "side-boot", what I referred to as "boot to" (and flashing) programs available:
  • apt install -y python3-pip rkflashtool
  • pip3 install pyamlboot

Thanks as365n4 for pointing me to the u-boot-install-rockchip package.

The main issue I was having was either booting my new image, or booting an image I could use to write the u-boot partition.


I inserted the "rescue" image but I cannot see the screen (I use HDMI to connect to my display) What am I doing wrong?
  Reply
#8
(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Hi,
I'm stuck just in this place. Can you help me to make my debian SD card bootable? I'm newbie and dont konw how to proceed with  two options you suggest.
Thanks in avance
  Reply
#9
(09-04-2022, 11:48 AM)ju0n Wrote:
(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Hi,
I'm stuck just in this place. Can you help me to make my debian SD card bootable? I'm newbie and dont konw how to proceed with  two options you suggest.
Thanks in avance

a bit late but hope it will help others who searched for a solution...

As pointed out above the Debian Installer is kind of broken as it does not install u-boot and also does not partition the target correctly.
There are several options build your own image as decribed here
Or use an image from a different Distro and partition the target and install u-boot and then use the Debian Installer without reformating the drive, as others suggested.

Myself as I had no luck with the Debian Installer, I always build my own image if I have to flash a Rock64 or H64B.
Also worth a note, the Debian Installer offers a shell which one could access and do comand line work, but the included BusyBox has a very limited amount of comands available.

With regards to partitioning the first 32767 sectors of the SD-Card or eMMC-Module are reserved for u-boot on any Rockchip based Board!
Your partitions need to start after or on sector 32768, otherwise you will end up with a brocken partition as the u-boot flash does not care about your partitions and may overwrite your data if you used any sector before 32767.
  Reply
#10
(11-25-2022, 09:02 AM)as365n4 Wrote:
(09-04-2022, 11:48 AM)ju0n Wrote:
(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Hi,
I'm stuck just in this place. Can you help me to make my debian SD card bootable? I'm newbie and dont konw how to proceed with  two options you suggest.
Thanks in avance

a bit late but hope it will help others who searched for a solution...

As pointed out above the Debian Installer is kind of broken as it does not install u-boot and also does not partition the target correctly.
There are several options build your own image as decribed here
Or use an image from a different Distro and partition the target and install u-boot and then use the Debian Installer without reformating the drive, as others suggested.

Myself as I had no luck with the Debian Installer, I always build my own image if I have to flash a Rock64 or H64B.
Also worth a note, the Debian Installer offers a shell which one could access and do comand line work, but the included BusyBox has a very limited amount of comands available.

With regards to partitioning the first 32767 sectors of the SD-Card or eMMC-Module are reserved for u-boot on any Rockchip based Board!
Your partitions need to start after or on sector 32768, otherwise you will end up with a brocken partition as the u-boot flash does not care about your partitions and may overwrite your data if you used any sector before 32767.

Thanks!
It looks like some complicated  to me, but i'll try to  build my own debian  image next time.
Hopefully i've get a working debian  image with a simpler  aproach:
I've used  debian  installer, then using gparted i did move all partitions freeing the device first 16 mb and finally write u-boot this way https://forum.pine64.org/showthread.php?tid=8174
Hope it can help
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PBP Debian 11 GRUB install error zlth 2 125 11-18-2022, 07:42 AM
Last Post: zlth
  Rock64 won't boot luminosity7 1 146 11-04-2022, 04:28 PM
Last Post: luminosity7
  MRAA Rock64 support jbize 2 651 07-09-2022, 04:40 AM
Last Post: igorp
  dependency problem cerno 4 3,358 05-07-2021, 08:18 AM
Last Post: cerno
  How to boot from the SD card and install to eMMC? ravanh 2 5,120 03-18-2020, 09:42 AM
Last Post: tophneal
  Rock64 with Debian netinst usb Bloris 6 6,799 12-03-2019, 12:37 PM
Last Post: madalin
  The differences between Rock64 and RockPro64 phamoanh 1 3,247 06-12-2019, 10:44 PM
Last Post: evilbunny
  Install OS on RAID1 thanks to dual SATA board? Thatoo 12 11,539 05-15-2019, 02:55 PM
Last Post: Thatoo
  The Debian Jessie User Accounts? jesse1234 6 5,885 01-20-2019, 06:07 PM
Last Post: zer0sig
  Custom Kernel for ROCK64 mayst 2 4,085 01-07-2019, 08:04 AM
Last Post: mayst

Forum Jump:


Users browsing this thread: 1 Guest(s)