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


Possibly Related Threads…
Thread Author Replies Views Last Post
  MRAA Rock64 support jbize 2 355 07-09-2022, 04:40 AM
Last Post: igorp
  dependency problem cerno 4 3,042 05-07-2021, 08:18 AM
Last Post: cerno
  How to boot from the SD card and install to eMMC? ravanh 2 4,850 03-18-2020, 09:42 AM
Last Post: tophneal
  Rock64 with Debian netinst usb Bloris 6 6,321 12-03-2019, 12:37 PM
Last Post: madalin
  The differences between Rock64 and RockPro64 phamoanh 1 3,006 06-12-2019, 10:44 PM
Last Post: evilbunny
  Install OS on RAID1 thanks to dual SATA board? Thatoo 12 10,782 05-15-2019, 02:55 PM
Last Post: Thatoo
  The Debian Jessie User Accounts? jesse1234 6 5,524 01-20-2019, 06:07 PM
Last Post: zer0sig
  Custom Kernel for ROCK64 mayst 2 3,870 01-07-2019, 08:04 AM
Last Post: mayst
  Creating bootable Debian backup image Drago 3 4,305 12-11-2018, 03:42 PM
Last Post: evilbunny
Bug Rock64 Login lpninja 1 3,360 10-04-2018, 12:02 AM
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)