mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-25 20:04:03 +02:00
some cleanup (note this may break stuff, will fix in next commit)
This commit is contained in:
parent
54f1305f25
commit
a653961b04
@ -0,0 +1,4 @@
|
||||
|
||||
* inflash ChangeLog
|
||||
|
||||
25Jun2009 [WS] some cleanup in directory structure and build system
|
@ -1,3 +1,2 @@
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = autogen.sh
|
||||
|
@ -1,18 +1,24 @@
|
||||
Ingenic Usb Boot Tools
|
||||
flash image(like: u-Boot, kernel) to PI.
|
||||
*
|
||||
* inflash
|
||||
*
|
||||
* Utility to respond to Ingenic XBurst USB boot protocol, provide
|
||||
* initial boot stages and ability to access NAND on device.
|
||||
*
|
||||
|
||||
= compile =
|
||||
On Debian and Ubuntu, you'll need libusb-dev
|
||||
sudo apt-get install libusb-dev libconfuse-dev
|
||||
Authors: Xiangfu Liu <xiangfu.z@gmail.com>
|
||||
Marek Lindner <lindner_marek@yahoo.de>
|
||||
Wolfgang Spraul <wolfgang@qi-hardware.com>
|
||||
|
||||
= run =
|
||||
inflash you need device stage1(fw.bin), stage2(usb_boot.bin)
|
||||
and usb_boot.cfg for the device configure.
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
|
||||
Build Requirements: libusb-dev, libconfuse-dev
|
||||
|
||||
= shell =
|
||||
#!/bin/bash
|
||||
To run inflash you need device stage 1 (fw.bin), stage 2 (usb_boot.bin)
|
||||
and usb_boot.cfg for device configuration.
|
||||
|
||||
sudo ./inflash -c "boot"
|
||||
sudo ./inflash -c "nprog 0 u-boot-nand.bin 0 0 -n"
|
||||
# sudo ./inflash -c "nprog 2048 uImage 0 0 -n"
|
||||
sudo ./inflash -c "nprog 2048 uImage 0 0 -n"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#! /bin/sh
|
||||
AUTOMAKE="automake --foreign --add-missing --copy"
|
||||
export AUTOMAKE
|
||||
#!/bin/sh
|
||||
export AUTOMAKE="automake --foreign --add-missing --copy"
|
||||
autoreconf
|
||||
|
@ -1,28 +1,17 @@
|
||||
#
|
||||
# Makefile for the JZ4740 internal boot rom code.
|
||||
#
|
||||
# (C) Copyright 2009
|
||||
# Author: Xiangfu Liu <xiangfu.z@gmail.com>
|
||||
# Authors: Xiangfu Liu <xiangfu.z@gmail.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
|
||||
# as published by the Free Software Foundation; either version
|
||||
# 3 of the License, or (at your option) any later version.
|
||||
#
|
||||
|
||||
FLASH_TOOL_BIN_PATH = ../bin
|
||||
FLASH_TOOL_SRC_PATH = ../src
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
$(error CROSS_COMPILE variable not set)
|
||||
$(error CROSS_COMPILE variable not set, should point to .../mipsel-openwrt-linux-)
|
||||
endif
|
||||
|
||||
CFLAGS := -O2 -mips32 -fno-pic -mno-abicalls -I$(FLASH_TOOL_SRC_PATH)
|
||||
@ -30,22 +19,21 @@ LDFLAGS := -nostdlib -EL -T target.ld
|
||||
|
||||
OBJS = head.o main.o common.o board_4740.o board_4750.o debug.o
|
||||
|
||||
all: fw.bin
|
||||
all: xburst_stage1.bin
|
||||
|
||||
fw.bin: fw.elf
|
||||
xburst_stage1.bin: xburst_stage1.elf
|
||||
$(CROSS_COMPILE)objcopy -O binary $< $@
|
||||
$(CROSS_COMPILE)objdump -D $< > fw.dump
|
||||
$(CROSS_COMPILE)objdump -h $< > fw.map
|
||||
$(CROSS_COMPILE)objdump -D $< > xburst_stage1.dump
|
||||
$(CROSS_COMPILE)objdump -h $< > xburst_stage1.map
|
||||
$(CROSS_COMPILE)nm -n $< > System.map
|
||||
mkdir -p $(FLASH_TOOL_BIN_PATH)
|
||||
cp fw.bin $(FLASH_TOOL_BIN_PATH)
|
||||
|
||||
fw.elf: $(OBJS)
|
||||
xburst_stage1.elf: $(OBJS)
|
||||
$(CROSS_COMPILE)ld $(LDFLAGS) $(OBJS) -o $@
|
||||
.c.o:
|
||||
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
||||
.S.o:
|
||||
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
||||
clean:
|
||||
rm -f *.o *.elf *.bin *.dump *.map
|
||||
rm -f *~
|
||||
rm -f xburst_stage1.bin xburst_stage1.elf xburst_stage1.dump xburst_stage1.map
|
||||
rm -f $(OBJS)
|
||||
rm -f System.map
|
||||
|
@ -12,6 +12,6 @@ inflash_SOURCES = cmd.c command_line.c ingenic_cfg.c \
|
||||
prefix = /usr
|
||||
|
||||
datadir = /usr/share/inflash
|
||||
data_DATA = ../device_stage1/fw.bin ../device_stage2/usb_boot.bin \
|
||||
data_DATA = ../xburst_stage1/xburst_stage1.bin ../device_stage2/usb_boot.bin \
|
||||
usb_boot.cfg
|
||||
EXTRA_DIST = $(datadir)
|
||||
EXTRA_DIST = $(datadir)
|
||||
|
Loading…
Reference in New Issue
Block a user