Build a separate image for each bootconfig, add pcf8563 kmod for sensing
This commit is contained in:
parent
68bee355e2
commit
31107a2ef5
|
@ -38,8 +38,12 @@ cd ${pwd}
|
||||||
|
|
||||||
tar -xJf /Downloads/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz
|
tar -xJf /Downloads/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz
|
||||||
|
|
||||||
|
PROFILE=rpi-4
|
||||||
|
BINPATH=bin/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}
|
||||||
|
IMAGE_PATH=${BINPATH}/openwrt-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}-${PROFILE}
|
||||||
|
|
||||||
cd openwrt-imagebuilder-*/
|
cd openwrt-imagebuilder-*/
|
||||||
cp ${sdkdir}/bin/targets/bcm27xx/bcm2711/packages/*.ipk packages/
|
cp ${sdkdir}/${BINPATH}/packages/*.ipk packages/
|
||||||
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/packages/*.ipk packages/
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/packages/*.ipk packages/
|
||||||
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/telephony/*.ipk packages/
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/telephony/*.ipk packages/
|
||||||
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/quectel/*.ipk packages/
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/quectel/*.ipk packages/
|
||||||
|
@ -51,19 +55,8 @@ echo "CONFIG_TARGET_ROOTFS_PARTSIZE=308" >> .config
|
||||||
# Disable ext4 images
|
# Disable ext4 images
|
||||||
echo "CONFIG_TARGET_ROOTFS_EXT4FS=n" >> .config
|
echo "CONFIG_TARGET_ROOTFS_EXT4FS=n" >> .config
|
||||||
|
|
||||||
# Setup files
|
PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra \
|
||||||
mkdir -p files/etc/dropbear
|
kmod-rtc-ds1307 kmod-rtc-pcf8563 \
|
||||||
chmod 0750 files/etc/dropbear
|
|
||||||
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/overlays
|
|
||||||
cp ${pwd}/overlays/*.txt files/boot/
|
|
||||||
cp ${pwd}/overlays/*.dtbo files/boot/overlays/
|
|
||||||
|
|
||||||
|
|
||||||
PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
|
||||||
kmod-usb-audio kmod-usb-net-rtl8152 \
|
kmod-usb-audio kmod-usb-net-rtl8152 \
|
||||||
alsa-lib pciutils usbutils \
|
alsa-lib pciutils usbutils \
|
||||||
kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
|
kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
|
||||||
|
@ -91,7 +84,7 @@ PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
||||||
collectd-mod-thermal collectd-mod-uptime \
|
collectd-mod-thermal collectd-mod-uptime \
|
||||||
collectd-mod-users collectd-mod-vmem \
|
collectd-mod-users collectd-mod-vmem \
|
||||||
collectd-mod-wireless \
|
collectd-mod-wireless \
|
||||||
curl etherwake fail2ban \
|
curl etherwake fail2ban hwclock i2c-tools \
|
||||||
luci-app-mwan3 luci-app-upnp \
|
luci-app-mwan3 luci-app-upnp \
|
||||||
luci-proto-wireguard \
|
luci-proto-wireguard \
|
||||||
luci-ssl-nginx luci-app-acme \
|
luci-ssl-nginx luci-app-acme \
|
||||||
|
@ -101,13 +94,52 @@ PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
||||||
wireguard-tools wget-ssl \
|
wireguard-tools wget-ssl \
|
||||||
"
|
"
|
||||||
|
|
||||||
make image PROFILE=rpi-4 \
|
# Setup files
|
||||||
|
mkdir -p files/etc/dropbear
|
||||||
|
chmod 0750 files/etc/dropbear
|
||||||
|
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
|
||||||
|
|
||||||
|
# cat << "EOF" >> ${BOOTCONFIG}
|
||||||
|
# dtparam=i2c1=on
|
||||||
|
# dtparam=spi=on
|
||||||
|
# dtparam=i2s=on
|
||||||
|
# dtoverlay=i2c-rtc,ds1307
|
||||||
|
# EOF
|
||||||
|
|
||||||
|
cp ${BOOTCONFIG} .
|
||||||
|
|
||||||
|
echo "include dualeth.txt" >> ${BOOTCONFIG}
|
||||||
|
|
||||||
|
make image PROFILE=${PROFILE} \
|
||||||
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files"
|
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files"
|
||||||
|
|
||||||
make manifest PROFILE=rpi-4 PACKAGES="${PACKAGES}"
|
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 config.txt ${BOOTCONFIG}
|
||||||
|
echo "include sensing.txt" >> ${BOOTCONFIG}
|
||||||
|
|
||||||
|
make image PROFILE=${PROFILE} \
|
||||||
|
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files"
|
||||||
|
|
||||||
|
mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-sensing.img.gz
|
||||||
|
mv ${IMAGE_PATH}-squashfs-sysupgrade.img.gz ${IMAGE_PATH}-squashfs-sysupgrade-sensing.img.gz
|
||||||
|
|
||||||
|
|
||||||
|
make manifest PROFILE=${PROFILE} PACKAGES="${PACKAGES}"
|
||||||
|
|
||||||
out=../../out
|
out=../../out
|
||||||
|
|
||||||
mkdir -p ${out}
|
mkdir -p ${out}
|
||||||
mv bin/targets/bcm27xx/bcm2711/*.gz ${out}
|
mv ${BINPATH}/*.gz ${out}
|
||||||
mv packages ${out}
|
mv packages ${out}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user