rpi4-uboot-tpm icon indicating copy to clipboard operation
rpi4-uboot-tpm copied to clipboard

Update and enhance to latest Raspberry Pi OS 32/64bit

Open StMaHa opened this issue 1 year ago • 1 comments

  • Update to latest Raspberry Pi OS
  • Enhance by Raspberry Pi OS 32bit

StMaHa avatar Feb 04 '23 17:02 StMaHa

Hi, this is a great PR and I can confirm that (at least he 64 bit version of the instructions) work as intended! Wish, I would have noticed before figuring out most of this myself.

I have two minor notes: One regarding the 64-bit boot.scr: You hardcode the size of the compressed kernel image:

setenv kernel_comp_size 8194604

If I understand it correctly, it would be better to set the size dynamically, because of course the size of the kernel can change over time. This was my approach instead:

fatload mmc 0:1 ${kernel_addr_r} kernel8.img
setenv kernel_comp_size ${filesize}

(note the setenv command should be placed directly behind the fatload which automatically sets the filesize environment variable to the size of the loaded file)


Another note for others having the same problem: You seemingly used U-Boot v2023.01. I first tried this with U-Boot v2023.10.

TL;DR: v2023.10 changed the boot command from run distro_bootcmd to bootflow scan, which is broken on the Raspberry Pi 4 in that version. In the current master it's working as expected... took me some hours to figure it out. So maybe add the tested version to the instructions?

Problem description, in case others find this via google:

When I simply typed boot, I got a "Card did not respond to voltage select! : -110" which later turned out can be ignored because bootflow simply scans different possibilities. However, manually loading and starting the script did work:

load mmc 0:1 $loadaddr boot.scr.uimg
source $loadaddr

(BTW setting CONFIG_BOOTCOMMAND back to run distro_bootcmd doesn't work anymore in v2023.10 as it is not set / found anymore and the pi defconfig uses the new bootflow instead)

Anyways: Just don't use v2023.10.

mozzbozz avatar Nov 02 '23 10:11 mozzbozz