hikey: l-loader: Update generate_ptable.sh and Makefiles

The ptable format has changed for newer bootloaders,
so update the generation and build script.

This syncs the l-loader code to match
f986003d5732348db3a0329d2ed6863aa9d0ae9e from:
https://github.com/96boards-hikey/l-loader.git

Along with some minor tweaks to keep it building in the AOSP
environment.

Change-Id: Iad73e4ac63e0ccc78975d82f16983225bcfaea2b
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/l-loader/hikey960.mk b/l-loader/hikey960.mk
new file mode 100644
index 0000000..e378b75
--- /dev/null
+++ b/l-loader/hikey960.mk
@@ -0,0 +1,19 @@
+BL1=bl1.bin
+NS_BL1U=BL33_AP_UEFI.fd
+PTABLE_LST:=aosp-32g aosp-32g-spare linux-32g
+
+.PHONY: all
+all: l-loader.bin prm_ptable.img
+
+l-loader.bin: $(BL1) $(NS_BL1U)
+	python gen_loader_hikey960.py -o $@ --img_bl1=$(BL1) --img_ns_bl1u=$(NS_BL1U)
+
+prm_ptable.img:
+	for ptable in $(PTABLE_LST); do \
+		PTABLE=$${ptable} SECTOR_SIZE=4096 SGDISK=./sgdisk bash -x generate_ptable.sh;\
+		cp prm_ptable.img ptable-$${ptable}.img;\
+	done
+
+.PHONY: clean
+clean:
+	rm -f *.img l-loader.bin