From nobody Tue Nov 26 09:32:44 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1709041577; cv=none; d=zohomail.com; s=zohoarc; b=Jhwj7HbMfASWpFF/gAF10hGr17+DNynFX9NE0321whOzlD5FKnWpb6MWuzYdFrjYIp12fe/9HBpDzF7ywblOWCdaKsFery9SfJaSypK/Gdm64zULOXQg8ebpJCOEOuBhXgPXTPmRExYj6OBAKsWQ3bKNtMeLv5q0faIsjhJ65Tg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709041577; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=EftjVY6w4DE2ldAEkCyJ7CK71+vFHWwK/iRzj67kYsA=; b=Ju2jn5cjXK9+EJj8dkrc/30VrpUBP92BBI+tdGcnilwlDPdB4abg8MJyJSJpgJpV1/IR24N0XJzxN67NoeOtTTUkZH6domn6fGd0v3r1Le4/nGLJgEsS4SJbNSzIdtYZMHpQvkk2mjc5lDvj/EHWySUuKu/seUVles6Id832uzo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709041577886714.0124897273176; Tue, 27 Feb 2024 05:46:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rexat-00012F-De; Tue, 27 Feb 2024 08:34:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rexab-0000pk-FH for qemu-devel@nongnu.org; Tue, 27 Feb 2024 08:33:47 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rexaT-0002uy-GT for qemu-devel@nongnu.org; Tue, 27 Feb 2024 08:33:43 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-33de64c91abso799195f8f.1 for ; Tue, 27 Feb 2024 05:33:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id i13-20020adfe48d000000b0033ae7d768b2sm11319552wrm.117.2024.02.27.05.33.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 05:33:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709040813; x=1709645613; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EftjVY6w4DE2ldAEkCyJ7CK71+vFHWwK/iRzj67kYsA=; b=cfr27BB01h3QXWD/ltxfDxslW8sl0cRDcapMlmmKYULsBzmHX7U8+G3hsv9nNDzo7v O+1l/jmBypXl7PdBhWPl8Ssd/ATCnSthpMhdjLx44RNtGSspIIrlF5yeyFGqysF9n4tM V2c6tpEXgZfGuqQAI13kCmw8WuDnTVYHsWemByxtvB9BJB/2zqEQg+tmF7OVoWOw97bC +T1aFjKWwEE324bhRppcTjjijDXDfG7h442gkrpUG+LpMsgqUfZgDqr3J0bfDJqj1ocw BkyWtsWVLWHg667RWA9J7WoALdK8mk4Lg8f5MaJJeU87hjtW+SLvOdzosbK8bTUJ7TJO 33Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709040813; x=1709645613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EftjVY6w4DE2ldAEkCyJ7CK71+vFHWwK/iRzj67kYsA=; b=bGRcR72UQy7gzGAuo3YOetMRkFmxUE0/3vR8Fy5WbA8PUvEq20FNAvmAc2PtGfoI07 SpzvOz8kHlSKkjWMemLDn6C14Tnd5KloZB07Z2rICrorDjl7AyCv0NPGyiJI15NCXgsR ElVjpnXIaF00FHrL8oMBFaU+83hCW214RE6WZ485cbCLx00wT0RfvtodTqFXgKXGeGXf XJO4WdHTluZIOf9QL14Av9VK3qBTpkx9/KWMkJwZa8Mj6uXrxY6Cf3x9Nw0nDVDgcNcK Coc2MTEtyD19SVtn3fXNPjq5TqvXTdykiPtWNBJpQoqO0ZMFhbY3NwzmPETBUQS24OJK 3UZA== X-Gm-Message-State: AOJu0YwTKhGx8yJq3eEybaYhTOpzxqXMpUMcYxibFWskly7wOVCsSE/H 47IG+KvNVjIeUYERgQ/3RzpJriuFPNneVyBA+2i9zl3ChqgDPljOjvRsd5qj8DnjFgripdAX5zS z X-Google-Smtp-Source: AGHT+IHGSflM5IoiN4cpCeCz0nn05LswI+p5ezh9dblnVElK5VI3KSKCkOQHYzpN9HVP4yjuxTvtOw== X-Received: by 2002:adf:f7cd:0:b0:33d:c29d:2219 with SMTP id a13-20020adff7cd000000b0033dc29d2219mr6825862wrq.8.1709040813046; Tue, 27 Feb 2024 05:33:33 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 34/45] tests/avocado/boot_linux_console.py: Add Rpi4b boot tests Date: Tue, 27 Feb 2024 13:33:03 +0000 Message-Id: <20240227133314.1721857-35-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240227133314.1721857-1-peter.maydell@linaro.org> References: <20240227133314.1721857-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1709041579221100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Sergey Kambalin Message-id: 20240226000259.2752893-31-sergey.kambalin@auriga.com Reviewed-by: Peter Maydell [PMM: Comment out use of USB, which depends on PCI] Signed-off-by: Peter Maydell --- tests/avocado/boot_linux_console.py | 97 +++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index a00202df3cb..989b65111c0 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -501,6 +501,103 @@ def test_arm_raspi2_initrd(self): # Wait for VM to shut down gracefully self.vm.wait() =20 + def test_arm_raspi4(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:raspi4b + :avocado: tags=3Ddevice:pl011 + :avocado: tags=3Daccel:tcg + :avocado: tags=3Drpi4b + + The kernel can be rebuilt using the kernel source referenced + and following the instructions on the on: + https://www.raspberrypi.org/documentation/linux/kernel/building.md + """ + + deb_url =3D ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20230106-1_arm64.deb') + deb_hash =3D '08dc55696535b18a6d4fe6fa10d4c0d905cbb2ed' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel8.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-= b.dtb') + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,mmio32,0xfe201000 ' + + 'console=3DttyAMA0,115200 ' + + 'root=3D/dev/mmcblk1p2 rootwait ' + + 'dwc_otg.fiq_fsm_enable=3D0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line) + # When PCI is supported we can add a USB controller: + # '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', + # '-device', 'usb-kbd,bus=3Dxhci.0', + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + # When USB is enabled we can look for this + # console_pattern =3D 'Product: QEMU USB Keyboard' + # self.wait_for_console_pattern(console_pattern) + console_pattern =3D 'Waiting for root device' + self.wait_for_console_pattern(console_pattern) + + + def test_arm_raspi4_initrd(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:raspi4b + :avocado: tags=3Ddevice:pl011 + :avocado: tags=3Daccel:tcg + :avocado: tags=3Drpi4b + + The kernel can be rebuilt using the kernel source referenced + and following the instructions on the on: + https://www.raspberrypi.org/documentation/linux/kernel/building.md + """ + deb_url =3D ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20230106-1_arm64.deb') + deb_hash =3D '08dc55696535b18a6d4fe6fa10d4c0d905cbb2ed' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel8.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-= b.dtb') + + initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '86b2be1384d41c8c388e63078a847f1e1c4cb1de/rootfs/' + 'arm64/rootfs.cpio.gz') + initrd_hash =3D 'f3d4f9fa92a49aa542f1b44d34be77bbf8ca5b9d' + initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) + initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,mmio32,0xfe201000 ' + + 'console=3DttyAMA0,115200 ' + + 'panic=3D-1 noreboot ' + + 'dwc_otg.fiq_fsm_enable=3D0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + # When PCI is supported we can add a USB controller: + # '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', + # '-device', 'usb-kbd,bus=3Dxhci.0', + self.vm.launch() + self.wait_for_console_pattern('Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'BCM2835') + exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', + 'cprman@7e101000') + exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System ha= lted') + # TODO: Raspberry Pi4 doesn't shut down properly with recent kerne= ls + # Wait for VM to shut down gracefully + #self.vm.wait() + def test_arm_exynos4210_initrd(self): """ :avocado: tags=3Darch:arm --=20 2.34.1