Compare commits

..

8 Commits

Author SHA1 Message Date
Lee Miller d5ee8cddf7
CONFIG_I2C_BRCMSTB seems not working 2023-02-15 06:05:23 +02:00
Lee Miller 54250cf063
Build a separate image for each dtbo, enable i2c properly 2023-02-15 02:14:06 +02:00
Lee Miller 9c72c96116
Trying to install dtbo 2023-02-15 02:07:12 +02:00
Lee Miller 27687ff419
Try to add i2p kmod and the files 2023-02-15 02:00:18 +02:00
Peter Šurda 8ebae57e5f
Change network defaults
buildbot/travis_bionic Build done. Details
buildbot/multibuild_parent Build done. Details
buildbot/job/openwrt Build done. Details
- eth0 is WAN, eth1 LAN
- firewall allow incoming SSH
2023-02-14 14:23:41 +08:00
Peter Šurda cd8043f92b
Fix ssh permissions and move ssh defaults file
buildbot/multibuild_parent Build done. Details
buildbot/travis_bionic Build done. Details
buildbot/job/openwrt Build done. Details
2023-02-14 12:08:16 +08:00
Lee Miller ba36504d3c
Add a common uci-defaults file
buildbot/multibuild_parent Build done. Details
buildbot/travis_bionic Build done. Details
buildbot/job/openwrt Build done. Details
2023-02-10 05:19:09 +02:00
Lee Miller c5d9f4329a
Disable ext4 images. Fixes #13.
buildbot/multibuild_parent Build done. Details
buildbot/travis_bionic Build done. Details
buildbot/job/openwrt Build done. Details
2023-02-09 23:53:02 +02:00
4 changed files with 33 additions and 12 deletions

View File

@ -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

3
defaults/48-overlays Normal file
View File

@ -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

21
defaults/49-network Normal file
View File

@ -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

2
defaults/50-sshd Normal file
View File

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