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