From c331b16ec9414fd2e597a874e7f6d82130cdb11d Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 7 May 2018 10:48:33 +0200 Subject: support patches for submodules after cloning the submodules, search for patches under builder/patches/ and apply them is appropriate. Currently: * dnbd3: ** configurable kernel version * qemu-xmount: ** do not pass the relocatable option (-r) to the linker since it conflicts with "-pie" that is activated by default on newer gcc. ** fix memfd compile errors The last patch was taken from: http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146949.html --- builder/build-initramfs.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builder/build-initramfs.sh') diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh index 7fac2186..2cb675a4 100755 --- a/builder/build-initramfs.sh +++ b/builder/build-initramfs.sh @@ -42,6 +42,12 @@ if ! [[ -d "$_needed_location" ]]; then git clone --depth 1 --branch "$branch" ' git submodule update # --remote <- this seems like a bad idea + # apply patches for submodules + git submodule foreach ' + for p in $(find ${toplevel}/builder/patches/${path##*/} -type f -name "*.patch" | sort -n); do + patch -p1 < $p || echo "Failed to patch $path with $p - expect errors." + done 2>/dev/null + ' popd # finally copy all dracut modules under modules.d/ cp --recursive \ -- cgit v1.2.3-55-g7522