Fix bootloaders.

Change-Id: I7e1666d604c554509375a4ae858ff3cd7be96b3a
diff --git a/bootloader/bootloader.make b/bootloader/bootloader.make
index f57fac0..88305f3 100644
--- a/bootloader/bootloader.make
+++ b/bootloader/bootloader.make
@@ -18,20 +18,15 @@
 
 .SECONDEXPANSION:
 
-ifeq (arm,$(ARCH))
-  UNWARMINDER_LINK := -lunwarminder -L$(BUILDDIR)/lib
-else
-  UNWARMINDER_LINK :=
-endif
-
 $(BOOTLINK): $(BOOTLDS) $(CONFIGFILE)
 	$(call PRINTS,PP $(@F))
 	$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
 
-$(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(UNWARMINDER) $$(BOOTLINK)
+$(BUILDDIR)/bootloader.elf: $$(OBJ) $(FIRMLIB) $(CORE_LIBS) $$(BOOTLINK)
 	$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
-		$(FIRMLIB) $(UNWARMINDER_LINK) -lgcc -L$(BUILDDIR)/firmware \
-		-T$(BOOTLINK) $(GLOBAL_LDOPTS) \
+		-L$(BUILDDIR)/firmware -lfirmware \
+		-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
+		-lgcc -T$(BOOTLINK) $(GLOBAL_LDOPTS) \
 		-Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map
 
 $(BUILDDIR)/bootloader.bin : $(BUILDDIR)/bootloader.elf
diff --git a/tools/root.make b/tools/root.make
index 861f017..4a8d2ad 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -66,8 +66,10 @@
 ifeq (,$(findstring checkwps,$(APPSDIR)))
   ifeq (,$(findstring database,$(APPSDIR)))
     include $(FIRMDIR)/firmware.make
-    include $(ROOTDIR)/lib/skin_parser/skin_parser.make
     include $(ROOTDIR)/apps/bitmaps/bitmaps.make
+	ifeq (,$(findstring bootloader,$(APPSDIR)))
+      include $(ROOTDIR)/lib/skin_parser/skin_parser.make
+    endif
   endif
 endif