mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
revert cpio usage, bsdtar is faster
This commit is contained in:
parent
9b7d259fbe
commit
1a30a18998
6 changed files with 14 additions and 7 deletions
|
@ -152,12 +152,14 @@ build_image() {
|
|||
find . -mindepth 1 -execdir touch -hcd "@0" "{}" +
|
||||
|
||||
# If this pipeline changes, |pipeprogs| below needs to be updated as well.
|
||||
find . -mindepth 1 |
|
||||
cpio --reproducible --quiet -o -H newc |
|
||||
find . -mindepth 1 -printf '%P\0' |
|
||||
sort -z |
|
||||
LANG=C bsdtar --uid 0 --gid 0 --null -cnf - -T - |
|
||||
LANG=C bsdtar --null -cf - --format=newc @- |
|
||||
$compress "${COMPRESSION_OPTIONS[@]}" > "$compressout"
|
||||
|
||||
pipestatus=("${PIPESTATUS[@]}")
|
||||
pipeprogs=('find' 'cpio' "$compress")
|
||||
pipeprogs=('find' 'sort' 'bsdtar (step 1)' 'bsdtar (step 2)' "$compress")
|
||||
|
||||
popd >/dev/null || return
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ add_firmware() {
|
|||
if ! compgen -G "${BUILDROOT}${fwpath}/${fw}"?(.*) &>/dev/null; then
|
||||
if fwfile="$(compgen -G "${fwpath}/${fw}"?(.*))"; then
|
||||
add_file "$fwfile"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -240,7 +240,11 @@ _create_initramfs() {
|
|||
# https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
|
||||
# compress image with zstd
|
||||
cd "${_W_DIR}"/tmp || exit 1
|
||||
find . -mindepth 1 | cpio --reproducible --quiet -o -H newc | zstd --rm -T0> ${_RAM}/${_INITRD} &
|
||||
find . -mindepth 1 -printf '%P\0' |
|
||||
sort -z |
|
||||
LANG=C bsdtar --null -cnf - -T - |
|
||||
LANG=C bsdtar --null -cf - --format=newc @- |
|
||||
zstd --rm -T0> ${_RAM}/${_INITRD} &
|
||||
sleep 2
|
||||
while pgrep -x zstd &>/dev/null; do
|
||||
_clean_kernel_cache
|
||||
|
|
|
@ -7,7 +7,7 @@ build ()
|
|||
map add_binary head id cksum tail test uptime w who whoami xargs \
|
||||
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
||||
chgrp chown dialog dmesg egrep fgrep stty sync hdparm \
|
||||
dirname chroot expr bzip2 su sdparm tput bsdtar bsdcpio \
|
||||
dirname chroot expr bzip2 su sdparm tput bsdcpio \
|
||||
losetup mkfifo mknod readlink lzmadec lzop xz last wall mesg utmpdump \
|
||||
xzdec switch_root pivot_root chcpu ctrlaltdel gdisk sgdisk cgdisk fixparts findmnt \
|
||||
lsfd lsblk swaplabel cal chrt col colcrt colrm column fallocate flock getopt \
|
||||
|
|
|
@ -6,7 +6,7 @@ build ()
|
|||
{
|
||||
apps="head id cksum tail test uptime w who whoami xargs \
|
||||
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
||||
chgrp dialog dmesg egrep fgrep stty sync hdparm bsdtar bsdcpio\
|
||||
chgrp dialog dmesg egrep fgrep stty sync hdparm bsdcpio\
|
||||
dirname chroot expr bunzip2 bzcat bzip2 su sdparm tput \
|
||||
losetup mkfifo mknod lzmadec lzop lzma lzcat unlzma unxz xzcat \
|
||||
lastb last wall mesg utmpdump xzdec switch_root pivot_root chcpu ctrlaltdel \
|
||||
|
|
|
@ -19,7 +19,7 @@ build ()
|
|||
mkdir echo false sleep kmod pidof touch chmod find wc uname yes awk halt \
|
||||
shutdown reboot poweroff insmod modprobe sh dd sort zstd date tee mktemp \
|
||||
install pgrep mkfs.btrfs rmmod mountpoint gzip ldconfig nscd ln top df cut \
|
||||
stat tr passwd od tar cpio
|
||||
stat tr passwd od tar bsdtar
|
||||
|
||||
### add nano
|
||||
add_binary nano
|
||||
|
|
Loading…
Reference in a new issue