![]() |
Custom boot.scr - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +--- Thread: Custom boot.scr (/showthread.php?tid=9518) |
Custom boot.scr - hk135 - 03-26-2020 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 RE: Custom boot.scr - a-wai - 03-26-2020 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. RE: Custom boot.scr - hk135 - 03-26-2020 Thanks, exactly what I was looking for! RE: Custom boot.scr - hk135 - 03-27-2020 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 |