mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
Update On Tue Oct 21 20:38:56 CEST 2025
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-amlogic
|
||||
PKG_VERSION:=3.1.269
|
||||
PKG_VERSION:=3.1.270
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 License
|
||||
|
||||
@@ -258,7 +258,7 @@ EOF
|
||||
|
||||
EOF
|
||||
echo "/etc/config/fstab generated."
|
||||
echo "please reboot"
|
||||
echo "Please reboot before continuing."
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,16 @@ error_msg() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get the partition name of the /boot file system
|
||||
get_boot_partition_name() {
|
||||
local paths="/boot"
|
||||
local partition_name
|
||||
|
||||
partition_name=$(df "${paths}" | awk 'NR==2 {print $1}' | awk -F '/' '{print $3}')
|
||||
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
# Get the partition name of the root file system
|
||||
get_root_partition_name() {
|
||||
local paths=("/" "/overlay" "/rom")
|
||||
@@ -47,7 +57,6 @@ get_root_partition_name() {
|
||||
[[ -n "${partition_name}" ]] && break
|
||||
done
|
||||
|
||||
[[ -z "${partition_name}" ]] && error_msg "Cannot find the root partition!"
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
@@ -91,6 +100,12 @@ init_var() {
|
||||
support_platform=("allwinner" "rockchip" "amlogic" "qemu-aarch64")
|
||||
[[ -n "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" ]] || error_msg "[ ${PLATFORM} ] is not supported."
|
||||
|
||||
# Check and repair partition mount points
|
||||
[[ -z "$(get_boot_partition_name)" || -z "$(get_root_partition_name)" ]] && {
|
||||
echo -e "Partition mount point error, start repairing..."
|
||||
openwrt-backup -g
|
||||
}
|
||||
|
||||
# Set /boot/vmlinuz-* replication names for different SoCs
|
||||
MYBOOT_VMLINUZ="$(ls -l /boot/*Image 2>/dev/null | awk '{print $9}' | head -n 1)"
|
||||
MYBOOT_VMLINUZ="${MYBOOT_VMLINUZ##*/}"
|
||||
@@ -268,8 +283,8 @@ update_kernel() {
|
||||
rm -f /boot/uInitrd*
|
||||
else
|
||||
valid_files="vmlinuz-${kernel_name} uInitrd-${kernel_name} config-${kernel_name} System.map-${kernel_name}"
|
||||
# wxy-oect: MODEL_ID numbers r304 and r306, require special handling of uInitrd
|
||||
[[ "${MODEL_ID}" =~ ^(r304|r306)$ ]] || rm -f /boot/initrd.img*
|
||||
# wxy-oect: MODEL_ID numbers r304,r306 and w[0-9]{3}, require special handling of uInitrd
|
||||
[[ "${MODEL_ID}" =~ ^(r304|r306|w[0-9]{3})$ ]] || rm -f /boot/initrd.img*
|
||||
fi
|
||||
for f in ${valid_files}; do [[ -f "/boot/${f}" ]] || restore_kernel; done
|
||||
|
||||
|
||||
@@ -21,6 +21,16 @@ error_msg() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get the partition name of the /boot file system
|
||||
get_boot_partition_name() {
|
||||
local paths="/boot"
|
||||
local partition_name
|
||||
|
||||
partition_name=$(df "${paths}" | awk 'NR==2 {print $1}' | awk -F '/' '{print $3}')
|
||||
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
# Get the partition name of the root file system
|
||||
get_root_partition_name() {
|
||||
local paths=("/" "/overlay" "/rom")
|
||||
@@ -31,7 +41,6 @@ get_root_partition_name() {
|
||||
[[ -n "${partition_name}" ]] && break
|
||||
done
|
||||
|
||||
[[ -z "${partition_name}" ]] && error_msg "Cannot find the root partition!"
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
@@ -79,6 +88,12 @@ else
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
# Check and repair partition mount points
|
||||
[[ -z "$(get_boot_partition_name)" || -z "$(get_root_partition_name)" ]] && {
|
||||
echo -e "Partition mount point error, start repairing..."
|
||||
openwrt-backup -g
|
||||
}
|
||||
|
||||
# Find the partition where root is located
|
||||
ROOT_PTNAME="$(get_root_partition_name)"
|
||||
|
||||
|
||||
@@ -21,6 +21,16 @@ error_msg() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get the partition name of the /boot file system
|
||||
get_boot_partition_name() {
|
||||
local paths="/boot"
|
||||
local partition_name
|
||||
|
||||
partition_name=$(df "${paths}" | awk 'NR==2 {print $1}' | awk -F '/' '{print $3}')
|
||||
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
# Get the partition name of the root file system
|
||||
get_root_partition_name() {
|
||||
local paths=("/" "/overlay" "/rom")
|
||||
@@ -31,7 +41,6 @@ get_root_partition_name() {
|
||||
[[ -n "${partition_name}" ]] && break
|
||||
done
|
||||
|
||||
[[ -z "${partition_name}" ]] && error_msg "Cannot find the root partition!"
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
@@ -65,6 +74,12 @@ else
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
# Check and repair partition mount points
|
||||
[[ -z "$(get_boot_partition_name)" || -z "$(get_root_partition_name)" ]] && {
|
||||
echo -e "Partition mount point error, start repairing..."
|
||||
openwrt-backup -g
|
||||
}
|
||||
|
||||
# Find the partition where root is located
|
||||
ROOT_PTNAME="$(get_root_partition_name)"
|
||||
|
||||
|
||||
@@ -21,6 +21,16 @@ error_msg() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get the partition name of the /boot file system
|
||||
get_boot_partition_name() {
|
||||
local paths="/boot"
|
||||
local partition_name
|
||||
|
||||
partition_name=$(df "${paths}" | awk 'NR==2 {print $1}' | awk -F '/' '{print $3}')
|
||||
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
# Get the partition name of the root file system
|
||||
get_root_partition_name() {
|
||||
local paths=("/" "/overlay" "/rom")
|
||||
@@ -31,7 +41,6 @@ get_root_partition_name() {
|
||||
[[ -n "${partition_name}" ]] && break
|
||||
done
|
||||
|
||||
[[ -z "${partition_name}" ]] && error_msg "Cannot find the root partition!"
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
@@ -79,6 +88,12 @@ else
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
# Check and repair partition mount points
|
||||
[[ -z "$(get_boot_partition_name)" || -z "$(get_root_partition_name)" ]] && {
|
||||
echo -e "Partition mount point error, start repairing..."
|
||||
openwrt-backup -g
|
||||
}
|
||||
|
||||
# Find the partition where root is located
|
||||
# vda2 or vda3
|
||||
ROOT_PTNAME="$(get_root_partition_name)"
|
||||
|
||||
@@ -21,6 +21,16 @@ error_msg() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get the partition name of the /boot file system
|
||||
get_boot_partition_name() {
|
||||
local paths="/boot"
|
||||
local partition_name
|
||||
|
||||
partition_name=$(df "${paths}" | awk 'NR==2 {print $1}' | awk -F '/' '{print $3}')
|
||||
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
# Get the partition name of the root file system
|
||||
get_root_partition_name() {
|
||||
local paths=("/" "/overlay" "/rom")
|
||||
@@ -31,7 +41,6 @@ get_root_partition_name() {
|
||||
[[ -n "${partition_name}" ]] && break
|
||||
done
|
||||
|
||||
[[ -z "${partition_name}" ]] && error_msg "Cannot find the root partition!"
|
||||
echo "${partition_name}"
|
||||
}
|
||||
|
||||
@@ -303,6 +312,12 @@ esac
|
||||
echo -e "Current device: ${MYDEVICE_NAME} [ ${SOC} ]"
|
||||
sleep 3
|
||||
|
||||
# Check and repair partition mount points
|
||||
[[ -z "$(get_boot_partition_name)" || -z "$(get_root_partition_name)" ]] && {
|
||||
echo -e "Partition mount point error, start repairing..."
|
||||
openwrt-backup -g
|
||||
}
|
||||
|
||||
# Find the partition where root is located
|
||||
ROOT_PTNAME="$(get_root_partition_name)"
|
||||
|
||||
@@ -747,7 +762,7 @@ sed -e 's/ttyAMA0/ttyS2/' -i ./etc/inittab
|
||||
[ "${SOC}" != "ht2" ] && \
|
||||
[ "${SOC}" != "e20c" ] && \
|
||||
[ "${SOC}" != "e24c" ] && \
|
||||
sed -e 's/ttyS0/tty1/' -i ./etc/inittab
|
||||
sed -e 's/ttyS0/tty1/' -i ./etc/inittab
|
||||
|
||||
sss=$(date +%s)
|
||||
ddd=$((sss / 86400))
|
||||
|
||||
Reference in New Issue
Block a user