]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - GRUB2/buildgrub.sh
update CI build script
[Ventoy.git] / GRUB2 / buildgrub.sh
1 #!/bin/bash
2
3 VT_GRUB_DIR=$PWD
4
5 rm -rf INSTALL
6 rm -rf SRC
7 rm -rf NBP
8 rm -rf PXE
9
10 mkdir SRC
11 mkdir NBP
12 mkdir PXE
13
14 tar -xvf grub-2.04.tar.xz -C ./SRC/
15
16 /bin/cp -a ./MOD_SRC/grub-2.04 ./SRC/
17
18 cd ./SRC/grub-2.04
19
20
21 # build for x86_64-efi
22 make distclean
23 ./autogen.sh
24 ./configure --with-platform=efi --prefix=$VT_GRUB_DIR/INSTALL/
25 make -j 16
26 sh install.sh uefi
27
28
29 #build for i386-efi
30 make distclean
31 ./autogen.sh
32 ./configure --target=i386 --with-platform=efi --prefix=$VT_GRUB_DIR/INSTALL/
33 make -j 16
34 sh install.sh i386efi
35
36
37
38 #build for arm64 EFI
39 PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin
40 make distclean
41 ./autogen.sh
42 ./configure --prefix=$VT_GRUB_DIR/INSTALL/ \
43 --target=aarch64 --with-platform=efi \
44 --host=x86_64-linux-gnu \
45 HOST_CC=x86_64-linux-gnu-gcc \
46 BUILD_CC=gcc \
47 TARGET_CC=aarch64-linux-gnu-gcc \
48 TARGET_OBJCOPY=aarch64-linux-gnu-objcopy \
49 TARGET_STRIP=aarch64-linux-gnu-strip TARGET_NM=aarch64-linux-gnu-nm \
50 TARGET_RANLIB=aarch64-linux-gnu-ranlib
51 make -j 16
52 sh install.sh arm64
53
54
55
56 # build for i386-pc
57 ./autogen.sh
58 ./configure --prefix=$VT_GRUB_DIR/INSTALL/
59 make -j 16
60 sh install.sh
61
62
63
64 cd ../../
65