Linux C embed development (personal rveiew)

1. 如何快速去bring up bcm 的wifi chipset
   a. 首先的确认 编译的BSP profile 
   b. 其次要先用 default 的kernel config 去编译
   c. 现在我们的一些 PCIE/GPIO/driver 总线的设置 都在dts 中,有错就去改dts
2. BCM 的板子bring up 注意事项
    a.  fw: bcm963146GW_WL23D2D1GA_WLMLO_nand_squashfs_update.pkgtb 
           这里从fw 名字中包含几种 信息(profile,flash 类型(nand,emmc)文件系统(ubi,squashfs)flashblock size(128、256),带不带bootloader(loader))
        .pkgtb 结尾的文件可以通过 bootloader cli ,webgui 的http 去升级
         .bin 结尾的可以用作烧录机器烧录(但一定要注意, 这个bin 有两种,1. 是文件名中带raw 的 1. 名字中没有raw包含bootstrap)  带raw的是不带ecc 的可以用作bootloader tftp 升级. 带bootstrap 的是用作烧录的带ecc.  
           这里注意 烧录和tftp 千万不要升错了bin file
     b.  启动时的boardid 千万不要选错 boardid=968560REF_PCI2 
        如何查看支持那些board id 可以在bootloader cli 中setenv  boardid  xx 来查看
      c. 这些信息可以给板子借一个console 来查看他的 星系
          U-Boot TPL 2019.07 (May 19 2024 - 00:53:56 -0700)
          U-Boot TPL 2019.07 (May 19 2024 - 00:53:56 -0700)
`Board is non secure`
`$TPL: 50404p3@499373 $`
`PMC driver initcall`
`BCM UBUS4 driver [ubus_sys] registered`
`BCM UBUS4 DCM clk driver [ubus_dcm_sys] registered`
`CPU Clock: 1500MHz`
`IMAGE is NAND`
`Trying to boot from NAND`
`nand flash device id 0xc2da9095, total size 256MB`
`block size 128KB, page size 2048 bytes, spare area 64 bytes required`
`ECC BCH-4`
`INFO: image from 2097152 to 2673868`

     3. BRCM EVM board 如何升级sc 的fw
          首先 想用 brcm bootloader + sc 上层的方式是 不容易实现的 (flash map 不同) 要想这样做一定要确定 brcm 的flash map 和sc 相同 并且 所用的ubi 的volume id 一定要相同
          1. 通过tftp 吧整个image 更行 bootloader 和上层都是sercomm 的
          2. 烧录 flash. 

bcm wifi 启动:
  1. 首先 NONE csm fw 编译(加上_BASESHELL) 即使none cms
     /release/maketargets  96856GWO_WL23D2D1GA_WLMLO_BASESHELL 
    在这个项目中会遇到none cms viop 便不过,就直接自己解决brcm 说是宏报的不好
 2. 编译MT DT test wifi driver (WLTEST=1 enable test driver)
     make PROFILE=96856GWO_WL23D2D1GA_WLMLO_BASESHELL WLTEST=1 
      wl -i wl0 ver 查看,入宫ver 中带有test 字样就是test driver
 3. test wifi driver bin
      DHD: /dhd/mfg/  现编时 test fw
      普通 在/lib/modules/extra /wl_mfgtest.ko
 4. enable test fw 
     在bootloader cli 下  setenv wlFeature 0x2   // test 
                      setenv wlFeature 0x0  //normal 
 5. application
     wlssk->ufnvram->hostapd
     wlssk-service.c
      wlconfig: wifi config
      ceventd/cevent  时wifi 调试app和debug
      
 6. DHD enable
    bootargs_append=cma=56M  48M for 63146
     dhd0=11
     dhd1=11
7. EVM board 可能 升级MCB 出错。 
      shmoo completed OK
find magic number 0x64503301 at address 0x26000
reading blob from 0x26000 offset 0xc len 20492
digest sha256 OK

DPFE FW hpk3_16_ddr3 3.53.0.0 20210506 SEGMENT 2/4
FFF000F8 00000000 0090703D
DDR3
MCB rev=0x00020A01 Ref ID=0x0703D Sub Bld=0x009 Cookie=0x9E5C163A
Dram Timing 11-11-11
CMD @1T
Virt VTT on


Shmoo WL

One UI Steps : 0x76

   0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111
   0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999000000000011111111
   0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
00 X+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01 X+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

shmoo completed with error
run shmoo error
MEMSYS init failed, return code 00000010
DPFE errors: 0x0 0x400000 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
MHS errors: 0x10000 0x0
DDR scrambling enabled
### ERROR ### Please RESET the board ###

     ddr 4 
      ddr 0x40101615
     
  2. 改bootloader 的code
      
 3. Bootloader 能烧录的bin 要用par 文件来做,loader_xx.bin 不能用
 4. 如果启动后 mtd 区域数据丢失或者 不可写, 要看启动过程中 有没有人去写gpio 的值。

5. 读懂一个工程最快的步骤
     a. 要介绍文档
     b. 下载工程
     c.  看下下来的 源码 找readme 来看
     d.  在下载的 源码中找介绍文档读
  6. UIBI fs (var/ft)无法mount 上
     a. 首先要检查 给的flash 的大小,ubi 最小3M,但是最好要是两倍
     b. 我们遇到 inviald arguments 时 一般 都是 分区flash map 给的太小了
     
     用ubinfo -a 看 没有可用空间
   

2.如何判断一个bootloader 能否在另一个hw 上能不能起来
    a. 首先 他们的住chip的型号要相近 (也即bootcli 中的boardid 有支持列表)
    b. 他们的 flash、ram 都要能支持 (特别是 flash 他的blcok size 支持 DCH 4 还是8 ) 
    c. 是否有security boot 
     d. 如何判断 bootloader 能否带起rootfs
         1. flash map 是否相同
         2. 是否有签名校验(校验rootfs 不是ram 的整个ubi)
         3. ubi的volume name 是否和 bootloader 中的一样。(不一样找不到volum)
3.我们想要在 EVM board 上去跑sc fw 最快的方法
1. 如果 EVM board 的flash (block size,BCH 等都要看)和 ram 都是和 我们的hw 一样,直接 在bcm 的bootloader cli 先tftp 升级(tftp VD4277B_evm_boot.bin  
    nand erase.chip   
    nand write 0x1000000 0 $filesize)  我们VD4277B sc hw 和evm board 不同

     2. EVM board 和sc board hw 不同 (flash 和ram)

         这时最快的方法是 让driver team 给以个bootloader 和sc 相同的flash map, 我们在升级 sc 的上层。
4.Broadcom wifi 如何 编译 WLTEST fw(wlFeature=0x2)
      首先 说明一点 如果是 dongle fw 编译的的时候 在 dongle image 下有两个录 一个 formfw 的 一个mfg 的目录就是 mfg test fw。
      如果不是dongle fw, 则有连个ko for wl test (wl_mfgtest.ko  hnd_mfgtest.ko), 这两个 ko 在sdk 中有的有 prebuild 的ko 有的没有就需要自己去编一个test ko。 
          build command: make clean; make PROFILE=<profile>_WLMFGTEST    (在profile 加个后缀 _WLMFGTEST)
          编出来后 的wl.ko   和 hnd.ko 就是 test image, 你再在编译test image 时更名成wl_mfgtest.ko  hnd_mfgtest.ko 然后copy 到你的rootfs中,然后去编。 
5. wl test fw 编译方法: 
     make PROFILE=<profile>  WLTEST=1  // 这种编译方法只是 在编译的时候安装 mfg image ,不是 rebuild mfg test ko, 注意注意。 
      WLTEST=1 和 bsp config file 中 BUILD_HND_MFG=y  都不是在编译wl_mfgtest.ko 和 hnd_mfgtest.ko, 他只是去编译一个test image, 包括hw test 时用到的default 值不同等。


  6.  Remove  mfg test kernel module in formal release for flash size limtation. 
              in bsp config file set BUILD_BCM_WLAN_NO_MFGBIN=y
 7. when you met the aclocal-1.14 command not found  for compiler packets
       enter the directory && autoreconf -ivf 
 

  • 16
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值