Commit f1cb74d8 authored by Ian Campbell's avatar Ian Campbell Committed by Siarhei Siamashka
Browse files

Makefile: Prefix most tools with sunxi-



Several of the tools here are too generic and/or short for distro packaging
purposes (which like to try and avoid naming clashes in $PATH). Prefix the
following with "sunxi-":
  - fexc
  - bootinfo
  - fel
  - pio
  - meminfo

Do not prefix any of the fel "payloads" or raw binaries since they would not
normally be installed in $PATH.

Do not prefix "phoenix_info", since "phoenix" already seems like an appropriate
prefix for this particular tool.

Update in-tree callers, README and .gitignore accordingly.
Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 6cc91f10
fexc
sunxi-fexc
bin2fex
fex2bin
bootinfo
fel
pio
nand-part
meminfo
sunxi-meminfo-static
sunxi-bootinfo
sunxi-fel
sunxi-pio
sunxi-nand-part
*.o
*.swp
*~
......@@ -21,8 +21,8 @@ CFLAGS = -g -O0 -Wall -Wextra
CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L
CFLAGS += -Iinclude/
TOOLS = fexc bin2fex fex2bin bootinfo fel pio
TOOLS += nand-part
TOOLS = sunxi-fexc bin2fex fex2bin sunxi-bootinfo sunxi-fel sunxi-pio
TOOLS += sunxi-nand-part
MISC_TOOLS = phoenix_info
......@@ -40,10 +40,10 @@ clean:
$(TOOLS): Makefile common.h
fex2bin bin2fex: fexc
fex2bin bin2fex: sunxi-fexc
ln -s $< $@
fexc: fexc.h script.h script.c \
sunxi-fexc: fexc.h script.h script.c \
script_uboot.h script_uboot.c \
script_bin.h script_bin.c \
script_fex.h script_fex.c
......@@ -52,16 +52,16 @@ LIBUSB = libusb-1.0
LIBUSB_CFLAGS = `pkg-config --cflags $(LIBUSB)`
LIBUSB_LIBS = `pkg-config --libs $(LIBUSB)`
fel: fel.c fel-to-spl-thunk.h
sunxi-fel: fel.c fel-to-spl-thunk.h
$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS) $(LIBUSB_LIBS)
nand-part: nand-part-main.c nand-part.c nand-part-a10.h nand-part-a20.h
sunxi-nand-part: nand-part-main.c nand-part.c nand-part-a10.h nand-part-a20.h
$(CC) $(CFLAGS) -c -o nand-part-main.o nand-part-main.c
$(CC) $(CFLAGS) -c -o nand-part-a10.o nand-part.c -D A10
$(CC) $(CFLAGS) -c -o nand-part-a20.o nand-part.c -D A20
$(CC) $(LDFLAGS) -o $@ nand-part-main.o nand-part-a10.o nand-part-a20.o $(LIBS)
%: %.c
sunxi-%: %.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
fel-pio.bin: fel-pio.elf fel-pio.nm
......@@ -109,9 +109,9 @@ boot_head_sun5i.elf: boot_head.S boot_head.lds
boot_head_sun5i.bin: boot_head_sun5i.elf
$(CROSS_COMPILE)objcopy -O binary boot_head_sun5i.elf boot_head_sun5i.bin
bootinfo: bootinfo.c
sunxi-bootinfo: bootinfo.c
meminfo: meminfo.c
sunxi-meminfo: meminfo.c
$(CROSS_COMPILE)gcc -g -O0 -Wall -static -o $@ $^
.gitignore: Makefile
......
......@@ -4,10 +4,10 @@ Copyright (C) 2012 Alejandro Mery <amery@geeks.cl>
Tools to help hacking Allwinner A10 (aka sun4i) based devices and possibly
it's successors, that's why the 'x' in the package name.
fexc:
sunxi-fexc:
`.fex` file (de)compiler
Usage: ./fexc [-vq] [-I <infmt>] [-O <outfmt>] [<input> [<output>]]
Usage: ./sunxi-fexc [-vq] [-I <infmt>] [-O <outfmt>] [<input> [<output>]]
infmt: fex, bin (default:fex)
outfmt: fex, bin (default:bin)
......@@ -21,7 +21,7 @@ fex2bin:
compatiblity shortcut to call `fexc` to compile a `.fex` file into
the binary form used by the sun4i kernel.
fel:
sunxi-fel:
script interface for talking to the FEL USB handler built in to
th CPU. You activate FEL mode by pushing the usboot/recovery
button at poweron. See http://linux-sunxi.org/FEL/USBBoot for
......@@ -37,17 +37,17 @@ fel-sdboot:
fel-pio:
ARM native helper for fel-gpio
pio:
sunxi-pio:
Manipulate PIO register dumps
nand-part:
sunxi-nand-part:
Tool for manipulating Allwinner NAND partition tables
jtag-loop.sunxi:
ARM native boot helper to force the SD port into JTAG
and then stop, to ease debugging of bootloaders.
bootinfo:
sunxi-bootinfo:
Dump information from Allwinner boot files (boot0/boot1)
--type=sd include SD boot info
--type=nand include NAND boot info (not implemented)
......
......@@ -24,23 +24,23 @@ pio_to_sram=0x2000
sram_to_pio=0x2004
if [ -f fel-pio.bin ]; then
./fel write 0x2000 fel-pio.bin
./sunxi-fel write 0x2000 fel-pio.bin
else
./fel write 0x2000 bin/fel-pio.bin
./sunxi-fel write 0x2000 bin/fel-pio.bin
fi
./fel exec $pio_to_sram
./fel read 0x3000 0x228 pio.reg
./pio -i pio.reg print > pio.old
./sunxi-fel exec $pio_to_sram
./sunxi-fel read 0x3000 0x228 pio.reg
./sunxi-pio -i pio.reg print > pio.old
cat pio.old | fgrep -v '<0><0><0><0>'
while read cmd; do
./pio -i pio.reg -o pio.reg $cmd
./fel write 0x3000 pio.reg
./fel exe 0x2004
./fel exe 0x2000
./fel read 0x3000 0x228 pio.reg
./pio -i pio.reg print > pio.new
./sunxi-pio -i pio.reg -o pio.reg $cmd
./sunxi-fel write 0x3000 pio.reg
./sunxi-fel exe 0x2004
./sunxi-fel exe 0x2000
./sunxi-fel read 0x3000 0x228 pio.reg
./sunxi-pio -i pio.reg print > pio.new
diff -U0 pio.old pio.new || true
mv -f pio.new pio.old
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment