20190129_jeffrey - silenceuncrio/diary GitHub Wiki
繼續 M300 - MFG tool with UBI
mfgtool 產出的部分當初是加在 M300\meta-proscend\classes\image_types_proscend.bbclass
的
IMAGE_CMD_nandflash_mfgtools () {
# clean up
rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}`
rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}
cp ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_NANDFLASH} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files
cp "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin" ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/zImage
# Copy device tree file
if test -n "${KERNEL_DEVICETREE}"; then
for DTS_FILE in ${KERNEL_DEVICETREE}; do
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
cp "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files
else
bbfatal "${DTS_FILE} does not exist."
fi
done
fi
cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
filename=$(date "+${MACHINE}_%Y%m%d%H%M%S_mfgtools.zip")
cd ${MFGTOOLS_DIR}/nandflash
zip -r ${filename} mfgtools/*
cp ${filename} ${DEPLOY_DIR_IMAGE}
cd -
cd ${DEPLOY_DIR_IMAGE}
ln -s ${filename} ${NANDFLASH_MFGTOOLS}
cd -
}
以下這部分要改
cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
改成
cp ubifs.img ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
就是把 rootfs 從原本的 rootfs.tar.bz2
換成 winston 產出的 ubifs.img
diff --git a/meta-proscend/classes/image_types_proscend.bbclass b/meta-proscend/classes/image_types_proscend.bbclass
old mode 100755
new mode 100644
index 78c8b59..f308fcd
--- a/meta-proscend/classes/image_types_proscend.bbclass
+++ b/meta-proscend/classes/image_types_proscend.bbclass
@@ -202,7 +202,10 @@ IMAGE_CMD_nandflash_mfgtools () {
done
fi
- cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+ # cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+
+ # use UBIFS file system image
+ cp ubifs.img ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/ubifs.img
filename=$(date "+${MACHINE}_%Y%m%d%H%M%S_mfgtools.zip")
cd ${MFGTOOLS_DIR}/nandflash
還要修改 M300\manufacturing_tool\nandflash\mfgtools\Profiles\Linux\OS Firmware
裡的 ucl2.xml
diff --git a/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml b/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
index 520ff3d..24cdacc 100644
--- a/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
+++ b/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
@@ -109,29 +109,20 @@
<CMD state="Updater" type="push"
body="$ ubimkvol /dev/ubi3 -N config_b -m"/>
- <!-- burn the rootfs_a -->
- <CMD state="Updater" type="push"
- body="$ mkdir -p /mnt/rootfs_a"/>
<CMD state="Updater" type="push"
- body="$ mount -t ubifs ubi0:rootfs_a /mnt/rootfs_a"/>
- <CMD state="Updater" type="push"
- body="pipe tar -jxv -C /mnt/rootfs_a" file="files/rootfs.tar.bz2">Sending and writting rootfs_a</CMD>
+ body="send" file="files/ubifs.img">Sending a UBIFS file system image</CMD>
+
+ <!-- burn the rootfs_a -->
<CMD state="Updater" type="push"
- body="frf">Finishing rootfs write</CMD>
+ body="$ ubiupdatevol /dev/ubi0_0 -t"/>
<CMD state="Updater" type="push"
- body="$ umount /mnt/rootfs_a">Unmounting rootfs_a partition</CMD>
+ body="$ ubiupdatevol /dev/ubi0_0 $FILE">Write to UBI volume /dev/ubi0_0 - rootfs_a</CMD>
<!-- burn the rootfs_b -->
<CMD state="Updater" type="push"
- body="$ mkdir -p /mnt/rootfs_b"/>
- <CMD state="Updater" type="push"
- body="$ mount -t ubifs ubi2:rootfs_b /mnt/rootfs_b"/>
- <CMD state="Updater" type="push"
- body="pipe tar -jxv -C /mnt/rootfs_b" file="files/rootfs.tar.bz2">Sending and writting rootfs_b</CMD>
- <CMD state="Updater" type="push"
- body="frf">Finishing rootfs write</CMD>
+ body="$ ubiupdatevol /dev/ubi2_0 -t"/>
<CMD state="Updater" type="push"
- body="$ umount /mnt/rootfs_b">Unmounting rootfs_a partition</CMD>
+ body="$ ubiupdatevol /dev/ubi2_0 $FILE">Write to UBI volume /dev/ubi2_0 - rootfs_b</CMD>
<CMD state="Updater" type="push"
body="$ echo Update Complete!">Done</CMD>
emmc 先不管
先 build 個 image 試試
實際用 build 出來的 mfgtool 作燒錄
比之前快上許多 雖然 ubifs image 比之前的大一些
可以 commit 了
commit 8fe03637038346e01233f1aeb5c153d0c88ac464
Author: jeffrey <[email protected]>
Date: Tue Jan 29 09:53:45 2019 +0800
use UBIFS file system image in mfgtools
.../mfgtools/Profiles/Linux/OS Firmware/ucl2.xml | 23 +++++++---------------
meta-proscend/classes/image_types_proscend.bbclass | 5 ++++-
2 files changed, 11 insertions(+), 17 deletions(-)
DQA 表示 hotfix/v1.76
bootloader 的版號不要顯示在 web ui 上
只要在 cli 顯示方便產線做確認就好了
切回 branch hotfix/v1.76
直接把 bootloader version 從 web ui 拿掉
diff --git a/proscend/prosrc/www/app/feature/identification.html b/proscend/prosrc/www/app/feature/identification.html
index e97e9d5..488ffef 100644
--- a/proscend/prosrc/www/app/feature/identification.html
+++ b/proscend/prosrc/www/app/feature/identification.html
@@ -25,8 +25,6 @@
<td>{{vm.system.szMacLan}}</td></tr>
<tr><td>{{ 'IDENTIFICATION_WAN_MAC_ADDRESS' | translate }}</td>
<td>{{vm.system.szMacWan}}</td></tr>
- <tr><td>{{ 'IDENTIFICATION_BOOTLOADER_VERSION' | translate }}</td>
- <td>{{vm.system.szBootloaderVersion}}</td></tr>
<tr><td>{{ 'IDENTIFICATION_SOFTWARE_VERSION' | translate }}</td>
<td>{{vm.system.szSwMobileRouterVersion}}</td></tr>
<tr><td>{{ 'IDENTIFICATION_SERIAL_NUMBER' | translate }}</td>
直接上 code 吧
commit a47f51180afa0b7429dad9cef8fd3e65fc20ba06
Refs: [hotfix/v1.76], {origin/hotfix/v1.76}
Author: jeffrey <[email protected]>
Date: Tue Jan 29 10:07:53 2019 +0800
remove bootloader version from web ui
proscend/prosrc/www/app/feature/identification.html | 2 --
1 file changed, 2 deletions(-)
自己同步做一下測試
build image
- Products/Vendor = M300/10_GPS_HYTEC
確認無誤
update 一下自己以前寫的有關於 Manufacturing tool 的 wiki
盤一下待作事項
- M330
- web server and GUI
- GRE
- PPTP
- RIP 1/2
- OSPF
- BGP
- M300
- Cisco DMVPN
- M360
- Schedule Reboot
看來可以切到 M330 了
目前 M330 工作的 branch 是在 feature/proscend-proting
利用 ~/330.sh
進開發環境 省得每次都要敲一長串 docker exec -it -u user build-m330 bash
➜ m330 git:(feature/proscend-porting) ✗ cat ../330.sh
#!/bin/bash
docker exec -it -u user build-m330 bash
起手式跟 M360 一樣
cd /home/user
source proenv.sh
一樣先 build proscend 外層
M330 第一次上電
先不要管目前的 SDK
先看目前板子上的軟體
keep 一下 console 的訊息
U-Boot 1.1.4 (Oct 12 2018 - 10:26:06)
ap147 - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x25)
Tap values = (0x17, 0x17, 0x17, 0x17)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 202k for U-Boot at: 87fcc000
Reserving 192k for malloc() at: 87f9c000
Reserving 44 Bytes for Board Info at: 87f9bfd4
Reserving 36 Bytes for Global Data at: 87f9bfb0
Reserving 128k for boot params() at: 87f7bfb0
Stack Pointer at: 87f7bf98
Now running in RAM - U-Boot at: 87fcc000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Setting 0x181162c0 to 0x1021a100
Hit any key to stop autoboot: 0
## Booting image at 9fe80000 ...
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2018-12-18 2:16:23 UTC
Image Type: MIPS Linux Multi-File Image (lzma compressed)
Data Size: 1389015 Bytes = 1.3 MB
Load Address: 80060000
Entry Point: 80060000
Contents:
Image 0: 1389007 Bytes = 1.3 MB
Verifying Checksum at 0x9fe80040 ...OK
Uncompressing Multi-File Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728
Starting kernel ...
[ 0.000000] Linux version 3.3.8 (ycore@ycore-70TUA000CN) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Tue Dec 18 10:15:40 CST 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Qualcomm Atheros QCA9531 rev 2
[ 0.000000] Clocks: CPU:650.000MHz, DDR:597.216MHz, AHB:216.666MHz, Ref:25.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00008000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00008000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: board=AP147 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art),16000k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd crashkernel=10M@20M oops=panic
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 125348k/131072k available (2856k kernel code, 5724k reserved, 866k data, 232k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:83
[ 0.000000] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[ 0.060000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 512
[ 0.070000] NET: Registered protocol family 16
[ 0.070000] gpiochip_add: registered GPIOs 0 to 17 on device: ath79
[ 0.080000] MIPS: machine is Qualcomm Atheros AP147 reference board
[ 0.080000] AP147 Reference Board Id is 255
[ 0.090000] ar724x-pci ar724x-pci.0: PCIe link is down
[ 0.090000] registering PCI controller with io_map_base unset
[ 0.100000]
[ 0.100000] WLAN firmware dump buffer allocation of 2097152 bytes @ address 0x87a00000- SUCCESS !!!
[ 0.110000] ar71xx: invalid MDIO id 1
[ 0.520000] bio: create slab <bio-0> at 0
[ 0.520000] PCI host bridge to bus 0000:00
[ 0.530000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[ 0.530000] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.540000] Switching to clocksource MIPS
[ 0.540000] NET: Registered protocol family 2
[ 0.550000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.550000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.560000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.560000] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.570000] TCP reno registered
[ 0.570000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.580000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.580000] NET: Registered protocol family 1
[ 0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.610000] NTFS driver 2.1.30 [Flags: R/W].
[ 0.610000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.620000] msgmni ha
s been set to 244
[ 0.620000] io scheduler noop registered
[ 0.630000] io scheduler deadline registered (default)
[ 0.630000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.660000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[ 0.670000] console [ttyS0] enabled, bootconsole disabled
[ 0.670000] console [ttyS0] enabled, bootconsole disabled
[ 0.680000] m25p80 spi0.0: found w25q128, expected m25p80
[ 0.690000] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.690000] 6 cmdlinepart partitions found on MTD device spi0.0
[ 0.700000] Creating 6 MTD partitions on "spi0.0":
[ 0.700000] 0x000000000000-0x000000040000 : "u-boot"
[ 0.710000] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.720000] 0x000000050000-0x000000e80000 : "rootfs"
[ 0.720000] mtd: partition "rootfs" set to be root filesystem
[ 0.730000] mtd: partition "rootfs_data" created automatically, ofs=C60000, len=220000
[ 0.740000] 0x000000c60000-0x000000e80000 : "rootfs_data"
[ 0.740000] 0x000000e80000-0x000000ff0000 : "kernel"
[ 0.750000] 0x000000ff0000-0x000001000000 : "art"
[ 0.760000] 0x000000050000-0x000000ff0000 : "firmware"
[ 0.780000] ag71xx_mdio: probed
[ 0.920000] ag71xx_mdio: probed
[ 0.920000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[ 1.480000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[ 1.490000] eth1: Atheros AG71xx at 0xba000000, irq 5
[ 2.050000] eth1: Found an AR934X built-in switch
[ 3.080000] GACT probability on
[ 3.080000] Mirror/redirect action on
[ 3.090000] netem: version 1.3
[ 3.090000] u32 classifier
[ 3.100000] Performance counters on
[ 3.100000] input device check on
[ 3.100000] Actions configured
[ 3.110000] Netfilter messages via NETLINK v0.30.
[ 3.110000] nfnl_acct: registering with nfnetlink.
[ 3.120000] nf_conntrack version 0.5.0 (1958 buckets, 7832 max)
[ 3.120000] ctnetlink v0.93: registering with nfnetlink.
[ 3.130000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 3.130000] arp_tables: (C) 2002 David S. Miller
[ 3.140000] TCP cubic registered
[ 3.140000] NET: Registered protocol family 17
[ 3.150000] Bridge firewalling registered
[ 3.150000] Ebtables v2.0 registered
[ 3.160000] 8021q: 802.1Q VLAN Support v1.8
[ 3.160000] ### of_selftest(): No testcase data in device tree; not running tests
[ 3.170000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 3.180000] Freeing unused kernel memory: 232k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[ 8.420000] JFFS2 notice: (656) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 13 of xref (0 dead, 0 orphan) found.
switching to jffs2
- init -
Please press Enter to activate this console. [ 10.490000] NET: Registered protocol family 10
[ 10.640000] SCSI subsystem initialized
[ 10.650000] Button Hotplug driver version 0.4.1
[ 10.740000] PPP generic driver version 2.4.2
[ 10.770000] NET: Registered protocol family 24
[ 10.820000] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[ 11.410000] xt_time: kernel timezone is +0800
[ 11.760000] nf_conntrack_rtsp v0.6.21 loading
[ 11.780000] nf_nat_rtsp v0.6.21 loading
[ 12.070000] AR71XX_RESET_REG_WDOG_CTRL: 0x0
[ 12.070000]
[ 12.160000] fuse init (API version 7.18)
[ 16.570000] mem_manager: module license 'unspecified' taints kernel.
[ 16.580000] Disabling lock debugging due to kernel taint
[ 16.810000] ath_dfs: Version 2.0.0
[ 16.810000] Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
[ 16.890000] ath_spectral: Version 2.0.0
[ 16.890000] Copyright (c) 2005-2009 Atheros Communications, Inc. All Rights Reserved
[ 18.140000] ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, PRIVATE_DIAG, WRITE_EEPROM, 11D)
[ 18.160000] ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
[ 18.240000] ath_tx99: Version 2.0
[ 18.240000] Copyright (c) 2010 Atheros Communications, Inc, All Rights Reserved
[ 18.440000] ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
[ 18.480000] JET_PRINT: init_ath_wmac[240]: Checking devid: 3d
[ 18.480000] __ath_attach: Set global_scn[0]
[ 18.490000] *** All the minfree values should be <= ATH_TXBUF-32, otherwise default value will be used instead ***
[ 18.500000] ACBKMinfree = 48
[ 18.500000] ACBEMinfree = 32
[ 18.500000] ACVIMinfree = 16
[ 18.510000] ACVOMinfree = 0
[ 18.510000] CABMinfree = 48
[ 18.510000] UAPSDMinfree = 0
[ 18.510000] ATH_TXBUF=2700
[ 18.530000] Enterprise mode: 0x03fc0000
[ 18.530000] Restoring Cal data from FS
[ 18.530000] qdf_fs_read[59], Open File /tmp/wifi0.caldata SUCCESS!!file system magic:16914836super blocksize:4096inode 191file size:12064qdf_fs_read[79]: caldata data size mismatch, fsize=12064, cal_size=1088
[ 18.550000] ART Version : -48.0.0
[ 18.560000] SW Image Version : -48.0.0.0.0
[ 18.560000] Board Revision :
[ 18.560000] ar9300_attach: nf_2_nom -110 nf_2_max -60 nf_2_min -125
[ 18.570000] SPECTRAL : get_capability not registered
[ 18.580000] HAL_CAP_PHYDIAG : Capable
[ 18.580000] SPECTRAL : Need to fix the capablity check for RADAR (spectral_attach : 237)
[ 18.590000] SPECTRAL : get_capability not registered
[ 18.600000] HAL_CAP_RADAR : Capable
[ 18.600000] SPECTRAL : Need to fix the capablity check for SPECTRAL
[ 18.600000] (spectral_attach : 242)
[ 18.610000] SPECTRAL : get_capability not registered
[ 18.620000] HAL_CAP_SPECTRAL_SCAN : Capable
[ 18.620000] SPECTRAL : get_tsf64 not registered
[ 18.620000] spectral_init_netlink 78 NULL SKB
[ 18.630000] SPECTRAL : No ADVANCED SPECTRAL SUPPORT
[ 18.630000] SPECTRAL :----- module attached
[ 18.640000] Green-AP : Green-AP : Attached
[ 18.640000]
[ 18.650000] Starting random number generator thread
[ 18.660000] ath_get_caps[6187] rx chainmask mismatch actual 3 sc_chainmak 0
[ 18.660000] ath_get_caps[6162] tx chainmask mismatch actual 3 sc_chainmak 0
[ 18.680000] band steering initialized for direct attach hardware
[ 18.680000] ieee80211_bsteering_attach: Band steering initialized
[ 18.690000] acfg_attach: 3013: Netlink socket created:86cb6600
[ 18.690000] ath_attach_dfs[12583] dfsdomain 1
[ 18.700000] dfs_attach: event log enabled by default
[ 18.720000] SPECTRAL : module already attached
[ 18.720000] ath_attach: Set global_ic[1]..gloabl_ic ptr:865585b0
[ 18.730000] osif_wrap_attach:444 osif wrap attached
[ 18.730000] osif_wrap_devt_init:405 osif wrap dev table init done
[ 18.740000] Wrap Attached: Wrap_com =86ea4000 ic->ic_wrap_com=86ea4000 &wrap_com->wc_devt=86ea4000
[ 18.750000] ath_tx_paprd_init sc 86570000 PAPRD disabled in HAL
[ 18.760000] wifi0: Atheros ???: mem_start: =0xb8100000, mem_end: =0xb8120000, irq=47
[ 18.770000] ath_da_pci: (Atheros/multi-bss)
[ 19.320000] ath_ol_pci: (Atheros/multi-bss)
[ 19.480000] __sa_init_module
No offload chipsets found.
qcawifi disable radio wifi0
[ 24.430000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 24.430000] device eth0 entered promiscuous mode
[ 24.450000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 25.550000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 25.550000] device eth1 entered promiscuous mode
qcawifi disable radio wifi0
qcawifi disable radio wifi0
qcawifi disable radio wifi0
qcawifi disable radio wifi0
[ 38.050000] fast-classifier: starting up
[ 38.050000] fast-classifier: registered
[ 41.370000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 41.380000] ieee80211_mbo_vattach:MBO Initialized
[ 41.390000] ieee80211_oce_vattach: OCE Initialized
[ 41.390000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x86268000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 41.400000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.410000] VAP device ath0 created osifp: (8619cb80) os_if: (86268000)
[ 41.460000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 41.470000] ieee80211_mbo_vattach:MBO Initialized
[ 41.470000] ieee80211_oce_vattach: OCE Initialized
[ 41.480000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x86310000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 41.490000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.500000] VAP device ath01 created osifp: (8739bb80) os_if: (86310000)
[ 41.520000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 41.530000] ieee80211_mbo_vattach:MBO Initialized
[ 41.540000] ieee80211_oce_vattach: OCE Initialized
[ 41.540000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x86328000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 41.550000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.560000] VAP device ath02 created osifp: (862e9b80) os_if: (86328000)
[ 41.580000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 41.590000] ieee80211_mbo_vattach:MBO Initialized
[ 41.600000] ieee80211_oce_vattach: OCE Initialized
[ 41.600000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x86338000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 41.610000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.620000] VAP device ath03 created osifp: (86306380) os_if: (86338000)
[ 41.650000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 41.660000] ieee80211_mbo_vattach:MBO Initialized
[ 41.660000] ieee80211_oce_vattach: OCE Initialized
[ 41.670000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x86368000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 41.680000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.690000] VAP device ath04 created osifp: (8634cb80) os_if: (86368000)
[ 41.750000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_STA, flags=0x3
[ 41.760000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x863b0000, opmode=IEEE80211_M_STA, flags=0x3.
[ 41.770000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.780000] VAP device ath05 created osifp: (8634f380) os_if: (863b0000)
[ 41.810000] wlan_vap_create : enter. devhandle=0x86ef0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 41.820000] ieee80211_mbo_vattach:MBO Initialized
[ 41.830000] ieee80211_oce_vattach: OCE Initialized
[ 41.830000] wlan_vap_create : exit. devhandle=0x86ef0380, vap=0x863c8000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 41.840000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 41.850000] VAP device ath06 created osifp: (863c5b80) os_if: (863c8000)
[ 44.260000] ath_net80211_dfs_clist_update: called, cmd=1, nollist= (null), nentries=0
[ 44.270000] ath_attach_dfs[12583] dfsdomain 1
[ 44.280000] dfs_attach: event log enabled by default
[ 44.350000] DCS for CW interference mitigation: 0
[ 44.350000] DCS for WLAN interference mitigation: 0
[ 44.400000] siwfreq
[ 44.410000] Set freq vap 0 stop send + 86268000
[ 44.410000] Set freq vap 0 stop send -86268000
[ 44.450000] Set wait done --86268000
[ 44.450000] Set freq vap 1 stop send + 86310000
[ 44.450000] Set freq vap 1 stop send -86310000
[ 44.490000] Set wait done --86310000
[ 44.490000] Set freq vap 2 stop send + 86328000
[ 44.490000] Set freq vap 2 stop send -86328000
[ 44.530000] Set wait done --86328000
[ 44.530000] Set freq vap 3 stop send + 86338000
[ 44.530000] Set freq vap 3 stop send -86338000
[ 44.570000] Set wait done --86338000
[ 44.570000] Set freq vap 4 stop send + 86368000
[ 44.570000] Set freq vap 4 stop send -86368000
[ 44.610000] Set wait done --86368000
[ 44.610000] Set freq vap 6 stop send + 863c8000
[ 44.610000] Set freq vap 6 stop send -863c8000
[ 44.650000] Set wait done --863c8000
[ 44.790000] Setting Max Stations:64
[ 44.830000] Setting Max Stations:64
[ 44.870000] Setting Max Stations:64
[ 44.920000] Setting Max Stations:64
[ 44.960000] Setting Max Stations:64
[ 45.030000] Setting Max Stations:64
[ 45.260000] 8021q: adding VLAN 0 to HW filter on device ath0
[ 45.650000] device ath0 entered promiscuous mode
[ 45.660000] br-lan: port 3(ath0) entered listening state
[ 45.660000] br-lan: port 3(ath0) entered listening state
[ 45.680000] br-lan: port 3(ath0) entered disabled state
[ 45.800000] br-lan: port 3(ath0) entered listening state
[ 45.800000] br-lan: port 3(ath0) entered listening state
[ 45.810000] 8021q: adding VLAN 0 to HW filter on device ath0
[ 45.840000] ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
[ 45.850000] br-lan: port 3(ath0) entered disabled state
[ 45.860000] DEVICE IS DOWN ifname=ath0
[ 45.860000] DEVICE IS DOWN ifname=ath0
[ 46.050000] [DEBUG] vap-0(ath0):set SIOC80211NWID, 13 characters
[ 46.050000]
[ 46.050000] DES SSID SET=Wireless 2.4G
[ 46.060000] Warning: node not in table 0x8622c000
[ 46.100000] br-lan: port 3(ath0) entered listening state
[ 46.100000] br-lan: port 3(ath0) entered listening state
[ 46.110000] 8021q: adding VLAN 0 to HW filter on device ath0
[ 46.120000] [DEBUG] vap-0(ath0):set SIOC80211NWID, 13 characters
[ 46.130000]
[ 46.130000] DES SSID SET=Wireless 2.4G
[ 46.240000] __ieee80211_smart_ant_init: Smart Antenna is not supported
[ 46.370000] [DEBUG] vap-1(ath01):set SIOC80211NWID, 5 characters
[ 46.380000]
[ 46.380000] DES SSID SET=VAP01
[ 46.550000] [DEBUG] vap-2(ath02):set SIOC80211NWID, 5 characters
[ 46.560000]
[ 46.560000] DES SSID SET=VAP02
[ 46.720000] [DEBUG] vap-3(ath03):set SIOC80211NWID, 5 characters
[ 46.730000]
[ 46.730000] DES SSID SET=VAP03
[ 46.940000] [DEBUG] vap-4(ath04):set SIOC80211NWID, 7 characters
[ 46.950000]
[ 46.950000] DES SSID SET=scap-ap
[ 47.120000] [DEBUG] vap-5(ath05):set SIOC80211NWID, 18 characters
[ 47.120000]
[ 47.120000] DES SSID SET=@@@_5ad1fa4107a3_1
[ 47.300000] [DEBUG] vap-6(ath06):set SIOC80211NWID, 16 characters
[ 47.310000]
[ 47.310000] DES SSID SET=Wireless2.4G_WDS
[ 48.100000] br-lan: port 3(ath0) entered learning state
[ 50.100000] br-lan: topology change detected, propagating
[ 50.100000] br-lan: port 3(ath0) entered forwarding state
[ 50.110000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
FIT-MB550 login:
進 uboot 看一下
U-Boot 1.1.4 (Oct 12 2018 - 10:26:06)
ap147 - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x24)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 202k for U-Boot at: 87fcc000
Reserving 192k for malloc() at: 87f9c000
Reserving 44 Bytes for Board Info at: 87f9bfd4
Reserving 36 Bytes for Global Data at: 87f9bfb0
Reserving 128k for boot params() at: 87f7bfb0
Stack Pointer at: 87f7bf98
Now running in RAM - U-Boot at: 87fcc000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Setting 0x181162c0 to 0x1021a100
Hit any key to stop autoboot: 0
ath>
先看有啥 command 可以用
ath> ?
? - alias for 'help'
autoscr - run script from memory
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm - boot application image from memory
bootp - boot image via network using BootP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - invoke DHCP client to obtain IP/boot params
echo - echo args to console
erase - erase FLASH memory
ethreg - Switch/PHY Reg rd/wr utility
exit - exit script
flinfo - print FLASH memory information
go - start application at address 'addr'
help - print online help
iminfo - print header information for application image
itest - return true/false on integer compare
loop - infinite loop on address range
mct - simple RAM test
md - memory display
mii - MII utility commands
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
pci - list and access PCI Configuration Space
ping - send ICMP ECHO_REQUEST to network host
pll cpu-pll dither ddr-pll dither - Set to change CPU & DDR speed
pll erase
pll get
printenv- print environment variables
progmac - Set ethernet MAC addresses
progmac2 - Set ethernet MAC addresses
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
version - print monitor version
ath>
DQA 表示 hotfix/v1.76
bootloader 的版號又可以顯示在 web ui 上了
因為 DQA 已經跟客戶說了
進 M300 source code with branch hotfix/v1.76
修正
diff --git a/proscend/prosrc/www/app/feature/identification.html b/proscend/prosrc/www/app/feature/identification.html
index 488ffef..e97e9d5 100644
--- a/proscend/prosrc/www/app/feature/identification.html
+++ b/proscend/prosrc/www/app/feature/identification.html
@@ -25,6 +25,8 @@
<td>{{vm.system.szMacLan}}</td></tr>
<tr><td>{{ 'IDENTIFICATION_WAN_MAC_ADDRESS' | translate }}</td>
<td>{{vm.system.szMacWan}}</td></tr>
+ <tr><td>{{ 'IDENTIFICATION_BOOTLOADER_VERSION' | translate }}</td>^M
+ <td>{{vm.system.szBootloaderVersion}}</td></tr>^M
<tr><td>{{ 'IDENTIFICATION_SOFTWARE_VERSION' | translate }}</td>
<td>{{vm.system.szSwMobileRouterVersion}}</td></tr>
<tr><td>{{ 'IDENTIFICATION_SERIAL_NUMBER' | translate }}</td>
上 code
commit 9062d30d8b813b942b455018da335c6e4ffe0852
Refs: [hotfix/v1.76], {origin/hotfix/v1.76}
Author: jeffrey <[email protected]>
Date: Tue Jan 29 13:55:44 2019 +0800
add back bootloader version to web ui
proscend/prosrc/www/app/feature/identification.html | 2 ++
1 file changed, 2 insertions(+)
繼續 M330
printenv
看一下目前的 uboot 環境變數
ath> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),14528k(rootfs),1408k(uImage),64k(mib0),64k(ART)
bootcmd=bootm 0x9fe80000
bootdelay=2
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
dir=
lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0xE30000&&cp.b $fileaddr 0x9f050000 $filesize
lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9fe80000 +$filesize&&cp.b $fileaddr 0x9fe80000 $filesize
ethact=eth0
ipaddr=192.168.0.144
serverip=192.168.0.141
mode=0
stdin=serial
stdout=serial
stderr=serial
Environment size: 694/65532 bytes
ath>
先修改 uboot env 的 ipaddr 以及 serverip 方便後續開發
ath> setenv ipaddr 192.168.1.1
ath> setenv serverip 192.168.1.113
ath> saveenv
Saving Environment to Flash...
Protect off 9F040000 ... 9F04FFFF
Un-Protecting sectors 4..4 in bank 1
Un-Protected 1 sectors
Erasing Flash...Erasing flash...
First 0x4 last 0x4 sector size 0x10000
4
Erased 1 sectors
Writing to Flash... write addr: 9f040000
done
Protecting sectors 4..4 in bank 1
Protected 1 sectors
ath> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),14528k(rootfs),1408k(uImage),64k(mib0),64k(ART)
bootcmd=bootm 0x9fe80000
bootdelay=2
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
dir=
lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0xE30000&&cp.b $fileaddr 0x9f050000 $filesize
lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9fe80000 +$filesize&&cp.b $fileaddr 0x9fe80000 $filesize
ethact=eth0
mode=0
stdin=serial
stdout=serial
stderr=serial
ipaddr=192.168.1.1
serverip=192.168.1.113
Environment size: 692/65532 bytes
ath>
接上網路線並利用 ping 確認
ath> ping 192.168.1.113
Trying eth0
enet0 port4 up
dup 1 speed 100
Using eth0 device
host 192.168.1.113 is alive
ath>
M330 build 出來的 uboot 在 m330\bin\ar71xx
裡
雖然 build 不只一個 uboot
但我們能使用的是 openwrt-ar71xx-ap147-16M-qca-legacy-uboot.bin
現有的 uboot env lu
可以用來 update uboot
ath> printenv lu
lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
ath>
將工作 PC 上的 tftp server 服務的目錄指到 m330\bin\ar71xx
去
將 openwrt-ar71xx-ap147-16M-qca-legacy-uboot.bin
另存成 u-boot.bin
利用 run 來執行 lu
ath> run lu
Trying eth0
Using eth0 device
TFTP from server 192.168.1.113; our IP address is 192.168.1.1
Filename 'u-boot.bin'.
Load address: 0x80060000
Loading: T ####################################
done
Bytes transferred = 182940 (2ca9c hex)
Erasing flash...
First 0x0 last 0x2 sector size 0x10000
2
Erased 3 sectors
Copy to Flash... write addr: 9f000000
done
ath> printenv lu
lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
ath>
reset
U-Boot 1.1.4-g4e057f46 (Jan 29 2019 - 03:36:19)
ap147 - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x24)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 216k for U-Boot at: 87fc8000
Reserving 192k for malloc() at: 87f98000
Reserving 44 Bytes for Board Info at: 87f97fd4
Reserving 36 Bytes for Global Data at: 87f97fb0
Reserving 128k for boot params() at: 87f77fb0
Stack Pointer at: 87f77f98
Now running in RAM - U-Boot at: 87fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Qualcomm Atheros SPI NAND Driver, Version 0.1 (c) 2014 Qualcomm Atheros Inc.
ath_spi_nand_ecc: Couldn't enable internal ECC
Setting 0x181162c0 to 0x1021a100
Hit any key to stop autoboot: 0
ath>
前後 uboot 差異如下
1c1
< U-Boot 1.1.4 (Oct 12 2018 - 10:26:06)
---
> U-Boot 1.1.4-g4e057f46 (Jan 29 2019 - 03:36:19)
13,19c13,19
< Reserving 202k for U-Boot at: 87fcc000
< Reserving 192k for malloc() at: 87f9c000
< Reserving 44 Bytes for Board Info at: 87f9bfd4
< Reserving 36 Bytes for Global Data at: 87f9bfb0
< Reserving 128k for boot params() at: 87f7bfb0
< Stack Pointer at: 87f7bf98
< Now running in RAM - U-Boot at: 87fcc000
---
> Reserving 216k for U-Boot at: 87fc8000
> Reserving 192k for malloc() at: 87f98000
> Reserving 44 Bytes for Board Info at: 87f97fd4
> Reserving 36 Bytes for Global Data at: 87f97fb0
> Reserving 128k for boot params() at: 87f77fb0
> Stack Pointer at: 87f77f98
> Now running in RAM - U-Boot at: 87fc8000
54a55,56
> Qualcomm Atheros SPI NAND Driver, Version 0.1 (c) 2014 Qualcomm Atheros Inc.
> ath_spi_nand_ecc: Couldn't enable internal ECC
看一下有那些 command
ath> ?
? - alias for 'help'
autoscr - run script from memory
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm - boot application image from memory
bootp - boot image via network using BootP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - invoke DHCP client to obtain IP/boot params
echo - echo args to console
erase - erase FLASH memory
ethreg - Switch/PHY Reg rd/wr utility
exit - exit script
flinfo - print FLASH memory information
go - start application at address 'addr'
help - print online help
iminfo - print header information for application image
itest - return true/false on integer compare
loop - infinite loop on address range
mct - simple RAM test
md - memory display
mii - MII utility commands
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
pci - list and access PCI Configuration Space
ping - send ICMP ECHO_REQUEST to network host
pll cpu-pll dither ddr-pll dither - Set to change CPU & DDR speed
pll erase
pll get
printenv- print environment variables
progmac - Set ethernet MAC addresses
progmac2 - Set ethernet MAC addresses
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
version - print monitor version
ath>
前後 uboot 的 command 差異
32a33,34
> nand - NAND sub-system
> nboot - boot from NAND device
看一下 nand command 怎麼用
ath> help nand
nand info - show available NAND devices
nand device [dev] - show or set current device
nand read[.jffs2] - addr off size
nand write[.jffs2] - addr off size - read/write `size' bytes starting
at offset `off' to/from memory address `addr'
nand erase [clean] [off size] - erase `size' bytes from
offset `off' (entire device if not specified)
nand bad - show bad blocks
nand dump[.oob] off - dump page
nand scrub - really clean NAND erasing bad blocks (UNSAFE)
nand markbad off - mark bad block at offset (UNSAFE)
nand biterr off - make a bit error at offset (UNSAFE)
ath>
先用 nand info
來看看 nand device - 沒看到任何東西
ath> nand info
ath>
john 表示我需要做以下兩件事來重新產生 uboot image
make package/qca-legacy-uboot/clean V=s
make package/qca-legacy-uboot/install V=s
一樣將新產出的 openwrt-ar71xx-ap147-16M-qca-legacy-uboot.bin
另存成 u-boot.bin
run lu
燒錄 uboot
ath> run lu
Trying eth0
dup 1 speed 100
Using eth0 device
TFTP from server 192.168.1.113; our IP address is 192.168.1.1
Filename 'u-boot.bin'.
Load address: 0x80060000
Loading: ####################################
done
Bytes transferred = 182940 (2ca9c hex)
Erasing flash...
First 0x0 last 0x2 sector size 0x10000
2
Erased 3 sectors
Copy to Flash... write addr: 9f000000
done
ath>
reset
U-Boot 1.1.4-g4e057f46 (Jan 29 2019 - 06:53:22)
ap147 - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x24)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 216k for U-Boot at: 87fc8000
Reserving 192k for malloc() at: 87f98000
Reserving 44 Bytes for Board Info at: 87f97fd4
Reserving 36 Bytes for Global Data at: 87f97fb0
Reserving 128k for boot params() at: 87f77fb0
Stack Pointer at: 87f77f98
Now running in RAM - U-Boot at: 87fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Qualcomm Atheros SPI NAND Driver, Version 0.1 (c) 2014 Qualcomm Atheros Inc.
ath_spi_nand_ecc: Couldn't enable internal ECC
Setting 0x181162c0 to 0x1021a100
Hit any key to stop autoboot: 0
ath> nand info
ath> nand device
Device 0: <NULL>
ath>
還是一樣沒認到
改燒 jessy 產出的 openwrt-ar71xx-ap147-16M-qca-legacy-uboot.bin
一樣另存成 u-boot.bin
作燒錄
ath> run lu
Trying eth0
dup 1 speed 100
Using eth0 device
TFTP from server 192.168.1.113; our IP address is 192.168.1.1
Filename 'u-boot.bin'.
Load address: 0x80060000
Loading: ####################################
done
Bytes transferred = 183692 (2cd8c hex)
Erasing flash...
First 0x0 last 0x2 sector size 0x10000
2
Erased 3 sectors
Copy to Flash... write addr: 9f000000
done
ath>
reset
U-Boot 1.1.4-g4e057f46-dirty (Jan 29 2019 - 13:20:19)
ap147 - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x24)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 216k for U-Boot at: 87fc8000
Reserving 192k for malloc() at: 87f98000
Reserving 44 Bytes for Board Info at: 87f97fd4
Reserving 36 Bytes for Global Data at: 87f97fb0
Reserving 128k for boot params() at: 87f77fb0
Stack Pointer at: 87f77f98
Now running in RAM - U-Boot at: 87fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Qualcomm Atheros SPI NAND Driver, Version 0.1 (c) 2014 Qualcomm Atheros Inc.
ath_spi_nand_ecc: Couldn't enable internal ECC
Setting 0x181162c0 to 0x1021a100
11111 Hit any key to stop autoboot: 0
ath> nand info
ath> nand device
Device 0: <NULL>
ath>
還是一樣
看來我這一片 M330 加焊上去的 nand flash 肯定有問題
目前麻煩 jessy 幫我確認一下我手上的板子狀況
jessy 跟 john 都覺得是那顆 nand flash 沒焊好
寫個紙條連同版子放 morris 桌上
考慮重構一下 M300 wizard 的 javascript
先回到 M300 develop branch
build image
- Products/Vendor = M300/16_MTK_WIFI
mfgtool 燒錄
BUII 剛剛開完會
總經理 Jim 得知 M300 - DMVPN
又要跳票的事後表示就先把該 task 拿掉吧
不然對 terry 無法交代
雖然事出有因
不過這個項目掛在我頭上那麼久
也讓我黑掉了
不過還是以 M330 為優先
黑不黑掉就不要太去在意了
就算黑掉會發生什麼事
頂多又是今年沒加薪罷了
再三年就要回去接家業了
在新竹的工作 不求突破 只求穩定就好了
不過等 M330 忙完還是要加緊把 DMVPN 做完
畢竟這是個蠻有價值的功能
專心在目前的 wizard
從 wizard.html 的角度來看會用到以下的 API
- vm.step
- 紀錄現在 wizard 進行到哪個 step 了
- vm.step_skip()
- 放棄 wizard 並回到 status
- vm.step_1_init()
- 準備顯示 step 1 給使用者前的前置作業
- vm.step_2_init()
- 準備顯示 step 2 給使用者前的前置作業
- vm.step_2_reset()
- 重新跟 device 要目前 step 2 的設定
- vm.step_2_syncing
- 目前是否還在跟 device 要目前 step 2 的設定
- vm.step_2_1_init()
- 準備顯示 step 2.1 給使用者前的前置作業
- vm.step_2_1_reset()
- 重新跟 device 要目前 step 2.1 的設定
- vm.step_2_1_syncing_chg_wproto
- 目前是否還在跟 device 要目前 step 2.1 - chg_wproto 的設定
- vm.step_2_1_syncing_pppoe
- 目前是否還在跟 device 要目前 step 2.1 - pppoe 的設定
- vm.step_2_1_syncing_dns_dhcpc
- 目前是否還在跟 device 要目前 step 2.1 - dns_dhcpc 的設定
- vm.step_2_1_syncing_wanst
- 目前是否還在跟 device 要目前 step 2.1 - wanst 的設定
- vm.step_2_1_syncing_dns_static
- 目前是否還在跟 device 要目前 step 2.1 - dns_static 的設定
- vm.step_2_2_init()
- 準備顯示 step 2.2 給使用者前的前置作業
- vm.step_2_2_reset()
- 重新跟 device 要目前 step 2.2 的設定
- vm.step_2_2_syncing
- 目前是否還在跟 device 要目前 step 2.2 - chg_wproto 的設定
- vm.step_3_init()
- 準備顯示 step 3 給使用者前的前置作業
- vm.step_3_reset()
- 重新跟 device 要目前 step 3 的設定
- vm.step_3_syncing
- 目前是否還在跟 device 要目前 step 3 的設定
- vm.step_4_init()
- 準備顯示 step 4 給使用者前的前置作業
- vm.step_4_reset()
- 重新跟 device 要目前 step 4 的設定
- vm.step_4_syncing
- 目前是否還在跟 device 要目前 step 4 的設定
- vm.step_5_init()
- 準備顯示 step 5 給使用者前的前置作業
- vm.step_5_reset()
- 重新跟 device 要目前 step 5 的設定
- vm.step_5_syncing
- 目前是否還在跟 device 要目前 step 5 的設定
- vm.step_review()
- 準備顯示 review 給使用者前的前置作業
- vm.step_apply()
- 觸發 apply 的動作
以下這 5 個值如果能整成同一個讓 view 層取用會更方便
- vm.step_2_1_syncing_chg_wproto
- vm.step_2_1_syncing_pppoe
- vm.step_2_1_syncing_dns_dhcpc
- vm.step_2_1_syncing_wanst
- vm.step_2_1_syncing_dns_static
目前 view layer 的使用方式如下
<section ng-show="vm.step === 'step_2_1' && (
vm.step_2_1_syncing_chg_wproto ||
vm.step_2_1_syncing_pppoe ||
vm.step_2_1_syncing_dns_dhcpc ||
vm.step_2_1_syncing_wanst ||
vm.step_2_1_syncing_dns_static )">
<i class="fa fa-spinner fa-pulse"></i>
</section>