-
Notifications
You must be signed in to change notification settings - Fork 17
/
readme.rpi
83 lines (75 loc) · 4.13 KB
/
readme.rpi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
u-boot:
# inspiration for latest try: https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/uboot-raspberrypi
# bootloader: https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/raspberrypi-bootloader
# firmware tools: https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/raspberrypi-firmware
# firmware: https://github.com/archlinuxarm/PKGBUILDs/tree/master/alarm/firmware-raspberrypi
# PKGBUILDs commit used for the above: 53b7fd411908db95afc9f2c020e37d1beb61abd4
# links:
# - https://gist.github.com/XSystem252/d274cd0af836a72ff42d590d59647928
# - https://gist.github.com/yogaxpto/9495fb9f76a6321aa483e0f73d4ffaf2
# - https://archlinuxarm.org/forum/viewtopic.php?t=14672#p64313
git clone https://gitlab.denx.de/u-boot/u-boot.git/
mv u-boot u-boot-mainline-rpi
cd u-boot-mainline-rpi
git checkout v2022.01
# add-fdt overlay addr to be able to load dtbo files
# sadly this did not work - resulted in: "failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND"
#patch -p1 < /compile/doc/u-boot-misc/misc.rpi/add-fdt-overlay-addr.patch
patch -p1 < /compile/doc/u-boot-misc/misc.rpi/0001-rpi-increase-space-for-kernel.patch
# only one of those depending on target
make rpi_2_defconfig
make rpi_3_32b_defconfig
make rpi_3_defconfig
make rpi_3_b_plus_defconfig
make rpi_4_32b_defconfig
make rpi_4_defconfig
make
# result: u-boot.bin
# either rename to
# - kernel8.img for Raspberry Pi 3 and 4 in 64 bit mode
# - kernel7l.img for Raspberry Pi 4 in 32bit mode (with LPAE)
# - kernel7.img for Raspberry Pi 2, 3 and 4 in 32bit mode (no LPAE)
# - kernel.img for the rest
# or set kernel=u-boot.bin - maybe in the corresponding section (ex: [pi4]) - in config.txt
# for bootloader files see misc.rpi/archlinuxarm-files/bootloader
# the files currently used are:
dtb_commit=fb0bfa6a669745578041e838fc73cc17e8c543c9
wget https://github.com/raspberrypi/firmware/raw/${dtb_commit}/boot/bcm2710-rpi-3-b.dtb
wget https://github.com/raspberrypi/firmware/raw/${dtb_commit}/boot/bcm2710-rpi-3-b-plus.dtb
wget https://github.com/raspberrypi/firmware/raw/${dtb_commit}/boot/bcm2710-rpi-cm3.dtb
wget https://github.com/raspberrypi/firmware/raw/${dtb_commit}/boot/bcm2711-rpi-4-b.dtb
boot_commit=9c04ed2c1ad06a615d8e6479806ab252dbbeb95a
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/bootcode.bin
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup4cd.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup4.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup4db.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup4x.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup_cd.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup_db.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/fixup_x.dat
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start4cd.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start4db.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start4.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start4x.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start_cd.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start_db.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start.elf
wget https://github.com/raspberrypi/firmware/raw/${boot_commit}/boot/start_x.elf
# working config.txt based on https://wiki.debian.org/RaspberryPi4
enable_uart=1
arm_64bit=1
upstream_kernel=1
#http://lists.infradead.org/pipermail/linux-rpi-kernel/2020-November/007906.html
#disable_fw_kms_setup=1
u-boot-next - development version:
git clone https://github.com/mbgg/u-boot
mv u-boot u-boot-next-rpi
cd u-boot-next-rpi
git checkout rpi-next
# everything else see above
# some old links
https://andrei.gherzan.ro/linux/uboot-on-rpi/
https://www.raspberrypi.org/forums/viewtopic.php?t=244785
https://github.com/agherzan/u-boot/commits/ag/rpi4
https://github.com/agherzan/meta-raspberrypi/pull/437