From patchwork Sun Nov 15 14:36:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1400448 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=LbBtHi2x; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CYvsS2sKwz9sT6 for ; Mon, 16 Nov 2020 01:36:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 46AD886B12; Sun, 15 Nov 2020 14:36:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oCptPgJF-Ey4; Sun, 15 Nov 2020 14:36:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 2BD7E869D4; Sun, 15 Nov 2020 14:36:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9636A1BF293 for ; Sun, 15 Nov 2020 14:36:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 92780861DD for ; Sun, 15 Nov 2020 14:36:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id okn-QC7EUBhg for ; Sun, 15 Nov 2020 14:36:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 6827D861D7 for ; Sun, 15 Nov 2020 14:36:15 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id o15so15874381wru.6 for ; Sun, 15 Nov 2020 06:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5oXgL9kVfQPY95UAGrhN+SjdrQ7GcT0B77gpTuMfCkY=; b=LbBtHi2xz9DovQHaq/CoaDesDDSA7PihK8RMfkXCIrnB9ozlVjGnWjVRfyuStZ8xy/ FU+hrglxkLOpi11DsDp9Dkw6RTZqki3tIMepVMRC51TLW4W3JowYXKh69usDQHselQZB 2F6NoN7vBJkMGIxHit1Ud1G4qJ5iqLu+Kmw7oWhDl85J7+2At6BjKojI+yGGEO19Wm/1 gr/uHw//367xDtm2b3i2B9cTfoeaoE8OH2pNZQdYA4441YgIT2c5xElSpyfAh1GllDNh o9h0LriBtj+nfAXrv09tvwSbwpZD0BMfXC4h2d86oIJMaBhmB7XEDG/mLCncu54v9ejd 8SQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5oXgL9kVfQPY95UAGrhN+SjdrQ7GcT0B77gpTuMfCkY=; b=nKSCJcsNeZ2PpY0PNcH/G2lE7HqeRYzZgeXhNqHrMSIAgZAptpjO0/2eg6OZbzLRTc 8yvJx1B7AO/Snf6ccUVztIwmErWV59bu1BuKXi2MYDhaxlEudRqRNp9XAXS8eF9utACj oqkfkH+A4yFDWSnrnEntYr06yH32zYO0/lQrLI4WS6gc1n2tpqv4A0qYyWm4jU1v1Is2 Lv1/+uDZo8WReojr00Vh41Tn7IYFkMrmWomKrDPP5+6TulU69Bmuctz+gHfPFjlwcT3D xyj08VjG7SBG9sXyd1GC9cidU0YS/uq+DpxLbUMFxIz5E1IbZun0RilLcvXcQBYBNxcg l+Bg== X-Gm-Message-State: AOAM5312WX71iy1KwWqepq5uOSzjXHPjjYsjawORbLinH+Bhig66y2rD huHXxpMDlaoETuejL2tHxJTVjpmsxzU= X-Google-Smtp-Source: ABdhPJzA81fPslpO/R5YUgr1achB8IgDYnHKMHwQZb7oLEQA8dH+7Y6MNVUlQLiCWpIqXSby1VydVQ== X-Received: by 2002:adf:fdc5:: with SMTP id i5mr14357958wrs.26.1605450973380; Sun, 15 Nov 2020 06:36:13 -0800 (PST) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id d3sm18754333wre.91.2020.11.15.06.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 06:36:12 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 15 Nov 2020 15:36:06 +0100 Message-Id: <20201115143609.2160080-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Subject: [Buildroot] [=PATCH v3 1/4] board/qemu/post-image.sh: rename IMAGE_DIR to BINARIES_DIR X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The output/images directory is called BINARIES_DIR in the Buildroot manual, not IMAGE_DIR. Signed-off-by: Romain Naour Cc: Yann E. MORIN --- board/qemu/post-image.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/board/qemu/post-image.sh b/board/qemu/post-image.sh index 9a4d216274..f34bf5043a 100755 --- a/board/qemu/post-image.sh +++ b/board/qemu/post-image.sh @@ -19,9 +19,9 @@ if [ -z "${QEMU_CMD_LINE}" ]; then exit 0 fi -# Replace output/images path by ${IMAGE_DIR} since the script +# Replace output/images path by ${BINARIES_DIR} since the script # will be in the same directory as the kernel and the rootfs images. -QEMU_CMD_LINE="${QEMU_CMD_LINE//output\/images/\${IMAGE_DIR\}}" +QEMU_CMD_LINE="${QEMU_CMD_LINE//output\/images/\${BINARIES_DIR\}}" # Remove -serial stdio if present, keep it as default args DEFAULT_ARGS="$(sed -r -e '/-serial stdio/!d; s/.*(-serial stdio).*/\1/' <<<"${QEMU_CMD_LINE}")" @@ -40,7 +40,7 @@ esac cat <<-_EOF_ > "${START_QEMU_SCRIPT}" #!/bin/sh - IMAGE_DIR="\${0%/*}/" + BINARIES_DIR="\${0%/*}/" if [ "\${1}" = "serial-only" ]; then EXTRA_ARGS='${SERIAL_ARGS}' From patchwork Sun Nov 15 14:36:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1400447 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=D/AmZFhg; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CYvsS2sHrz9sSn for ; Mon, 16 Nov 2020 01:36:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1F83686A94; Sun, 15 Nov 2020 14:36:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X0LME88ETt62; Sun, 15 Nov 2020 14:36:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8C22C86A79; Sun, 15 Nov 2020 14:36:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EA0161BF293 for ; Sun, 15 Nov 2020 14:36:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DC13720242 for ; Sun, 15 Nov 2020 14:36:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TVhUTXn8QrLt for ; Sun, 15 Nov 2020 14:36:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by silver.osuosl.org (Postfix) with ESMTPS id 581CB20198 for ; Sun, 15 Nov 2020 14:36:16 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id p22so21377588wmg.3 for ; Sun, 15 Nov 2020 06:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W2g6H5aTlcpSD98C6KjgTI+NSb4JZHwg3kVCDFpkkwE=; b=D/AmZFhgsisyIt0s1lfZ1DyxRa50vsH38ztkhsn26toRprSndJ4+c9XWR9gEyF4947 pC74q9pqLU8Qsx01EbASn/YOz2j8pwLUq7eGsS23bedNeLcfheJQNECg97q6dzcUmEya gqbLVfh+GjHg8yBzFNeeczgp6xX+G7ftRwha+UppCTiUDVbVfY6ZQW1NPsfTm0B7nh47 brUXY6/Sf7kRrY7s/ylInMj6OkwEXxsfRtBu6/vCT80NckYwQHEO7yx4JKJKtkoio9Wn asDotjHR5ZP9J7drNyhVN5wtIVOY9EudCpivlIDYvmrXMUQFNlzAjwttx0xwFNgbgXcO 12Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W2g6H5aTlcpSD98C6KjgTI+NSb4JZHwg3kVCDFpkkwE=; b=PMThHLUvtD/SGRTUFYXhb+EK2QXyGpDbalCTK2HkBesSDuwn4/eN6AAM4ts5SI+hqa TcfAGziG7FfPuqZE7CDXdxK2WY1wnz0ZcgIQKDKo5y8eY1mF9aZg9e/M1ZmYkFK7hkWR P8qCsRKlMaMB+htj9A/DDVIZs2gMLCeZwsxTAHhqR69fVBSnKOoo6Kpb8Zf4aGPCXnjH w2fiROHetx22ncUOjha36XHIsVKwQW7mGAxfgiZxpz13SGLOSpkKG+UZ5ujke8YPMaAC sEG78HIdjmdXbu7FILok/7FIQhAx5dAzaF3vwRZE3fVtBy2YDCSo0yk4mHNbm9JhqY4i FBsw== X-Gm-Message-State: AOAM533GhwJwvSpfjMGPM3eAlDFrmC5bGI3HUtwRokt7JtBX0AYgg15n +PSzC8bkgg31XO858ORmjsMmwG7Aygo= X-Google-Smtp-Source: ABdhPJwDL7TGPthhGbpe7cJLMphjlWSnjnVYA+6tif2LqElptU8eoNexXUHSaeZfJT4SjYu54LK0GQ== X-Received: by 2002:a7b:cc84:: with SMTP id p4mr11336126wma.86.1605450974507; Sun, 15 Nov 2020 06:36:14 -0800 (PST) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id d3sm18754333wre.91.2020.11.15.06.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 06:36:13 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 15 Nov 2020 15:36:07 +0100 Message-Id: <20201115143609.2160080-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201115143609.2160080-1-romain.naour@gmail.com> References: <20201115143609.2160080-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [=PATCH v3 2/4] board/qemu/post-image.sh: execute from BINARIES_DIR X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Usually the qemu command line start directly with "qemu-system- ...". But the command line for qemu_arm_vexpress_tz_defconfig start by doing "cd output/images && ../host/bin/qemu-system-arm". This is necessary since boot binaries, except BL1, are primarily loaded via semi-hosting so all binaries has to reside in the same directory as QEMU is started from [1]. To order to handle this case correctly, update the post-image.sh used by all qemu defconfigs to execute qemu from BINARIES_DIR. Since we have to change the current directory use a subshell to restore the current directory after Qemu execution. [1] https://github.com/ARM-software/arm-trusted-firmware/blob/4ebbea9592ab37fc62217d0ac62fa13a3e063527/docs/plat/qemu.rst Signed-off-by: Romain Naour Cc: Yann E. MORIN --- board/qemu/post-image.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/board/qemu/post-image.sh b/board/qemu/post-image.sh index f34bf5043a..b7ee418e07 100755 --- a/board/qemu/post-image.sh +++ b/board/qemu/post-image.sh @@ -19,9 +19,9 @@ if [ -z "${QEMU_CMD_LINE}" ]; then exit 0 fi -# Replace output/images path by ${BINARIES_DIR} since the script -# will be in the same directory as the kernel and the rootfs images. -QEMU_CMD_LINE="${QEMU_CMD_LINE//output\/images/\${BINARIES_DIR\}}" +# Remove output/images path since the script will be in +# the same directory as the kernel and the rootfs images. +QEMU_CMD_LINE="${QEMU_CMD_LINE//output\/images/}" # Remove -serial stdio if present, keep it as default args DEFAULT_ARGS="$(sed -r -e '/-serial stdio/!d; s/.*(-serial stdio).*/\1/' <<<"${QEMU_CMD_LINE}")" @@ -40,7 +40,9 @@ esac cat <<-_EOF_ > "${START_QEMU_SCRIPT}" #!/bin/sh + ( BINARIES_DIR="\${0%/*}/" + cd \${BINARIES_DIR} if [ "\${1}" = "serial-only" ]; then EXTRA_ARGS='${SERIAL_ARGS}' @@ -50,6 +52,7 @@ cat <<-_EOF_ > "${START_QEMU_SCRIPT}" export PATH="${HOST_DIR}/bin:\${PATH}" exec ${QEMU_CMD_LINE} \${EXTRA_ARGS} + ) _EOF_ chmod +x "${START_QEMU_SCRIPT}" From patchwork Sun Nov 15 14:36:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1400449 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OpB3d9T4; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CYvsT2hSLz9sVK for ; Mon, 16 Nov 2020 01:36:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C8E34861F2; Sun, 15 Nov 2020 14:36:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5l77WWWU4E4W; Sun, 15 Nov 2020 14:36:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 93777861DD; Sun, 15 Nov 2020 14:36:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 62A351BF293 for ; Sun, 15 Nov 2020 14:36:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 597A420349 for ; Sun, 15 Nov 2020 14:36:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vnxxwwfCx8vq for ; Sun, 15 Nov 2020 14:36:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by silver.osuosl.org (Postfix) with ESMTPS id 4650220242 for ; Sun, 15 Nov 2020 14:36:17 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id 33so15863658wrl.7 for ; Sun, 15 Nov 2020 06:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5pdW30BhkUahllopMBN72b3zLwS57KiahkJ+ukQ/cIw=; b=OpB3d9T4fguzomI7YBTVh24nGXy97n/o+aw0ICBc0Usy56vH1BxqZVU5jX+6arEQLh q39zNXbwXtktIZLCL1SE1wO2ozjF8k3A8n9SbAiXLfJrF69LIwn1ePnJpxNdcFM1c4vs SuoAwYKz4h+W+WDBRW9opHEg0ZHtMQoSpXqAepRl4eJEL1hShl+RGnVjGxC00Iww9ngq DXuC59BKwFXBVDPiaghdBAZlOS4gDm+VEjNmXDW/oS7ZLcrKt7ABXesol3yKFLuc9XzY +AUiyBp1jySWA2PEOl4zksIdfyBpIeWWfRMZIjRL2jzv3ocibfe9aR0Ok0H69NKlteoy 1nGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5pdW30BhkUahllopMBN72b3zLwS57KiahkJ+ukQ/cIw=; b=BziVP2uyJbF+UAHcdyk56yu5mrUUzlGkeUig1611YpMxxUmhbxujBmpmEOkS3xInks HejcOTTCy6gcE9+NbLxfUTqVaW7RaIwRN9J4MbmIpPHXqC2ugfF4QxBPBUhZHkfsBLyC ayObz6Crj0Z7sGvQb4/cJwqJFqEOheMHuhZ6PpHYcEvWBxEdnIEaKSR+QKVHWQcdp5Qo p4rM4jILUOY8YWOTHu4MUduoTVYRN/KaO7WV9Ul1X82SQR2fJnfH0A5E5nDpupKxuW+L EdZ8E6pI9gJNyKSTXFXxzuZjXpK7ZH7XF5x0JvUr+FfSe7aDbuUPssnsEFKkbx9nzkEu fQqw== X-Gm-Message-State: AOAM530RUCwPManNHF25l8rhG0qvx9f7tOOGu8D5qd/DeKO3tVwZb+6d XTdpoo5Su/OoR/JMkkCtc/CJ23K1Pjw= X-Google-Smtp-Source: ABdhPJxo0fUc1qzB3UfDvXzSXATg6ryIlvz9C74ZixcFUFwFgfC+11jSsTTA7hspoG+MpDCBGwrzVA== X-Received: by 2002:adf:9066:: with SMTP id h93mr15257370wrh.166.1605450975396; Sun, 15 Nov 2020 06:36:15 -0800 (PST) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id d3sm18754333wre.91.2020.11.15.06.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 06:36:14 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 15 Nov 2020 15:36:08 +0100 Message-Id: <20201115143609.2160080-3-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201115143609.2160080-1-romain.naour@gmail.com> References: <20201115143609.2160080-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [=PATCH v3 3/4] configs/qemu_arm_vexpress_tz_defconfig: build start-qemu.sh X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Cc: Yann E. MORIN --- Tested with: ./support/scripts/boot-qemu-image.py qemu_arm_vexpress_tz_defconfig --- 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 b7ee418e07..bb4abfc0c4 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=${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 From patchwork Sun Nov 15 14:36:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1400446 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Vlb2n3iT; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CYvsS60H1z9sTL for ; Mon, 16 Nov 2020 01:36:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1466587272; Sun, 15 Nov 2020 14:36:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xOauNHwtnA2n; Sun, 15 Nov 2020 14:36:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 475B486F6E; Sun, 15 Nov 2020 14:36:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D54AD1BF293 for ; Sun, 15 Nov 2020 14:36:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D2546861DD for ; Sun, 15 Nov 2020 14:36:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BerrHN6JRhxi for ; Sun, 15 Nov 2020 14:36:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 28AC1861D7 for ; Sun, 15 Nov 2020 14:36:18 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id 33so15863689wrl.7 for ; Sun, 15 Nov 2020 06:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GpWPQ7WHi+2hLKBVUf9lYIuOlI5/5JfxTazOM+SSY94=; b=Vlb2n3iTEY8Uc2iNkRWSfd3gyhlcWEnzl7QmquXWtHb/bFvSEP35dnx133PHA3J0eF IRKUjyXQDiI7elsLsouN2MKRdLzbIHC3hdyi/ZSMvftRyXx2YbNSEF/L4vhKCSfO1cvv XARn/9WJ0A/5Q6phtt1FgX497H3ZPSRDojK/JfcjEgFFvNs4+87oot+p3dqlnLCKulow D/gQRCIkjyJHsrsP1sy7j6R8z3evLYoQ6oVsTyqolqPSM0QIB5p5+VIAF8buU/f5iOBy pbSaeTTKhqWLW3LjamPqWKAIiExZaWmgb7/CIh6yH8wqCZc6qpS/2UWI1HrsuMFKu/tu gxSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GpWPQ7WHi+2hLKBVUf9lYIuOlI5/5JfxTazOM+SSY94=; b=la7gXKlvg2X0994i3DNFSY5Y+hs4/0u29loxvrwsOaQ5ThHmzPoV2Gm532ga0oT1jL AbDMrHMXlEcztFXzDydpKluWDeLHOxL13SsyIl2qlBvpe7q6/1NgJHuT8BLCt+l9oYUi We0IYXvkayqWfqtpXzva4NQMa2FmiJABdNyFb+UtJAk93nMtJXzmauhs9x/0VkibUdeO rJ1SBG8Usa08NCYKLb8hvsHguazjm9W74a+iPcMrJYbNVUsRqWiRjSOJT7USv/VvJkAA NwbfytyaqLxXN0VzJLvcd0lV4/9YAdF7HMctgAuSw1dP7A+26A+Jfj/INsYP8smtOdvP qWZg== X-Gm-Message-State: AOAM533LHEXNBRY4Rshq9D65B2l5vG2/8yrJWqzmL0I7U/rxJID5EhZE gCrjFA9TIBQnfosQGzaiZN8naePI3aU= X-Google-Smtp-Source: ABdhPJwr1v52dOXkW++qwRc2Z1U4dYqC4OJLtsM7v84RIySYrQnChZ2Txcxq8DffQzAeyf7LVNV0pg== X-Received: by 2002:adf:a315:: with SMTP id c21mr14356495wrb.272.1605450976290; Sun, 15 Nov 2020 06:36:16 -0800 (PST) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id d3sm18754333wre.91.2020.11.15.06.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 06:36:15 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 15 Nov 2020 15:36:09 +0100 Message-Id: <20201115143609.2160080-4-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201115143609.2160080-1-romain.naour@gmail.com> References: <20201115143609.2160080-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [=PATCH v3 4/4] support/scripts/boot-qemu-image.py: don't fail if start-qemu.sh is missing X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When boot-qemu-image.py script was added, we wanted to run each qemu defconfig in gitlab, so we expect that all qemu defconfig generate the script start-qemu.sh in images directory. Don't make it a hard requirement even if we prefer to be able to do a runtime test for each qemu defconfig. Signed-off-by: Romain Naour Cc: Yann E. MORIN --- support/scripts/boot-qemu-image.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/support/scripts/boot-qemu-image.py b/support/scripts/boot-qemu-image.py index dbbba552ad..4066788c88 100755 --- a/support/scripts/boot-qemu-image.py +++ b/support/scripts/boot-qemu-image.py @@ -18,6 +18,10 @@ def main(): if not sys.argv[1].startswith('qemu_'): sys.exit(0) + if not os.path.exists('output/images/start-qemu.sh'): + print('qemu-start.sh is missing, cannot test.') + sys.exit(0) + qemu_start = os.path.join(os.getcwd(), 'output/images/start-qemu.sh') child = pexpect.spawn(qemu_start, ['serial-only'],