hikey: Add wrapper script to build uefi
Booloader sources are located under device/linaro/bootloader
Change-Id: I8b35f9a292f5037eac2e0a281f5345921a313b93
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
diff --git a/l-loader/Makefile b/l-loader/Makefile
new file mode 100644
index 0000000..93afcd1
--- /dev/null
+++ b/l-loader/Makefile
@@ -0,0 +1,27 @@
+CROSS_COMPILE?=arm-linux-gnueabihf-
+CC=$(CROSS_COMPILE)gcc
+CFLAGS=-march=armv7-a
+LD=$(CROSS_COMPILE)ld
+OBJCOPY=$(CROSS_COMPILE)objcopy
+BL1=bl1.bin
+PTABLE_LST:=aosp-4g aosp-8g linux-4g linux-8g
+
+all: l-loader.bin ptable.img
+
+%.o: %.S $(DEPS)
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+l-loader.bin: start.o $(BL1)
+ $(LD) -Bstatic -Tl-loader.lds -Ttext 0xf9800800 start.o -o loader
+ $(OBJCOPY) -O binary loader temp
+ python gen_loader.py -o $@ --img_loader=temp --img_bl1=$(BL1)
+ rm -f loader temp
+
+ptable.img:
+ for ptable in $(PTABLE_LST); do \
+ sudo PTABLE=$${ptable} bash -x generate_ptable.sh;\
+ python gen_loader.py -o ptable-$${ptable}.img --img_prm_ptable=prm_ptable.img;\
+ done
+
+clean:
+ rm -f *.o *.img l-loader.bin