mkcpio.sh 996 Bytes
Newer Older
longpanda's avatar
longpanda committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

VENTOY_PATH=$PWD/../

rm -f ventoy.cpio

chmod -R 777 cpio

cp -a cpio	cpio_tmp

cd cpio_tmp
rm -f init
ln -s sbin/init init
ln -s sbin/init linuxrc

cd ventoy


longpanda's avatar
update  
longpanda committed
19
cp -a $VENTOY_PATH/DMSETUP/dmsetup* tool/
20
21
22
23
cp -a $VENTOY_PATH/SQUASHFS/unsquashfs_* tool/
cp -a $VENTOY_PATH/FUSEISO/vtoy_fuse_iso_* tool/
cp -a $VENTOY_PATH/VtoyTool/vtoytool tool/
cp -a $VENTOY_PATH/VBLADE/vblade-master/vblade_* tool/
longpanda's avatar
longpanda committed
24

longpanda's avatar
longpanda committed
25
26
cp -a $VENTOY_PATH/LZIP/lunzip32 tool/
cp -a $VENTOY_PATH/LZIP/lunzip64 tool/
longpanda's avatar
longpanda committed
27
cp -a $VENTOY_PATH/LZIP/lunzipaa64 tool/
longpanda's avatar
longpanda committed
28

29
30

chmod -R 777 ./tool
longpanda's avatar
longpanda committed
31
32
33
34
35

find ./tool | cpio  -o -H newc>tool.cpio
xz tool.cpio
rm -rf tool

longpanda's avatar
update  
longpanda committed
36
37
38
39
find ./loop | cpio  -o -H newc>loop.cpio
xz loop.cpio
rm -rf loop

longpanda's avatar
longpanda committed
40
41
xz ventoy_chain.sh
xz ventoy_loop.sh
longpanda's avatar
longpanda committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

find ./hook | cpio  -o -H newc>hook.cpio
xz hook.cpio
rm -rf hook
cd ..

find .| cpio  -o -H newc>../ventoy.cpio

cd ..
rm -rf cpio_tmp

echo '======== SUCCESS ============='

rm -f $VENTOY_PATH/INSTALL/ventoy/ventoy.cpio
cp -a ventoy.cpio $VENTOY_PATH/INSTALL/ventoy/