meta-digi-arm: Update atheros init script to make it platform independent.
Another option would be to split it up in machine folders, but it is similar enough in all platforms not to need this for the time being. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
parent
02a3bc1fad
commit
cc17072c91
|
|
@ -53,6 +53,8 @@ if ! cmp -s ${RAM_DRIVE}/${MAC_FILENAME} ${FIRMWARE_DIR}/${MAC_FILENAME}; then
|
|||
fi
|
||||
rm -f ${RAM_DRIVE}/${MAC_FILENAME}
|
||||
|
||||
BDATA_SOURCE=Digi_6203-6233-World.bin
|
||||
if [ -e "/sys/kernel/machine/name" ]; then
|
||||
# Figure out which wireless region we are in. The US has rules for
|
||||
# what channels can be used and at what power level. We use a different set of
|
||||
# rules for the other regions in the world that we sell into. The mod_cert field
|
||||
|
|
@ -60,11 +62,13 @@ rm -f ${RAM_DRIVE}/${MAC_FILENAME}
|
|||
# appropriate calibration file is loaded.
|
||||
#
|
||||
US_CODE="0x0"
|
||||
REGION_CODE="$(cat /sys/kernel/ccardimx28/mod_cert)"
|
||||
MACHINE="$(cat /sys/kernel/machine/name)"
|
||||
REGION_CODE="$(cat /sys/kernel/${MACHINE}/mod_cert)"
|
||||
if [ -z "${REGION_CODE}" -o "${US_CODE}" = "${REGION_CODE}" ]; then
|
||||
BDATA_SOURCE=Digi_6203-6233-US.bin
|
||||
fi
|
||||
else
|
||||
BDATA_SOURCE=Digi_6203-6233-World.bin
|
||||
logger -t atheros "Undefined machine, defaulting to world region."
|
||||
fi
|
||||
|
||||
# We don't want to rewrite NAND every time we boot so only
|
||||
|
|
|
|||
Loading…
Reference in New Issue