2015-05-05 17:18:24 -06:00
|
|
|
#!/bin/sh
|
|
|
|
#CMLARA: Temporary shell script for ar71xx platform models
|
|
|
|
# Return the model of the device
|
|
|
|
|
|
|
|
if [ ! -f /tmp/sysinfo/boardid ]; then
|
|
|
|
. /lib/functions.sh
|
|
|
|
. /lib/ar71xx.sh
|
|
|
|
ar71xx_board_detect
|
|
|
|
|
2016-09-30 21:41:33 -06:00
|
|
|
case $AR71XX_BOARD_NAME in
|
2019-04-12 21:56:48 -06:00
|
|
|
*-m-xw|lbe-m5)
|
2015-05-05 17:18:24 -06:00
|
|
|
BOARDID=$(dd if=/dev/mtd7 bs=1 skip=12 count=2 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"')
|
|
|
|
BOARDID="0x${BOARDID}"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
BOARDID=$AR71XX_MODEL
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$BOARDID" > /tmp/sysinfo/boardid
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2015-05-10 00:04:54 -06:00
|
|
|
cat /tmp/sysinfo/boardid
|