92dab2c82a
/tmp does not contain anything useful anyway, and excluding its content makes the initramfs smaller too. Change-Id: Ia72867e0cdebacf668ac1a1f551a965da0d69694
24 lines
533 B
Bash
Executable file
24 lines
533 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
|
|
[ -n "$TARGET_ROOT" ]
|
|
|
|
source $_LIB/img-functions
|
|
|
|
IMAGE_PATH=$(readlink -f $IMAGE_NAME)
|
|
cd $TARGET_ROOT
|
|
|
|
echo "#disabled" > ./tmp/fstab.new
|
|
sudo mv ./tmp/fstab.new ./etc/fstab
|
|
sudo ln -s ./sbin/init ./
|
|
|
|
sudo find . -path ./sys -prune -o -path ./proc -prune -o -path './tmp/*' -prune -o -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs
|
|
|
|
select_boot_kernel_initrd $TARGET_ROOT
|
|
sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.vmlinuz
|