]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - GRUB2/buildgrub.sh
1. change some directory structure for the 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 # build for Legacy BIOS
21 ./autogen.sh
22 ./configure --prefix=$VT_GRUB_DIR/INSTALL/
23 make -j 16
24 sh install.sh
25
26 # build for UEFI
27 make distclean
28 ./autogen.sh
29 ./configure --with-platform=efi --prefix=$VT_GRUB_DIR/INSTALL/
30 make -j 16
31 sh install.sh uefi
32
33
34 cd ../../
35