mirror of
https://github.com/ggrandou/abootimg.git
synced 2024-11-23 09:53:32 +08:00
added tools to pack/unpack ramdisks
This commit is contained in:
parent
5230e5fb08
commit
40817afd9b
8
pack-initrd
Executable file
8
pack-initrd
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
initrd=${1:-initrd.img}
|
||||
ramdisk=${2:-ramdisk}
|
||||
|
||||
( cd $ramdisk; find | sort | cpio --quiet -o -H newc ) | gzip > $initrd
|
||||
|
15
unpack-initrd
Executable file
15
unpack-initrd
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
initrd=${1:-initrd.img}
|
||||
ramdisk=${2:-ramdisk}
|
||||
|
||||
if [ -d $ramdisk ]; then
|
||||
echo "$ramdisk already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $ramdisk
|
||||
|
||||
zcat $initrd | ( cd $ramdisk; cpio -i )
|
||||
|
Loading…
Reference in New Issue
Block a user