summaryrefslogtreecommitdiffstats
path: root/builder/build-initramfs.sh
diff options
context:
space:
mode:
authorJonathan Bauer2018-05-07 10:48:33 +0200
committerJonathan Bauer2018-05-07 10:48:33 +0200
commitc331b16ec9414fd2e597a874e7f6d82130cdb11d (patch)
tree96f7bd1c485cafc8c6ecb38046e69daf7ab020e9 /builder/build-initramfs.sh
parent[openslx_tmp_mount] add chmod binary (diff)
downloadsystemd-init-c331b16ec9414fd2e597a874e7f6d82130cdb11d.tar.gz
systemd-init-c331b16ec9414fd2e597a874e7f6d82130cdb11d.tar.xz
systemd-init-c331b16ec9414fd2e597a874e7f6d82130cdb11d.zip
support patches for submodules
after cloning the submodules, search for patches under builder/patches/<submodule_name> 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
Diffstat (limited to 'builder/build-initramfs.sh')
-rwxr-xr-xbuilder/build-initramfs.sh6
1 files changed, 6 insertions, 0 deletions
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 \