Received: by 2002:a17:906:3657:b0:a0d:e0d9:b5bf with SMTP id r23csp2386823ejb; Sun, 3 Dec 2023 16:31:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8kE5wyIdHmsqjc2poZrw4SQ0HMr+K5f/IoiRcGPnYxMcv52G6v9ZFsLVNAyjeDQkx8r+J X-Received: by 2002:a05:620a:8b87:b0:77e:fba3:93bb with SMTP id qx7-20020a05620a8b8700b0077efba393bbmr3110489qkn.157.1701649882521; Sun, 03 Dec 2023 16:31:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701649882; cv=none; d=google.com; s=arc-20160816; b=K9NPYDap4UAlGV8XxBLNXH7l1cw+m397iHo+HWLoxSxTjlKe0wGolbPVLE/0n/9IiT Uy0i5FVWbPIaIoE/0Wkpv5/WGlcODm76DNmVQO/gdeT+6S6KK5hleUREYpjMsDpAr/e9 Ww3XDrNe6k+D2+tMZ2riBeShnep/92ia3EWbu5OMEdMwLbpBOnUVGaJ2zl1+6y262Xq5 /JiSgTcSGwrD7K7XMzPKO1Cv/nyPPGoksfCUiZf+gZMcUxt29AgWUxJFGkuSvkOUvJEn puUR5/794Xu7ToO4/vZXwde6dda9c1Hntitfc9780EkH+hVqzMLdvnphHE2QHkqtWY9q 0D2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mcF9QghvfuN/SOxiRcej/fFnaurGCk30s1qkfL8vZWQ=; fh=1CWWAdYo81brd4jeYOgzhc83mN/ncVbe89i2SJzFql0=; b=Qrl7iK3AT3SqcxYZ5RT40CzNCoTfgLvW/WJ+1iBhww5GNj/7QO/PqC/8c9o9GUxAZv kVfLi8n3/fG8pys7YY9Dtms/Pp2Nmdv+EEs9mQIKarelLkQejW8/WLmNGmMOMAY7iJwG scNQ1eKsv1Zw3KuyBh5acWwi9b3jHYN6hHIucmOIPWet1oGN6lhR6Vz5rBVxzy/OpNWL 69FTy7iUSRT23xbkHHQTGsjWVOSZJIE94gcWRV0g9of3PA5d1Xg0kvkQAMPU7fG/tA6x v6mT7PQLbjP9tvJs8yh7fqkNvcj09HOIgkcdFEGDlySa/ijBAvLTqm7S1XMnA/LguXxf woyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z4DLMcLU; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qc12-20020a05620a654c00b0077efb9691a0si4336021qkn.189.2023.12.03.16.31.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Dec 2023 16:31:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z4DLMcLU; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9woH-0005s5-3k; Sun, 03 Dec 2023 19:27:41 -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 1r9wnq-0004qX-FT; Sun, 03 Dec 2023 19:27:14 -0500 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9wnk-0000Hl-TJ; Sun, 03 Dec 2023 19:27:14 -0500 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-5d4f71f7e9fso24242957b3.0; Sun, 03 Dec 2023 16:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701649627; x=1702254427; 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=mcF9QghvfuN/SOxiRcej/fFnaurGCk30s1qkfL8vZWQ=; b=Z4DLMcLUJwiSYZyohWg5T7LgHjVcHcn2KmhzgZuJ/KSDwcDbbsCLzL1mP5xjCCkttc DqHAs6qWNeCGjtrFDWnHoXpM0K9IyaY260c5Yfvyr0WAvai45aXzcaISPpYK72z9yDnl 7neAJ+hxcIukXnF6VIdjXSSlMbfFWMtyj50atw6ppgy/KTaZlAAI668mD8G42bLk9D4t 3TB7bp8CRMvbCj2XAFh62j+AjjX1dS+4hTpN4bok8ROXzF+hiFfccpCgmKtLWVPvagBZ TijOHCqH6Byw46XIP+jNxek3SFiXatLQJOK2sE72mIhRaqsp6pDFlaR7BX62NsfBQOc7 Vpng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701649627; x=1702254427; 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=mcF9QghvfuN/SOxiRcej/fFnaurGCk30s1qkfL8vZWQ=; b=HYK3m4CFuxk0T+fjVtXxhEIRqVM0pvGrcWPt8oQREAE7AAz3G9+ZG1cizWN389vpuk SwSNN+S9C8kStmgY+F0eLMcqSwowWuOxM7LJste5oPwZ8A2EL9G2jRj3jLsB7WNXpAz8 QDd7RExZ8RP3EqGNmhqnLcP2+KU2F2OE9x9OCz9PsKmDRPUqAQR83ElOpYypYEDL8uQ0 Scm2G9H3hA3rHP/v7L1Jizyygpy3g35izwB597r5GzGCC8uEQxl8s8K0DoVxeR++I2tG /h6rcwsj/ZVkVuG/aY/YqBSTVf+JD0o+IuIaA04md98NDkQfE5jfizCp1cn6rL8hZxEI u7xg== X-Gm-Message-State: AOJu0Yy3+3qAXXQinPxmbzZm3J29JFFm9Jz0K281wOkPwVlqn6cBCs6z t/xJ+g9vqVhkOj8neihFvkYuQK04MyrA0w== X-Received: by 2002:a81:ac48:0:b0:5d7:1940:dd74 with SMTP id z8-20020a81ac48000000b005d71940dd74mr1930294ywj.74.1701649627201; Sun, 03 Dec 2023 16:27:07 -0800 (PST) Received: from localhost.localdomain ([201.206.180.22]) by smtp.gmail.com with ESMTPSA id l63-20020a0de242000000b005d3e6ce07e7sm2443187ywe.6.2023.12.03.16.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 16:27:06 -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 v3 34/45] Add Rpi4b boot tests Date: Sun, 3 Dec 2023 18:26:08 -0600 Message-Id: <20231204002619.1367044-35-sergey.kambalin@auriga.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231204002619.1367044-1-sergey.kambalin@auriga.com> References: <20231204002619.1367044-1-sergey.kambalin@auriga.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1134; envelope-from=serg.oker@gmail.com; helo=mail-yw1-x1134.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-arm@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-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: tMsup7VcZKfT 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 6eab515718..62aac02bbb 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() + def test_arm_raspi4(self): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:raspi4b2g + :avocado: tags=device:pl011 + :avocado: tags=accel:tcg + :avocado: tags=rpi4b + + 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 = ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20230106-1_arm64.deb') + deb_hash = '08dc55696535b18a6d4fe6fa10d4c0d905cbb2ed' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, '/boot/kernel8.img') + dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-b.dtb') + + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=pl011,mmio32,0xfe201000 ' + + 'console=ttyAMA0,115200 ' + + 'root=/dev/mmcblk1p2 rootwait ' + + 'dwc_otg.fiq_fsm_enable=0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line, + '-device', 'qemu-xhci,bus=pcie.1,id=xhci', + '-device', 'usb-kbd,bus=xhci.0') + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + console_pattern = 'Product: QEMU USB Keyboard' + self.wait_for_console_pattern(console_pattern) + + + def test_arm_raspi4_initrd(self): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:raspi4b2g + :avocado: tags=device:pl011 + :avocado: tags=accel:tcg + :avocado: tags=rpi4b + + 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 = ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20230106-1_arm64.deb') + deb_hash = '08dc55696535b18a6d4fe6fa10d4c0d905cbb2ed' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, '/boot/kernel8.img') + dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-b.dtb') + + initrd_url = ('https://github.com/groeck/linux-build-test/raw/' + '86b2be1384d41c8c388e63078a847f1e1c4cb1de/rootfs/' + 'arm64/rootfs.cpio.gz') + initrd_hash = 'f3d4f9fa92a49aa542f1b44d34be77bbf8ca5b9d' + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path = os.path.join(self.workdir, 'rootfs.cpio') + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=pl011,mmio32,0xfe201000 ' + + 'console=ttyAMA0,115200 ' + + 'panic=-1 noreboot ' + + 'dwc_otg.fiq_fsm_enable=0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-device', 'qemu-xhci,bus=pcie.1,id=xhci', + '-device', 'usb-kbd,bus=xhci.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 halted') + # TODO: Raspberry Pi4 doesn't shut down properly with recent kernels + # Wait for VM to shut down gracefully + #self.vm.wait() + def test_arm_exynos4210_initrd(self): """ :avocado: tags=arch:arm -- 2.34.1