build.sh 916 Bytes
Newer Older
longpanda's avatar
update  
longpanda committed
1
2
#!/bin/bash

longpanda's avatar
longpanda committed
3
4
5
rm -f vtoygpt_64
rm -f vtoygpt_32
rm -f vtoygpt_aa64
longpanda's avatar
update  
longpanda committed
6
7
8
9

/opt/diet64/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64  vtoygpt.c crc32.c -o  vtoygpt_64
/opt/diet32/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 -m32 vtoygpt.c crc32.c -o  vtoygpt_32

longpanda's avatar
longpanda committed
10
11
aarch64-buildroot-linux-uclibc-gcc -Os -static -D_FILE_OFFSET_BITS=64  vtoygpt.c crc32.c -o  vtoygpt_aa64

longpanda's avatar
update  
longpanda committed
12
13
14
#gcc -D_FILE_OFFSET_BITS=64 -static -Wall vtoygpt.c  -o  vtoytool_64
#gcc -D_FILE_OFFSET_BITS=64  -Wall  -m32  vtoygpt.c  -o  vtoytool_32

longpanda's avatar
longpanda committed
15
if [ -e vtoygpt_64 ] && [ -e vtoygpt_32 ] && [ -e vtoygpt_aa64 ]; then
longpanda's avatar
update  
longpanda committed
16
    echo -e '\n############### SUCCESS ###############\n'
longpanda's avatar
longpanda committed
17
18
19
20
21
    mv vtoygpt_64 ../INSTALL/tool/x86_64/vtoygpt
    mv vtoygpt_32 ../INSTALL/tool/i386/vtoygpt
    
    aarch64-buildroot-linux-uclibc-strip --strip-all vtoygpt_aa64
    mv vtoygpt_aa64 ../INSTALL/tool/aarch64/vtoygpt
longpanda's avatar
update  
longpanda committed
22
23
24
25
26
else
    echo -e '\n############### FAILED ################\n'
    exit 1
fi