Actiontec MI424WR的OpenWrt 实验-编译和运行 - ning的日志 ...

来源:百度文库 编辑:神马文学网 时间:2024/06/13 09:00:33
花了三个晚上,终于把OpenWrt搞定了,不过都不是靠自己,都是google的功劳。下面是step by step:

1、上次搭环境时使用的redboot有问题,kernel和rootfs在flash的位置和OpenWrt主干上的不一致,因此需要更新一下。如果有朋友被我误导,这里表示抱歉。如果使用新的redboot,可以直接转到第8步。

2、因为redboot是ROM版本,即代码在flash上跑的,因此是不能直接烧flash,更新redboot,需要先下载一个RAM版本的redboot,通过它来升级。

3、从这里下载RAM版本的redboot: http://oldwiki.openwrt.org/attachments/OpenWrtDocs(2f)Hardware(2f)Actiontec(2f)MI424(2d)WR/rb-mi424wr-RAM.img

4、在redboot下运行
    load -h 0x1800000 rb-mi424wr-RAM.img

    go

 5、下载ROM版本的redboot: http://oldwiki.openwrt.org/attachments/OpenWrtDocs(2f)Hardware(2f)Actiontec(2f)MI424(2d)WR/rb-mi424wr-ROM.bin

6、在redboot下加载并烧写:

    load -h 192.168.0.99 -r -b 0x1800000 rb-mi424wr-ROM.bin

    fis unlock RedBoot

        fis write -b 0x1800000 -l 0x60000 -f 0x50000000

7、重启设备,fis init 初始化 redboot flash文件系统

        fis init   

8、下载openwrt主干代码

       mkdir mi424wr-noeabi

       cd mi424wr-noeabi

       svn co svn://svn.openwrt.org/openwrt/trunk/

       cd trunk

       ./scripts/feeds update -a

       ./scripts/feeds install webif

9、运行make menuconfig做openwrt的配置

       Target System选择:Intel IXP4XX

       Subtarget选择:Generic [2.6]

       Target Profile选择:Default Profile

       Target Image选择:squashfs

       下面这个非常重要,缺省是EABI,需要把这个去掉,否则内核启动后,初始化会失败,串口没有响应。

       Advanced configuration options--->Toolchain Option----->[  ]Enable EABI support 去除

       Administration--->webif----><*> webif-lang-zh

       Administration--->webif----><*> webif-theme-xwrt

10、编译之 make V=99,这个过程很长,会下载很多软件包,并且编译toolchain和kernel

11、编译完成后,将生成的kernel和rootfs拷贝到tftp目录下提供下载

       cp bin/openwrt-ixp4xx-zImage /tftpboot/zImage

       cp bin/openwrt-ixp4xx-squashfs.img /tftpboot/rootfs

12、回到redboot,下载并烧到flash中

       load -r -b 0x1800000 -h 192.168.0.99 zImage

       fis create linux

       load -r -b 0x1800000 -h 192.168.0.99 rootfs

       fis create rootfs

13、运行之

       fis load linux

       exec




下面是参考的网页:

http://oldwiki.openwrt.org/OpenWrtDocs(2f)Hardware(2f)Actiontec(2f)MI424(2d)WR.html