1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-22 08:03:09 +02:00

clean the Makefile and README

This commit is contained in:
Xiangfu Liu 2009-12-06 01:27:44 +08:00
parent 71d4baa6b0
commit 04d76e1139
4 changed files with 24 additions and 146 deletions

View File

@ -1,73 +0,0 @@
# "PanGu Makefile" - for setting up the PanGu development environment
#
# Copyright 2009 (C) Qi Hardware inc.,
# Author: Xiangfu Liu <xiangfu@qi-hardware.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3 as published by the Free Software Foundation.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA
# for the device stage
FLASH_TOOL_PATH = ./usbboot
STAGE1_PATH = $(FLASH_TOOL_PATH)/xburst_stage1
STAGE2_PATH = $(FLASH_TOOL_PATH)/xburst_stage2
CROSS_COMPILE ?= mipsel-openwrt-linux-
CFLAGS="-O2"
### u-boot
.PHONY: u-boot
u-boot:
git clone git://github.com/xiangfu/qi-u-boot.git u-boot
cd u-boot && \
make qi_lb60_config && \
make
### kernel
.PHONY: kernel
kernel:
git clone git://github.com/xiangfu/qi-kernel.git kernel
cd kernel && \
make pi_defconfig && \
make uImage
### flash-boot
.PHONY: usbboot
usbboot: stage1 stage2
cd $(FLASH_TOOL_PATH)
./autogen.sh && \
./configure && \
make
stage1:
make CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE1_PATH)
stage2:
make CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE2_PATH)
### clean up
distclean: clean clean-usbboot
clean:
clean-usbboot:
make clean CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE1_PATH)
make clean CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE2_PATH)
make clean -C $(FLASH_TOOL_PATH)
help:
@make --print-data-base --question | \
awk '/^[^.%][-A-Za-z0-9_]*:/ \
{ print substr($$1, 1, length($$1)-1) }' | \
sort | \
pr --omit-pagination --width=80 --columns=1

73
README
View File

@ -1,73 +0,0 @@
Prepare for Reflash Device
--------------------
=serial console=
at the back of Ben Nanonote, there is "GND", "TXD" and "RXD",
you can get serial output from those pins
you need a TTL <-> RS232 converter. because the Ben Nanonote serial
console is TTL. here[1] is the serial PIN in the board.
=toolchain=
$ git clone git://github.com/lindnermarek/openwrt-x-burst.git[2]
$ git checkout --track -b x-burst origin/x-burst
$ make menuconfig
(select 'XBurst JZ47x0 [2.6]' in 'Target System')
$ make
then you will get toolchain under /PATH/TO/openwrt-x-burst/staging_dir/
toolchain-mipsel_gcc-4.1.2_uClibc-0.9.30.1/usr/bin
=xburst-tools (usbboot tools)=
you can get source code at git://github.com/xiangfu/xburst-tools.git[3]
$ cd /PATH/TO/xburst-tools/usbboot
$ ./autogen.sh && ./configure && make && sudo make install
then you got the 'usbboot' command. that is for the reflash.
=u-boot=
in openWRT menuconfig-->Target Images-->Build U-Boot bootloader -->
U-Boot target board (NEW) --> input 'qi_lb60
here[4] is the u-boot github URL
$ make qi_lb60_config
$ make
there is 'u-boot-nand.bin' is for Ben
How To Reflash
--------------------
1. plug the Ben to your computer. direct connect. no usb hub.
2. short the two pin ('boot from usb' show in [1])
3. press 'RESET' at the back of Ben
4. in you computer run [5] and [6]. then you flashed the bootloader and kernel
to nand flash.
5. rootfs: format your SD card.
the first partition must VFAT and others is EXT2.
we can put the kernel(uImage) in the first partition. put the rootfs in second partition.
uncompress openwrt rootfs to second partition of SD card
6. now you can boot your Ben.
----
[1] http://www.openmobilefree.net/?p=61
[2] here is the web site
http://github.com/lindnermarek/openwrt-x-burst/commits/x-burst
now we put the code in github.com
[3] in folder 'usbboot', here is the tar package and Debian package.
http://cloud.github.com/downloads/xiangfu/xburst-tools/xburst-tools_0.0_200906.tar.gz
http://cloud.github.com/downloads/xiangfu/xburst-tools/xburst-tools_0.0_200906-1_i386.deb
[4] http://github.com/xiangfu/qi-u-boot/tree
[master] is the last u-boot.
command: "mmc init;fatload mmc 0 0x80600000 uImage;bootm" is for boot the kernel in sd card.
[5] flash.u-boot.sh
--------
#!/bin/bash
U_BOOT=/PATH/TO/u-boot-nand.bin
sudo ../usbboot/src/usbboot -c "\
boot;\
nprog 0 $U_BOOT 0 0 -n"
[6] flash.kernel.sh
----------
#!/bin/bash
START_PAGE=2048
KERNEL=/PATH/TO/KERNEL_UIMAGE
sudo usbboot -c "boot"
sudo usbboot -c "nprog $START_PAGE $KERNEL 0 0 -n"

12
xbboot/scripts/boot-uboot.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
../host-app/xbboot set_addr 0x80002000
../host-app/xbboot bulk_write ../target-stage1/stage1.bin
../host-app/xbboot start1 0x80002000
../host-app/xbboot get_info
../host-app/xbboot flush_cache
../host-app/xbboot set_addr 0x80100000
../host-app/xbboot bulk_write $1
../host-app/xbboot flush_cache
../host-app/xbboot start2 0x80100000

12
xbboot/scripts/boot-zImage.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
../host-app/xbboot set_addr 0x80002000
../host-app/xbboot bulk_write ../target-stage1/stage1.bin
../host-app/xbboot start1 0x80002000
../host-app/xbboot get_info
../host-app/xbboot flush_cache
../host-app/xbboot set_addr 0x80600000
../host-app/xbboot bulk_write $1
../host-app/xbboot flush_cache
../host-app/xbboot start2 0x80600000