Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled

This commit is contained in:
domenico
2025-06-24 14:35:53 +02:00
commit c06fb25d1f
9263 changed files with 1750214 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
#!/bin/sh /etc/rc.common
START=99
mmc_resetbc() {
local part_label="$1"
. /lib/functions.sh
local part_device="$(find_mmc_part "$part_label")"
if [ "$part_device" = "" ]; then
>&2 echo "mmc_resetbc: Unknown partition label: $part_label"
return 1
fi
local magic_number="$(hexdump -e '"0x%02x\n"' -n 4 "$part_device")"
if [ "$magic_number" != "0x20110811" ]; then
>&2 echo "mmc_resetbc: Unexpected partition magic: $magic_number"
return 1
fi
local last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
if [ "$last_count" != "0x00" ]; then
printf "\x00" | dd of="$part_device" bs=4 seek=1 count=1 conv=notrunc 2>/dev/null
last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
if [ "$last_count" != "0x00" ]; then
>&2 echo "mmc_resetbc: Unable to reset boot counter"
return 1
fi
fi
}
boot() {
case $(board_name) in
alfa-network,ap120c-ac)
[ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
echo -e "bootcount\nchanged\n" | /usr/sbin/fw_setenv -s -
;;
linksys,ea6350v3|\
linksys,ea8300|\
linksys,mr8300|\
linksys,whw01|\
linksys,whw03v2)
mtd resetbc s_env || true
;;
linksys,whw03)
mmc_resetbc s_env || true
;;
netgear,wac510)
fw_setenv boot_cnt=0
;;
esac
}

View File

@@ -0,0 +1,34 @@
#!/bin/sh /etc/rc.common
START=15
STOP=10
boot() {
case $(board_name) in
netgear,lbr20)
echo "0" > /sys/class/gpio/lte_rst/value
echo "0" > /sys/class/gpio/lte_pwrkey/value
echo "0" > /sys/class/gpio/lte_usb_boot/value
echo "0" > /sys/class/gpio/lte_pwm/value
sleep 1
echo "1" > /sys/class/gpio/lte_pwm/value
echo "1" > /sys/class/gpio/lte_pwrkey/value
echo "1" > /sys/class/gpio/lte_rst/value
sleep 1
echo "0" > /sys/class/gpio/lte_pwrkey/value
sleep 1
echo "1" > /sys/class/gpio/lte_pwrkey/value
;;
esac
}
shutdown() {
case $(board_name) in
netgear,lbr20)
echo "0" > /sys/class/gpio/lte_pwrkey/value
sleep 1
echo "1" > /sys/class/gpio/lte_pwrkey/value
sleep 10
;;
esac
}