linux-qemu-guest (6344B)
1 #!/usr/bin/env pthbs-build 2 #+busybox.68f74170e6a13d2e0e3d99d29d2f02cd614667a68afec5007308ea1ece55ad64 3 #+busybox-bzip2.9d87ac159c5af2abf932204167d7dd79a5e2854ec5603817b258b68b5584c07c 4 #+busybox-gzip.1c4e6759f305d884692ed4260879ddf1ca5b722a4b2b8995fd7ac2ff244c1318 5 #+busybox-lzop.f4feb74da70e7c871444211871d0fc78da65a9e8ebb6b2d09716cda043d9559f 6 #+busybox-unzip.3525f1554aa628809b2af9b084dd93fe2a37c8f14dbd514faf0e888c25426073 7 #+busybox-xz.ead5b695755cbb0c379db6ee22b83de1da44c6d75a5295889ae4536de2a22e58 8 #+busybox-cpio.aae9207efa7aa6f41519f502d53ce4eabb45a70d339a22bf65d89f1aaf7a39de 9 #+busybox-dpkg.4f8487d22d56efdc91cb2d6263149840ae08d3ff07047357b04d4437f0321f2d 10 #+busybox-rpm.173468d54d79d9e5630360360e4479f04190c411b81fd1b1ad0139f618dd6b49 11 #+busybox-tar.794822cecad4eba7d3977210cc3b83b2dc8011cc18c77d9e0ce5205098cffae8 12 #+busybox-ed.afab42d8bf2060655b013c6225efcb43715780ef058e718d6a697e25de0dfa16 13 #+busybox-sed.13120e3643a859180c04f69bc441a554327a643b8a8301ec412d412d3ae9e263 14 #+busybox-vi.76239b7b2102b4489b0e8a0e86f19030f01d6149fa7310d00504580711d0b0f1 15 #+busybox-xxd.f3350b2e6c2d9463bc4d0ac5761b2a3ca4d5b811e651c2c705d6143667656c76 16 #+busybox-process-extra.4718339ba96e00c8091bf1348aef03c41cb830463fb26a943788db2c07d43509 17 #+busybox-procps.d618aac5f7c813d68a26afdddd97c7989c1ccb671cfa2628642e15573944b541 18 #+busybox-psmisc.8e915b0be8aa34811699584be98d8d1532c6fe91b44de921e0cbf527402859ad 19 #+busybox-ash.ec7c45db8ddc5ce15e4890ac76b9058759c93db13f5a7d7af554888e3c5c593f 20 #+busybox-bc.3e9cce6408b94240c76671a4d11bcade40182fcb5bcc1cfd1828208bef65a085 21 #+busybox-coreutils.9bf9b030f85f1e2273dcd70b660827388694be93e5dbd86e8c812031195508cb 22 #+busybox-coreutils-extra.8eb2d3d7aee3f89bc564e0da7e1dcf67071e7e49c1ea9b9dcbdba00069d4e247 23 #+busybox-daemontools.ff774454c0914cb16b18b038863c4a5a8b7c267eb2a308a9c13b740089ea5727 24 #+busybox-grep.acdcecd4d05a4d1c250b30ae8925ee38ed1f787276a99b9e3514b9850159d301 25 #+busybox-misc.125f4e5526de9635e0e04ddc5b6ba8c98a9a0e9e817c423b55241a0f0571e0d4 26 #+busybox-sh.991f989805551e1b6bb35424114e9339163a4e7c90bb03a946ae71b980936e97 27 #+busybox-util-linux-unpriv.1f8b2c8640b56685a72666365d8aece78e21f1ebc8a83b4355bb4111536b7caa 28 #+busybox-modutils.f424154ecd9e763d06daf39d5b6bbcd5055b977c1cfaced5b87bb7731f4a243a 29 #+gnu-make.f9c645bf2cec787c1273cfa3ca4f2ad9a50bf2749bc7b290c97880642c6775af 30 #+musl-cross-make.4e31ccacab5cc8de22091926201823288206e2471d5991c3fa8db8b8f5c1b22b 31 #+findutils.a2c6dd910e879fb4aa6349a1b64991a805639fc688cf91114ec571a7752c871e 32 #+diffutils.b0f6dc127fff42f218cf31dd3ecae47acf3fec88211ad4cd72b70015f1f70aed 33 #+patch.7adc3ffe7e269590d403752f9695b319a45b26a5aac091056cde741c7480ec5f 34 #+flex.99b935d9e8a1d65118e90c5310fed9d92f4497ba8e83f1098a834afd2640bf36 35 #+bison.1f39336996ab8687f8112c0df61fb226fd31b9e07f68d1d71a156635c6942fc1 36 #+rsync.28d5a700581498f8532f2c94df41d35452fb2d2aa1af9e43f0fb2ebf973d9a1f 37 #+zstd.e3dc9c1470dfaac98515ac2cfc7459823a2d2b943158e5228ffcb6149fd29a39 38 #+libelf.185e472d3f7a36b91a86dd3a1c5acf04b961474415f5a6bc500d7c88644e9b95 39 #+pkgconf-pkg-config.0ebd4f4bbcafb81f2165a73c99df6cedbe59beb6ea356dc27ef652a83e3db611 40 #+nawk.89894c53f13b6d37465565571d13dd5f7ee380df8ecabaf81420ccc89b60253f 41 #@untar:-J:sha256:7586962547803be7ecc4056efc927fb25214548722bd28171172f3599abb9764:. 42 #@sha256:cc2633ee136db0283d4faf7c27c890641e90cd835fc3adb19eaf0569e4078867:linux.config 43 #@sha256:ff3ddd131d73fee6838b11a6c4773bdb85c5f60fdd4b9ac4120ced021c341417:noobjtool.patch 44 45 46 # - build script start - 47 48 49 prefix=/versions/$pthbs_package 50 dest=${pthbs_destdir%/}${prefix} 51 cd 'linux-6.15' 52 53 patch -p1 -N <../noobjtool.patch 54 55 56 export CPATH="$pthbs_build_environment/include" 57 58 cp -v ../linux.config .config 59 make olddefconfig 60 diff -u ../linux.config .config || true 61 62 63 64 make -j${JOBS:-1} -l$((1+${JOBS:-1})) \ 65 V=1 \ 66 HOSTLDFLAGS="-static -L$pthbs_build_environment/library" \ 67 HOSTCFLAGS="-L$pthbs_build_environment/library" 68 69 70 mkdir -p "${dest}/doc/linux" "${dest}/boot" 71 cp -v .config "${dest}/config" 72 mv Documentation/* "${dest}/doc/linux" 73 make modules_install install \ 74 INSTALL_MOD_PATH="${dest}/kernel" \ 75 INSTALL_MOD_STRIP=1 \ 76 INSTALL_PATH="${dest}/boot" \ 77 INSTALL_DTBS_PATH="${dest}/boot/dtbs" 78 79 # remove dangling symlinks 80 module_dir="${dest}/kernel/lib/modules/6.15.0" 81 rm -f "$module_dir/build" "$module_dir/source" 82 ls -lhA "$module_dir" 83 84 85 86 87 88 cd "$pthbs_destdir/versions/$pthbs_package" 89 find -type d -o -print | awk -F/ ' 90 BEGIN { 91 kernel_name="6.15.0" 92 x["./boot/vmlinuz"]=1 93 x["./boot/System.map"]=1 94 x["./kernel/lib/modules/" kernel_name "/modules.alias"]=1 95 x["./kernel/lib/modules/" kernel_name "/modules.builtin"]=1 96 x["./kernel/lib/modules/" kernel_name "/modules.dep"]=1 97 x["./kernel/lib/modules/" kernel_name "/modules.order"]=1 98 x["./kernel/lib/modules/" kernel_name "/modules.symbols"]=1 99 } 100 101 function r1(s) { 102 sub("^[.]/[^/]*", ".", s) 103 return s 104 } 105 function s1(repl, s) { 106 sub("^[.]/[^/]*", "./"repl, s) 107 return s 108 } 109 function link(src) { 110 x[$0]=0 111 printf "%s\t%s\n", $0, src 112 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 113 } 114 $1!="."{exit 1} 115 116 117 $2 == "boot" { link($0); next } 118 $2 == "lib" && $3 == "modules" { exit 3 } # make sure kernel modules do not mix with userspace libraries 119 function mod_path(s) { 120 sub("^[.]/kernel/lib/", "./kernel/", s) 121 return s 122 } 123 $2 == "kernel" && $3 == "lib" && $4 == "modules" { link(mod_path($0)); next } 124 125 $2 == "config" { link($0); next } 126 $2 == "keys" { link($0); next } 127 $2 == "zsh" { link($0); next } 128 $2 == "env" { link($0); next } 129 $2 == "command" { link($0); next } 130 $2 == "bin" { link(s1("command", $0)); next } 131 132 $2 == "library.so" { link($0); next } 133 $2 == "library" { link($0); next } 134 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } 135 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } 136 137 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } 138 139 $2 == "man" { link($0); next } 140 $2 == "info" { link($0); next } 141 $2 == "doc" { link($0); next } 142 $2 == "icons" { link($0); next } 143 $2 == "terminfo" { link($0); next } 144 $2 == "data" { link($0); next } 145 $2 == "include" { link($0); next } 146 147 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } 148 149 END { 150 for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } 151 for(fname in x) { 152 if(x[fname]) { 153 printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" 154 exit 3 155 } 156 } 157 }' >.install-links.new 158 mv .install-links.new .install-links 159