Compare commits
24 Commits
v2023.04.1
...
v2023.06.2
Author | SHA1 | Date | |
---|---|---|---|
c7465dba27 | |||
4a4232e358 | |||
250bf06367 | |||
3ca90a54a9 | |||
58d1ffc9a2 | |||
a7f3f2faea | |||
6d0e693fc4 | |||
68a1de079e | |||
7f1472f21b | |||
291ad94b15 | |||
4b181ec9e1 | |||
81360c3fda | |||
2cf46ed9a5 | |||
df763ef49a | |||
9e153e38cb | |||
9214c097b3 | |||
2339bc3aa6 | |||
908a36896e | |||
23452a06ff | |||
83f97abcbd | |||
d0f6e63007 | |||
087f8a27a8 | |||
42c157a1e5 | |||
7b722293b7 |
@ -1 +1 @@
|
||||
v2023.4.14-813f837
|
||||
v2023.6.23-4a58847
|
||||
|
7
install/raspberrypi.mk
Normal file
7
install/raspberrypi.mk
Normal file
@ -0,0 +1,7 @@
|
||||
install-rpi-network-config:
|
||||
mkdir -p files/etc/config
|
||||
cp misc/rpi/uci/network files/etc/config/network
|
||||
|
||||
install-rpi-uci-defaults:
|
||||
mkdir -p files/etc/uci-defaults
|
||||
cp misc/rpi/uci-defaults/* files/etc/uci-defaults/
|
37
misc/rpi/uci-defaults/99-x86-uci-custom.sh
Normal file
37
misc/rpi/uci-defaults/99-x86-uci-custom.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
main() {
|
||||
# Update default firewall ruleset
|
||||
uci add firewall rule
|
||||
uci set firewall.@rule[-1].name='Allow SSH on WAN'
|
||||
uci set firewall.@rule[-1].src='wan'
|
||||
uci set firewall.@rule[-1].proto='tcp'
|
||||
uci set firewall.@rule[-1].dest_port='22'
|
||||
uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
uci add firewall rule
|
||||
uci set firewall.@rule[-1].name='Allow HTTP on WAN'
|
||||
uci set firewall.@rule[-1].src='wan'
|
||||
uci set firewall.@rule[-1].proto='tcp'
|
||||
uci set firewall.@rule[-1].dest_port='80'
|
||||
uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
uci add firewall rule
|
||||
uci set firewall.@rule[-1].name='Allow HTTPS on WAN'
|
||||
uci set firewall.@rule[-1].src='wan'
|
||||
uci set firewall.@rule[-1].proto='tcp'
|
||||
uci set firewall.@rule[-1].dest_port='443'
|
||||
uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
uci commit firewall
|
||||
|
||||
# Disable DNS-rebind protection
|
||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci commit dhcp
|
||||
|
||||
reload_config
|
||||
}
|
||||
|
||||
main
|
9
misc/rpi/uci/network
Normal file
9
misc/rpi/uci/network
Normal file
@ -0,0 +1,9 @@
|
||||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'wan'
|
||||
option ifname 'eth0'
|
||||
option proto 'dhcp'
|
37
misc/turris/omnia/uci-defaults/98-turris-omnia-uci-custom.sh
Normal file
37
misc/turris/omnia/uci-defaults/98-turris-omnia-uci-custom.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
main() {
|
||||
# Update default firewall ruleset
|
||||
uci add firewall rule
|
||||
uci set firewall.@rule[-1].name='Allow SSH on WAN'
|
||||
uci set firewall.@rule[-1].src='wan'
|
||||
uci set firewall.@rule[-1].proto='tcp'
|
||||
uci set firewall.@rule[-1].dest_port='22'
|
||||
uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
uci add firewall rule
|
||||
uci set firewall.@rule[-1].name='Allow HTTP on WAN'
|
||||
uci set firewall.@rule[-1].src='wan'
|
||||
uci set firewall.@rule[-1].proto='tcp'
|
||||
uci set firewall.@rule[-1].dest_port='80'
|
||||
uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
uci add firewall rule
|
||||
uci set firewall.@rule[-1].name='Allow HTTPS on WAN'
|
||||
uci set firewall.@rule[-1].src='wan'
|
||||
uci set firewall.@rule[-1].proto='tcp'
|
||||
uci set firewall.@rule[-1].dest_port='443'
|
||||
uci set firewall.@rule[-1].target='ACCEPT'
|
||||
|
||||
uci commit firewall
|
||||
|
||||
# Disable DNS-rebind protection
|
||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci commit dhcp
|
||||
|
||||
reload_config
|
||||
}
|
||||
|
||||
main
|
@ -1,25 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# set -eo pipefail
|
||||
set -eo pipefail
|
||||
|
||||
# FLAG_FILE=/root/.disk_resized
|
||||
block info
|
||||
|
||||
# if [ -f "$FLAG_FILE" ]; then
|
||||
# exit
|
||||
# fi
|
||||
DISK=/dev/mmcblk0
|
||||
PARTITION="${DISK}p2"
|
||||
|
||||
# DISK=/dev/mmcblk0
|
||||
# PARTITION="${DISK}p2"
|
||||
parted -s -a opt "$DISK" "resizepart 2 100%"
|
||||
|
||||
# parted -s -a opt "$DISK" "resizepart 2 100%"
|
||||
FS_SIZE="$(unsquashfs -s "$PARTITION" | grep -o 'Filesystem size [0-9]* bytes' | grep -o '[0-9][0-9]*')"
|
||||
FS_OFFSET="$(expr '(' "$FS_SIZE" + 65535 ')' / 65536 '*' 65536)"
|
||||
LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")"
|
||||
|
||||
# FS_SIZE="$(unsquashfs -s "$PARTITION" | grep -o 'Filesystem size [0-9]* bytes' | grep -o '[0-9][0-9]*')"
|
||||
# FS_OFFSET="$(expr '(' "$FS_SIZE" + 65535 ')' / 65536 '*' 65536)"
|
||||
# LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")"
|
||||
e2fsck -y -f "$LOOP_DEVICE"
|
||||
resize2fs "$LOOP_DEVICE"
|
||||
|
||||
# e2fsck -y -f "$LOOP_DEVICE"
|
||||
# resize2fs "$LOOP_DEVICE"
|
||||
rm -f /etc/uci-defaults/99-resize-disk.sh
|
||||
|
||||
# touch "$FLAG_FILE"
|
||||
|
||||
# reboot
|
||||
reboot
|
@ -2,7 +2,7 @@ all: rpi-4 rpi-3
|
||||
|
||||
rpi-4:
|
||||
$(MAKE) \
|
||||
ADDITIONAL_INSTALL="" \
|
||||
ADDITIONAL_INSTALL="install-rpi-network-config install-rpi-uci-defaults" \
|
||||
OPENWRT_TARGET="bcm27xx/bcm2711" \
|
||||
EMISSARY_ARCH="arm64" \
|
||||
OPENWRT_PROFILE="rpi-4" \
|
||||
@ -10,7 +10,7 @@ rpi-4:
|
||||
|
||||
rpi-3:
|
||||
$(MAKE) \
|
||||
ADDITIONAL_INSTALL="" \
|
||||
ADDITIONAL_INSTALL="install-rpi-network-config install-rpi-uci-defaults" \
|
||||
OPENWRT_TARGET="bcm27xx/bcm2710" \
|
||||
EMISSARY_ARCH="arm64" \
|
||||
OPENWRT_PROFILE="rpi-3" \
|
@ -5,7 +5,7 @@ turris: omnia
|
||||
omnia:
|
||||
$(MAKE) \
|
||||
ADDITIONAL_INSTALL="install-turris-omnia-uci-defaults" \
|
||||
ADDITIONAL_OPENWRT_PACKAGES="losetup squashfs-tools-unsquashfs resize2fs e2fsprogs parted" \
|
||||
ADDITIONAL_OPENWRT_PACKAGES="losetup squashfs-tools-unsquashfs resize2fs e2fsprogs parted block-mount" \
|
||||
OPENWRT_TARGET="mvebu/cortexa9" \
|
||||
EMISSARY_ARCH="armv7" \
|
||||
OPENWRT_PROFILE="cznic_turris-omnia" \
|
||||
|
Reference in New Issue
Block a user