| 1 | Prepare for Reflash Device |
| 2 | -------------------- |
| 3 | =serial console= |
| 4 | at the back of Ben Nanonote, there is "GND", "TXD" and "RXD", |
| 5 | you can get serial output from those pins |
| 6 | you need a TTL <-> RS232 converter. because the Ben Nanonote serial |
| 7 | console is TTL. here[1] is the serial PIN in the board. |
| 8 | |
| 9 | =toolchain= |
| 10 | $ git clone git://github.com/lindnermarek/openwrt-x-burst.git[2] |
| 11 | $ git checkout --track -b x-burst origin/x-burst |
| 12 | $ make menuconfig |
| 13 | (select 'XBurst JZ47x0 [2.6]' in 'Target System') |
| 14 | $ make |
| 15 | then you will get toolchain under /PATH/TO/openwrt-x-burst/staging_dir/ |
| 16 | toolchain-mipsel_gcc-4.1.2_uClibc-0.9.30.1/usr/bin |
| 17 | |
| 18 | =xburst-tools (usbboot tools)= |
| 19 | you can get source code at git://github.com/xiangfu/xburst-tools.git[3] |
| 20 | $ cd /PATH/TO/xburst-tools/usbboot |
| 21 | $ ./autogen.sh && ./configure && make && sudo make install |
| 22 | then you got the 'usbboot' command. that is for the reflash. |
| 23 | |
| 24 | =u-boot= |
| 25 | in openWRT menuconfig-->Target Images-->Build U-Boot bootloader --> |
| 26 | U-Boot target board (NEW) --> input 'qi_lb60 |
| 27 | |
| 28 | here[4] is the u-boot github URL |
| 29 | $ make qi_lb60_config |
| 30 | $ make |
| 31 | there is 'u-boot-nand.bin' is for Ben |
| 32 | |
| 33 | |
| 34 | How To Reflash |
| 35 | -------------------- |
| 36 | 1. plug the Ben to your computer. direct connect. no usb hub. |
| 37 | 2. short the two pin ('boot from usb' show in [1]) |
| 38 | 3. press 'RESET' at the back of Ben |
| 39 | 4. in you computer run [5] and [6]. then you flashed the bootloader and kernel |
| 40 | to nand flash. |
| 41 | 5. rootfs: format your SD card. |
| 42 | the first partition must VFAT and others is EXT2. |
| 43 | we can put the kernel(uImage) in the first partition. put the rootfs in second partition. |
| 44 | uncompress openwrt rootfs to second partition of SD card |
| 45 | 6. now you can boot your Ben. |
| 46 | |
| 47 | ---- |
| 48 | [1] http://www.openmobilefree.net/?p=61 |
| 49 | [2] here is the web site |
| 50 | http://github.com/lindnermarek/openwrt-x-burst/commits/x-burst |
| 51 | now we put the code in github.com |
| 52 | [3] in folder 'usbboot', here is the tar package and Debian package. |
| 53 | http://cloud.github.com/downloads/xiangfu/xburst-tools/xburst-tools_0.0_200906.tar.gz |
| 54 | http://cloud.github.com/downloads/xiangfu/xburst-tools/xburst-tools_0.0_200906-1_i386.deb |
| 55 | [4] http://github.com/xiangfu/qi-u-boot/tree |
| 56 | [master] is the last u-boot. |
| 57 | command: "mmc init;fatload mmc 0 0x80600000 uImage;bootm" is for boot the kernel in sd card. |
| 58 | [5] flash.u-boot.sh |
| 59 | -------- |
| 60 | #!/bin/bash |
| 61 | U_BOOT=/PATH/TO/u-boot-nand.bin |
| 62 | sudo ../usbboot/src/usbboot -c "\ |
| 63 | boot;\ |
| 64 | nprog 0 $U_BOOT 0 0 -n" |
| 65 | |
| 66 | [6] flash.kernel.sh |
| 67 | ---------- |
| 68 | #!/bin/bash |
| 69 | START_PAGE=2048 |
| 70 | KERNEL=/PATH/TO/KERNEL_UIMAGE |
| 71 | sudo usbboot -c "boot" |
| 72 | sudo usbboot -c "nprog $START_PAGE $KERNEL 0 0 -n" |
| 73 | |
| 74 | |