Skip to content

Commit

Permalink
add grub4dos utils build
Browse files Browse the repository at this point in the history
  • Loading branch information
chenall committed Jan 27, 2021
1 parent 5f7bb45 commit 2b662b4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
files: |
*.7z
*.zip
efi/*.7z
build4:
name: build efi with qemu
runs-on: ubuntu-18.04
Expand Down
9 changes: 9 additions & 0 deletions build-ext.sh
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2b662b4

Please sign in to comment.