mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Support loading correct DTB for RPi 3 model B+
U-Boot sets the variable fdtfile to the correct file name for the detected hardware revision. Use this in the boot script to load either the 3-b or 3-b-plus DTB Signed-off-by: Richard Connon <richard@connon.me.uk>
This commit is contained in:
parent
b97f47b0aa
commit
5ffbfbbf67
@ -24,8 +24,7 @@ RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||
# u-boot compile. The patch is needed to handle larger kernels
|
||||
ENV UBOOT_COMMIT=v2019.04
|
||||
COPY u-boot.patch .
|
||||
RUN git clone -b $UBOOT_COMMIT --depth 1 https://github.com/u-boot/u-boot.git && \
|
||||
cd /u-boot
|
||||
RUN git clone -b $UBOOT_COMMIT --depth 1 https://github.com/u-boot/u-boot.git
|
||||
WORKDIR /u-boot
|
||||
RUN patch -p 1 < /u-boot.patch && \
|
||||
make rpi_3_defconfig all && \
|
||||
|
@ -1,9 +1,9 @@
|
||||
setenv bootargs "dwc_otg.lpm_enable=0 earlyprintk console=tty1 console=ttyS0,115200 root=/dev/ram0 rw"
|
||||
setenv dtbfile bcm2837-rpi-3-b.dtb
|
||||
setenv loadaddr 0x01000000
|
||||
setenv machid 0x00000c42
|
||||
saveenv
|
||||
|
||||
fatload mmc 0:1 ${kernel_addr_r} kernel.uimg
|
||||
fatload mmc 0:1 ${fdt_addr_r} ${dtbfile}
|
||||
fatload mmc 0:1 ${loadaddr} kernel.uimg
|
||||
fatload mmc 0:1 ${fdt_addr_r} dtb/${fdtfile}
|
||||
fatload mmc 0:1 ${ramdisk_addr_r} initrd.uimg
|
||||
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
||||
bootm ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}
|
||||
|
@ -14,7 +14,8 @@ cd /files
|
||||
cd /
|
||||
|
||||
# copy/convert files
|
||||
cp /files/boot/dtb/broadcom/bcm2837-rpi-3-b.dtb /boot
|
||||
mkdir -p /boot/dtb/broadcom
|
||||
cp /files/boot/dtb/broadcom/bcm2837-rpi-3-b*.dtb /boot/dtb/broadcom
|
||||
/bin/mkimage -A arm64 -O linux -T kernel -C gzip -a 0x80000 -e 0x80000 \
|
||||
-d /files/boot/kernel /boot/kernel.uimg >> /boot/uboot.log
|
||||
/bin/mkimage -A arm64 -O linux -T script -C none -a 0x00000000 -e 0x00000000 -n RPi3 \
|
||||
|
Loading…
Reference in New Issue
Block a user