mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 16:25:20 +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
|
SUBDIRS = src
|
||||||
|
|
||||||
EXTRA_DIST = autogen.sh
|
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 =
|
Authors: Xiangfu Liu <xiangfu.z@gmail.com>
|
||||||
On Debian and Ubuntu, you'll need libusb-dev
|
Marek Lindner <lindner_marek@yahoo.de>
|
||||||
sudo apt-get install libusb-dev libconfuse-dev
|
Wolfgang Spraul <wolfgang@qi-hardware.com>
|
||||||
|
|
||||||
= run =
|
This program is free software; you can redistribute it and/or
|
||||||
inflash you need device stage1(fw.bin), stage2(usb_boot.bin)
|
modify it under the terms of the GNU General Public License
|
||||||
and usb_boot.cfg for the device configure.
|
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 =
|
To run inflash you need device stage 1 (fw.bin), stage 2 (usb_boot.bin)
|
||||||
#!/bin/bash
|
and usb_boot.cfg for device configuration.
|
||||||
|
|
||||||
sudo ./inflash -c "boot"
|
sudo ./inflash -c "boot"
|
||||||
sudo ./inflash -c "nprog 0 u-boot-nand.bin 0 0 -n"
|
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
|
#!/bin/sh
|
||||||
AUTOMAKE="automake --foreign --add-missing --copy"
|
export AUTOMAKE="automake --foreign --add-missing --copy"
|
||||||
export AUTOMAKE
|
|
||||||
autoreconf
|
autoreconf
|
||||||
|
@ -1,28 +1,17 @@
|
|||||||
#
|
#
|
||||||
# Makefile for the JZ4740 internal boot rom code.
|
# Authors: Xiangfu Liu <xiangfu.z@gmail.com>
|
||||||
#
|
|
||||||
# (C) Copyright 2009
|
|
||||||
# Author: Xiangfu Liu <xiangfu.z@gmail.com>
|
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# version 3 as published by the Free Software Foundation.
|
# as published by the Free Software Foundation; either version
|
||||||
|
# 3 of the License, or (at your option) any later version.
|
||||||
# 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
|
|
||||||
|
|
||||||
FLASH_TOOL_BIN_PATH = ../bin
|
FLASH_TOOL_BIN_PATH = ../bin
|
||||||
FLASH_TOOL_SRC_PATH = ../src
|
FLASH_TOOL_SRC_PATH = ../src
|
||||||
|
|
||||||
ifeq ($(CROSS_COMPILE),)
|
ifeq ($(CROSS_COMPILE),)
|
||||||
$(error CROSS_COMPILE variable not set)
|
$(error CROSS_COMPILE variable not set, should point to .../mipsel-openwrt-linux-)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS := -O2 -mips32 -fno-pic -mno-abicalls -I$(FLASH_TOOL_SRC_PATH)
|
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
|
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)objcopy -O binary $< $@
|
||||||
$(CROSS_COMPILE)objdump -D $< > fw.dump
|
$(CROSS_COMPILE)objdump -D $< > xburst_stage1.dump
|
||||||
$(CROSS_COMPILE)objdump -h $< > fw.map
|
$(CROSS_COMPILE)objdump -h $< > xburst_stage1.map
|
||||||
$(CROSS_COMPILE)nm -n $< > System.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 $@
|
$(CROSS_COMPILE)ld $(LDFLAGS) $(OBJS) -o $@
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
||||||
.S.o:
|
.S.o:
|
||||||
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.elf *.bin *.dump *.map
|
rm -f xburst_stage1.bin xburst_stage1.elf xburst_stage1.dump xburst_stage1.map
|
||||||
rm -f *~
|
rm -f $(OBJS)
|
||||||
|
rm -f System.map
|
||||||
|
@ -12,6 +12,6 @@ inflash_SOURCES = cmd.c command_line.c ingenic_cfg.c \
|
|||||||
prefix = /usr
|
prefix = /usr
|
||||||
|
|
||||||
datadir = /usr/share/inflash
|
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
|
usb_boot.cfg
|
||||||
EXTRA_DIST = $(datadir)
|
EXTRA_DIST = $(datadir)
|
Loading…
Reference in New Issue
Block a user