mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-06-09 07:52:07 +08:00
base-files: allow override model name from uboot env
This commit is contained in:
parent
41e0c30d82
commit
d242992f65
@ -1,10 +1,11 @@
|
|||||||
do_sysinfo_generic() {
|
do_sysinfo_generic() {
|
||||||
[ -d /proc/device-tree ] || return
|
|
||||||
mkdir -p /tmp/sysinfo
|
mkdir -p /tmp/sysinfo
|
||||||
|
[ -d /proc/device-tree ] || return
|
||||||
[ -e /tmp/sysinfo/board_name ] || \
|
[ -e /tmp/sysinfo/board_name ] || \
|
||||||
echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name
|
echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name
|
||||||
[ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \
|
[ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \
|
||||||
echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model
|
echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model
|
||||||
|
[ -z "$(fw_printenv model_name)" ] || fw_printenv model_name > /tmp/sysinfo/model
|
||||||
}
|
}
|
||||||
|
|
||||||
boot_hook_add preinit_main do_sysinfo_generic
|
boot_hook_add preinit_main do_sysinfo_generic
|
||||||
|
@ -16,7 +16,8 @@ alfa-network,ac1200rm|\
|
|||||||
alfa-network,awusfree1|\
|
alfa-network,awusfree1|\
|
||||||
alfa-network,quad-e4g|\
|
alfa-network,quad-e4g|\
|
||||||
alfa-network,r36m-e4g|\
|
alfa-network,r36m-e4g|\
|
||||||
alfa-network,tube-e4g)
|
alfa-network,tube-e4g|\
|
||||||
|
huasifei,mt7621dtu)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
|
||||||
;;
|
;;
|
||||||
allnet,all0256n-4m|\
|
allnet,all0256n-4m|\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user