Merge remote-tracking branch 'origin/lance/grub-updates' into staging
This commit is contained in:
commit
71690e97bb
1 changed files with 49 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=2.06
|
||||
ENV SRC_HASH=23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f
|
||||
ENV VERSION=2.12
|
||||
ENV SRC_HASH=b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91
|
||||
ENV SRC_FILE=grub-${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://mirrors.kernel.org/gnu/grub/${SRC_FILE}
|
||||
|
||||
|
@ -14,34 +14,63 @@ COPY --from=stagex/flex . /
|
|||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/make . /
|
||||
COPY --from=stagex/gawk . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/python . /
|
||||
COPY --from=stagex/m4 . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/perl . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/automake . /
|
||||
COPY --from=stagex/autoconf . /
|
||||
COPY --from=stagex/gettext . /
|
||||
COPY --from=stagex/xz . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR grub-${VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
make -j "$(nproc)" CFLAGS="-Wno-error"
|
||||
sh autogen.sh
|
||||
touch grub-core/extra_deps.lst
|
||||
mkdir build-pc
|
||||
cd build-pc
|
||||
CLFLAGS="-fno-plt" \
|
||||
../configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var \
|
||||
--build=x86_64 \
|
||||
--target=x86_64 \
|
||||
--host=x86_64 \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--with-platform=pc
|
||||
make
|
||||
cd ..
|
||||
mkdir build-efi
|
||||
cd build-efi
|
||||
../configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var \
|
||||
--build=x86_64 \
|
||||
--target=x86_64 \
|
||||
--host=x86_64 \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--with-platform=efi \
|
||||
--disable-efiemu
|
||||
make
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN make DESTDIR=/rootfs install
|
||||
|
||||
FROM base as test
|
||||
COPY --from=install /rootfs/. /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/busybox . /
|
||||
RUN grub-install --version
|
||||
RUN /bin/sh <<-EOF
|
||||
set -eux
|
||||
GRUB_VERSION=\$(echo | grub-install --version)
|
||||
if [ "grub-install (GRUB) ${VERSION}" != "\$GRUB_VERSION" ]; then
|
||||
echo "Expected grub version is \$VERSION, but got \$GRUB_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
RUN <<-EOF
|
||||
cd build-pc
|
||||
make DESTDIR=/rootfs install-strip
|
||||
cd ..
|
||||
cd build-efi
|
||||
make DESTDIR=/rootfs install-strip
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
|
|
Loading…
Reference in a new issue