Initial commit
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
#AP6210_NVRAM_V1.2_03192013
|
||||
manfid=0x2d0
|
||||
prodid=0x492
|
||||
vendid=0x14e4
|
||||
devid=0x4343
|
||||
boardtype=0x0598
|
||||
|
||||
# Board Revision is P307, same nvram file can be used for P304, P305, P306 and P307 as the tssi pa params used are same
|
||||
#Please force the automatic RX PER data to the respective board directory if not using P307 board, for e.g. for P305 boards force the data into the following directory /projects/BCM43362/a1_labdata/boardtests/results/sdg_rev0305
|
||||
boardrev=0x1307
|
||||
boardnum=777
|
||||
xtalfreq=26000
|
||||
boardflags=0x80201
|
||||
boardflags2=0x80
|
||||
sromrev=3
|
||||
wl0id=0x431b
|
||||
macaddr=00:90:4c:07:71:12
|
||||
aa2g=1
|
||||
ag0=2
|
||||
maxp2ga0=74
|
||||
cck2gpo=0x2222
|
||||
ofdm2gpo=0x44444444
|
||||
mcs2gpo0=0x6666
|
||||
mcs2gpo1=0x6666
|
||||
pa0maxpwr=56
|
||||
|
||||
#P207 PA params
|
||||
#pa0b0=5447
|
||||
#pa0b1=-658
|
||||
#pa0b2=-175<div></div>
|
||||
|
||||
#Same PA params for P304,P305, P306, P307
|
||||
|
||||
pa0b0=5447
|
||||
pa0b1=-607
|
||||
pa0b2=-160
|
||||
pa0itssit=62
|
||||
pa1itssit=62
|
||||
|
||||
|
||||
cckPwrOffset=5
|
||||
ccode=0
|
||||
rssismf2g=0xa
|
||||
rssismc2g=0x3
|
||||
rssisav2g=0x7
|
||||
triso2g=0
|
||||
noise_cal_enable_2g=0
|
||||
noise_cal_po_2g=0
|
||||
swctrlmap_2g=0x04040404,0x02020202,0x02020202,0x010101,0x1ff
|
||||
temp_add=29767
|
||||
temp_mult=425
|
||||
|
||||
btc_flags=0x6
|
||||
btc_params0=5000
|
||||
btc_params1=1000
|
||||
btc_params6=63
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#AP6181_NVRAM_V1.1_01152013
|
||||
#adjuest PA parameter for g/n mode
|
||||
manfid=0x2d0
|
||||
prodid=0x492
|
||||
vendid=0x14e4
|
||||
devid=0x4343
|
||||
boardtype=0x0598
|
||||
|
||||
# Board Revision is P307, same nvram file can be used for P304, P305, P306 and P307 as the tssi pa params used are same
|
||||
#Please force the automatic RX PER data to the respective board directory if not using P307 board, for e.g. for P305 boards force the data into the following directory /projects/BCM43362/a1_labdata/boardtests/results/sdg_rev0305
|
||||
boardrev=0x1307
|
||||
boardnum=777
|
||||
xtalfreq=26000
|
||||
boardflags=0xa00
|
||||
sromrev=3
|
||||
wl0id=0x431b
|
||||
macaddr=00:90:4c:07:71:12
|
||||
aa2g=1
|
||||
ag0=2
|
||||
maxp2ga0=74
|
||||
cck2gpo=0x2222
|
||||
ofdm2gpo=0x66666666
|
||||
mcs2gpo0=0x7777
|
||||
mcs2gpo1=0x7777
|
||||
pa0maxpwr=56
|
||||
|
||||
#P207 PA params
|
||||
#pa0b0=5447
|
||||
#pa0b1=-658
|
||||
#pa0b2=-175<div></div>
|
||||
|
||||
#Same PA params for P304,P305, P306, P307
|
||||
|
||||
pa0b0=5447
|
||||
pa0b1=-607
|
||||
pa0b2=-160
|
||||
pa0itssit=62
|
||||
pa1itssit=62
|
||||
|
||||
|
||||
cckPwrOffset=5
|
||||
ccode=0
|
||||
rssismf2g=0xa
|
||||
rssismc2g=0x3
|
||||
rssisav2g=0x7
|
||||
triso2g=0
|
||||
noise_cal_enable_2g=0
|
||||
noise_cal_po_2g=0
|
||||
swctrlmap_2g=0x04040404,0x02020202,0x02020202,0x010101,0x1ff
|
||||
temp_add=29767
|
||||
temp_mult=425
|
||||
@@ -0,0 +1,53 @@
|
||||
#AP6212_NVRAM_V1.0_20140603
|
||||
# 2.4 GHz, 20 MHz BW mode
|
||||
|
||||
# The following parameter values are just placeholders, need to be updated.
|
||||
manfid=0x2d0
|
||||
prodid=0x0726
|
||||
vendid=0x14e4
|
||||
devid=0x43e2
|
||||
boardtype=0x0726
|
||||
boardrev=0x1101
|
||||
boardnum=22
|
||||
macaddr=00:90:4c:c5:12:38
|
||||
sromrev=11
|
||||
boardflags=0x00404201
|
||||
xtalfreq=26000
|
||||
nocrc=1
|
||||
ag0=255
|
||||
aa2g=1
|
||||
ccode=ALL
|
||||
|
||||
pa0itssit=0x20
|
||||
extpagain2g=0
|
||||
|
||||
#PA parameters for 2.4GHz, measured at CHIP OUTPUT
|
||||
pa2ga0=-168,7161,-820
|
||||
AvVmid_c0=0x0,0xc8
|
||||
cckpwroffset0=5
|
||||
|
||||
# PPR params
|
||||
maxp2ga0=90
|
||||
txpwrbckof=6
|
||||
cckbw202gpo=0x5555
|
||||
legofdmbw202gpo=0x77777777
|
||||
mcsbw202gpo=0xaaaaaaaa
|
||||
|
||||
# OFDM IIR :
|
||||
ofdmdigfilttype=7
|
||||
# PAPD mode:
|
||||
papdmode=2
|
||||
|
||||
il0macaddr=00:90:4c:c5:12:38
|
||||
wl0id=0x431b
|
||||
|
||||
#OOB parameters
|
||||
hostwake=0x40
|
||||
hostrdy=0x41
|
||||
usbrdy=0x03
|
||||
usbrdydelay=100
|
||||
deadman_to=0xffffffff
|
||||
# muxenab: 0x1 for UART enable, 0x10 for Host awake
|
||||
muxenab=0x10
|
||||
# CLDO PWM voltage settings - 0x4 - 1.1 volt
|
||||
#cldo_pwm=0x4
|
||||
18
target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh
Normal file
18
target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
do_b53_hack() {
|
||||
. /lib/functions.sh
|
||||
|
||||
# hack: enable switch on Lamobo R1 and reset counters
|
||||
case "$(board_name)" in
|
||||
"lamobo,lamobo-r1")
|
||||
ifconfig eth0 up
|
||||
sleep 1
|
||||
swconfig dev switch0 set reset 1
|
||||
swconfig dev switch0 set reset_mib 1
|
||||
swconfig dev switch0 set apply 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_b53_hack
|
||||
20
target/linux/sunxi/base-files/lib/preinit/79_move_config
Normal file
20
target/linux/sunxi/base-files/lib/preinit/79_move_config
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2012-2015 OpenWrt.org
|
||||
|
||||
move_config() {
|
||||
local partdev
|
||||
|
||||
. /lib/upgrade/common.sh
|
||||
|
||||
if export_bootdevice && export_partdevice partdev -1; then
|
||||
if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then
|
||||
if [ -f /mnt/sysupgrade.tgz ]; then
|
||||
mv -f /mnt/sysupgrade.tgz /
|
||||
fi
|
||||
umount /mnt
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
|
||||
89
target/linux/sunxi/base-files/lib/upgrade/platform.sh
Normal file
89
target/linux/sunxi/base-files/lib/upgrade/platform.sh
Normal file
@@ -0,0 +1,89 @@
|
||||
platform_check_image() {
|
||||
local diskdev partdev diff
|
||||
|
||||
export_bootdevice && export_partdevice diskdev -2 || {
|
||||
echo "Unable to determine upgrade device"
|
||||
return 1
|
||||
}
|
||||
|
||||
get_partitions "/dev/$diskdev" bootdisk
|
||||
|
||||
#extract the boot sector from the image
|
||||
get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
|
||||
|
||||
get_partitions /tmp/image.bs image
|
||||
|
||||
#compare tables
|
||||
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
|
||||
|
||||
rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
|
||||
|
||||
if [ -n "$diff" ]; then
|
||||
echo "Partition layout has changed. Full image will be written."
|
||||
ask_bool 0 "Abort" && exit 1
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
platform_copy_config() {
|
||||
local partdev
|
||||
|
||||
if export_partdevice partdev -1; then
|
||||
mount -t vfat -o rw,noatime "/dev/$partdev" /mnt
|
||||
cp -af "$CONF_TAR" /mnt/
|
||||
umount /mnt
|
||||
fi
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local diskdev partdev diff
|
||||
|
||||
export_bootdevice && export_partdevice diskdev -2 || {
|
||||
echo "Unable to determine upgrade device"
|
||||
return 1
|
||||
}
|
||||
|
||||
sync
|
||||
|
||||
if [ "$SAVE_PARTITIONS" = "1" ]; then
|
||||
get_partitions "/dev/$diskdev" bootdisk
|
||||
|
||||
#extract the boot sector from the image
|
||||
get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
|
||||
|
||||
get_partitions /tmp/image.bs image
|
||||
|
||||
#compare tables
|
||||
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
|
||||
else
|
||||
diff=1
|
||||
fi
|
||||
|
||||
if [ -n "$diff" ]; then
|
||||
get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
|
||||
|
||||
# Separate removal and addtion is necessary; otherwise, partition 1
|
||||
# will be missing if it overlaps with the old partition 2
|
||||
partx -d - "/dev/$diskdev"
|
||||
partx -a - "/dev/$diskdev"
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
#write uboot image
|
||||
get_image "$@" | dd of="$diskdev" bs=1024 skip=8 seek=8 count=1016 conv=fsync
|
||||
#iterate over each partition from the image and write it to the boot disk
|
||||
while read part start size; do
|
||||
part="$(($part - 2))"
|
||||
if export_partdevice partdev $part; then
|
||||
echo "Writing image to /dev/$partdev..."
|
||||
get_image "$@" | dd of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
|
||||
else
|
||||
echo "Unable to find partition $part device, skipped."
|
||||
fi
|
||||
done < /tmp/partmap.image
|
||||
|
||||
#copy partition uuid
|
||||
echo "Writing new UUID to /dev/$diskdev..."
|
||||
get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
|
||||
}
|
||||
Reference in New Issue
Block a user