Merge branch 'master' into themactep-postbuildscripts

pull/805/head
Paul Philippov 2023-05-19 16:29:05 -04:00 committed by GitHub
commit 6172356e42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View File

@ -74,7 +74,7 @@ BR2_PACKAGE_LIBYAML=y
BR2_PACKAGE_MBEDTLS_OPENIPC=y BR2_PACKAGE_MBEDTLS_OPENIPC=y
# BR2_PACKAGE_MBEDTLS_OPENIPC_PROGRAMS is not set # BR2_PACKAGE_MBEDTLS_OPENIPC_PROGRAMS is not set
# BR2_PACKAGE_MBEDTLS_OPENIPC_COMPRESSION is not set # BR2_PACKAGE_MBEDTLS_OPENIPC_COMPRESSION is not set
BR2_PACKAGE_MICROBE_WEB=y # BR2_PACKAGE_MICROBE_WEB is not set
# BR2_PACKAGE_MINI_SNMPD is not set # BR2_PACKAGE_MINI_SNMPD is not set
# BR2_PACKAGE_OPUS_OPENIPC is not set # BR2_PACKAGE_OPUS_OPENIPC is not set
# BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT is not set # BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT is not set

View File

@ -1,6 +1,6 @@
auto eth0 auto eth0
iface eth0 inet dhcp iface eth0 inet dhcp
hwaddress ether $(fw_printenv -n ethaddr || echo 00:24:B8:FF:FF:FF) hwaddress ether $(fw_printenv -n ethaddr || echo 00:00:23:34:45:66)
#udhcpc_opts -O search -O ntpsrv -O hostname #udhcpc_opts -O search -O ntpsrv -O hostname
#pre-up echo -e "nameserver 77.88.8.8\nnameserver 8.8.4.4\n" >/tmp/resolv.conf #pre-up echo -e "nameserver 77.88.8.8\nnameserver 8.8.4.4\n" >/tmp/resolv.conf
#pre-up echo -e "server 0.time.openipc.org iburst\nserver 1.time.openipc.org iburst\nserver 2.time.openipc.org iburst\nserver 3.time.openipc.org iburst" >/tmp/ntp.conf #pre-up echo -e "server 0.time.openipc.org iburst\nserver 1.time.openipc.org iburst\nserver 2.time.openipc.org iburst\nserver 3.time.openipc.org iburst" >/tmp/ntp.conf

View File

@ -1,15 +1,18 @@
#!/bin/sh #!/bin/sh
# #
# OpenIPC.org | v.20230503 # OpenIPC.org | v.20230518
# #
scr_version=1.0.17 scr_version=1.0.18
args=" $@" args=" $@"
set -e set -e
LOCK_FILE=/tmp/sysupgrade.lock LOCK_FILE=/tmp/sysupgrade.lock
IPCINFO=/tmp/ipcinfo
[ -f ${IPCINFO} ] && chmod +x ${IPCINFO} || IPCINFO=$(which ipcinfo)
echo_c() { echo_c() {
# 31 red, 32 green, 33 yellow, 34 blue, 35 magenta, 36 cyan, 37 white, 38 grey # 31 red, 32 green, 33 yellow, 34 blue, 35 magenta, 36 cyan, 37 white, 38 grey
@ -83,10 +86,11 @@ do_wipe_overlay() {
download_firmware() { download_firmware() {
echo_c 33 "\nFirmware" echo_c 33 "\nFirmware"
[ "$branch_dev" = "1" ] && branch="dev" || branch="latest"
osr=$(get_system_build) osr=$(get_system_build)
ftype=$(get_flash_type) ftype=$(get_flash_type)
build="${soc}-${ftype}-${osr}" build="${soc}-${ftype}-${osr}"
[ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${build}.tgz" [ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/${branch}/openipc.${build}.tgz"
echo "Download from $url" echo "Download from $url"
[ -z "$HASERLVER" ] && progress="-#" || progress="-s" [ -z "$HASERLVER" ] && progress="-#" || progress="-s"
[ "$(curl -o /dev/null -s -w '%{http_code}\n' "$url")" = "000" ] && die "Check your network!" [ "$(curl -o /dev/null -s -w '%{http_code}\n' "$url")" = "000" ] && die "Check your network!"
@ -190,7 +194,7 @@ get_kernel_version() {
} }
get_system_info() { get_system_info() {
vendor=$(ipcinfo --vendor) vendor=$(${IPCINFO} -v)
soc=$(fw_printenv -n soc) || die "SoC is not defined in U-Boot environment" soc=$(fw_printenv -n soc) || die "SoC is not defined in U-Boot environment"
kernel_device=$(get_device "kernel") kernel_device=$(get_device "kernel")
kernel_version=$(get_kernel_version "$kernel_device") kernel_version=$(get_kernel_version "$kernel_device")
@ -206,7 +210,7 @@ get_system_build() {
} }
get_flash_type() { get_flash_type() {
local x=$(ipcinfo -F) local x=$(${IPCINFO} -F)
[ -z "$1" ] && [ "$x" = "nand" ] && $(fw_printenv bootcmd | grep -qv nand) && x=nor [ -z "$1" ] && [ "$x" = "nand" ] && $(fw_printenv bootcmd | grep -qv nand) && x=nor
echo "$x" echo "$x"
} }
@ -224,6 +228,7 @@ Where:
-k Update kernel from online repository. -k Update kernel from online repository.
-r Update rootfs from online repository. -r Update rootfs from online repository.
-w Update Web UI to development version. -w Update Web UI to development version.
-d Update firmware from development branch.
--url=[URL] Custom URL to update from (.tgz format). --url=[URL] Custom URL to update from (.tgz format).
--kernel=[FILE] Update kernel from file (uImage format). --kernel=[FILE] Update kernel from file (uImage format).
--rootfs=[FILE] Update rootfs from file (squashfs format). --rootfs=[FILE] Update rootfs from file (squashfs format).
@ -271,6 +276,10 @@ for i in "$@"; do
skip_ver=1 skip_ver=1
shift shift
;; ;;
-d)
branch_dev=1
shift
;;
-h | --help) -h | --help)
print_sysinfo print_sysinfo
print_usage print_usage

View File

@ -3,7 +3,7 @@ iface lo inet loopback
auto eth0 auto eth0
iface eth0 inet static iface eth0 inet static
hwaddress ether $(fw_printenv -n ethaddr || echo 00:24:B8:FF:FF:FF) hwaddress ether $(fw_printenv -n ethaddr || echo 00:00:23:34:45:66)
address 192.168.2.10 address 192.168.2.10
netmask 255.255.255.0 netmask 255.255.255.0