Skip to content

Commit 7fa4f34

Browse files
authored
ARM64 update - PE format needed (#14)
arm64 build now provides PE format image, instead of ELF, as expected by firecracker
1 parent b8cea06 commit 7fa4f34

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

build.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,22 @@ function build_version {
4949

5050
echo "Building kernel version: $version"
5151
make $make_opts olddefconfig
52-
make $make_opts vmlinux -j "$(nproc)"
52+
53+
if [[ "$TARGET_ARCH" == "arm64" ]]; then
54+
make $make_opts Image -j "$(nproc)"
55+
else
56+
make $make_opts vmlinux -j "$(nproc)"
57+
fi
5358

5459
echo "Copying finished build to builds directory"
5560
# Always output to {arch}/ subdirectory
5661
mkdir -p "../builds/vmlinux-${version}/${TARGET_ARCH}"
57-
cp vmlinux "../builds/vmlinux-${version}/${TARGET_ARCH}/vmlinux.bin"
58-
62+
if [[ "$TARGET_ARCH" == "arm64" ]]; then
63+
cp arch/arm64/boot/Image "../builds/vmlinux-${version}/${TARGET_ARCH}/vmlinux.bin"
64+
else
65+
cp vmlinux "../builds/vmlinux-${version}/${TARGET_ARCH}/vmlinux.bin"
66+
fi
67+
5968
# x86_64: also copy to legacy path (no arch subdir) for backwards compat
6069
if [[ "$TARGET_ARCH" == "x86_64" ]]; then
6170
cp vmlinux "../builds/vmlinux-${version}/vmlinux.bin"

0 commit comments

Comments
 (0)