[U-Boot] [PATCH 1/1] Dockerfile: build GRUB UEFI targets

Build GRUB UEFI targets grubarm.efi and grubaa64.efi. These are needed for running test_efi_grub_net().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- This patch applies to https://gitlab.denx.de/u-boot/gitlab-ci-runner --- Dockerfile | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile index e8468ce..23d4042 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,10 @@ RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2018.02 RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/d... | tar -C /opt -xz RUN wget -O - https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/201... | tar -C /opt -xz
-# Updat and install things from apt now +# Update and install things from apt now RUN apt-get update && apt-get install -y \ + automake \ + autopoint \ bc \ bison \ build-essential \ @@ -77,6 +79,41 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/*
+# Build GRUB UEFI targets grubarm.efi and grubaa64.efi +RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ + cd /tmp/grub && \ + git checkout grub-2.04 && \ + ./bootstrap && \ + mkdir -p /opt/grub && \ + ./configure --target=aarch64 --with-platform=efi \ + CC=gcc \ + TARGET_CC=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \ + TARGET_OBJCOPY=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \ + TARGET_STRIP=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \ + TARGET_NM=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \ + TARGET_RANLIB=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \ + make && \ + ./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \ + grub-core cat chain configfile echo efinet ext2 fat halt help linux \ + lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ + search search_fs_file search_fs_uuid search_label serial sleep test \ + true && \ + make clean && \ + ./configure --target=arm --with-platform=efi \ + CC=gcc \ + TARGET_CC=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \ + TARGET_OBJCOPY=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \ + TARGET_STRIP=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \ + TARGET_NM=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \ + TARGET_RANLIB=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \ + make && \ + ./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \ + grub-core cat chain configfile echo efinet ext2 fat halt help linux \ + lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ + search search_fs_file search_fs_uuid search_label serial sleep test \ + true && \ + rm -rf /tmp/grub + RUN git clone git://git.qemu.org/qemu.git /tmp/qemu && \ cd /tmp/qemu && \ git submodule update --init dtc && \ -- 2.20.1

On Sat, Jul 27, 2019 at 4:43 PM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Build GRUB UEFI targets grubarm.efi and grubaa64.efi. These are needed for running test_efi_grub_net().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
This patch applies to https://gitlab.denx.de/u-boot/gitlab-ci-runner
Dockerfile | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile index e8468ce..23d4042 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,10 @@ RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2018.02 RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/d... | tar -C /opt -xz RUN wget -O - https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/201... | tar -C /opt -xz
-# Updat and install things from apt now +# Update and install things from apt now RUN apt-get update && apt-get install -y \
automake \
autopoint \ bc \ bison \ build-essential \
@@ -77,6 +79,41 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/*
+# Build GRUB UEFI targets grubarm.efi and grubaa64.efi +RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
cd /tmp/grub && \
git checkout grub-2.04 && \
./bootstrap && \
mkdir -p /opt/grub && \
./configure --target=aarch64 --with-platform=efi \
CC=gcc \
TARGET_CC=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \
TARGET_OBJCOPY=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \
TARGET_STRIP=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \
TARGET_NM=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \
TARGET_RANLIB=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \
make && \
./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \
Use grub-mkstandalone to simplify the command a little bit?
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
search search_fs_file search_fs_uuid search_label serial sleep test \
true && \
make clean && \
./configure --target=arm --with-platform=efi \
CC=gcc \
TARGET_CC=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \
TARGET_OBJCOPY=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \
TARGET_STRIP=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \
TARGET_NM=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \
TARGET_RANLIB=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \
make && \
./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
search search_fs_file search_fs_uuid search_label serial sleep test \
true && \
rm -rf /tmp/grub
RUN git clone git://git.qemu.org/qemu.git /tmp/qemu && \ cd /tmp/qemu && \ git submodule update --init dtc && \
Regards, Bin

On 7/27/19 4:11 PM, Bin Meng wrote:
On Sat, Jul 27, 2019 at 4:43 PM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Build GRUB UEFI targets grubarm.efi and grubaa64.efi. These are needed for running test_efi_grub_net().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
This patch applies to https://gitlab.denx.de/u-boot/gitlab-ci-runner
Dockerfile | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile index e8468ce..23d4042 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,10 @@ RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2018.02 RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/d... | tar -C /opt -xz RUN wget -O - https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/201... | tar -C /opt -xz
-# Updat and install things from apt now +# Update and install things from apt now RUN apt-get update && apt-get install -y \
automake \
autopoint \ bc \ bison \ build-essential \
@@ -77,6 +79,41 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/*
+# Build GRUB UEFI targets grubarm.efi and grubaa64.efi +RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
cd /tmp/grub && \
git checkout grub-2.04 && \
./bootstrap && \
mkdir -p /opt/grub && \
./configure --target=aarch64 --with-platform=efi \
CC=gcc \
TARGET_CC=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \
TARGET_OBJCOPY=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \
TARGET_STRIP=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \
TARGET_NM=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \
TARGET_RANLIB=/opt/gcc-7.3.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \
make && \
./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \
Use grub-mkstandalone to simplify the command a little bit?
grub-mkstandalone generates a standalone image containing all modules. The selected modules are enough to test what U-Boot is offering.
Best regards
Heinrich
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
search search_fs_file search_fs_uuid search_label serial sleep test \
true && \
make clean && \
./configure --target=arm --with-platform=efi \
CC=gcc \
TARGET_CC=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \
TARGET_OBJCOPY=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \
TARGET_STRIP=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \
TARGET_NM=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \
TARGET_RANLIB=/opt/gcc-7.3.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \
make && \
./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
search search_fs_file search_fs_uuid search_label serial sleep test \
true && \
rm -rf /tmp/grub
RUN git clone git://git.qemu.org/qemu.git /tmp/qemu && \ cd /tmp/qemu && \ git submodule update --init dtc && \
Regards, Bin

On Sat, Jul 27, 2019 at 10:43:37AM +0200, Heinrich Schuchardt wrote:
Build GRUB UEFI targets grubarm.efi and grubaa64.efi. These are needed for running test_efi_grub_net().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
Next step, update the CI hook scripts to use these files, and copy them in the .gitlab-ci.yml file. Stephen has moved these to the DENX GitLab as well, btw.
Applied to u-boot-gitlab-ci-runner/master, thanks!

On 7/29/19 3:07 PM, Tom Rini wrote:
On Sat, Jul 27, 2019 at 10:43:37AM +0200, Heinrich Schuchardt wrote:
Build GRUB UEFI targets grubarm.efi and grubaa64.efi. These are needed for running test_efi_grub_net().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
Next step, update the CI hook scripts to use these files, and copy them in the .gitlab-ci.yml file. Stephen has moved these to the DENX GitLab as well, btw.
I guess you refer to https://gitlab.denx.de/u-boot/u-boot-test-hooks.
I think we have to keep Travis CI alive for developers who can not run anything on GitLab. So will https://gitlab.denx.de/u-boot/u-boot-test-hooks and https://github.com/swarren/uboot-test-hooks.git now diverge?
A better idea would be to let .gitlab-ci.yml and .travis.yml use the same Dockerimage.
We simply have to push our docker image to Dockerhub.
Usage of Docker images with Travis CI is described here: https://docs.travis-ci.com/user/docker/
Best Regards
Heinrich

On Mon, Jul 29, 2019 at 08:04:15PM +0200, Heinrich Schuchardt wrote:
On 7/29/19 3:07 PM, Tom Rini wrote:
On Sat, Jul 27, 2019 at 10:43:37AM +0200, Heinrich Schuchardt wrote:
Build GRUB UEFI targets grubarm.efi and grubaa64.efi. These are needed for running test_efi_grub_net().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
Next step, update the CI hook scripts to use these files, and copy them in the .gitlab-ci.yml file. Stephen has moved these to the DENX GitLab as well, btw.
I guess you refer to https://gitlab.denx.de/u-boot/u-boot-test-hooks.
I think we have to keep Travis CI alive for developers who can not run anything on GitLab. So will https://gitlab.denx.de/u-boot/u-boot-test-hooks and https://github.com/swarren/uboot-test-hooks.git now diverge?
The intention is to leverage our new gitlab instance to make it easier to find the related parts of the overall project. Stephen owns the gitlab repository and I think he intends long term to have his github one become just a personal repo. Travis (and GitLab) should get migrated.
A better idea would be to let .gitlab-ci.yml and .travis.yml use the same Dockerimage.
We simply have to push our docker image to Dockerhub.
Usage of Docker images with Travis CI is described here: https://docs.travis-ci.com/user/docker/
So, I personally would like to phase out Travis as it's both a bit of a maintenance burden and the network failures are annoying. But, it's good to know that Travis can use a custom Docker image. We currently publish the runner image so moving the travis job to use that instead would be good and I'd appreciate patches.
participants (3)
-
Bin Meng
-
Heinrich Schuchardt
-
Tom Rini