From 2fec7688b0d373015a85853f7b75a4ab4d30e5c5 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Wed, 5 Jul 2023 14:09:04 +0200 Subject: [PATCH] genprotimg: move bootloader installation responsibility to boot/Makefile It's cleaner if the bootloader installation code is located in the boot/Makefile, rather than the top Makefile. Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Steffen Eiden --- genprotimg/Makefile | 2 -- genprotimg/boot/Makefile | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/genprotimg/Makefile b/genprotimg/Makefile index 4e81a63f..f8b69ac7 100644 --- a/genprotimg/Makefile +++ b/genprotimg/Makefile @@ -12,8 +12,6 @@ all: all-recursive install: all install-recursive $(INSTALL) -d -m 755 "$(PKGDATADIR)" - $(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 boot/stage3a.bin "$(PKGDATADIR)" - $(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 boot/stage3b_reloc.bin "$(PKGDATADIR)" $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 samples/check_hostkeydoc "$(PKGDATADIR)" clean: clean-recursive diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile index 6f3ae5c9..cb5706b1 100644 --- a/genprotimg/boot/Makefile +++ b/genprotimg/boot/Makefile @@ -3,6 +3,7 @@ include ../../common.mak ZIPL_DIR := $(rootdir)/zipl ZIPL_BOOT_DIR := $(ZIPL_DIR)/boot +PKGDATADIR := $(DESTDIR)$(TOOLS_DATADIR)/genprotimg INCLUDE_PATHS := $(ZIPL_BOOT_DIR) $(ZIPL_DIR)/include $(rootdir)/include INCLUDE_PARMS := $(addprefix -I,$(INCLUDE_PATHS)) @@ -80,6 +81,11 @@ stage3b.elf: head.o $(ZIPL_OBJS) $(OBJCOPY) -O binary $< $@ @chmod a-x $@ +install: stage3a.bin stage3b_reloc.bin + $(INSTALL) -d -m 755 "$(PKGDATADIR)" + $(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 stage3a.bin "$(PKGDATADIR)" + $(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 stage3b_reloc.bin "$(PKGDATADIR)" + clean: rm -f *.o *.elf *.bin *.map .*.d *.lds