From patchwork Thu Aug 22 13:02:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1975484 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WqNf64gbbz1yYZ for ; Thu, 22 Aug 2024 23:02:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C9F1860E0F; Thu, 22 Aug 2024 13:02:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id PRvu1s9bI3DH; Thu, 22 Aug 2024 13:02:34 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4D0A960DE5 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 4D0A960DE5; Thu, 22 Aug 2024 13:02:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id C6C9B1BF3DF for ; Thu, 22 Aug 2024 13:02:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B4AEB60B25 for ; Thu, 22 Aug 2024 13:02:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 4-APl1H852h9 for ; Thu, 22 Aug 2024 13:02:27 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::533; helo=mail-ed1-x533.google.com; envelope-from=alex.bennee@linaro.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org B578560641 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B578560641 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by smtp3.osuosl.org (Postfix) with ESMTPS id B578560641 for ; Thu, 22 Aug 2024 13:02:26 +0000 (UTC) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso1358699a12.1 for ; Thu, 22 Aug 2024 06:02:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724331744; x=1724936544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vdE90vPPELMWmZA+/181r2H3Fe258AT5Qte2Dd7Gr2U=; b=g2a4COMteWVcnq/B35BxjWR+towfZD2IwaklSO/XH5rtnk0wC9+XcmB5gieOWrTUJU DCcsOGUUcr6jEaHMHEVRsHNOZT0192ca3aNcUOncUGBZedzIkfSngAQbqjoPBXWU9qhq NIDuwWZ+9w7sxgoqb3ANV78xwCGC5JibDkZeNi2F0jji8nz/LRhuykrQbNYnMLYbU4q/ OkPumVQ/Lc3zdXkLcpg7zJl5x9rlvmBZQ+HFKd8DqOb8oBCQC8VfR7/HCz2+TssQE1r9 p2NdxOGiQu055jj4sm1+gerY1duSKfGWSSULJSfT10AcbSfWdkVwfQRjBBXVdEtCPfMg B7Pg== X-Gm-Message-State: AOJu0YyS65+klBkvEOg2kFvtymM4bc/IXRhuRZci9RESDufY6IapaxPg T+2BaKTMBhPuRPyxEILz7tnULY0U4yTup+FcdMbzSrpPPs2Sb8wlJydTdCeMCY1DqySmSFddqrr d X-Google-Smtp-Source: AGHT+IFaEmFeREOkL3t0c9JzTJdwMFw0iITOCaxgyTWvP1RIZ3vG6k0FcEXZ82/I91LUFxZmFjSo+w== X-Received: by 2002:a17:907:e690:b0:a7a:abd8:77ae with SMTP id a640c23a62f3a-a866f0fd2e5mr465643166b.7.1724331743633; Thu, 22 Aug 2024 06:02:23 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f220324sm118753766b.44.2024.08.22.06.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 06:02:23 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 651FA5F94B; Thu, 22 Aug 2024 14:02:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: buildroot@buildroot.org Date: Thu, 22 Aug 2024 14:02:19 +0100 Message-Id: <20240822130220.4135741-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822130220.4135741-1-alex.bennee@linaro.org> References: <20240822130220.4135741-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724331744; x=1724936544; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vdE90vPPELMWmZA+/181r2H3Fe258AT5Qte2Dd7Gr2U=; b=Po6ea4DCVA351kW/C8AxgxfEhMJG6kly+28akm5kQb7+lU+3iiOdAUc7oiyBPcfrLs yj+YVmvf7Wf8IbMxojKHu9au0f0svStU/N6nR6k9+GjO79pZFjC3iMpz5tfDZ67kGy09 36QCejpbCKJ4cTeqIbsC8+rfyMRoR7EEaFELHEQsvFm7xsa1WkIpFpIF+xFvfi0q2SdC ldXA95z9jLuzd4dc0Jmxr8faZwk5PoTuMgxPlZGkF3WOIgJtViJ+R5u3HXgP5y2eXtBa InepTuItcRcHjgyBFbtlWZ9+SmFc43Jmpvz/V51exTD+JaNngEmr16kf/MJU0YiK6l03 6yVw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=linaro.org X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Po6ea4DC Subject: [Buildroot] [PATCH 3/4] board/qemu: add post-build script to aarch64_virt_defconfig X-BeenThere: buildroot@buildroot.org 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 Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This is in aid of supporting getty on fbcon. Signed-off-by: Alex Bennée --- board/qemu/post-build.sh | 16 ++++++++++++++++ configs/qemu_aarch64_virt_defconfig | 1 + 2 files changed, 17 insertions(+) create mode 100755 board/qemu/post-build.sh diff --git a/board/qemu/post-build.sh b/board/qemu/post-build.sh new file mode 100755 index 0000000000..73026e5922 --- /dev/null +++ b/board/qemu/post-build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty1 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab +# systemd doesn't use /etc/inittab, enable getty.tty1.service instead +elif [ -d ${TARGET_DIR}/etc/systemd ]; then + mkdir -p "${TARGET_DIR}/etc/systemd/system/getty.target.wants" + ln -sf /lib/systemd/system/getty@.service \ + "${TARGET_DIR}/etc/systemd/system/getty.target.wants/getty@tty1.service" +fi diff --git a/configs/qemu_aarch64_virt_defconfig b/configs/qemu_aarch64_virt_defconfig index 30ecf04cac..45f7fc75eb 100644 --- a/configs/qemu_aarch64_virt_defconfig +++ b/configs/qemu_aarch64_virt_defconfig @@ -15,6 +15,7 @@ BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set # Image +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"