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
  Upgrading ancient Rock64 timxjr1300 1 160 11-26-2024, 09:47 AM
Last Post: dmitrymyadzelets
  irradium (based on crux linux) Rock64 riscv64, aarch64 mara 7 1,225 11-19-2024, 02:54 PM
Last Post: mara
  problem with debian emmc boot G4zCDzWb 10 2,040 11-01-2024, 04:32 PM
Last Post: bits
  Debian installation via sd card oaFJSADBKV 0 160 10-12-2024, 10:24 AM
Last Post: oaFJSADBKV
  arch rock64 does not boot nemnob 1 1,040 09-20-2024, 11:18 AM
Last Post: AwU2HBg
  DietPi OS for ROCK64 MichaIng 42 45,199 09-01-2024, 06:43 AM
Last Post: RaymondDay
Smile First Lakka image for Rock64! Luke 47 82,504 09-01-2024, 06:05 AM
Last Post: RaymondDay
  How to update/compile Debian 12.5? Wizardknight 3 1,371 03-29-2024, 05:01 AM
Last Post: gedas07
  Rock64 v2 - did not work song / audio sqw200zu 2 1,974 03-14-2024, 03:09 AM
Last Post: dmitrymyadzelets
  Rock64 won't boot dstallmo 0 680 12-27-2023, 10:34 AM
Last Post: dstallmo

Forum Jump:


Users browsing this thread: 3 Guest(s)