Skip to content

Commit

Permalink
add x86 images (#9)
Browse files Browse the repository at this point in the history
The config is copied from buildroot/x86_64.config modulo CONFIG_64B.

Boot tested with a 32b x86 Clang built kernel in qemu.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
  • Loading branch information
nickdesaulniers authored Apr 26, 2020
1 parent f0ca342 commit 6ae3da1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
9 changes: 8 additions & 1 deletion boot-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function parse_parameters() {
-a | --arch | --architecture)
shift
case ${1} in
arm32_v5 | arm32_v6 | arm32_v7 | arm64 | mips | mipsel | ppc32 | ppc64 | ppc64le | x86_64) ARCH=${1} ;;
arm32_v5 | arm32_v6 | arm32_v7 | arm64 | mips | mipsel | ppc32 | ppc64 | ppc64le | x86 | x86_64) ARCH=${1} ;;
*) die "Invalid --arch value '${1}'" ;;
esac
;;
Expand Down Expand Up @@ -185,6 +185,13 @@ function setup_qemu_args() {
QEMU=(qemu-system-ppc64)
;;

x86)
KIMAGE=bzImage
QEMU_ARCH_ARGS=(-append "console=ttyS0${RDINIT}" -enable-kvm)
QEMU_RAM=512m
QEMU=(qemu-system-i386)
;;

x86_64)
KIMAGE=bzImage
QEMU_ARCH_ARGS=(-append "console=ttyS0${RDINIT}")
Expand Down
2 changes: 1 addition & 1 deletion buildroot/rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CONFIGS=()
while ((${#})); do
case ${1} in
all) for CONFIG in *.config; do CONFIGS+=("../${CONFIG}"); done ;;
arm64 | arm | mips | mipsel | ppc32 | ppc64 | ppc64le | x86_64) CONFIGS+=("../${1}.config") ;;
arm64 | arm | mips | mipsel | ppc32 | ppc64 | ppc64le | x86 | x86_64) CONFIGS+=("../${1}.config") ;;
*) die "Unknown parameter '${1}', exiting!" ;;
esac
shift
Expand Down
11 changes: 11 additions & 0 deletions buildroot/x86.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
BR2_OPTIMIZE_3=y
BR2_KERNEL_HEADERS_4_4=y
BR2_BINUTILS_VERSION_2_31_X=y
BR2_GCC_VERSION_8_X=y
BR2_TARGET_GENERIC_ROOT_PASSWD="root"
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_ROOTFS_OVERLAY="../overlay-poweroff"
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_BASH=y
BR2_TARGET_ROOTFS_CPIO=y
# BR2_TARGET_ROOTFS_TAR is not set
Binary file added images/x86/rootfs.cpio.zst
Binary file not shown.

0 comments on commit 6ae3da1

Please sign in to comment.