File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,25 @@ function linuxkit_build() {
100
100
log info " Building Hook with kernel ${inventory_id} using linuxkit: ${lk_args[*]} "
101
101
" ${linuxkit_bin} " build " --format" " kernel+initrd" " ${lk_args[@]} "
102
102
103
+ # if LINUXKIT_ISO is set, build an ISO with the kernel and initramfs
104
+ if [[ -n " ${LINUXKIT_ISO} " ]]; then
105
+ declare lk_iso_output_dir=" out"
106
+ mkdir -p " ${lk_iso_output_dir} "
107
+
108
+ declare -a lk_iso_args=(
109
+ " --docker"
110
+ " --arch" " ${kernel_info['DOCKER_ARCH']} "
111
+ " --format" " iso-efi-initrd"
112
+ " --name" " hook"
113
+ " --cache" " ${lk_cache_dir} "
114
+ " --dir" " ${lk_iso_output_dir} "
115
+ " hook.${inventory_id} .yaml" # the linuxkit configuration file
116
+ )
117
+
118
+ log info " Building Hook ISO with kernel ${inventory_id} using linuxkit: ${lk_iso_args[*]} "
119
+ " ${linuxkit_bin} " build " ${lk_iso_args[@]} "
120
+ fi
121
+
103
122
declare initramfs_path=" ${lk_output_dir} /hook-initrd.img"
104
123
# initramfs_path is a gzipped file. obtain the uncompressed byte size, without decompressing it
105
124
declare -i initramfs_size_bytes=0
You can’t perform that action at this time.
0 commit comments