制作A20蜂鸟开发板干净系统[提取并实践AP6210固件]

提取这个AP6210的固件有两个办法,一个网上提取,一个从现有系统提取,我下载了bananian-1504.img,打算从这儿提取:

看看这个镜像结构:

Disk /mnt/bananian-1504.img: 1899 MB, 1899999744 bytes
255 heads, 63 sectors/track, 230 cylinders, total 3710937 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9f732a23
                 Device Boot      Start         End      Blocks   Id  System
/mnt/bananian-1504.img1            2048       43007       20480   83  Linux
/mnt/bananian-1504.img2           43008     3710936     1833964+  83  Linux

第二分区肯定是系统了,通过mount -0 loop方式挂载,然后提取文件.或者觉得麻烦可以打开内核的USB U盘驱动,然后烧写这个系统到TF卡[U盘],再把U盘插进去.

我就不管,直接把/lib/firmware/整个复制过去.发现提示如下:

root@Tater-ARM:~# dmesg | grep brcmf
[    3.078193] brcmfmac: F1 signature read @0x18000000=0x1591a962
[    3.413406] brcmf_c_preinit_dcmds: Firmware version = wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
[    3.743521] brcmf_cfg80211_reg_notifier: not a ISO3166 code
root@Tater-ARM:~#

试试扫描:

root@Tater-ARM:~# iwlist wlan0 scanning
wlan0     Interface doesn't support scanning.

看来ISO3166问题还得先解决,不过先试试可行性,修改文件/etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

生成/etc/wpa_supplicant.conf文件,这个可以用自己的方法,然后重启,如果没什么意外,应该能看到WLAN连接.竟然可以了:

wlan0     Link encap:Ethernet  HWaddr 6c:fa:a7:73:8e:27
          inet addr:192.168.199.181  Bcast:192.168.199.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72 errors:0 dropped:26 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15230 (14.8 KiB)  TX bytes:1412 (1.3 KiB)

那继续看看蓝牙,UART2基地址0x1c28800,理由是:

uart2: serial@01c28800 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart2_pins_a>;
    status = "okay";
};

通过dmesg输出日志看来已经注册:

[    0.832546] 1c28800.serial: ttyS1 at MMIO 0x1c28800 (irq = 44, base_baud = 1500000) is a U6_16550A

然后需要一个工具,连接:https://code.google.com/p/broadcom-bluetooth/source/browse/,我下载到的文件名是broadcom-bluetooth-53e35d81e01a.签名不一样,文件名可能也不一样哦.可能编译时候缺少什么库,比如我用Debian,默认缺少libbluetooth-dev,自己补全一下.apt-get install不用多说了吧.对于一些蓝牙操作工具,应该还需要安装bluez,当然还可以适当安装其他包,用来测试.

不过发现执行下列语句会进入一个死循环,原来是DTS还没配置好.

./brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1

首先添加PinCtrl以及rf配置:

bt-pinctrl

但,经过配置后,依然死循环,有点不解,今天有点晚了,下回继续分解吧.

option patchram with arg /lib/firmware/ap6210/bcm20710a1.hcd
option enable_hci
option bd_addr with arg 11:22:33:44:55:66
option no2bytes
option tosleep with arg 1000
/dev/ttyS1
writing
01 03 0c 00
writing
01 03 0c 00
writing
01 03 0c 00

发表评论

电子邮件地址不会被公开。 必填项已用*标注