Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv4 4/4] configs/qemu_arm_vexpress_tz_defconfig: build start-qemu.sh
Date: Tue, 24 Nov 2020 21:30:22 +0100	[thread overview]
Message-ID: <20201124203022.477461-4-romain.naour@gmail.com> (raw)
In-Reply-To: <20201124203022.477461-1-romain.naour@gmail.com>

When tags was added by commit 011206b2bffd509b29365bc1eaa761414ee13726
to detect the qemu command line, the qemu_arm_vexpress_tz_defconfig
was ignored due to a build issue.

This build issue has been fixed by previous patches, so we can
enable the runtime testing by adding the tag in the readme.txt
and the post-image script in the defconfig.

Since Qemu from HOST_DIR is now executed directly from BINARIES_DIR,
we can remove all the string before "qemu-system-*".

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
---
Tested with: https://gitlab.com/kubu93/buildroot/-/pipelines/220213431

v4: fix string removal before "qemu-system-*"
v3: rebase on top of previous patch
---
 board/qemu/arm-vexpress-tz/readme.txt  | 2 +-
 board/qemu/post-image.sh               | 3 +++
 configs/qemu_arm_vexpress_tz_defconfig | 4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/board/qemu/arm-vexpress-tz/readme.txt b/board/qemu/arm-vexpress-tz/readme.txt
index b235ba5cd7..abce750291 100644
--- a/board/qemu/arm-vexpress-tz/readme.txt
+++ b/board/qemu/arm-vexpress-tz/readme.txt
@@ -18,7 +18,7 @@ secure and non-secure worlds.
 	-serial stdio \
 	-netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \
 	-semihosting-config enable,target=native \
-	-bios bl1.bin
+	-bios bl1.bin # qemu_arm_vexpress_tz_defconfig
 
 The boot stage traces (if any) followed by the login prompt will appear
 in the terminal that started QEMU.
diff --git a/board/qemu/post-image.sh b/board/qemu/post-image.sh
index 404f77411c..23717e6f8e 100755
--- a/board/qemu/post-image.sh
+++ b/board/qemu/post-image.sh
@@ -27,6 +27,9 @@ QEMU_CMD_LINE="${QEMU_CMD_LINE//output\/images\//}"
 DEFAULT_ARGS="$(sed -r -e '/-serial stdio/!d; s/.*(-serial stdio).*/\1/' <<<"${QEMU_CMD_LINE}")"
 QEMU_CMD_LINE="${QEMU_CMD_LINE//-serial stdio/}"
 
+# Remove any sting before qemu-system-*
+QEMU_CMD_LINE="$(sed -r -e 's/^.*(qemu-system-)/\1/' <<<"${QEMU_CMD_LINE}")"
+
 # Disable graphical output and redirect serial I/Os to console
 case ${DEFCONFIG_NAME} in
   (qemu_sh4eb_r2d_defconfig|qemu_sh4_r2d_defconfig)
diff --git a/configs/qemu_arm_vexpress_tz_defconfig b/configs/qemu_arm_vexpress_tz_defconfig
index 5aeb6b4290..7f5a06f0ab 100644
--- a/configs/qemu_arm_vexpress_tz_defconfig
+++ b/configs/qemu_arm_vexpress_tz_defconfig
@@ -43,6 +43,10 @@ BR2_PACKAGE_OPTEE_BENCHMARK=y
 BR2_PACKAGE_OPTEE_EXAMPLES=y
 BR2_PACKAGE_OPTEE_TEST=y
 
+# Image
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
+
 # U-boot for booting the dear Linux kernel
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
-- 
2.25.4

  parent reply	other threads:[~2020-11-24 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 20:30 [Buildroot] [PATCHv4 1/4] support/scripts/boot-qemu-image.py: don't fail if start-qemu.sh is missing Romain Naour
2020-11-24 20:30 ` [Buildroot] [PATCHv4 2/4] board/qemu/post-image.sh: rename IMAGE_DIR to BINARIES_DIR Romain Naour
2020-11-24 20:30 ` [Buildroot] [PATCHv4 3/4] board/qemu/post-image.sh: execute from BINARIES_DIR Romain Naour
2020-11-24 20:30 ` Romain Naour [this message]
2020-12-05 21:35 ` [Buildroot] [PATCHv4 1/4] support/scripts/boot-qemu-image.py: don't fail if start-qemu.sh is missing Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201124203022.477461-4-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox