提交 e7e3a5cd 编写于 作者: V vit9696

Build: Add Linux userspace utility bundling

上级 53b0312d
......@@ -23,6 +23,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Add Linux Toolchain
run: brew tap MarioSchwalbe/gcc-musl-cross
- name: Install Linux Toolchain
run: brew install gcc-8-musl-cross --without-armhf --without-aarch64
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_AUTO_UPDATE: 1
- name: Install Dependencies
run: brew install openssl mingw-w64
env:
......
......@@ -7,6 +7,7 @@ xcshareddata
xcuserdata
project.xcworkspace
*.dSYM
*.linux
Utilities/AppleEfiSignTool/AppleEfiSignTool
Utilities/ACPIe/ACPIe
Utilities/acdtinfo/acdtinfo
......
......@@ -17,6 +17,7 @@ OpenCore Changelog
- Added vector acceleration of SHA-512 and SHA-384 hashing algorithms, thx @MikhailKrichanov
- Fixed wraparound when using arrow keys in OpenCanopy
- Updated builtin firmware versions for SMBIOS and the rest
- Added bundled Linux versions for userspace utilities
#### v0.6.8
- Switched to VS2019 toolchain for Windows builds
......
......@@ -38,24 +38,28 @@ UDK_ARCH ?= X64
#
CFLAGS := -c -fshort-wchar -Wall -Wextra -D EFIUSER
ifeq ($(STATIC),1)
LDFLAGS += -static
endif
ifeq ($(WERROR),1)
CFLAGS += -Werror
CFLAGS += -Werror
endif
ifeq ($(shell echo 'int a;' | "${CC}" -Wno-unused-parameter -x c -c - -o /dev/null 2>&1),)
CFLAGS += -Wno-unused-parameter
CFLAGS += -Wno-unused-parameter
endif
ifeq ($(shell echo 'int a;' | "${CC}" -Wno-implicit-fallthrough -x c -c - -o /dev/null 2>&1),)
CFLAGS += -Wno-implicit-fallthrough
CFLAGS += -Wno-implicit-fallthrough
endif
ifeq ($(shell echo 'int a;' | "${CC}" -Wno-strict-aliasing -x c -c - -o /dev/null 2>&1),)
CFLAGS += -Wno-strict-aliasing
CFLAGS += -Wno-strict-aliasing
endif
ifeq ($(shell echo 'int a;' | "${CC}" -Wno-address -x c -c - -o /dev/null 2>&1),)
CFLAGS += -Wno-address
CFLAGS += -Wno-address
endif
ifeq ($(DIST),Darwin)
......@@ -66,8 +70,8 @@ ifeq ($(DIST),Darwin)
endif
ifeq ($(DIST),Windows)
SUFFIX := .exe
CFLAGS += -D_ISOC99_SOURCE=1
SUFFIX := .exe
CFLAGS += -D_ISOC99_SOURCE=1
endif
ifeq ($(SANITIZE),1)
......
......@@ -50,6 +50,11 @@ buildutil() {
UDK_ARCH=Ia32 CC=i686-w64-mingw32-gcc STRIP=i686-w64-mingw32-strip DIST=Windows make clean || exit 1
UDK_ARCH=Ia32 CC=i686-w64-mingw32-gcc STRIP=i686-w64-mingw32-strip DIST=Windows make -j "$cores" || exit 1
fi
if [ "$(which x86_64-linux-musl-gcc-8)" != "" ]; then
echo "Building ${util} for Linux..."
STATIC=1 SUFFIX=.linux UDK_ARCH=X64 CC=x86_64-linux-musl-gcc-8 STRIP=x86_64-linux-musl-strip-8 DIST=Linux make clean || exit 1
STATIC=1 SUFFIX=.linux UDK_ARCH=X64 CC=x86_64-linux-musl-gcc-8 STRIP=x86_64-linux-musl-strip-8 DIST=Linux make -j "$cores" || exit 1
fi
cd - || exit 1
done
popd || exit
......@@ -233,9 +238,11 @@ package() {
mkdir -p "${dest}" || exit 1
bin="${selfdir}/Utilities/${util}/${util}"
cp "${bin}" "${dest}" || exit 1
binEXE="${bin}.exe"
if [ -f "${binEXE}" ]; then
cp "${binEXE}" "${dest}" || exit 1
if [ -f "${bin}.exe" ]; then
cp "${bin}.exe" "${dest}" || exit 1
fi
if [ -f "${bin}.linux" ]; then
cp "${bin}.linux" "${dest}" || exit 1
fi
done
# additional docs for macserial.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册