From 07f7653999ab96ec712a0a652885c25806edd273 Mon Sep 17 00:00:00 2001 From: Trammell hudson Date: Fri, 19 Jan 2018 14:17:26 -0500 Subject: [PATCH] move tools into bin/ directory --- Makefile | 2 +- Makefile.nerf | 22 +++++++++++++++------- cpio-clean => bin/cpio-clean | 0 create-ffs => bin/create-ffs | 0 fit-parse => bin/fit-parse | 0 verity-sign => bin/verity-sign | 0 6 files changed, 16 insertions(+), 8 deletions(-) rename cpio-clean => bin/cpio-clean (100%) rename create-ffs => bin/create-ffs (100%) rename fit-parse => bin/fit-parse (100%) rename verity-sign => bin/verity-sign (100%) diff --git a/Makefile b/Makefile index 54571df1..c3504b35 100644 --- a/Makefile +++ b/Makefile @@ -353,7 +353,7 @@ initrd.cpio: $(initrd_bins) $(initrd_libs) dev.cpio FORCE cd "$(initrd_dir)"; \ find . \ | cpio --quiet -H newc -o \ - | $(pwd)/cpio-clean \ + | $(pwd)/bin/cpio-clean \ $(pwd)/dev.cpio \ - \ > "$(pwd)/$@" \ diff --git a/Makefile.nerf b/Makefile.nerf index e75a41c2..4e1ea73c 100644 --- a/Makefile.nerf +++ b/Makefile.nerf @@ -82,7 +82,7 @@ Acpi-data-file := /dev/null Acpi-data-guid := 7E374E25-8E01-4FEE-87F2-390C23C606CD Acpi-data-filetype := FREEFORM Acpi-data.$(BOARD).ffs: $(sort blobs/$(BOARD)/acpi/*) - ./create-ffs \ + ./bin/create-ffs \ -o $@ \ --guid "$(Acpi-data-guid)" \ --type FREEFORM \ @@ -111,7 +111,7 @@ Initrd-guid := 74696e69-6472-632e-7069-6f2f62696f73 define build-ffs = $1.ffs: $(or $($1-file),$(build)/$(edk2_dir)/Build/MdeModule/DEBUG_GCC5/X64/$1.efi) - ./create-ffs \ + ./bin/create-ffs \ -o "$1.ffs" \ --guid "$($1-guid)" \ --type $(or $($1-filetype),DRIVER) \ @@ -158,7 +158,7 @@ nerf-$(BOARD).full.vol: $(addsuffix .ffs,$(dxe-y)) Acpi-data.$(BOARD).ffs # blo #nerf-$(BOARD).lz.ffs: nerf-$(BOARD).full.vol nerf-$(BOARD).lz.ffs: vendor-$(BOARD).full.rom - ./create-ffs \ + ./bin/create-ffs \ --compress \ --type FIRMWARE_VOLUME_IMAGE \ -o "$@" \ @@ -198,15 +198,23 @@ nerf-$(BOARD).rom: \ exit 1; \ fi -vendor-$(BOARD).full.rom: blobs/$(BOARD)/vendor-files.txt Linux.ffs Initrd.ffs +vendor-files-y := $(shell awk \ + '/^[0-9A-Fa-f]/ {print "blobs/$(BOARD)/files/file-"$$1"/file.obj"}' \ + blobs/$(BOARD)/vendor-files.txt \ +) + +vendor-$(BOARD).full.rom: \ + EmuVariableRuntimeDxe.ffs \ + $(vendor-files-y) \ + Linux.ffs \ + Initrd.ffs \ + $(EDK2_DIR)/GenFv \ --numberblock $$[$(NERF_FULL_SIZE)/0x1000] \ --blocksize 0x1000 \ --FvNameGuid 4652454e-482f-6165-6473-2f4c696e7578 \ -o $@ \ - `awk '/^[0-9A-Fa-f]/ {print "-f blobs/$(BOARD)/files/file-"$$1"/file.obj"}' $<` \ - -f Linux.ffs \ - -f Initrd.ffs \ + $(addprefix -f ,$^) nerf.intermediate: edk2.intermediate nerf-$(BOARD).rom diff --git a/cpio-clean b/bin/cpio-clean similarity index 100% rename from cpio-clean rename to bin/cpio-clean diff --git a/create-ffs b/bin/create-ffs similarity index 100% rename from create-ffs rename to bin/create-ffs diff --git a/fit-parse b/bin/fit-parse similarity index 100% rename from fit-parse rename to bin/fit-parse diff --git a/verity-sign b/bin/verity-sign similarity index 100% rename from verity-sign rename to bin/verity-sign