Compare commits

..

5 Commits

Author SHA1 Message Date
3f106cc1f3
CONFIG_I2C_BRCMSTB seems not working 2023-02-24 03:23:56 +02:00
16d14475c3
Build a separate image for each bootconfig, add pcf8563 kmod for sensing 2023-02-24 03:23:45 +02:00
0e97c28944
Add i2c kmod and the files 2023-02-24 03:17:46 +02:00
85c081df3d
Replace opessh-server with dropbear
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
- apparently dropbear now supports ed25519 keys so openssh isn't
  necessary anymore
2023-02-23 20:44:13 +08:00
1e60f1fd33
Remove adguard and DoH
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
- adguard needs manual setup and the install UI is exposed by default
- I would like to test DoH first, I suspect it's interfering with NTP
  during boot (sysntpd needs to be restarted manually to work, strace
  found that it can't resolve if started from init)
2023-02-23 11:19:59 +08:00
4 changed files with 42 additions and 22 deletions

View File

@ -54,12 +54,12 @@ echo "CONFIG_TARGET_ROOTFS_PARTSIZE=208" >> .config
# Disable ext4 images
echo "CONFIG_TARGET_ROOTFS_EXT4FS=n" >> .config
PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra kmod-rtc-ds1307 \
PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra \
kmod-rtc-ds1307 kmod-rtc-pcf8563 \
kmod-usb-audio kmod-usb-net-rtl8152 \
alsa-lib pciutils usbutils \
kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
shadow-usermod \
adguardhome \
asterisk \
asterisk-app-sms asterisk-pjsip asterisk-bridge-simple \
asterisk-codec-alaw asterisk-codec-ulaw \
@ -84,35 +84,34 @@ PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra kmod-rtc-ds1307 \
collectd-mod-users collectd-mod-vmem \
collectd-mod-wireless \
curl etherwake fail2ban hwclock i2c-tools \
luci-app-https-dns-proxy luci-app-mwan3 luci-app-upnp \
luci-app-mwan3 luci-app-upnp \
luci-ssl-nginx luci-app-acme \
python3-packages python3-yaml \
wireguard-tools wget-ssl \
openssh-server \
"
# Setup files
mkdir -p files/boot/overlays
cp ${pwd}/overlays/ed-mcp2515-spi1-can0.dtbo ${pwd}/overlays/dualeth.txt files/boot/overlays/
mkdir -p files/root/.ssh
chmod 0700 files/root files/root/.ssh
cp ${pwd}/authorized_keys files/root/.ssh/
chmod 0400 files/root/.ssh/authorized_keys
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
# cat << "EOF" >> ${BOOTCONFIG}
# dtparam=i2c1=on
# dtparam=spi=on
# dtparam=i2s=on
# dtoverlay=i2c-rtc,ds1307
# EOF
cp ${BOOTCONFIG} .
echo "dtoverlay=ed-mcp2515-spi1-can0" >> ${BOOTCONFIG}
echo "include dualeth.txt" >> ${BOOTCONFIG}
make image PROFILE=${PROFILE} \
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files"
@ -120,10 +119,11 @@ 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
rm -rf files/boot/overlays/*
cp ${pwd}/overlays/ed-sdhost.dtbo ${pwd}/overlays/sensing.txt files/boot/overlays/
mkdir files/boot/overlays
cp ${pwd}/overlays/sensing.txt files/boot/
cp ${pwd}/overlays/*.dtbo files/boot/overlays/
cp config.txt ${BOOTCONFIG}
echo "dtoverlay=ed-sdhost" >> ${BOOTCONFIG}
echo "include sensing.txt" >> ${BOOTCONFIG}
make image PROFILE=${PROFILE} \
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files"
@ -131,6 +131,7 @@ make image PROFILE=${PROFILE} \
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

4
defaults/00-defaults Normal file
View File

@ -0,0 +1,4 @@
touch /etc/config/defaults
/sbin/uci get defaults.version || /sbin/uci set defaults.version=version && \
/sbin/uci commit defaults

17
defaults/50-dropbear Normal file
View File

@ -0,0 +1,17 @@
VERSION=1
[ "$(uci -q get defaults.version.dropbear)" -ge "$VERSION" ] && exit 0
# save version
/sbin/uci set defaults.version.dropbear="$VERSION"
/sbin/uci -q batch << EOF
set defaults.version.dropbear="$VERSION"
commit defaults
set dropbear.@dropbear[0].PasswordAuth='off'
set dropbear.@dropbear[0].RootPasswordAuth='off'
commit dropbear
EOF
/sbin/service dropbear enable
/sbin/service dropbear restart

View File

@ -1,2 +0,0 @@
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
/sbin/service sshd restart