[Why] When user want run job with their own custom bootstrap instead of lkp-tests framework, they will generate a bootstrap-$(arch).cgz firstly, and scheduler will give the bootstrap-$(arch).cgz path to testbox, then testbox download the bootstrap-$(arch).cgz and use it as part of initrd.
So we add a step to handle bootstrap-$(arch).cgz, extract all of it to $NEWROOT and boot from $NEWROOT.
[Addition] The root dir in bootstrap-$(arch).cgz is /custom_bootstrap.
Signed-off-by: Yu Chuan 13186087857@163.com --- container/dracut-initrd/bin/overlay-lkp.sh | 5 +++++ container/dracut-initrd/modules.d/90lkp/lkp-deploy.sh | 5 +++++ 2 files changed, 10 insertions(+)
diff --git a/container/dracut-initrd/bin/overlay-lkp.sh b/container/dracut-initrd/bin/overlay-lkp.sh index 9a2800e532f9..c2165baa6eea 100644 --- a/container/dracut-initrd/bin/overlay-lkp.sh +++ b/container/dracut-initrd/bin/overlay-lkp.sh @@ -1,6 +1,11 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0
+# transfer custom bootstrap +[ -d /custom_bootstrap ] && { + cp -a /custom_bootstrap/* "$NEWROOT"/ +} + # transfer LKP dirs [ -d /lkp ] || return 0
diff --git a/container/dracut-initrd/modules.d/90lkp/lkp-deploy.sh b/container/dracut-initrd/modules.d/90lkp/lkp-deploy.sh index 44f994e1475e..8597f3086b6a 100755 --- a/container/dracut-initrd/modules.d/90lkp/lkp-deploy.sh +++ b/container/dracut-initrd/modules.d/90lkp/lkp-deploy.sh @@ -7,6 +7,11 @@ if ! getargbool 0 local; then return fi
+# transfer custom bootstrap +[ -d /custom_bootstrap ] && { + cp -a /custom_bootstrap/* "$NEWROOT"/ +} + # transfer LKP dirs [ -d /lkp ] || return 0