Custom boot.scr
#1
Hi All

Thanks in advance for any advice. I am trying to bootstrap my own Debian install on my Pinephone and after alot of faffing and false starts I finally managed to boot a kernel I had build into a Debian install I had bootstrapped, cos why wouldn't you on FOSS phone!

The last hurdle I came across was the boot.scr script not being run by u-boot on my image, I had copied the one from the Debian+Phosh image and then updated the entries to point to my kernel/initramfs. There are some non-text bytes at the beginning of the file which I think is might be the reason its not booting (checksum/hash maybe) but once I had restored the original and copied my kernel/initramfs files to the to the names used in the boot.scr it booted without issue.

So, the question! How do I generate my own boot.scr correctly?

Thanks Again

hk135
  Reply
#2
Hi,

You have to use mkimage for that, see this script I use for generating it.
The first characters are the u-boot image header, containing (among other things) a checksum: if you change the content, the checksum verification will fail, and u-boot will refuse to execute your script.
  Reply
#3
Thanks, exactly what I was looking for!
  Reply
#4
Had a chance to test and the solution is to edit the boot.cmd file and then generate boot.scr as follows:

mkimage -T script -A arm64 -C none -n pinephone -d /boot/boot.cmd /boot/boot.scr
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't boot on SD anymore LeNouveau 1 346 02-12-2024, 01:05 PM
Last Post: LeNouveau
  Does Ubuntu modify a Pinephone SD boot card? Peter Gamma 0 850 10-05-2023, 09:18 AM
Last Post: Peter Gamma
  Tow-boot headaches. antiwesley 3 1,501 04-30-2023, 05:03 PM
Last Post: Kevin Kofler
  problem with boot evaldas 2 2,228 03-17-2023, 06:21 AM
Last Post: gulshan212
  Article: NuttX RTOS for PinePhone: Boot to LVGL lupyuen 2 1,860 01-23-2023, 10:41 PM
Last Post: lupyuen
  tow-boot shulamy 2 1,658 09-08-2022, 12:33 AM
Last Post: shulamy
  Device memory full on multi-boot SD card Peter Gamma 4 2,717 08-27-2022, 10:03 AM
Last Post: Eugo
  wiping u-boot off sd card shulamy 6 2,923 08-17-2022, 03:38 AM
Last Post: shulamy
  Change tow-boot boot order or otherwise make Mobian on uSD the default? allworlds 3 2,436 05-04-2022, 06:27 PM
Last Post: allworlds
  Multi boot issue generaluser 4 3,270 10-06-2021, 07:45 AM
Last Post: generaluser

Forum Jump:


Users browsing this thread: 1 Guest(s)