adding support for dynamic ramdisk size
This commit is contained in:
parent
d51c41460f
commit
3b383625a9
|
@ -163,7 +163,7 @@ mkdir -p $INITRD_DIR/bin
|
||||||
wget -O $INITRD_DIR/bin/busybox https://www.busybox.net/downloads/binaries/1.26.1-defconfig-multiarch/busybox-x86_64
|
wget -O $INITRD_DIR/bin/busybox https://www.busybox.net/downloads/binaries/1.26.1-defconfig-multiarch/busybox-x86_64
|
||||||
chmod +x $INITRD_DIR/bin/busybox
|
chmod +x $INITRD_DIR/bin/busybox
|
||||||
|
|
||||||
cat <<-EOF >$INITRD_DIR/init
|
cat <<-"EOF" >$INITRD_DIR/init
|
||||||
#!/bin/busybox sh
|
#!/bin/busybox sh
|
||||||
|
|
||||||
# Dump to sh if something fails
|
# Dump to sh if something fails
|
||||||
|
@ -193,7 +193,7 @@ cat <<-EOF >$INITRD_DIR/init
|
||||||
mdev -s
|
mdev -s
|
||||||
|
|
||||||
mkdir -p /newroot
|
mkdir -p /newroot
|
||||||
mount -t tmpfs -o size=${SIZE:=10000}m tmpfs /newroot || error
|
mount -t tmpfs -o size=${size:=10000}m tmpfs /newroot || error
|
||||||
|
|
||||||
echo "Extracting rootfs... "
|
echo "Extracting rootfs... "
|
||||||
xz -d -c -f rootfs.tar.xz | tar -x -f - -C /newroot || error
|
xz -d -c -f rootfs.tar.xz | tar -x -f - -C /newroot || error
|
||||||
|
|
Loading…
Reference in New Issue