Tweak bootloader deb fetching to fix external build

- Because LK source isn't public, we need to fetch it as a binary from
apt in the case that the source is not available.
- Split the fetch step into one fetch for lk and one for
excelsior-bootloader, so that build targets only fetch what they need
(and don't cause issues like having multiple versions of the
excelsior-bootloader package in the output).

Change-Id: I51df316a6616a77851a9dea9a4878f3ac17f066e
diff --git a/bootloader.mk b/bootloader.mk
index 8fe9897..80ff197 100644
--- a/bootloader.mk
+++ b/bootloader.mk
@@ -18,11 +18,14 @@
 
 include $(ROOTDIR)/build/preamble.mk
 
-fetch-bootloader:
-	$(LOG) bootloader fetch
+fetch-lk:
+	$(LOG) lk fetch
 	wget -P $(PRODUCT_OUT)/packages \
 		-e robots=off -nv -A deb -r -np -nd \
 		https://mendel-linux.org/apt/$(RELEASE_NAME)-bsp-excelsior/pool/main/l/lk-bootloader/
+	$(LOG) lk fetch finished
+fetch-bootloader:
+	$(LOG) bootloader fetch
 	wget -P $(PRODUCT_OUT)/packages \
 		-e robots=off -nv -A deb -r -np -nd \
 		https://mendel-linux.org/apt/$(RELEASE_NAME)-bsp-excelsior/pool/main/e/excelsior-bootloader/
@@ -36,9 +39,13 @@
 $(PRODUCT_OUT)/lk_2G.bin: extract-lk
 $(PRODUCT_OUT)/lk_1G.bin: extract-lk
 ifeq ($(IS_JENKINS),)
+ifneq ($(wildcard $(ROOTDIR)/packages/lk-bootloader),)
 extract-lk: lk-bootloader | out-dirs
 else
-extract-lk: fetch-bootloader | out-dirs
+extract-lk: fetch-lk | out-dirs
+endif
+else
+extract-lk: fetch-lk | out-dirs
 endif
 	$(LOG) lk.bin extract
 	find $(PRODUCT_OUT)/packages -name 'lk-bootloader*$(USERSPACE_ARCH)*.deb' | xargs \