From 2b662b457e2baa5d00594544e36de42d92b29254 Mon Sep 17 00:00:00 2001 From: "chenall.cn" Date: Wed, 27 Jan 2021 10:47:56 +0800 Subject: [PATCH] add grub4dos utils build --- .github/workflows/test.yml | 1 + build-ext.sh | 9 +++++++++ build.sh | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100755 build-ext.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dd4884..203eba7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,7 @@ jobs: files: | *.7z *.zip + efi/*.7z build4: name: build efi with qemu runs-on: ubuntu-18.04 diff --git a/build-ext.sh b/build-ext.sh new file mode 100755 index 0000000..121accc --- /dev/null +++ b/build-ext.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e +git clone --depth=1 https://github.com/chenall/grubutils.git $GITHUB_WORKSPACE/grubutils +pushd $GITHUB_WORKSPACE/grubutils +make -C umbr +make -j -C g4dext && mv g4dext/bin g4dext/ext +make -j -C g4eext && mv g4eext/bin g4eext/ext +popd diff --git a/build.sh b/build.sh index ff7b56c..684859c 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,7 @@ #!/bin/bash ACTION_PATH=$(dirname $(readlink -f $0)) +$ACTION_PATH/build-ext.sh chmod +x $ACTION_PATH/build-page.sh set -e for src in $grub4dos_src @@ -26,11 +27,24 @@ do #因为默认下载不是完整的代码不包含 tag 信息,ipxe 编译必须包含 tag,否则会报错 #具体相关信息 https://github.com/ipxe/ipxe/commit/8f1514a00 cd ipxe + # iPXE 多线程预编译 git tag v1.0.0 + make -j -C src bin/undionly.pxe cd .. fi CC=gcc-4.8 ./build fi + + GRUB4DOS_BIN=`ls grub4dos-$GRUB4DOS_VER-*.7z` + if [ "${GRUB4DOS_VER/EFI}" = "${GRUB4DOS_VER}" ]; then + if [ -d $GITHUB_WORKSPACE/grubutils/g4dext/ext ]; then + 7z a $GRUB4DOS_BIN $GITHUB_WORKSPACE/grubutils/g4dext/ext + fi + else + if [ -d $GITHUB_WORKSPACE/grubutils/g4eext/ext ]; then + 7z a $GRUB4DOS_BIN $GITHUB_WORKSPACE/grubutils/g4eext/ext + fi + fi $ACTION_PATH/build-page.sh popd done