Compare commits
8 Commits
4e38ff4c60
...
d5ee8cddf7
Author | SHA1 | Date |
---|---|---|
Lee Miller | d5ee8cddf7 | |
Lee Miller | 54250cf063 | |
Lee Miller | 9c72c96116 | |
Lee Miller | 27687ff419 | |
Peter Šurda | 8ebae57e5f | |
Peter Šurda | cd8043f92b | |
Lee Miller | ba36504d3c | |
Lee Miller | c5d9f4329a |
|
@ -23,6 +23,7 @@ cat ${pwd}/feeds.conf >> feeds.conf
|
|||
./scripts/feeds install -a
|
||||
|
||||
make defconfig
|
||||
echo "CONFIG_I2C_BRCMSTB=y" >> target/linux/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/config-5.10
|
||||
echo 'CONFIG_PACKAGE_python3-packages=y' >> .config
|
||||
echo 'CONFIG_PACKAGE_python3-packages-list="CherryPy==18.8.0"' >> .config
|
||||
|
||||
|
@ -94,19 +95,13 @@ PACKAGES="kmod-i2c-bcm2835 kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
|||
mkdir -p files/boot/overlays
|
||||
cp ${pwd}/overlays/ed-mcp2515-spi1-can0.dtbo 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/uci-defaults
|
||||
# Initial setup, common part
|
||||
cat << "EOF" > files/etc/uci-defaults/99-custom
|
||||
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
|
||||
/sbin/service sshd restart
|
||||
echo "dtparam=i2c1=on" >> /boot/config.txt
|
||||
echo "dtparam=spi=on" >> /boot/config.txt
|
||||
echo "dtparam=i2s=on" >> /boot/config.txt
|
||||
EOF
|
||||
cp ${pwd}/defaults/* files/etc/uci-defaults
|
||||
|
||||
cp files/etc/uci-defaults/99-custom uci_defaults
|
||||
cat << "EOF" >> files/etc/uci-defaults/99-custom
|
||||
cat << "EOF" >> files/etc/uci-defaults/48-overlays
|
||||
echo "dtoverlay=ed-mcp2515-spi1-can0" >> /boot/config.txt
|
||||
EOF
|
||||
|
||||
|
@ -117,8 +112,8 @@ mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-dualeth.
|
|||
mv ${IMAGE_PATH}-squashfs-sysupgrade.img.gz ${IMAGE_PATH}-squashfs-sysupgrade-dualeth.img.gz
|
||||
|
||||
cp ${pwd}/overlays/ed-sdhost.dtbo overlays/sensing.txt files/boot/overlays/
|
||||
cp uci_defaults files/etc/uci-defaults/99-custom
|
||||
cat << "EOF" >> files/etc/uci-defaults/99-custom
|
||||
cp ${pwd}/defaults/48-overlays files/etc/uci-defaults/
|
||||
cat << "EOF" >> files/etc/uci-defaults/48-overlays
|
||||
echo "dtoverlay=ed-sdhost" >> /boot/config.txt
|
||||
EOF
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
echo "dtparam=i2c1=on" >> /boot/config.txt
|
||||
echo "dtparam=spi=on" >> /boot/config.txt
|
||||
echo "dtparam=i2s=on" >> /boot/config.txt
|
|
@ -0,0 +1,21 @@
|
|||
# switch LAN to eth1
|
||||
/sbin/uci set network.@device[0].ports='eth1'
|
||||
|
||||
# set WAN to eth0
|
||||
/sbin/uci set network.wan=interface
|
||||
/sbin/uci set network.wan.device=eth0
|
||||
/sbin/uci set network.wan.proto=dhcp
|
||||
|
||||
# firewall allow SSH
|
||||
/sbin/uci add firewall rule
|
||||
/sbin/uci set firewall.@rule[-1].name='Allow-SSH'
|
||||
/sbin/uci set firewall.@rule[-1].src='wan'
|
||||
/sbin/uci set firewall.@rule[-1].dest_port='22'
|
||||
/sbin/uci set firewall.@rule[-1].proto='tcp'
|
||||
/sbin/uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
/sbin/uci commit
|
||||
|
||||
/sbin/service network restart
|
||||
/sbin/service firewall restart
|
||||
/sbin/service dnsmasq restart
|
|
@ -0,0 +1,2 @@
|
|||
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
|
||||
/sbin/service sshd restart
|
Loading…
Reference in New Issue