diff --git a/.buildbot/openwrt/build.sh b/.buildbot/openwrt/build.sh index 32322bb..5482aa3 100755 --- a/.buildbot/openwrt/build.sh +++ b/.buildbot/openwrt/build.sh @@ -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" diff --git a/patches/overlay-add.patch b/patches/overlay-add.patch new file mode 100644 index 0000000..26209de --- /dev/null +++ b/patches/overlay-add.patch @@ -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 \