Work around inability to add files to boot via FILES make parameter

This commit is contained in:
Lee Miller 2023-02-24 05:33:10 +02:00
parent 31107a2ef5
commit af4e1053b6
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
2 changed files with 22 additions and 6 deletions

View File

@ -94,6 +94,11 @@ PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra \
wireguard-tools wget-ssl \
"
BOOTSOURCE=target/linux/${OPENWRT_TARGET}/image
BOOTCONFIG=${BOOTSOURCE}/config.txt
KERNELSOURCE=build_dir/target-aarch64_cortex-a72_musl/linux-${OPENWRT_TARGET}_${OPENWRT_DEVICE}/linux-5.10.146
OVERLAYSOURCE=${KERNELSOURCE}/arch/arm64/boot/dts/overlays
# Setup files
mkdir -p files/etc/dropbear
chmod 0750 files/etc/dropbear
@ -101,10 +106,8 @@ cp ${pwd}/authorized_keys files/etc/dropbear
chmod 0400 files/etc/dropbear/authorized_keys
mkdir -p files/etc/uci-defaults
cp ${pwd}/defaults/* files/etc/uci-defaults
mkdir -p files/boot
cp ${pwd}/overlays/dualeth.txt files/boot/
BOOTCONFIG=target/linux/${OPENWRT_TARGET}/image/config.txt
cp ${pwd}/overlays/dualeth.txt ${BOOTSOURCE}
# cat << "EOF" >> ${BOOTCONFIG}
# dtparam=i2c1=on
@ -123,11 +126,13 @@ make image PROFILE=${PROFILE} \
mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-dualeth.img.gz
mv ${IMAGE_PATH}-squashfs-sysupgrade.img.gz ${IMAGE_PATH}-squashfs-sysupgrade-dualeth.img.gz
mkdir files/boot/overlays
cp ${pwd}/overlays/sensing.txt files/boot/
cp ${pwd}/overlays/*.dtbo files/boot/overlays/
cp ${pwd}/overlays/sensing.txt ${BOOTSOURCE}
cp ${pwd}/overlays/*.dtbo ${OVERLAYSOURCE}
cp config.txt ${BOOTCONFIG}
echo "include sensing.txt" >> ${BOOTCONFIG}
pushd ${KERNELSOURCE}
git apply ${pwd}/patches/overlay-add.patch
popd
make image PROFILE=${PROFILE} \
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files"

11
patches/overlay-add.patch Normal file
View File

@ -0,0 +1,11 @@
--- a/arch/arm64/boot/dts/overlays/Makefile 2023-02-24 04:54:15.978815530 +0200
+++ b/arch/arm64/boot/dts/overlays/Makefile 2023-02-24 04:57:05.155496795 +0200
@@ -3,6 +3,8 @@
dtb-$(CONFIG_ARCH_BCM2835) += overlay_map.dtb
dtbo-$(CONFIG_ARCH_BCM2835) += \
+ ed-mcp2515-spi1-can0.dtbo \
+ ed-sdhost.dtbo \
act-led.dtbo \
adafruit18.dtbo \
adau1977-adc.dtbo \