Received: by 2002:a17:906:e92:b0:a3e:79c1:d636 with SMTP id p18csp1762595ejf; Sun, 25 Feb 2024 16:05:32 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXD2gjLmIWO4/QYndRaLCT3RgSGSxM96w6clUconR/ghGSDh2voUZxU/3Oha+AjdCR5WR/jIyH62Yw6O/2cFelFkrV70BEt X-Google-Smtp-Source: AGHT+IHJSx07pgnoiUMxy31lKG65SEcyvHdfLAP0CPq7SXQjAhWf63VjvAWUJHvw8qIZRuWTGCfX X-Received: by 2002:a05:620a:8d9:b0:787:7d07:c91d with SMTP id z25-20020a05620a08d900b007877d07c91dmr5410694qkz.77.1708905931990; Sun, 25 Feb 2024 16:05:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708905931; cv=none; d=google.com; s=arc-20160816; b=zXoCXewXJjbNXsT0QM1l+F2F++bsedJAN8FoLogPiZB/XC3NDn/q1VB4ONVPeb2ssI QGvxppcnCwowyQTxPMqrz7ixeeexLJPovoMVIygKq3dby2CoTOvEEAwuq+zBqNlWniPr zzoaSg1DCKOcHxUUUaDJCqxVhJIw74tnWYT2/kSlmHZ9oKFFCVLan4jr7nwS/EkYXi3N kn/z62Z9jMgSoBBCrcJfdE9C4jiVkz8dwJsjxlfAbUZtOm73rsb8ZjbYVE5Psqm3aqIo uXhRhebpWQJW+Gm77Ee+Nwi7nZxugZH3ZyLcibt5QKza6A1K/MWn93AdqDPQ9gWlkBKg rxhA== 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=wwyrNxzUk6DFg1jGtMujWHpBnYqnB9ANI0mGns0fyyU=; fh=1CWWAdYo81brd4jeYOgzhc83mN/ncVbe89i2SJzFql0=; b=nsuX0BwValfHlLalLVNxqjU9FnAmNxGVeNKEFjanaP7T+7Z2J05C/ItdVPqKdefJ8C jFfxD4ynbLlJUeMtuLX1h4CywGOW/PIACd3nmM1xDE/MpxfdYps4XSLA4lkHKGtR3D68 IYewPyrfzvT2KrILYtVlP4FQgm5wicr2W28YiHHpBNROCe4RRfYdlSHlrNimS0dbEe8c MN0Ikq+Qr1bxEd7Ixqq9f6u4uiaDWFJE77ysGPbTW6r/dgH8eMRN29i7sCwzRC9vWWDM 90W5Q8qvgRkR6hYsrgulUrHcgntFxFS68NLyCrWT+I47LVS6Gmdwsvzyt1bWYJSA/zVi GtxA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=S01RO5zw; 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 y17-20020a05620a09d100b00787acad01b8si3837300qky.152.2024.02.25.16.05.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Feb 2024 16:05:31 -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=S01RO5zw; 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 1reOTv-0007WG-Ij; Sun, 25 Feb 2024 19:04: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 1reOT8-0006ta-7L; Sun, 25 Feb 2024 19:03:42 -0500 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reOT6-0000Xh-7e; Sun, 25 Feb 2024 19:03:41 -0500 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-608ccac1899so18581457b3.1; Sun, 25 Feb 2024 16:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708905819; x=1709510619; 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=wwyrNxzUk6DFg1jGtMujWHpBnYqnB9ANI0mGns0fyyU=; b=S01RO5zwoaEfqyxxlDUUU/9FV5IOH2B8Yleww76TUkxcPIT2LhYvxIo7GQWrtaKRXg aBi0J5hXuo3OQubWG3NVXYeTYMy9k35qb3pEBH414KDS5HN6YaNKvhd3NOabTlq7Aw1X fTdnfA+w5PBT2Q5hSzQ/V03F6qejhd0EZgesDR4SmmMDQL7eSTyyLg6QHGlVwIkoCMsb wt/wIyMwH06vj74XhFu7WcwLX04XqwkkZTx8S7/GitNXCi9wuRPBH1KIqz3BH8l9XrTA uc0qP1UakW/ZbCPHDrtl4MNIaRya6M/IT/f1vQf6elH50eh+3H1poQuqCz966OvEu3XB gfcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708905819; x=1709510619; 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=wwyrNxzUk6DFg1jGtMujWHpBnYqnB9ANI0mGns0fyyU=; b=V7FTHlzU5qJZKDhCeQi5NrbHWDky/1ftPsJLzqkNeMXq2Rr9siKwHl/oR6ky7NPaGO h7YA6svlyRvxu4G9O8uXA+gv8D21JztJTkgO5pNBOc5pAJnDVj+pZ0OxfHH30Oa/ffsU lXaGa9wF4sEw3akAA53WGYE+GNgxV8SXpjfWP7iOBh8NJ1EXcwrLV59ZTCPK7CTSxZMo tmqzJisB/dsnT4EvN1rM7HhT4FPEaeIRv9LkelvgU/oN4pPUg7AzPfBeukuSrDKI/a6h DAuTX177gbTOUIPUzmE6pJ63SAbBdVgtt1oU0HEZMPVpzuE93+9tMsDXFfeiqztKFFRa nCUw== X-Gm-Message-State: AOJu0YziBgZcPR1IBPYWfYFebVzCgzSLkb9zYUYT0TDb4RO3B8HPNU8G o81T6QaqcFm23fYGl0zr3nA2Q6W8VbhxLYT9hl53kpxWmLVfP3yCpg0JRgw9IYD4dw== X-Received: by 2002:a0d:cc51:0:b0:608:ecf2:bd28 with SMTP id o78-20020a0dcc51000000b00608ecf2bd28mr1466849ywd.28.1708905818654; Sun, 25 Feb 2024 16:03:38 -0800 (PST) Received: from localhost.localdomain ([201.203.117.224]) by smtp.gmail.com with ESMTPSA id t18-20020a818312000000b00607bfa1913csm938171ywf.114.2024.02.25.16.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 16:03:38 -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 v6 30/41] Add Rpi4b boot tests Date: Sun, 25 Feb 2024 18:02:48 -0600 Message-Id: <20240226000259.2752893-31-sergey.kambalin@auriga.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240226000259.2752893-1-sergey.kambalin@auriga.com> References: <20240226000259.2752893-1-sergey.kambalin@auriga.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::112f; envelope-from=serg.oker@gmail.com; helo=mail-yw1-x112f.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: jpOtsptN/vfN 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 a00202df3c..f5ec6de0f1 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:raspi4b-2g + :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:raspi4b-2g + :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