From nobody Wed Apr 2 02:01:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1569520661; cv=none; d=zoho.com; s=zohoarc; b=Bw9e5ITh4npS4gL+IADpG+8E2xlb8GT9A9FEdeFe0koQRXrBpJcZ+9PKn88z/EOygfDTo0t+LAbfIIYJyzX8ARmwLcaAOhgaxkzMFEIQ5A00qG4t1Mhv4bPe/b8new0E1/MbYtAJe3loDomQuESm4Ng5q0XbsbsBhvXdFGLbCP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569520661; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xoacbOd8UyUj66KJoz5CJtwAwcD7yLUS/+XI1DIJ904=; b=UEo1jv6ii9qN0fqkvfhBcNd5m0uqUqlACEDPsMZ7rzfVa/eulNs39rhP4eR3z4yvGmCiy4gxgezn2InFSPQMxEr1fXVHlFVGMDM3doRDLqhcQDzibI6aBkgM/xRuTh0vFiAlDHKlMSTtZC9UA9T9arXj33ljvy28Qs9nWbYPgFY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569520661134851.5271343722856; Thu, 26 Sep 2019 10:57:41 -0700 (PDT) Received: from localhost ([::1]:41940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDY1G-0007Ey-LM for importer@patchew.org; Thu, 26 Sep 2019 13:57:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59176) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDXgZ-0004s2-KU for qemu-devel@nongnu.org; Thu, 26 Sep 2019 13:36:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDXgW-00038e-0p for qemu-devel@nongnu.org; Thu, 26 Sep 2019 13:36:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDXgV-00038R-R9; Thu, 26 Sep 2019 13:36:07 -0400 Received: by mail-wr1-f67.google.com with SMTP id h7so3426437wrw.8; Thu, 26 Sep 2019 10:36:07 -0700 (PDT) Received: from x1w.redhat.com (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id b186sm9918980wmd.16.2019.09.26.10.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 10:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xoacbOd8UyUj66KJoz5CJtwAwcD7yLUS/+XI1DIJ904=; b=aZSw6xRUhvHOfj9MMOOIGfrU6BTC5zijJNv2xZTIZ7wMOLihCJuaT9H4eo4dfhufnl 1fxMe56/zUJGGEe3qR5HBcPANG13kg6fPUnWRRVYqAZOKwhin7E4P0wAEGOy916FEZKk e4kqZb8vizTJ4Sq86vDg1gg9kdgYUhkHlXPM0nnTeEhilaVxRzcOjcdkzF//egLJpaz1 Sqxl89uX/sw2W1tPHEa9pSsDRCrOkLY71Acgcu7XSrFhqkbMZTlzE0pSNyYh2fZKW4oz BjsSKYAHcJuZr5PWcszl3HV8zN/B9ztOBP/Rz6GnlwitXIB7Wv11lqnjmGw4s7sDPBiB khUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xoacbOd8UyUj66KJoz5CJtwAwcD7yLUS/+XI1DIJ904=; b=KMzUDqQAg1SCE8Cv5XhLt5N3llDmuDJc8291p9PAhzbpceZXzbjVNBSC5hTDDuksAz s5Li2jlehQk5kE1XgFJRvT1EKN4uFrmMcTFpAOimeRKx+Xs9HEuOMeoU8Y5c0oLgAY5K oXVULLoACGDGT/uAX5uKJNuGL7w/lldnBMfM3uUHv0UZHnJHKUHKIXNCe/6qhJ8X/SCi l0BbSAGwuVY1SFaR3p/5Wgbo+pffkzTYHN0rQR7UN9VFBI+m94uK+RiHiE+4zm8vsHDx SYXRtnVKLEy4QCr4+M2DOk/y2P8b9Y+14opfuvFiRykxeaqdDGDqA46wiIuW+ddZWVx5 vkoQ== X-Gm-Message-State: APjAAAWRTQqJ7ExdgPOFrXE5urMlG5cCLaNr4mf8Lhtfiosy3gEotsBz pJ2biSSsuw8VUjz/gCnV89WB2vlMKwE= X-Google-Smtp-Source: APXvYqwoyS2ioBkz0dl3A6iyTnSJnuWhlA3zhW9aYOckS4DI6CISJaxH8vgC9eMXcfY9xHaH5XgFVA== X-Received: by 2002:adf:de0d:: with SMTP id b13mr3824717wrm.140.1569519306690; Thu, 26 Sep 2019 10:35:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 16/19] tests/boot_linux_console: Add a test for the Raspberry Pi 2 Date: Thu, 26 Sep 2019 19:34:24 +0200 Message-Id: <20190926173428.10713-17-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190926173428.10713-1-f4bug@amsat.org> References: <20190926173428.10713-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.67 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Zolt=C3=A1n=20Baldaszti?= , Laurent Bonnans , Esteban Bosse , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, Clement Deschamps , Cleber Rosa , Paolo Bonzini , Cheng Xiang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pekka Enberg , Guenter Roeck , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Similar to the x86_64/pc test, it boots a Linux kernel on a raspi2 board and verify the serial is working. The kernel image and DeviceTree blob are built by the Raspbian project (based on Debian): https://www.raspbian.org/RaspbianImages as recommended by the Raspberry Pi project: https://www.raspberrypi.org/downloads/raspbian/ If ARM is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:arm" tags. Alternatively, this test can be run using: $ avocado run -t arch:arm tests/acceptance $ avocado run -t machine:raspi2 tests/acceptance Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- v3: removed debug printf (Cleber) use serial_kernel_cmdline dict --- tests/acceptance/boot_linux_console.py | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 079590f0c8..7eaf6cb60e 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -318,6 +318,42 @@ class BootLinuxConsole(Test): self.vm.launch() self.wait_for_console_pattern('init started: BusyBox') =20 + def do_test_arm_raspi2(self, uart_id): + """ + 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 + """ + serial_kernel_cmdline =3D { + 0: 'earlycon=3Dpl011,0x3f201000 console=3DttyAMA0', + } + deb_url =3D ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20190215-1_armhf.deb') + deb_hash =3D 'cd284220b32128c5084037553db3c482426f3972' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') + + self.vm.set_machine('raspi2') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + serial_kernel_cmdline[uart_id]) + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + + def test_arm_raspi2_uart0(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:raspi2 + :avocado: tags=3Ddevice:pl011 + """ + self.do_test_arm_raspi2(0) + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.20.1