Building Software Image/zh-hans

From Qi-Hardware
Jump to: navigation, search

Contents

[edit] U-Boot

我们目前使用U-Boot作为bootloader.

如果你已经有openWRT的源代码的话,可以用openWRT编译出U-Boot。


在 openWRT menuconfig中选择:Target Images-->Build U-Boot bootloader --> U-Boot target board (NEW) --> input 'qi_lb60

[edit] 工具链和OpenWRT

可以通过以下方式得到openWRT的源代码:

$ git clone git://projects.qi-hardware.com/openwrt-xburst.git
$ cd openwrt-xburst
$ git checkout --track -b xburst origin/xburst
$ make menuconfig
  (select XBurst JZ47x0 [2.6] in Target System)
$ make

编译完成以后可以在这个地址找到工具链,

/PATH/TO/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.1.2_uClibc-0.9.30.1/usr/bin
.

重新设置$PATH也许会更方便。

u-boot kernel rootfs 都在这个目录下:
/PATH/TO/openwrt-xburst/bin

当然你可以去这个地址下载一个已经编译好的文件

[edit] Rootfs

在目录 /PATH/TO/openwrt-xburst/bin 下的 openwrt-xburst-rootfs.tgz 文件就是openWRT的根目录的文件。

  1. 把sd格式化成ext2分区
  2. 然后可以这样解压根文件系统到SD卡中,这里假设sd卡挂在/media/disk
$ sudo tar zxvf openwrt-xburst-rootfs.tgz -C /media/disk

[edit] xburst-tools (usbboot tools)

我们移植了君正win32版本的usbboot到Linux下,你可以这样获得源代码.

$ git clone git://projects.qi-hardware.com/xburst-tools.git

[edit] Building

$ cd /PATH/TO/xburst-tools/usbboot
$ ./autogen.sh && ./configure --prefix=/usr --enable-firmware && make && sudo make install

这样就可以编译出usbboot工具,它是用来烧写文件系统的。

[edit] How To Reflash

请看 这篇如何烧写镜像

Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export