Installing r2kaw and Tow-Boot to the SPI
#1
I am trying to get r2kaw and Tow-Boot installed to the SPI of the PPP at the same time.
I can install Tow-Boot to the SPI, and I can install r2kaw to the SPI, but I haven't figured out how to have both on the SPI.

For installing Tow-Boot to the SPI, I can follow the Tow-Boot installation instructions for the PPP, under the "Installing to SPI (recommended)" section.
For installing rk2aw, I can follow the rk2aw installation instructions for the PPP, under the "Installation to SPI NOR flash" section.
Here is the relevant part of the rk2aw installation instructions:

Quote:Installation steps are:

1) Erase the SPI NOR flash compeltely and install rk2aw

  # for RK3399:

  ./rk2aw-spi-flasher --erase-all --rk2aw rk2aw/debug.img.spi

  # for other SoCs:

  ./rk2aw-spi-flasher --erase-all --rk2aw rk2aw/debug.img

2) Install U-Boot or other bootloader

  a) U-Boot
 
    ./rk2aw-spi-flasher \
      --uboot-spl u-boot-spl.bin \
      --uboot-tpl u-boot-tpl.bin \
      --uboot-itb u-boot.itb

    (The above 3 files are normal build artifacts of U-Boot. You get them from
    a regular defconfig U-Boot build for your board.)

  b) Other bootloaders

    ./rk2aw-spi-flasher \
      --spl levinboot-emmc.img

  If flashing fallback bootloader add --replace-fallback to the above commands.
Although the instructions mention U-Boot and "other bootloaders", they don't directly mention Tow-Boot. So my first question was, what category does Tow-Boot fall under? U-Boot, since it's based off U-Boot, or "other bootloaders".

After downloading and extracting the "pine64-pinephonePro-2023.07-007.tar.xz" file from the latest Tow-Boot release, this is what I got:
Code:
$ tree ./pine64-pinephonePro-2023.07-007
./pine64-pinephonePro-2023.07-007
├── binaries
│   ├── Tow-Boot.noenv.bin
│   └── Tow-Boot.spi.bin
├── config
│   ├── noenv.config
│   └── spi.config
├── shared.disk-image.img
└── spi.installer.img

3 directories, 6 files
So there aren't the three "u-boot-spl.bin", "u-boot-tpl.bin", and "u-boot.itb" files mentioned in the U-Boot instructions, nor are there Tow-Boot equivalents.

Next I tried using the "shared.disk-image.img" file for the "Other bootloaders" method:
Code:
./rk2aw-spi-flasher --spl shared.disk-image.img
...
ERROR: File shared.disk-image.img is too big for the buffer size 1048576
Then I tried with "spi.installer.img":
Code:
./rk2aw-spi-flasher --spl spi.installer.img
...
ERROR: File spi.installer.img is too big for the buffer size 1048576

That's what I've tried so far. Any tips would be appreciated!
TIA, ethical_haquer
  Reply
#2
I would guess Tow-Boot.spi.bin is what you want to install with rk2aw-spi-flasher.
  Reply
#3
(12-12-2024, 07:57 PM)Kevin Kofler Wrote: I would guess Tow-Boot.spi.bin is what you want to install with rk2aw-spi-flasher.

Sadly, that also failed:
Code:
$ ~/rk2aw $ sudo ./rk2aw-spi-flasher --spl Tow-Boot.spi.bin
...
ERROR: File Tow-Boot.spi.bin is too big for the buffer size 1048576
  Reply
#4
Then it looks like Tow-Boot is unfortunately too big to be installed as a secondary bootloader next to rk2aw. Though I am not sure whether Tow-Boot is necessarily that big or whether those .bin files are padded and could be recompiled without the padding or with less padding.
  Reply
#5
I have rk2aw on my PPP.
It is an alternative to Tow-boot and uses uboot.
See here https://wiki.pine64.org/wiki/PinePhone_P...sing_rk2aw
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.12 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with pmOS/SXMO on eMMC
  Reply
#6
(12-15-2024, 05:41 PM)dukla2000 Wrote: I have rk2aw on my PPP.
It is an alternative to Tow-boot and uses uboot.
See here https://wiki.pine64.org/wiki/PinePhone_P...sing_rk2aw
I tried using it with U-Boot, but U-Boot couldn't find the pmOS installation I have on the eMMC.
I'm just surprised that no one has tried using Tow-Boot with rk2aw before. It should be possible, seeing as Tow-Boot is based off U-Boot.
  Reply
#7
(12-17-2024, 04:59 PM)ethical_haquer Wrote: I tried using it with U-Boot, but U-Boot couldn't find the pmOS installation I have on the eMMC.
...

rk2aw includes its own flavour of uboot (as does Tow-Boot): I had problems with pmOS and rk2aw as pmOS wasn't happy to have its boot directory in the same partition as /. So if I did a "default" pmOS where /boot had its own partition, and didn't bother with extlinux stuff, rk2aw happily picked up the EFI hooks and it loaded fine. However it kept randomly rebooting so I went with arch.

(12-17-2024, 04:59 PM)ethical_haquer Wrote: ...
I'm just surprised that no one has tried using Tow-Boot with rk2aw before. It should be possible, seeing as Tow-Boot is based off U-Boot.
I am perplexed as to why you would want to? Both Tow-Boot & rk2aw are "facilitators" between the board startup firmware and (their own flavour of) uboot. As such they flash LEDs, make disks available over USB and give some options which is your OS of choice for the day. I prefer rk2aw as it (better) supports multiple OSs on each disk.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.12 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with pmOS/SXMO on eMMC
  Reply
#8
(12-18-2024, 05:13 AM)dukla2000 Wrote:
(12-17-2024, 04:59 PM)ethical_haquer Wrote: I tried using it with U-Boot, but U-Boot couldn't find the pmOS installation I have on the eMMC.
...

rk2aw includes its own flavour of uboot (as does Tow-Boot): I had problems with pmOS and rk2aw as pmOS wasn't happy to have its boot directory in the same partition as /. So if I did a "default" pmOS where /boot had its own partition, and didn't bother with extlinux stuff, rk2aw happily picked up the EFI hooks and it loaded fine. However it kept randomly rebooting so I went with arch.

(12-17-2024, 04:59 PM)ethical_haquer Wrote: ...
I'm just surprised that no one has tried using Tow-Boot with rk2aw before. It should be possible, seeing as Tow-Boot is based off U-Boot.
I am perplexed as to why you would want to? Both Tow-Boot & rk2aw are "facilitators" between the board startup firmware and (their own flavour of) uboot. As such they flash LEDs, make disks available over USB and give some options which is your OS of choice for the day. I prefer rk2aw as it (better) supports multiple OSs on each disk.
I was under the impression that rk2aw was a loader for boot-loaders.
When you flash rk2aw to the SPI and there are no boot-loaders present on the SPI, eMMC, and microSD, rk2aw won't do anything.
And I was able to flash Tow-Boot to the microSD, and rk2aw to the SPI, and it worked. rk2aw would start up, and after pressing the power key Tow-Boot would load pmOS.
But that was not ideal, as having Tow-Boot on the microSD made it so I couldn't test out other installations easily.

How do you like Arch on the PPP?
  Reply
#9
(12-18-2024, 08:17 AM)ethical_haquer Wrote: I was under the impression that rk2aw was a loader for boot-loaders.
When you flash rk2aw to the SPI and there are no boot-loaders present on the SPI, eMMC, and microSD, rk2aw won't do anything.
...
Yes it is. But if you install it as per the multiboot instructions I first linked above it also installs uboot. (use sudo ./spinor-flash-initial-setup.sh ). Thereafter sudo ./rk2aw-spi-flasher with no parameters will report what is there as per this copy/paste (I wrote the eMMC section of that page!)



(12-18-2024, 08:17 AM)ethical_haquer Wrote: ...
How do you like Arch on the PPP?


My real poison is SXMO - love it. On arch or pmOS is pretty much the same: I just updated my signature and have arch on my PPP as it does not reboot randomly and has 6.12 kernel. (I am sure pmOS will be 6.12 on the PPP very shortly if not already in edge.) Arch is always quirky: at the moment wpa-supplicant and conky require exceptional TLC. But that is the pain/pleasure of arch ;-) Also arch is still SXMO 1.16 whereas pmOS is 1.17 (hardly game changer but I do tend to be a latest revision freak!)

Have pmOS on my PP which kinda makes sense as the PP is soo short of horsepower. And on PP it is 6.12 kernel already.



More rk2aw documentation here.
 
Also check this
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.12 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with pmOS/SXMO on eMMC
  Reply
#10
(12-18-2024, 04:13 PM)dukla2000 Wrote:
(12-18-2024, 08:17 AM)ethical_haquer Wrote: I was under the impression that rk2aw was a loader for boot-loaders.
When you flash rk2aw to the SPI and there are no boot-loaders present on the SPI, eMMC, and microSD, rk2aw won't do anything.
...
Yes it is. But if you install it as per the multiboot instructions I first linked above it also installs uboot. (use sudo ./spinor-flash-initial-setup.sh ). Thereafter sudo ./rk2aw-spi-flasher with no parameters will report what is there as per this copy/paste (I wrote the eMMC section of that page!)



(12-18-2024, 08:17 AM)ethical_haquer Wrote: ...
How do you like Arch on the PPP?


My real poison is SXMO - love it. On arch or pmOS is pretty much the same: I just updated my signature and have arch on my PPP as it does not reboot randomly and has 6.12 kernel. (I am sure pmOS will be 6.12 on the PPP very shortly if not already in edge.) Arch is always quirky: at the moment wpa-supplicant and conky require exceptional TLC. But that is the pain/pleasure of arch ;-) Also arch is still SXMO 1.16 whereas pmOS is 1.17 (hardly game changer but I do tend to be a latest revision freak!)

Have pmOS on my PP which kinda makes sense as the PP is soo short of horsepower. And on PP it is 6.12 kernel already.



More rk2aw documentation here.
 
Also check this
Thanks for all the info! I'll be sure to try it on my PPP in the near future.
I haven't tried SXMO out yet, I'll have to try it. And yeah, pmOS got the 6.11.11 kernel for the PPP a few days ago (for edge and stable).
I must admit that I haven't used Arch yet, on desktop or mobile. I probably should though, as I like having the latest packages (I run Debian testing on my laptop).

What is the camera situation like for the PPP with Arch? On pmOS edge it got a lot better with the kernel update, but the back camera stops working after a suspend. And you mention you have pmOS on the PP, since it's so under-powered - does Arch use more power or something? TIA.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  tow-boot installation problem techariah 4 2,322 12-04-2024, 10:32 AM
Last Post: zetabeta
  How can boot from MicroSD after replacement of the main board u-kidjp 6 516 11-08-2024, 09:14 PM
Last Post: Kevin Kofler
  July 1 upgrade of Mobian Bookworm boot loops. mburns 5 1,422 10-26-2024, 05:17 AM
Last Post: mburns
  tow-boot, just bought pinephone pro stratofall 4 849 07-30-2024, 03:43 PM
Last Post: stratofall
  Tow-Boot, a new U-Boot option for Pinephone Pro and other devices Ulfnic 60 57,939 02-13-2024, 02:54 PM
Last Post: fxc
Brick Recovery without Tow Boot b34ux 10 3,451 02-02-2024, 07:07 PM
Last Post: reky
  What to do if your PinePhone Pro does not boot fxc 19 25,128 09-10-2023, 03:19 AM
Last Post: fxc
  Pine Phone won't boot into recovery mode ninjapig26@gmail.com 3 2,677 02-18-2023, 06:14 PM
Last Post: fxc
  create tow boot .img fox95 6 4,374 10-21-2022, 11:40 AM
Last Post: fox95
  No display on early boot after Manjaro update robocone 0 1,087 07-07-2022, 05:47 AM
Last Post: robocone

Forum Jump:


Users browsing this thread: 8 Guest(s)