mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
This mode assists in validating the `rawprogram_.xml` and `patch_.xml` files, as well as the Firehose commands that are expected to be sent to the Firehose programmer. Dry run implementation is also expected to be extended for the Digests Table generation required for Firehose Validated Image Programming (VIP). Example of usage: $ qdl --dry-run --serial=0AA94EFD --debug prog_firehose_ddr.elf rawprogram*.xml patch*.xml qdl version v2.1-24-g30ac3a8-dirty This is a dry-run execution of QDL. No actual flashing has been performed waiting for programmer... FIREHOSE WRITE: <?xml version="1.0"?> <data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="1048576" verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data> FIREHOSE WRITE: <?xml version="1.0"?> <data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="0" verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data> accepted max payload size: 0 FIREHOSE WRITE: <?xml version="1.0"?> <data><program SECTOR_SIZE_IN_BYTES="4096" num_partition_sectors="131072" physical_partition_number="0" start_sector="6" filename="efi.bin"/></data> Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
49 lines
1.4 KiB
Makefile
49 lines
1.4 KiB
Makefile
QDL := qdl
|
|
RAMDUMP := qdl-ramdump
|
|
VERSION := $(or $(VERSION), $(shell git describe --dirty --always --tags 2>/dev/null), "unknown-version")
|
|
|
|
CFLAGS += -O2 -Wall -g `pkg-config --cflags libxml-2.0 libusb-1.0`
|
|
LDFLAGS += `pkg-config --libs libxml-2.0 libusb-1.0`
|
|
prefix := /usr/local
|
|
|
|
QDL_SRCS := firehose.c io.c qdl.c sahara.c util.c patch.c program.c read.c sim.c ufs.c usb.c ux.c oscompat.c
|
|
QDL_OBJS := $(QDL_SRCS:.c=.o)
|
|
|
|
RAMDUMP_SRCS := ramdump.c sahara.c io.c sim.c usb.c util.c ux.c oscompat.c
|
|
RAMDUMP_OBJS := $(RAMDUMP_SRCS:.c=.o)
|
|
|
|
KS_OUT := ks
|
|
KS_SRCS := ks.c sahara.c util.c ux.c oscompat.c
|
|
KS_OBJS := $(KS_SRCS:.c=.o)
|
|
|
|
default: $(QDL) $(RAMDUMP) $(KS_OUT)
|
|
|
|
$(QDL): $(QDL_OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
$(RAMDUMP): $(RAMDUMP_OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
$(KS_OUT): $(KS_OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
compile_commands.json: $(QDL_SRCS) $(KS_SRCS)
|
|
@echo -n $^ | jq -snR "[inputs|split(\" \")[]|{directory:\"$(PWD)\", command: \"$(CC) $(CFLAGS) -c \(.)\", file:.}]" > $@
|
|
|
|
version.h::
|
|
@echo "#define VERSION \"$(VERSION)\"" > .version.h
|
|
@cmp -s .version.h version.h || cp .version.h version.h
|
|
|
|
util.o: version.h
|
|
|
|
clean:
|
|
rm -f $(QDL) $(QDL_OBJS)
|
|
rm -f $(RAMDUMP) $(RAMDUMP_OBJS)
|
|
rm -f $(KS_OUT) $(KS_OBJS)
|
|
rm -f compile_commands.json
|
|
rm -f version.h .version.h
|
|
|
|
install: $(QDL) $(RAMDUMP) $(KS_OUT)
|
|
install -d $(DESTDIR)$(prefix)/bin
|
|
install -m 755 $^ $(DESTDIR)$(prefix)/bin
|