diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-11-12 12:41:02 -0500 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-11-12 12:41:02 -0500 |
commit | 21f681ffd8cfb62b0a5bf0b4cfd7a6f11da022ac (patch) | |
tree | cab471ee594f90b204949ca1a0b127879498020d /make | |
parent | 5536eca55c98b0cdb97e8575dcf4ac0d068cdd51 (diff) | |
download | minitramfs-21f681ffd8cfb62b0a5bf0b4cfd7a6f11da022ac.tar.xz minitramfs-21f681ffd8cfb62b0a5bf0b4cfd7a6f11da022ac.zip |
revamp solib selection, remove load-random-seed
Diffstat (limited to 'make')
-rwxr-xr-x | make | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -17,7 +17,7 @@ gen_cmd() { # ignore builtins [ "$cmd" != "$cmdp" ] || return printf 'file %s %s 0755 0 0\n' "$cmdp" "$cmdp" - ldd "$cmdp" | awk '/\// { if ($1~/^\//) file=$1; else file=$3; print "file " file " " file " 0755 0 0" }' + ldd "$cmdp" | awk '/=>/ { print "file /lib64/" $1 " " $3 " 0755 0 0" }' } # generate the main file list @@ -27,7 +27,7 @@ gen_cpio_list() { gen_cmd e2fsck gen_cmd dropbear gen_cmd cryptsetup - ldconfig -p | awk '$1 == "libgcc_s.so.1" { print "file " $4 " " $4 " 0755 0 0" }' + ldconfig -p | awk '$1 == "libgcc_s.so.1" && $2 ~ /x86-64/ { print "file " $4 " " $4 " 0755 0 0" }' } # filter the list and insert parent directory entries @@ -37,8 +37,11 @@ gen_dir_ents() { # filter the list and generate the make dependency file gen_depfile() { - deps='cpio_list.txt make' - awk -v d=/dev/fd/3 '{print} $1 == "file" { deps=deps " " $3; print $3 ":" > d } END { print "initramfs.img:" deps > d }' + awk -v f=/dev/fd/3 -v deps="cpio_list.txt make" ' + { print } + $1 == "file" { deps=deps " " $3; print $3 ":" > f } + END { print "initramfs.img: " deps > f } + ' } if ! [ -e cpio_list.txt ] || ! [ -e gen_init_cpio ]; then |