From nobody Thu Nov 14 17:58:51 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1708305922; cv=none; d=zohomail.com; s=zohoarc; b=N70kqhJ1CgvKJQkTSdVO9dpcQNNQpGERx4AhiGbTgFdO9NvGRwP/Bs4sB/76PGLh1QVA6bep2/h2/GPqdiP0kQyr2RCjU4Ngho05z1XwFEX0OY2twg0uAn8Q+9zv/uTGz1Jv/4w8UU0F0huStLb13NUar14jYFPvh5GGQpsPKAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708305922; h=Content-Transfer-Encoding:Cc:Cc: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; bh=U0WySoIw/pOlRD+fj8Dh9muIWANrpWCJPovF4vt3VaI=; b=cZuFXpGqwRlJdtARulkdWeRKO1XtyjQwYxnDwORyfWdjTwhan45dbozRhnU4VkavWYObnY4PH6JbsZ9Zr8PMArRLrhgvqe6g02tMMPVBnhuzRHdRMV6XpPrAdK8DmElZnx4ZtXVA7Tigo9NHDLHM5IcLqSSlWWxBsfd6nh5Sg9Y= 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 1708305922536341.18102944948555; Sun, 18 Feb 2024 17:25:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbsJf-0005pd-3y; Sun, 18 Feb 2024 20:19:31 -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 1rbsIe-0003YD-LS; Sun, 18 Feb 2024 20:18:29 -0500 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rbsIY-0004Ju-SY; Sun, 18 Feb 2024 20:18:26 -0500 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-607dec82853so31897677b3.3; Sun, 18 Feb 2024 17:18:20 -0800 (PST) Received: from localhost.localdomain ([201.203.117.224]) by smtp.gmail.com with ESMTPSA id m12-20020a819e0c000000b00607ff905ed3sm1204704ywj.58.2024.02.18.17.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 17:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708305499; x=1708910299; darn=nongnu.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=U0WySoIw/pOlRD+fj8Dh9muIWANrpWCJPovF4vt3VaI=; b=OWdPx73ey10iTZjMBTdaQ96o+CQXSGQVwTHIKKVzTvHbgkxuoP2QYrN+jB6d7GsAov qBa/QCETH3HhE/i3xMnjAErw3YFdzeqJN4N4qyDbOz53rYh/ecK2qxhJBTYbaYiM09mR J5ECtICdK/PU00hmRIOZ28eJQt5wYFnvDG40Rb3aSz9XBC8dqovqAmiGdQZhekzUYluu cZ/0lzY34AH1aR9fM7JL0OP1QoKPd7id7tA1mrQDzO6j2qA87U9NR48MH4decEHy3XwU QMg35jL9slerMW6P6qd/Nem/xD3Kzd4SUT+4Kx0y33OuPeECa91VHZ8Cd5PNRar6diEZ 3tYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708305499; x=1708910299; 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=U0WySoIw/pOlRD+fj8Dh9muIWANrpWCJPovF4vt3VaI=; b=X7rLkqXAnB/yMo8oSWTz1t3RhymSuorgSYh/fd7oPi3AXCgOv5ajZnE8ocYrd3Xxqd mo7ujExxkLtOGoDL+WKegxfmnN1+bpwoBJC4Gtv89HzoNAyzPa+hyhrVm7dUOVP5QL+y kEtGBrqanVCfL6jWU/k33G5zmdZxq9F0BmhzTI3RyEbC42OEoSF7i9vKtmXlkszmCgvH A+HBn6cJtfUu0pF/Qli0//LfQxF5+MRRMy9850RGi96oGkj4f7wFeGrdw98kdXdDfGxA 7g4NQvEcBmzdA4YWGn7o8O9J4tpAqGDWsIlg3bDQo+KY/yE9wBbXyhEjT0hZykO24sU9 tqiw== X-Gm-Message-State: AOJu0Yy6wWjB8BElVyawKCzZDBPe6C9i45N3xL4EuMyHMwEyUyP5HubB +E7hEVzJqLMHolbTbxHuCcEgllyC857ag7/RmLpDGF+eJOy6OgIgcOuoV3uFN7E= X-Google-Smtp-Source: AGHT+IEu5cz+w7gtfoebQjIT+hXEC4xa1nZs9C4xs18W3vEyjchbMQ5Scsll8Q2EXpbUePbAd9X7aQ== X-Received: by 2002:a05:690c:3682:b0:608:2d21:7193 with SMTP id fu2-20020a05690c368200b006082d217193mr1741240ywb.44.1708305499435; Sun, 18 Feb 2024 17:18:19 -0800 (PST) From: Sergey Kambalin X-Google-Original-From: Sergey Kambalin To: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org, Sergey Kambalin Subject: [PATCH v5 30/41] Add Rpi4b boot tests Date: Sun, 18 Feb 2024 19:17:28 -0600 Message-Id: <20240219011739.2316619-31-sergey.kambalin@auriga.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240219011739.2316619-1-sergey.kambalin@auriga.com> References: <20240219011739.2316619-1-sergey.kambalin@auriga.com> 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=2607:f8b0:4864:20::112d; envelope-from=serg.oker@gmail.com; helo=mail-yw1-x112d.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1708305923773100012 Content-Type: text/plain; charset="utf-8" Signed-off-by: Sergey Kambalin --- tests/avocado/boot_linux_console.py | 92 +++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 3f0180e1f8..40e4aa86e1 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -501,6 +501,98 @@ 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-2g + :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, + '-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) + console_pattern =3D 'Product: QEMU USB Keyboard' + self.wait_for_console_pattern(console_pattern) + + + def test_arm_raspi4_initrd(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:raspi4b-2g + :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, + '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', + '-device', 'usb-kbd,bus=3Dxhci.0', + '-no-reboot') + 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