mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
Merge pull request #3357 from riconnon/uboot-dtbs
Support for dynamic selection of Raspberry Pi DTB
This commit is contained in:
commit
4dbba2540b
@ -27,7 +27,7 @@ var (
|
|||||||
"vhd": "linuxkit/mkimage-vhd:4cc60c4f46b07e11c64ba618e46b81fa0096c91f",
|
"vhd": "linuxkit/mkimage-vhd:4cc60c4f46b07e11c64ba618e46b81fa0096c91f",
|
||||||
"dynamic-vhd": "linuxkit/mkimage-dynamic-vhd:99b9009ed54a793020d3ce8322a42e0cc06da71a",
|
"dynamic-vhd": "linuxkit/mkimage-dynamic-vhd:99b9009ed54a793020d3ce8322a42e0cc06da71a",
|
||||||
"vmdk": "linuxkit/mkimage-vmdk:b55ea46297a16d8a4448ce7f5a2df987a9602b27",
|
"vmdk": "linuxkit/mkimage-vmdk:b55ea46297a16d8a4448ce7f5a2df987a9602b27",
|
||||||
"rpi3": "linuxkit/mkimage-rpi3:9f2d993daa83152c5d52af16ebb7fefa1e69f28e",
|
"rpi3": "linuxkit/mkimage-rpi3:9dd4f7735e19e495c2b0a856a52af15141816534",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
FROM linuxkit/alpine:86cd4f51b49fb9a078b50201d892a3c7973d48ec as build
|
FROM linuxkit/alpine:86cd4f51b49fb9a078b50201d892a3c7973d48ec as build
|
||||||
RUN apk add \
|
RUN apk add \
|
||||||
bc \
|
bc \
|
||||||
|
bison \
|
||||||
dtc \
|
dtc \
|
||||||
curl \
|
curl \
|
||||||
|
flex \
|
||||||
make \
|
make \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
@ -20,11 +22,9 @@ RUN apk add --no-cache --initdb -p /out \
|
|||||||
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||||
|
|
||||||
# u-boot compile. The patch is needed to handle larger kernels
|
# u-boot compile. The patch is needed to handle larger kernels
|
||||||
ENV UBOOT_COMMIT=v2017.09
|
ENV UBOOT_COMMIT=v2019.04
|
||||||
COPY u-boot.patch .
|
COPY u-boot.patch .
|
||||||
RUN git clone https://github.com/u-boot/u-boot.git && \
|
RUN git clone -b $UBOOT_COMMIT --depth 1 https://github.com/u-boot/u-boot.git
|
||||||
cd /u-boot && \
|
|
||||||
git checkout $UBOOT_COMMIT
|
|
||||||
WORKDIR /u-boot
|
WORKDIR /u-boot
|
||||||
RUN patch -p 1 < /u-boot.patch && \
|
RUN patch -p 1 < /u-boot.patch && \
|
||||||
make rpi_3_defconfig all && \
|
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 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
|
setenv machid 0x00000c42
|
||||||
saveenv
|
saveenv
|
||||||
|
|
||||||
fatload mmc 0:1 ${kernel_addr_r} kernel.uimg
|
fatload mmc 0:1 ${loadaddr} kernel.uimg
|
||||||
fatload mmc 0:1 ${fdt_addr_r} ${dtbfile}
|
fatload mmc 0:1 ${fdt_addr_r} dtb/${fdtfile}
|
||||||
fatload mmc 0:1 ${ramdisk_addr_r} initrd.uimg
|
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 /
|
cd /
|
||||||
|
|
||||||
# copy/convert files
|
# 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 \
|
/bin/mkimage -A arm64 -O linux -T kernel -C gzip -a 0x80000 -e 0x80000 \
|
||||||
-d /files/boot/kernel /boot/kernel.uimg >> /boot/uboot.log
|
-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 \
|
/bin/mkimage -A arm64 -O linux -T script -C none -a 0x00000000 -e 0x00000000 -n RPi3 \
|
||||||
|
Loading…
Reference in New Issue
Block a user