* [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests
@ 2019-12-17 18:27 Philippe Mathieu-Daudé
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-17 18:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Niek Linnenbank, qemu-arm, Cleber Rosa, Guenter Roeck
This series collect the examples given by Niek on:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg665532.html
Based-on: <20191216233519.29030-1-nieklinnenbank@gmail.com>
Philippe Mathieu-Daudé (5):
tests/boot_linux_console: Add a quick test for the OrangePi PC board
tests/boot_linux_console: Add initrd test for the Orange Pi PC board
tests/boot_linux_console: Add a SD card test for the OrangePi PC board
!fixup "hw: arm: add Xunlong Orange Pi PC machine"
tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi
PC
hw/arm/orangepi.c | 1 +
tests/acceptance/boot_linux_console.py | 150 +++++++++++++++++++++++++
2 files changed, 151 insertions(+)
--
2.21.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
@ 2019-12-17 18:27 ` Philippe Mathieu-Daudé
2019-12-18 21:20 ` Niek Linnenbank
` (2 more replies)
2019-12-17 18:27 ` [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi " Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 3 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-17 18:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Niek Linnenbank, qemu-arm, Cleber Rosa, Guenter Roeck
This test boots a Linux kernel on a OrangePi PC board and verify
the serial output is working.
The kernel image and DeviceTree blob are built by the Raspbian
project (based on Debian):
https://www.raspbian.org/RaspbianImages
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:
$ make check-venv
$ ./tests/venv/bin/avocado --show=console,app run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
JOB ID : 2e4d15eceb13c33672af406f08171e6e9de1414a
JOB LOG : ~/job-results/job-2019-12-17T05.46-2e4d15e/job.log
(1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
console: Uncompressing Linux... done, booting the kernel.
console: Booting Linux on physical CPU 0x0
console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
console: CPU: div instructions available: patching division code
console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
console: OF: fdt: Machine model: Xunlong Orange Pi PC
console: Memory policy: Data cache writealloc
console: OF: reserved mem: failed to allocate memory for node 'cma@4a000000'
console: cma: Failed to reserve 128 MiB
console: psci: probing for conduit method from DT.
console: psci: PSCIv0.2 detected in firmware.
console: psci: Using standard PSCI v0.2 function IDs
console: psci: Trusted OS migration not required
console: random: get_random_bytes called from start_kernel+0x8d/0x3c2 with crng_init=0
console: percpu: Embedded 18 pages/cpu @(ptrval) s41228 r8192 d24308 u73728
console: Built 1 zonelists, mobility grouping on. Total pages: 32480
console: Kernel command line: printk.time=0 console=ttyS0,115200
PASS (8.59 s)
JOB TIME : 8.81 s
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 7e41cebd47..820239e439 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -411,6 +411,32 @@ class BootLinuxConsole(Test):
self.wait_for_console_pattern('Boot successful.')
# TODO user command, for now the uart is stuck
+ def test_arm_orangepi(self):
+ """
+ :avocado: tags=arch:arm
+ :avocado: tags=machine:orangepi-pc
+ """
+ deb_url = ('https://apt.armbian.com/pool/main/l/'
+ 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
+ deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+ deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
+ kernel_path = self.extract_from_deb(deb_path,
+ '/boot/vmlinuz-4.20.7-sunxi')
+ dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+ dtb_path = self.extract_from_deb(deb_path, dtb_path)
+
+ self.vm.set_machine('orangepi-pc')
+ self.vm.set_console()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0,115200n8 '
+ 'earlycon=uart,mmio32,0x1c28000')
+ self.vm.add_args('-kernel', kernel_path,
+ '-dtb', dtb_path,
+ '-append', kernel_command_line)
+ self.vm.launch()
+ console_pattern = 'Kernel command line: %s' % kernel_command_line
+ self.wait_for_console_pattern(console_pattern)
+
def test_s390x_s390_ccw_virtio(self):
"""
:avocado: tags=arch:s390x
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi PC board
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
@ 2019-12-17 18:27 ` Philippe Mathieu-Daudé
2019-12-18 21:21 ` Niek Linnenbank
2019-12-19 18:22 ` Cleber Rosa
2019-12-17 18:27 ` [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi " Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 2 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-17 18:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Niek Linnenbank, qemu-arm, Cleber Rosa,
Philippe Mathieu-Daudé,
Guenter Roeck
This test boots a Linux kernel on a OrangePi PC board and verify
the serial output is working.
The kernel image and DeviceTree blob are built by the Raspbian
project (based on Debian):
https://www.raspbian.org/RaspbianImages
The cpio image used comes from the linux-build-test project:
https://github.com/groeck/linux-build-test
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 --show=console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
console: Uncompressing Linux... done, booting the kernel.
console: Booting Linux on physical CPU 0x0
console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
console: CPU: div instructions available: patching division code
console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
console: OF: fdt: Machine model: Xunlong Orange Pi PC
[...]
console: Trying to unpack rootfs image as initramfs...
console: Freeing initrd memory: 3256K
console: Freeing unused kernel memory: 1024K
console: Run /init as init process
console: mount: mounting devtmpfs on /dev failed: Device or resource busy
console: Starting logging: OK
console: Initializing random number generator... random: dd: uninitialized urandom read (512 bytes read)
console: done.
console: Starting network: OK
console: Found console ttyS0
console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
console: Boot successful.
console: cat /proc/cpuinfo
console: / # cat /proc/cpuinfo
console: processor : 0
console: model name : ARMv7 Processor rev 5 (v7l)
console: BogoMIPS : 125.00
console: Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
console: CPU implementer : 0x41
console: CPU architecture: 7
console: CPU variant : 0x0
console: CPU part : 0xc07
console: CPU revision : 5
[...]
console: processor : 3
console: model name : ARMv7 Processor rev 5 (v7l)
console: BogoMIPS : 125.00
console: Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
console: CPU implementer : 0x41
console: CPU architecture: 7
console: CPU variant : 0x0
console: CPU part : 0xc07
console: CPU revision : 5
console: Hardware : Allwinner sun8i Family
console: Revision : 0000
console: Serial : 0000000000000000
console: cat /proc/iomem
console: / # cat /proc/iomem
console: 01000000-010fffff : clock@1000000
console: 01c00000-01c00fff : system-control@1c00000
console: 01c02000-01c02fff : dma-controller@1c02000
[...]
console: reboot
console: / # reboot
console: / # Found console ttyS0
console: Stopping network: OK
console: hrtimer: interrupt took 21852064 ns
console: Saving random seed... random: dd: uninitialized urandom read (512 bytes read)
console: done.
console: Stopping logging: OK
console: umount: devtmpfs busy - remounted read-only
console: umount: can't unmount /: Invalid argument
console: The system is going down NOW!
console: Sent SIGTERM to all processes
console: Sent SIGKILL to all processes
console: Requesting system reboot
console: reboot: Restarting system
PASS (48.32 s)
JOB TIME : 49.16 s
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 820239e439..daabd47404 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -437,6 +437,47 @@ class BootLinuxConsole(Test):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
+ def test_arm_orangepi_initrd(self):
+ """
+ :avocado: tags=arch:arm
+ :avocado: tags=machine:orangepi-pc
+ """
+ deb_url = ('https://apt.armbian.com/pool/main/l/'
+ 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
+ deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+ deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
+ kernel_path = self.extract_from_deb(deb_path,
+ '/boot/vmlinuz-4.20.7-sunxi')
+ dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+ dtb_path = self.extract_from_deb(deb_path, dtb_path)
+ initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
+ '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
+ 'arm/rootfs-armv7a.cpio.gz')
+ initrd_hash = '604b2e45cdf35045846b8bbfbf2129b1891bdc9c'
+ 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_machine('orangepi-pc')
+ self.vm.set_console()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0,115200 '
+ 'panic=-1 noreboot')
+ self.vm.add_args('-kernel', kernel_path,
+ '-dtb', dtb_path,
+ '-initrd', initrd_path,
+ '-append', kernel_command_line,
+ '-no-reboot')
+ self.vm.launch()
+ self.wait_for_console_pattern('Boot successful.')
+
+ exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
+ 'Allwinner sun8i Family')
+ exec_command_and_wait_for_pattern(self, 'cat /proc/iomem',
+ 'system-control@1c00000')
+ exec_command_and_wait_for_pattern(self, 'reboot',
+ 'reboot: Restarting system')
+
def test_s390x_s390_ccw_virtio(self):
"""
:avocado: tags=arch:s390x
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi PC board
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
2019-12-17 18:27 ` [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi " Philippe Mathieu-Daudé
@ 2019-12-17 18:27 ` Philippe Mathieu-Daudé
2019-12-18 21:22 ` Niek Linnenbank
2019-12-19 20:04 ` Cleber Rosa
2019-12-17 18:27 ` [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine" Philippe Mathieu-Daudé
2019-12-17 18:27 ` [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Philippe Mathieu-Daudé
4 siblings, 2 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-17 18:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Niek Linnenbank, qemu-arm, Cleber Rosa, Guenter Roeck
The kernel image and DeviceTree blob are built by the Raspbian
project (based on Debian):
https://www.raspbian.org/RaspbianImages
The SD image is from the kernelci.org project:
https://kernelci.org/faq/#the-code
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 --show=console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
console: Uncompressing Linux... done, booting the kernel.
console: Booting Linux on physical CPU 0x0
console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
[...]
console: sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
console: sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
console: sunxi-mmc 1c0f000.mmc: Got CD GPIO
console: ledtrig-cpu: registered to indicate activity on CPUs
console: hidraw: raw HID events driver (C) Jiri Kosina
console: usbcore: registered new interface driver usbhid
console: usbhid: USB HID core driver
console: Initializing XFRM netlink socket
console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
console: NET: Registered protocol family 10
console: mmc0: host does not support reading read-only switch, assuming write-enable
console: mmc0: Problem switching card into high-speed mode!
console: mmc0: new SD card at address 4567
console: mmcblk0: mmc0:4567 QEMU! 60.0 MiB
[...]
console: EXT4-fs (mmcblk0): mounting ext2 file system using the ext4 subsystem
console: EXT4-fs (mmcblk0): mounted filesystem without journal. Opts: (null)
console: VFS: Mounted root (ext2 filesystem) on device 179:0.
console: Run /sbin/init as init process
console: EXT4-fs (mmcblk0): re-mounted. Opts: block_validity,barrier,user_xattr,acl
console: Starting syslogd: OK
console: Starting klogd: OK
console: Populating /dev using udev: udevd[203]: starting version 3.2.7
console: /bin/sh: can't access tty; job control turned off
console: cat /proc/partitions
console: / # cat /proc/partitions
console: major minor #blocks name
console: 1 0 4096 ram0
console: 1 1 4096 ram1
console: 1 2 4096 ram2
console: 1 3 4096 ram3
console: 179 0 61440 mmcblk0
console: reboot
console: / # reboot
console: umount: devtmpfs busy - remounted read-only
console: EXT4-fs (mmcblk0): re-mounted. Opts: (null)
console: The system is going down NOW!
console: Sent SIGTERM to all processes
console: Sent SIGKILL to all processes
console: Requesting system reboot
console: reboot: Restarting system
JOB TIME : 68.64 s
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tests/acceptance/boot_linux_console.py | 42 ++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index daabd47404..8179b45910 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -478,6 +478,48 @@ class BootLinuxConsole(Test):
exec_command_and_wait_for_pattern(self, 'reboot',
'reboot: Restarting system')
+ def test_arm_orangepi_sd(self):
+ """
+ :avocado: tags=arch:arm
+ :avocado: tags=machine:orangepi-pc
+ """
+ deb_url = ('https://apt.armbian.com/pool/main/l/'
+ 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
+ deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+ deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
+ kernel_path = self.extract_from_deb(deb_path,
+ '/boot/vmlinuz-4.20.7-sunxi')
+ dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+ dtb_path = self.extract_from_deb(deb_path, dtb_path)
+ rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'
+ 'kci-2019.02/armel/base/rootfs.ext2.xz')
+ rootfs_hash = '692510cb625efda31640d1de0a8d60e26040f061'
+ rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash)
+ rootfs_path = os.path.join(self.workdir, 'rootfs.cpio')
+ archive.lzma_uncompress(rootfs_path_xz, rootfs_path)
+
+ self.vm.set_machine('orangepi-pc')
+ self.vm.set_console()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0,115200 '
+ 'root=/dev/mmcblk0 rootwait rw '
+ 'panic=-1 noreboot')
+ self.vm.add_args('-kernel', kernel_path,
+ '-dtb', dtb_path,
+ '-drive', 'file=' + rootfs_path + ',if=sd,format=raw',
+ '-append', kernel_command_line,
+ '-no-reboot')
+ self.vm.launch()
+ shell_ready = "/bin/sh: can't access tty; job control turned off"
+ self.wait_for_console_pattern(shell_ready)
+
+ exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
+ 'Allwinner sun8i Family')
+ exec_command_and_wait_for_pattern(self, 'cat /proc/partitions',
+ 'mmcblk0')
+ exec_command_and_wait_for_pattern(self, 'reboot',
+ 'reboot: Restarting system')
+
def test_s390x_s390_ccw_virtio(self):
"""
:avocado: tags=arch:s390x
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine"
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2019-12-17 18:27 ` [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi " Philippe Mathieu-Daudé
@ 2019-12-17 18:27 ` Philippe Mathieu-Daudé
2019-12-18 21:23 ` Niek Linnenbank
2019-12-17 18:27 ` [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Philippe Mathieu-Daudé
4 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-17 18:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Niek Linnenbank, qemu-arm, Cleber Rosa, Guenter Roeck
Without this, the machine starts with default 128MB, and Ubuntu Bionic
fails:
[ *** ] (2 of 4) A start job is running for…Persistent Storage (37s / 2min 1s)
[ *** ] (2 of 4) A start job is running for…Persistent Storage (38s / 2min 1s)
[ OK ] Started Flush Journal to Persistent Storage.
Starting Create Volatile Files and Directories...
Starting Armbian ZRAM config...
[ **] (3 of 6) A start job is running for…s and Directories (55s / no limit)
[ *] (3 of 6) A start job is running for…s and Directories (55s / no limit)
[ **] (3 of 6) A start job is running for…s and Directories (56s / no limit)
[ OK ] Started Create Volatile Files and Directories.
[*** ] (5 of 6) A start job is running for… ZRAM config (1min 10s / 1min 19s)
[** ] (5 of 6) A start job is running for… ZRAM config (1min 12s / 1min 19s)
[* ] (5 of 6) A start job is running for… ZRAM config (1min 13s / 1min 19s)
[FAILED] Failed to start Armbian ZRAM config.
See 'systemctl status armbian-zram-config.service' for details.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/arm/orangepi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index 119f370924..da758d7eba 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -122,6 +122,7 @@ static void orangepi_machine_init(MachineClass *mc)
mc->max_cpus = AW_H3_NUM_CPUS;
mc->default_cpus = AW_H3_NUM_CPUS;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a7");
+ mc->default_ram_size = 1 * GiB;
}
DEFINE_MACHINE("orangepi-pc", orangepi_machine_init)
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2019-12-17 18:27 ` [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine" Philippe Mathieu-Daudé
@ 2019-12-17 18:27 ` Philippe Mathieu-Daudé
2019-12-18 21:26 ` Niek Linnenbank
4 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-17 18:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Niek Linnenbank, qemu-arm, Cleber Rosa, Guenter Roeck
This test boots Ubuntu Bionic on a OrangePi PC board.
As it requires 1GB of storage, and is slow, this test is disabled
on automatic CI testing.
It is useful for workstation testing. Currently Avocado timeouts too
quickly, so we can't run userland commands.
The kernel image and DeviceTree blob are built by the Raspbian
project (based on Debian):
https://www.raspbian.org/RaspbianImages
The Ubuntu image is downloaded from:
https://dl.armbian.com/orangepipc/Bionic_current
This test can be run using:
$ AVOCADO_ALLOW_LARGE_STORAGE=yes \
avocado --show=app,console run -t machine:orangepi-pc \
tests/acceptance/boot_linux_console.py
console: Uncompressing Linux... done, booting the kernel.
console: Booting Linux on physical CPU 0x0
console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
console: CPU: div instructions available: patching division code
console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
console: OF: fdt: Machine model: Xunlong Orange Pi PC
[...]
console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
console: NET: Registered protocol family 10
console: mmc0: host does not support reading read-only switch, assuming write-enable
console: mmc0: Problem switching card into high-speed mode!
console: mmc0: new SD card at address 4567
console: mmcblk0: mmc0:4567 QEMU! 932 MiB
console: Segment Routing with IPv6
console: NET: Registered protocol family 17
console: NET: Registered protocol family 15
console: bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
console: 8021q: 802.1Q VLAN Support v1.8
console: Key type dns_resolver registered
console: Registering SWP/SWPB emulation handler
console: mmcblk0: p1
[...]
console: Freeing unused kernel memory: 1024K
console: Run /sbin/init as init process
console: random: fast init done
console: systemd[1]: System time before build time, advancing clock.
console: systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
console: systemd[1]: Detected architecture arm.
console: Welcome to Ubuntu 18.04.3 LTS!
console: systemd[1]: Set hostname to <orangepipc>.
console: random: systemd: uninitialized urandom read (16 bytes read)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
RFC because this is not the definitive test, but it is helpful so
for for testing Niek work.
---
tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 8179b45910..663290e0c7 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -520,6 +520,47 @@ class BootLinuxConsole(Test):
exec_command_and_wait_for_pattern(self, 'reboot',
'reboot: Restarting system')
+ @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
+ def test_arm_orangepi_bionic(self):
+ """
+ :avocado: tags=arch:arm
+ :avocado: tags=machine:orangepi-pc
+ """
+ # This test download a 196MB compressed image and expand it to 932MB...
+ deb_url = ('https://apt.armbian.com/pool/main/l/'
+ 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
+ deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+ deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
+ kernel_path = self.extract_from_deb(deb_path,
+ '/boot/vmlinuz-4.20.7-sunxi')
+ dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+ dtb_path = self.extract_from_deb(deb_path, dtb_path)
+ image_url = ('https://dl.armbian.com/orangepipc/archive/'
+ 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
+ image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
+ image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash)
+ image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
+ image_path = os.path.join(self.workdir, image_name)
+ archive.lzma_uncompress(image_path_xz, image_path)
+
+ self.vm.set_machine('orangepi-pc')
+ self.vm.set_console()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0,115200 '
+ 'root=/dev/mmcblk0p1 rootwait rw '
+ 'systemd.mask=dev-ttyS0.device '
+ 'systemd.mask=armbian-zram-config.service '
+ 'systemd.mask=armbian-ramlog.service')
+ self.vm.add_args('-kernel', kernel_path,
+ '-dtb', dtb_path,
+ '-drive', 'file=' + image_path + ',if=sd,format=raw',
+ '-append', kernel_command_line,
+ '-nic', 'user',
+ '-no-reboot')
+ self.vm.launch()
+ self.wait_for_console_pattern('Welcome to Ubuntu 18.04.3 LTS!')
+ self.wait_for_console_pattern('Started Armbian filesystem resize.')
+
def test_s390x_s390_ccw_virtio(self):
"""
:avocado: tags=arch:s390x
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
@ 2019-12-18 21:20 ` Niek Linnenbank
2019-12-19 1:05 ` Cleber Rosa
2019-12-21 18:22 ` Niek Linnenbank
2 siblings, 0 replies; 17+ messages in thread
From: Niek Linnenbank @ 2019-12-18 21:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-arm, QEMU Developers, Guenter Roeck, Cleber Rosa
[-- Attachment #1: Type: text/plain, Size: 4669 bytes --]
Hey Philippe,
Super!! Fantastic, now we can automatically test the H3 based boards
and use that to verify they keep working as expected when changing the code.
Great, I'm going to use these tests also from now on (previously I had some
small
bash scripts).
This quick test is working fine for me, so:
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Regards,
Niek
On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> This test boots a Linux kernel on a OrangePi PC board and verify
> the serial output is working.
>
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> 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:
>
> $ make check-venv
> $ ./tests/venv/bin/avocado --show=console,app run -t machine:orangepi-pc
> tests/acceptance/boot_linux_console.py
> JOB ID : 2e4d15eceb13c33672af406f08171e6e9de1414a
> JOB LOG : ~/job-results/job-2019-12-17T05.46-2e4d15e/job.log
> (1/1)
> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> console: CPU: div instructions available: patching division code
> console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> console: OF: fdt: Machine model: Xunlong Orange Pi PC
> console: Memory policy: Data cache writealloc
> console: OF: reserved mem: failed to allocate memory for node
> 'cma@4a000000'
> console: cma: Failed to reserve 128 MiB
> console: psci: probing for conduit method from DT.
> console: psci: PSCIv0.2 detected in firmware.
> console: psci: Using standard PSCI v0.2 function IDs
> console: psci: Trusted OS migration not required
> console: random: get_random_bytes called from start_kernel+0x8d/0x3c2
> with crng_init=0
> console: percpu: Embedded 18 pages/cpu @(ptrval) s41228 r8192 d24308
> u73728
> console: Built 1 zonelists, mobility grouping on. Total pages: 32480
> console: Kernel command line: printk.time=0 console=ttyS0,115200
> PASS (8.59 s)
> JOB TIME : 8.81 s
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> index 7e41cebd47..820239e439 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -411,6 +411,32 @@ class BootLinuxConsole(Test):
> self.wait_for_console_pattern('Boot successful.')
> # TODO user command, for now the uart is stuck
>
> + def test_arm_orangepi(self):
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> +
> 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path =
> '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> +
> + self.vm.set_machine('orangepi-pc')
> + self.vm.set_console()
> + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> + 'console=ttyS0,115200n8 '
> + 'earlycon=uart,mmio32,0x1c28000')
> + self.vm.add_args('-kernel', kernel_path,
> + '-dtb', dtb_path,
> + '-append', kernel_command_line)
> + self.vm.launch()
> + console_pattern = 'Kernel command line: %s' % kernel_command_line
> + self.wait_for_console_pattern(console_pattern)
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.21.0
>
>
--
Niek Linnenbank
[-- Attachment #2: Type: text/html, Size: 6122 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi PC board
2019-12-17 18:27 ` [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi " Philippe Mathieu-Daudé
@ 2019-12-18 21:21 ` Niek Linnenbank
2019-12-19 18:22 ` Cleber Rosa
1 sibling, 0 replies; 17+ messages in thread
From: Niek Linnenbank @ 2019-12-18 21:21 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, QEMU Developers, qemu-arm, Cleber Rosa,
Philippe Mathieu-Daudé,
Guenter Roeck
[-- Attachment #1: Type: text/plain, Size: 7164 bytes --]
This one also works fine on my host (Ubuntu 18.04 LTS):
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> This test boots a Linux kernel on a OrangePi PC board and verify
> the serial output is working.
>
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> The cpio image used comes from the linux-build-test project:
> https://github.com/groeck/linux-build-test
>
> 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 --show=console run -t machine:orangepi-pc
> tests/acceptance/boot_linux_console.py
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> console: CPU: div instructions available: patching division code
> console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> console: OF: fdt: Machine model: Xunlong Orange Pi PC
> [...]
> console: Trying to unpack rootfs image as initramfs...
> console: Freeing initrd memory: 3256K
> console: Freeing unused kernel memory: 1024K
> console: Run /init as init process
> console: mount: mounting devtmpfs on /dev failed: Device or resource busy
> console: Starting logging: OK
> console: Initializing random number generator... random: dd:
> uninitialized urandom read (512 bytes read)
> console: done.
> console: Starting network: OK
> console: Found console ttyS0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> 2019
> console: Boot successful.
> console: cat /proc/cpuinfo
> console: / # cat /proc/cpuinfo
> console: processor : 0
> console: model name : ARMv7 Processor rev 5 (v7l)
> console: BogoMIPS : 125.00
> console: Features : half thumb fastmult vfp edsp neon vfpv3 tls
> vfpv4 idiva idivt vfpd32 lpae evtstrm
> console: CPU implementer : 0x41
> console: CPU architecture: 7
> console: CPU variant : 0x0
> console: CPU part : 0xc07
> console: CPU revision : 5
> [...]
> console: processor : 3
> console: model name : ARMv7 Processor rev 5 (v7l)
> console: BogoMIPS : 125.00
> console: Features : half thumb fastmult vfp edsp neon vfpv3 tls
> vfpv4 idiva idivt vfpd32 lpae evtstrm
> console: CPU implementer : 0x41
> console: CPU architecture: 7
> console: CPU variant : 0x0
> console: CPU part : 0xc07
> console: CPU revision : 5
> console: Hardware : Allwinner sun8i Family
> console: Revision : 0000
> console: Serial : 0000000000000000
> console: cat /proc/iomem
> console: / # cat /proc/iomem
> console: 01000000-010fffff : clock@1000000
> console: 01c00000-01c00fff : system-control@1c00000
> console: 01c02000-01c02fff : dma-controller@1c02000
> [...]
> console: reboot
> console: / # reboot
> console: / # Found console ttyS0
> console: Stopping network: OK
> console: hrtimer: interrupt took 21852064 ns
> console: Saving random seed... random: dd: uninitialized urandom read
> (512 bytes read)
> console: done.
> console: Stopping logging: OK
> console: umount: devtmpfs busy - remounted read-only
> console: umount: can't unmount /: Invalid argument
> console: The system is going down NOW!
> console: Sent SIGTERM to all processes
> console: Sent SIGKILL to all processes
> console: Requesting system reboot
> console: reboot: Restarting system
> PASS (48.32 s)
> JOB TIME : 49.16 s
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> index 820239e439..daabd47404 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -437,6 +437,47 @@ class BootLinuxConsole(Test):
> console_pattern = 'Kernel command line: %s' % kernel_command_line
> self.wait_for_console_pattern(console_pattern)
>
> + def test_arm_orangepi_initrd(self):
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> +
> 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path =
> '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> + initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
> + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
> + 'arm/rootfs-armv7a.cpio.gz')
> + initrd_hash = '604b2e45cdf35045846b8bbfbf2129b1891bdc9c'
> + 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_machine('orangepi-pc')
> + self.vm.set_console()
> + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> + 'console=ttyS0,115200 '
> + 'panic=-1 noreboot')
> + self.vm.add_args('-kernel', kernel_path,
> + '-dtb', dtb_path,
> + '-initrd', initrd_path,
> + '-append', kernel_command_line,
> + '-no-reboot')
> + self.vm.launch()
> + self.wait_for_console_pattern('Boot successful.')
> +
> + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
> + 'Allwinner sun8i Family')
> + exec_command_and_wait_for_pattern(self, 'cat /proc/iomem',
> + 'system-control@1c00000')
> + exec_command_and_wait_for_pattern(self, 'reboot',
> + 'reboot: Restarting
> system')
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.21.0
>
>
--
Niek Linnenbank
[-- Attachment #2: Type: text/html, Size: 9164 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi PC board
2019-12-17 18:27 ` [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi " Philippe Mathieu-Daudé
@ 2019-12-18 21:22 ` Niek Linnenbank
2019-12-19 20:04 ` Cleber Rosa
1 sibling, 0 replies; 17+ messages in thread
From: Niek Linnenbank @ 2019-12-18 21:22 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-arm, QEMU Developers, Guenter Roeck, Cleber Rosa
[-- Attachment #1: Type: text/plain, Size: 6403 bytes --]
Same, this one also runs fine for me:
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> The SD image is from the kernelci.org project:
> https://kernelci.org/faq/#the-code
>
> 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 --show=console run -t machine:orangepi-pc
> tests/acceptance/boot_linux_console.py
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> [...]
> console: sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec,
> nowayout=0)
> console: sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
> console: sunxi-mmc 1c0f000.mmc: Got CD GPIO
> console: ledtrig-cpu: registered to indicate activity on CPUs
> console: hidraw: raw HID events driver (C) Jiri Kosina
> console: usbcore: registered new interface driver usbhid
> console: usbhid: USB HID core driver
> console: Initializing XFRM netlink socket
> console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
> console: NET: Registered protocol family 10
> console: mmc0: host does not support reading read-only switch, assuming
> write-enable
> console: mmc0: Problem switching card into high-speed mode!
> console: mmc0: new SD card at address 4567
> console: mmcblk0: mmc0:4567 QEMU! 60.0 MiB
> [...]
> console: EXT4-fs (mmcblk0): mounting ext2 file system using the ext4
> subsystem
> console: EXT4-fs (mmcblk0): mounted filesystem without journal. Opts:
> (null)
> console: VFS: Mounted root (ext2 filesystem) on device 179:0.
> console: Run /sbin/init as init process
> console: EXT4-fs (mmcblk0): re-mounted. Opts:
> block_validity,barrier,user_xattr,acl
> console: Starting syslogd: OK
> console: Starting klogd: OK
> console: Populating /dev using udev: udevd[203]: starting version 3.2.7
> console: /bin/sh: can't access tty; job control turned off
> console: cat /proc/partitions
> console: / # cat /proc/partitions
> console: major minor #blocks name
> console: 1 0 4096 ram0
> console: 1 1 4096 ram1
> console: 1 2 4096 ram2
> console: 1 3 4096 ram3
> console: 179 0 61440 mmcblk0
> console: reboot
> console: / # reboot
> console: umount: devtmpfs busy - remounted read-only
> console: EXT4-fs (mmcblk0): re-mounted. Opts: (null)
> console: The system is going down NOW!
> console: Sent SIGTERM to all processes
> console: Sent SIGKILL to all processes
> console: Requesting system reboot
> console: reboot: Restarting system
> JOB TIME : 68.64 s
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/acceptance/boot_linux_console.py | 42 ++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> index daabd47404..8179b45910 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -478,6 +478,48 @@ class BootLinuxConsole(Test):
> exec_command_and_wait_for_pattern(self, 'reboot',
> 'reboot: Restarting
> system')
>
> + def test_arm_orangepi_sd(self):
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> +
> 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path =
> '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> + rootfs_url = ('
> http://storage.kernelci.org/images/rootfs/buildroot/'
> + 'kci-2019.02/armel/base/rootfs.ext2.xz')
> + rootfs_hash = '692510cb625efda31640d1de0a8d60e26040f061'
> + rootfs_path_xz = self.fetch_asset(rootfs_url,
> asset_hash=rootfs_hash)
> + rootfs_path = os.path.join(self.workdir, 'rootfs.cpio')
> + archive.lzma_uncompress(rootfs_path_xz, rootfs_path)
> +
> + self.vm.set_machine('orangepi-pc')
> + self.vm.set_console()
> + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> + 'console=ttyS0,115200 '
> + 'root=/dev/mmcblk0 rootwait rw '
> + 'panic=-1 noreboot')
> + self.vm.add_args('-kernel', kernel_path,
> + '-dtb', dtb_path,
> + '-drive', 'file=' + rootfs_path +
> ',if=sd,format=raw',
> + '-append', kernel_command_line,
> + '-no-reboot')
> + self.vm.launch()
> + shell_ready = "/bin/sh: can't access tty; job control turned off"
> + self.wait_for_console_pattern(shell_ready)
> +
> + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
> + 'Allwinner sun8i Family')
> + exec_command_and_wait_for_pattern(self, 'cat /proc/partitions',
> + 'mmcblk0')
> + exec_command_and_wait_for_pattern(self, 'reboot',
> + 'reboot: Restarting
> system')
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.21.0
>
>
--
Niek Linnenbank
[-- Attachment #2: Type: text/html, Size: 8377 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine"
2019-12-17 18:27 ` [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine" Philippe Mathieu-Daudé
@ 2019-12-18 21:23 ` Niek Linnenbank
0 siblings, 0 replies; 17+ messages in thread
From: Niek Linnenbank @ 2019-12-18 21:23 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-arm, QEMU Developers, Guenter Roeck, Cleber Rosa
[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]
Hi Philippe,
Noted. I'll make sure mc->default_ram_size = 1 * GiB is added for the next
reworked patch set v3.
Regards,
Niek
On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> Without this, the machine starts with default 128MB, and Ubuntu Bionic
> fails:
>
> [ *** ] (2 of 4) A start job is running for…Persistent Storage (37s /
> 2min 1s)
> [ *** ] (2 of 4) A start job is running for…Persistent Storage (38s /
> 2min 1s)
> [ OK ] Started Flush Journal to Persistent Storage.
> Starting Create Volatile Files and Directories...
> Starting Armbian ZRAM config...
> [ **] (3 of 6) A start job is running for…s and Directories (55s / no
> limit)
> [ *] (3 of 6) A start job is running for…s and Directories (55s / no
> limit)
> [ **] (3 of 6) A start job is running for…s and Directories (56s / no
> limit)
> [ OK ] Started Create Volatile Files and Directories.
> [*** ] (5 of 6) A start job is running for… ZRAM config (1min 10s / 1min
> 19s)
> [** ] (5 of 6) A start job is running for… ZRAM config (1min 12s / 1min
> 19s)
> [* ] (5 of 6) A start job is running for… ZRAM config (1min 13s / 1min
> 19s)
> [FAILED] Failed to start Armbian ZRAM config.
> See 'systemctl status armbian-zram-config.service' for details.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/arm/orangepi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
> index 119f370924..da758d7eba 100644
> --- a/hw/arm/orangepi.c
> +++ b/hw/arm/orangepi.c
> @@ -122,6 +122,7 @@ static void orangepi_machine_init(MachineClass *mc)
> mc->max_cpus = AW_H3_NUM_CPUS;
> mc->default_cpus = AW_H3_NUM_CPUS;
> mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a7");
> + mc->default_ram_size = 1 * GiB;
> }
>
> DEFINE_MACHINE("orangepi-pc", orangepi_machine_init)
> --
> 2.21.0
>
>
--
Niek Linnenbank
[-- Attachment #2: Type: text/html, Size: 2623 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC
2019-12-17 18:27 ` [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Philippe Mathieu-Daudé
@ 2019-12-18 21:26 ` Niek Linnenbank
2019-12-19 22:54 ` Cleber Rosa
0 siblings, 1 reply; 17+ messages in thread
From: Niek Linnenbank @ 2019-12-18 21:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-arm, QEMU Developers, Guenter Roeck, Cleber Rosa
[-- Attachment #1: Type: text/plain, Size: 6627 bytes --]
Hi Philippe,
This test has some problems on my host (Ubuntu 18.04.3 LTS, avocado 73.0,
python 3.6.9):
(4/4) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic:
ERROR: Input format not supported by decoder (3.25 s)
RESULTS : PASS 3 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
| CANCEL 0
JOB TIME : 46.22 s
I suspect it didn't download the image correctly.
Regards,
Niek
On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> This test boots Ubuntu Bionic on a OrangePi PC board.
>
> As it requires 1GB of storage, and is slow, this test is disabled
> on automatic CI testing.
>
> It is useful for workstation testing. Currently Avocado timeouts too
> quickly, so we can't run userland commands.
>
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> The Ubuntu image is downloaded from:
> https://dl.armbian.com/orangepipc/Bionic_current
>
> This test can be run using:
>
> $ AVOCADO_ALLOW_LARGE_STORAGE=yes \
> avocado --show=app,console run -t machine:orangepi-pc \
> tests/acceptance/boot_linux_console.py
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> console: CPU: div instructions available: patching division code
> console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> console: OF: fdt: Machine model: Xunlong Orange Pi PC
> [...]
> console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
> console: NET: Registered protocol family 10
> console: mmc0: host does not support reading read-only switch, assuming
> write-enable
> console: mmc0: Problem switching card into high-speed mode!
> console: mmc0: new SD card at address 4567
> console: mmcblk0: mmc0:4567 QEMU! 932 MiB
> console: Segment Routing with IPv6
> console: NET: Registered protocol family 17
> console: NET: Registered protocol family 15
> console: bridge: filtering via arp/ip/ip6tables is no longer available
> by default. Update your scripts to load br_netfilter if you need this.
> console: 8021q: 802.1Q VLAN Support v1.8
> console: Key type dns_resolver registered
> console: Registering SWP/SWPB emulation handler
> console: mmcblk0: p1
> [...]
> console: Freeing unused kernel memory: 1024K
> console: Run /sbin/init as init process
> console: random: fast init done
> console: systemd[1]: System time before build time, advancing clock.
> console: systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT
> +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT
> +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2
> default-hierarchy=hybrid)
> console: systemd[1]: Detected architecture arm.
> console: Welcome to Ubuntu 18.04.3 LTS!
> console: systemd[1]: Set hostname to <orangepipc>.
> console: random: systemd: uninitialized urandom read (16 bytes read)
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> RFC because this is not the definitive test, but it is helpful so
> for for testing Niek work.
> ---
> tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> index 8179b45910..663290e0c7 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -520,6 +520,47 @@ class BootLinuxConsole(Test):
> exec_command_and_wait_for_pattern(self, 'reboot',
> 'reboot: Restarting
> system')
>
> + @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage
> limited')
> + def test_arm_orangepi_bionic(self):
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + # This test download a 196MB compressed image and expand it to
> 932MB...
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> +
> 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path =
> '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> + image_url = ('https://dl.armbian.com/orangepipc/archive/'
> + 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
> + image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
> + image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash)
> + image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
> + image_path = os.path.join(self.workdir, image_name)
> + archive.lzma_uncompress(image_path_xz, image_path)
> +
> + self.vm.set_machine('orangepi-pc')
> + self.vm.set_console()
> + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> + 'console=ttyS0,115200 '
> + 'root=/dev/mmcblk0p1 rootwait rw '
> + 'systemd.mask=dev-ttyS0.device '
> + 'systemd.mask=armbian-zram-config.service '
> + 'systemd.mask=armbian-ramlog.service')
> + self.vm.add_args('-kernel', kernel_path,
> + '-dtb', dtb_path,
> + '-drive', 'file=' + image_path +
> ',if=sd,format=raw',
> + '-append', kernel_command_line,
> + '-nic', 'user',
> + '-no-reboot')
> + self.vm.launch()
> + self.wait_for_console_pattern('Welcome to Ubuntu 18.04.3 LTS!')
> + self.wait_for_console_pattern('Started Armbian filesystem
> resize.')
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.21.0
>
>
--
Niek Linnenbank
[-- Attachment #2: Type: text/html, Size: 8445 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
2019-12-18 21:20 ` Niek Linnenbank
@ 2019-12-19 1:05 ` Cleber Rosa
2019-12-19 18:25 ` Cleber Rosa
2019-12-21 18:22 ` Niek Linnenbank
2 siblings, 1 reply; 17+ messages in thread
From: Cleber Rosa @ 2019-12-19 1:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, Niek Linnenbank, qemu-arm, qemu-devel, Guenter Roeck
[-- Attachment #1: Type: text/plain, Size: 4428 bytes --]
On Tue, Dec 17, 2019 at 07:27:26PM +0100, Philippe Mathieu-Daudé wrote:
> This test boots a Linux kernel on a OrangePi PC board and verify
> the serial output is working.
>
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> 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:
>
> $ make check-venv
> $ ./tests/venv/bin/avocado --show=console,app run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
> JOB ID : 2e4d15eceb13c33672af406f08171e6e9de1414a
> JOB LOG : ~/job-results/job-2019-12-17T05.46-2e4d15e/job.log
> (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> console: CPU: div instructions available: patching division code
> console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> console: OF: fdt: Machine model: Xunlong Orange Pi PC
> console: Memory policy: Data cache writealloc
> console: OF: reserved mem: failed to allocate memory for node 'cma@4a000000'
> console: cma: Failed to reserve 128 MiB
> console: psci: probing for conduit method from DT.
> console: psci: PSCIv0.2 detected in firmware.
> console: psci: Using standard PSCI v0.2 function IDs
> console: psci: Trusted OS migration not required
> console: random: get_random_bytes called from start_kernel+0x8d/0x3c2 with crng_init=0
> console: percpu: Embedded 18 pages/cpu @(ptrval) s41228 r8192 d24308 u73728
> console: Built 1 zonelists, mobility grouping on. Total pages: 32480
> console: Kernel command line: printk.time=0 console=ttyS0,115200
> PASS (8.59 s)
> JOB TIME : 8.81 s
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index 7e41cebd47..820239e439 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -411,6 +411,32 @@ class BootLinuxConsole(Test):
> self.wait_for_console_pattern('Boot successful.')
> # TODO user command, for now the uart is stuck
>
> + def test_arm_orangepi(self):
Maybe rename the test to include the full machine type? I mean,
"test_arm_orangepi_pc"?
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> + 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> +
> + self.vm.set_machine('orangepi-pc')
> + self.vm.set_console()
> + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> + 'console=ttyS0,115200n8 '
> + 'earlycon=uart,mmio32,0x1c28000')
> + self.vm.add_args('-kernel', kernel_path,
> + '-dtb', dtb_path,
> + '-append', kernel_command_line)
> + self.vm.launch()
> + console_pattern = 'Kernel command line: %s' % kernel_command_line
> + self.wait_for_console_pattern(console_pattern)
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.21.0
>
Either way,
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi PC board
2019-12-17 18:27 ` [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi " Philippe Mathieu-Daudé
2019-12-18 21:21 ` Niek Linnenbank
@ 2019-12-19 18:22 ` Cleber Rosa
1 sibling, 0 replies; 17+ messages in thread
From: Cleber Rosa @ 2019-12-19 18:22 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-devel, Niek Linnenbank, qemu-arm,
Philippe Mathieu-Daudé,
Guenter Roeck
[-- Attachment #1: Type: text/plain, Size: 6234 bytes --]
On Tue, Dec 17, 2019 at 07:27:27PM +0100, Philippe Mathieu-Daudé wrote:
> This test boots a Linux kernel on a OrangePi PC board and verify
> the serial output is working.
>
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> The cpio image used comes from the linux-build-test project:
> https://github.com/groeck/linux-build-test
>
> 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 --show=console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> console: CPU: div instructions available: patching division code
> console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> console: OF: fdt: Machine model: Xunlong Orange Pi PC
> [...]
> console: Trying to unpack rootfs image as initramfs...
> console: Freeing initrd memory: 3256K
> console: Freeing unused kernel memory: 1024K
> console: Run /init as init process
> console: mount: mounting devtmpfs on /dev failed: Device or resource busy
> console: Starting logging: OK
> console: Initializing random number generator... random: dd: uninitialized urandom read (512 bytes read)
> console: done.
> console: Starting network: OK
> console: Found console ttyS0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
> console: Boot successful.
> console: cat /proc/cpuinfo
> console: / # cat /proc/cpuinfo
> console: processor : 0
> console: model name : ARMv7 Processor rev 5 (v7l)
> console: BogoMIPS : 125.00
> console: Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
> console: CPU implementer : 0x41
> console: CPU architecture: 7
> console: CPU variant : 0x0
> console: CPU part : 0xc07
> console: CPU revision : 5
> [...]
> console: processor : 3
> console: model name : ARMv7 Processor rev 5 (v7l)
> console: BogoMIPS : 125.00
> console: Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
> console: CPU implementer : 0x41
> console: CPU architecture: 7
> console: CPU variant : 0x0
> console: CPU part : 0xc07
> console: CPU revision : 5
> console: Hardware : Allwinner sun8i Family
> console: Revision : 0000
> console: Serial : 0000000000000000
> console: cat /proc/iomem
> console: / # cat /proc/iomem
> console: 01000000-010fffff : clock@1000000
> console: 01c00000-01c00fff : system-control@1c00000
> console: 01c02000-01c02fff : dma-controller@1c02000
> [...]
> console: reboot
> console: / # reboot
> console: / # Found console ttyS0
> console: Stopping network: OK
> console: hrtimer: interrupt took 21852064 ns
> console: Saving random seed... random: dd: uninitialized urandom read (512 bytes read)
> console: done.
> console: Stopping logging: OK
> console: umount: devtmpfs busy - remounted read-only
> console: umount: can't unmount /: Invalid argument
> console: The system is going down NOW!
> console: Sent SIGTERM to all processes
> console: Sent SIGKILL to all processes
> console: Requesting system reboot
> console: reboot: Restarting system
> PASS (48.32 s)
> JOB TIME : 49.16 s
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index 820239e439..daabd47404 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -437,6 +437,47 @@ class BootLinuxConsole(Test):
> console_pattern = 'Kernel command line: %s' % kernel_command_line
> self.wait_for_console_pattern(console_pattern)
>
> + def test_arm_orangepi_initrd(self):
Like in the previous patch, isn't it a good idea to name this after the exact
machine model, that is, test_arm_orangepi_pc_initrd?
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> + 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> + initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
> + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
> + 'arm/rootfs-armv7a.cpio.gz')
> + initrd_hash = '604b2e45cdf35045846b8bbfbf2129b1891bdc9c'
> + 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_machine('orangepi-pc')
There's no need to set the machine type manually since ba21bde93, the
one set by the ":avocado: tags=machine" will be used.
Tested-by: Cleber Rosa <crosa@redhat.com>
If this line is dropped:
Reviewed-by: Cleber Rosa <crosa@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board
2019-12-19 1:05 ` Cleber Rosa
@ 2019-12-19 18:25 ` Cleber Rosa
0 siblings, 0 replies; 17+ messages in thread
From: Cleber Rosa @ 2019-12-19 18:25 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, Niek Linnenbank, qemu-arm, qemu-devel, Guenter Roeck
[-- Attachment #1: Type: text/plain, Size: 4856 bytes --]
On Wed, Dec 18, 2019 at 08:05:15PM -0500, Cleber Rosa wrote:
> On Tue, Dec 17, 2019 at 07:27:26PM +0100, Philippe Mathieu-Daudé wrote:
> > This test boots a Linux kernel on a OrangePi PC board and verify
> > the serial output is working.
> >
> > The kernel image and DeviceTree blob are built by the Raspbian
> > project (based on Debian):
> > https://www.raspbian.org/RaspbianImages
> >
> > 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:
> >
> > $ make check-venv
> > $ ./tests/venv/bin/avocado --show=console,app run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
> > JOB ID : 2e4d15eceb13c33672af406f08171e6e9de1414a
> > JOB LOG : ~/job-results/job-2019-12-17T05.46-2e4d15e/job.log
> > (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
> > console: Uncompressing Linux... done, booting the kernel.
> > console: Booting Linux on physical CPU 0x0
> > console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
> > console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> > console: CPU: div instructions available: patching division code
> > console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> > console: OF: fdt: Machine model: Xunlong Orange Pi PC
> > console: Memory policy: Data cache writealloc
> > console: OF: reserved mem: failed to allocate memory for node 'cma@4a000000'
> > console: cma: Failed to reserve 128 MiB
> > console: psci: probing for conduit method from DT.
> > console: psci: PSCIv0.2 detected in firmware.
> > console: psci: Using standard PSCI v0.2 function IDs
> > console: psci: Trusted OS migration not required
> > console: random: get_random_bytes called from start_kernel+0x8d/0x3c2 with crng_init=0
> > console: percpu: Embedded 18 pages/cpu @(ptrval) s41228 r8192 d24308 u73728
> > console: Built 1 zonelists, mobility grouping on. Total pages: 32480
> > console: Kernel command line: printk.time=0 console=ttyS0,115200
> > PASS (8.59 s)
> > JOB TIME : 8.81 s
> >
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> > tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
> > 1 file changed, 26 insertions(+)
> >
> > diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> > index 7e41cebd47..820239e439 100644
> > --- a/tests/acceptance/boot_linux_console.py
> > +++ b/tests/acceptance/boot_linux_console.py
> > @@ -411,6 +411,32 @@ class BootLinuxConsole(Test):
> > self.wait_for_console_pattern('Boot successful.')
> > # TODO user command, for now the uart is stuck
> >
> > + def test_arm_orangepi(self):
>
> Maybe rename the test to include the full machine type? I mean,
> "test_arm_orangepi_pc"?
>
> > + """
> > + :avocado: tags=arch:arm
> > + :avocado: tags=machine:orangepi-pc
> > + """
> > + deb_url = ('https://apt.armbian.com/pool/main/l/'
> > + 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> > + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> > + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> > + kernel_path = self.extract_from_deb(deb_path,
> > + '/boot/vmlinuz-4.20.7-sunxi')
> > + dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> > + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> > +
> > + self.vm.set_machine('orangepi-pc')
Missed this on the previous message: you should drop this line, as the
machine type will be set automatically (given a machine tag exists)
since ba21bde93.
- Cleber.
> > + self.vm.set_console()
> > + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> > + 'console=ttyS0,115200n8 '
> > + 'earlycon=uart,mmio32,0x1c28000')
> > + self.vm.add_args('-kernel', kernel_path,
> > + '-dtb', dtb_path,
> > + '-append', kernel_command_line)
> > + self.vm.launch()
> > + console_pattern = 'Kernel command line: %s' % kernel_command_line
> > + self.wait_for_console_pattern(console_pattern)
> > +
> > def test_s390x_s390_ccw_virtio(self):
> > """
> > :avocado: tags=arch:s390x
> > --
> > 2.21.0
> >
>
> Either way,
>
> Reviewed-by: Cleber Rosa <crosa@redhat.com>
> Tested-by: Cleber Rosa <crosa@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi PC board
2019-12-17 18:27 ` [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi " Philippe Mathieu-Daudé
2019-12-18 21:22 ` Niek Linnenbank
@ 2019-12-19 20:04 ` Cleber Rosa
1 sibling, 0 replies; 17+ messages in thread
From: Cleber Rosa @ 2019-12-19 20:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, Niek Linnenbank, qemu-arm, qemu-devel, Guenter Roeck
[-- Attachment #1: Type: text/plain, Size: 5131 bytes --]
On Tue, Dec 17, 2019 at 07:27:28PM +0100, Philippe Mathieu-Daudé wrote:
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
>
> The SD image is from the kernelci.org project:
> https://kernelci.org/faq/#the-code
>
> 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 --show=console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> [...]
> console: sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
> console: sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
> console: sunxi-mmc 1c0f000.mmc: Got CD GPIO
> console: ledtrig-cpu: registered to indicate activity on CPUs
> console: hidraw: raw HID events driver (C) Jiri Kosina
> console: usbcore: registered new interface driver usbhid
> console: usbhid: USB HID core driver
> console: Initializing XFRM netlink socket
> console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
> console: NET: Registered protocol family 10
> console: mmc0: host does not support reading read-only switch, assuming write-enable
> console: mmc0: Problem switching card into high-speed mode!
> console: mmc0: new SD card at address 4567
> console: mmcblk0: mmc0:4567 QEMU! 60.0 MiB
> [...]
> console: EXT4-fs (mmcblk0): mounting ext2 file system using the ext4 subsystem
> console: EXT4-fs (mmcblk0): mounted filesystem without journal. Opts: (null)
> console: VFS: Mounted root (ext2 filesystem) on device 179:0.
> console: Run /sbin/init as init process
> console: EXT4-fs (mmcblk0): re-mounted. Opts: block_validity,barrier,user_xattr,acl
> console: Starting syslogd: OK
> console: Starting klogd: OK
> console: Populating /dev using udev: udevd[203]: starting version 3.2.7
> console: /bin/sh: can't access tty; job control turned off
> console: cat /proc/partitions
> console: / # cat /proc/partitions
> console: major minor #blocks name
> console: 1 0 4096 ram0
> console: 1 1 4096 ram1
> console: 1 2 4096 ram2
> console: 1 3 4096 ram3
> console: 179 0 61440 mmcblk0
> console: reboot
> console: / # reboot
> console: umount: devtmpfs busy - remounted read-only
> console: EXT4-fs (mmcblk0): re-mounted. Opts: (null)
> console: The system is going down NOW!
> console: Sent SIGTERM to all processes
> console: Sent SIGKILL to all processes
> console: Requesting system reboot
> console: reboot: Restarting system
> JOB TIME : 68.64 s
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/acceptance/boot_linux_console.py | 42 ++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index daabd47404..8179b45910 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -478,6 +478,48 @@ class BootLinuxConsole(Test):
> exec_command_and_wait_for_pattern(self, 'reboot',
> 'reboot: Restarting system')
>
> + def test_arm_orangepi_sd(self):
Same suggestion wrt test name as previous two patches.
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> + 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> + rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'
> + 'kci-2019.02/armel/base/rootfs.ext2.xz')
> + rootfs_hash = '692510cb625efda31640d1de0a8d60e26040f061'
> + rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash)
> + rootfs_path = os.path.join(self.workdir, 'rootfs.cpio')
> + archive.lzma_uncompress(rootfs_path_xz, rootfs_path)
> +
> + self.vm.set_machine('orangepi-pc')
Can/should be dropped.
With this,
Tested-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC
2019-12-18 21:26 ` Niek Linnenbank
@ 2019-12-19 22:54 ` Cleber Rosa
0 siblings, 0 replies; 17+ messages in thread
From: Cleber Rosa @ 2019-12-19 22:54 UTC (permalink / raw)
To: Niek Linnenbank
Cc: Peter Maydell, qemu-arm, Philippe Mathieu-Daudé,
Guenter Roeck, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 7433 bytes --]
On Wed, Dec 18, 2019 at 10:26:08PM +0100, Niek Linnenbank wrote:
> Hi Philippe,
>
> This test has some problems on my host (Ubuntu 18.04.3 LTS, avocado 73.0,
> python 3.6.9):
>
> (4/4) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic:
> ERROR: Input format not supported by decoder (3.25 s)
> RESULTS : PASS 3 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
> | CANCEL 0
> JOB TIME : 46.22 s
>
> I suspect it didn't download the image correctly.
>
I don't think it's download related, because the
"archive.lzma_uncompress(image_path_xz, image_path)" line is not
capable of uncompressing that 7z archive.
> Regards,
> Niek
>
> On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
> wrote:
>
> > This test boots Ubuntu Bionic on a OrangePi PC board.
> >
> > As it requires 1GB of storage, and is slow, this test is disabled
> > on automatic CI testing.
> >
> > It is useful for workstation testing. Currently Avocado timeouts too
> > quickly, so we can't run userland commands.
> >
> > The kernel image and DeviceTree blob are built by the Raspbian
> > project (based on Debian):
> > https://www.raspbian.org/RaspbianImages
> >
> > The Ubuntu image is downloaded from:
> > https://dl.armbian.com/orangepipc/Bionic_current
> >
> > This test can be run using:
> >
> > $ AVOCADO_ALLOW_LARGE_STORAGE=yes \
> > avocado --show=app,console run -t machine:orangepi-pc \
> > tests/acceptance/boot_linux_console.py
> > console: Uncompressing Linux... done, booting the kernel.
> > console: Booting Linux on physical CPU 0x0
> > console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> > 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> > 2019
> > console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> > console: CPU: div instructions available: patching division code
> > console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> > instruction cache
> > console: OF: fdt: Machine model: Xunlong Orange Pi PC
> > [...]
> > console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
> > console: NET: Registered protocol family 10
> > console: mmc0: host does not support reading read-only switch, assuming
> > write-enable
> > console: mmc0: Problem switching card into high-speed mode!
> > console: mmc0: new SD card at address 4567
> > console: mmcblk0: mmc0:4567 QEMU! 932 MiB
> > console: Segment Routing with IPv6
> > console: NET: Registered protocol family 17
> > console: NET: Registered protocol family 15
> > console: bridge: filtering via arp/ip/ip6tables is no longer available
> > by default. Update your scripts to load br_netfilter if you need this.
> > console: 8021q: 802.1Q VLAN Support v1.8
> > console: Key type dns_resolver registered
> > console: Registering SWP/SWPB emulation handler
> > console: mmcblk0: p1
> > [...]
> > console: Freeing unused kernel memory: 1024K
> > console: Run /sbin/init as init process
> > console: random: fast init done
> > console: systemd[1]: System time before build time, advancing clock.
> > console: systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT
> > +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT
> > +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2
> > default-hierarchy=hybrid)
> > console: systemd[1]: Detected architecture arm.
> > console: Welcome to Ubuntu 18.04.3 LTS!
> > console: systemd[1]: Set hostname to <orangepipc>.
> > console: random: systemd: uninitialized urandom read (16 bytes read)
> >
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> > RFC because this is not the definitive test, but it is helpful so
> > for for testing Niek work.
> > ---
> > tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/tests/acceptance/boot_linux_console.py
> > b/tests/acceptance/boot_linux_console.py
> > index 8179b45910..663290e0c7 100644
> > --- a/tests/acceptance/boot_linux_console.py
> > +++ b/tests/acceptance/boot_linux_console.py
> > @@ -520,6 +520,47 @@ class BootLinuxConsole(Test):
> > exec_command_and_wait_for_pattern(self, 'reboot',
> > 'reboot: Restarting
> > system')
> >
> > + @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage
> > limited')
> > + def test_arm_orangepi_bionic(self):
> > + """
> > + :avocado: tags=arch:arm
> > + :avocado: tags=machine:orangepi-pc
> > + """
> > + # This test download a 196MB compressed image and expand it to
> > 932MB...
> > + deb_url = ('https://apt.armbian.com/pool/main/l/'
> > +
> > 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> > + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> > + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> > + kernel_path = self.extract_from_deb(deb_path,
> > + '/boot/vmlinuz-4.20.7-sunxi')
> > + dtb_path =
> > '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> > + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> > + image_url = ('https://dl.armbian.com/orangepipc/archive/'
> > + 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
> > + image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
> > + image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash)
> > + image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
> > + image_path = os.path.join(self.workdir, image_name)
> > + archive.lzma_uncompress(image_path_xz, image_path)
I'm not sure what magic Philippe was able to do here, but I can not
uncompress this file with lzma_uncompress. I'm looking into adding
proper 7z support to avocado.utils.archive module, by means of either
the 7z library or the py7zr Python module.
- Cleber.
> > +
> > + self.vm.set_machine('orangepi-pc')
> > + self.vm.set_console()
> > + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> > + 'console=ttyS0,115200 '
> > + 'root=/dev/mmcblk0p1 rootwait rw '
> > + 'systemd.mask=dev-ttyS0.device '
> > + 'systemd.mask=armbian-zram-config.service '
> > + 'systemd.mask=armbian-ramlog.service')
> > + self.vm.add_args('-kernel', kernel_path,
> > + '-dtb', dtb_path,
> > + '-drive', 'file=' + image_path +
> > ',if=sd,format=raw',
> > + '-append', kernel_command_line,
> > + '-nic', 'user',
> > + '-no-reboot')
> > + self.vm.launch()
> > + self.wait_for_console_pattern('Welcome to Ubuntu 18.04.3 LTS!')
> > + self.wait_for_console_pattern('Started Armbian filesystem
> > resize.')
> > +
> > def test_s390x_s390_ccw_virtio(self):
> > """
> > :avocado: tags=arch:s390x
> > --
> > 2.21.0
> >
> >
>
> --
> Niek Linnenbank
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
2019-12-18 21:20 ` Niek Linnenbank
2019-12-19 1:05 ` Cleber Rosa
@ 2019-12-21 18:22 ` Niek Linnenbank
2 siblings, 0 replies; 17+ messages in thread
From: Niek Linnenbank @ 2019-12-21 18:22 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-arm, QEMU Developers, Guenter Roeck, Cleber Rosa
[-- Attachment #1: Type: text/plain, Size: 4405 bytes --]
Hi Philippe,
On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> This test boots a Linux kernel on a OrangePi PC board and verify
> the serial output is working.
>
> The kernel image and DeviceTree blob are built by the Raspbian
> project (based on Debian):
> https://www.raspbian.org/RaspbianImages
One minor remark: I noticed here you refer to Raspbian, while the actual
image
used is from Armbian :-)
>
> 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:
>
> $ make check-venv
> $ ./tests/venv/bin/avocado --show=console,app run -t machine:orangepi-pc
> tests/acceptance/boot_linux_console.py
> JOB ID : 2e4d15eceb13c33672af406f08171e6e9de1414a
> JOB LOG : ~/job-results/job-2019-12-17T05.46-2e4d15e/job.log
> (1/1)
> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
> console: Uncompressing Linux... done, booting the kernel.
> console: Booting Linux on physical CPU 0x0
> console: Linux version 4.20.7-sunxi (root@armbian.com) (gcc version
> 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> 2019
> console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> console: CPU: div instructions available: patching division code
> console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> console: OF: fdt: Machine model: Xunlong Orange Pi PC
> console: Memory policy: Data cache writealloc
> console: OF: reserved mem: failed to allocate memory for node
> 'cma@4a000000'
> console: cma: Failed to reserve 128 MiB
> console: psci: probing for conduit method from DT.
> console: psci: PSCIv0.2 detected in firmware.
> console: psci: Using standard PSCI v0.2 function IDs
> console: psci: Trusted OS migration not required
> console: random: get_random_bytes called from start_kernel+0x8d/0x3c2
> with crng_init=0
> console: percpu: Embedded 18 pages/cpu @(ptrval) s41228 r8192 d24308
> u73728
> console: Built 1 zonelists, mobility grouping on. Total pages: 32480
> console: Kernel command line: printk.time=0 console=ttyS0,115200
> PASS (8.59 s)
> JOB TIME : 8.81 s
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> index 7e41cebd47..820239e439 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -411,6 +411,32 @@ class BootLinuxConsole(Test):
> self.wait_for_console_pattern('Boot successful.')
> # TODO user command, for now the uart is stuck
>
> + def test_arm_orangepi(self):
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:orangepi-pc
> + """
> + deb_url = ('https://apt.armbian.com/pool/main/l/'
> +
> 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> + kernel_path = self.extract_from_deb(deb_path,
> + '/boot/vmlinuz-4.20.7-sunxi')
> + dtb_path =
> '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> +
> + self.vm.set_machine('orangepi-pc')
> + self.vm.set_console()
> + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> + 'console=ttyS0,115200n8 '
> + 'earlycon=uart,mmio32,0x1c28000')
> + self.vm.add_args('-kernel', kernel_path,
> + '-dtb', dtb_path,
> + '-append', kernel_command_line)
> + self.vm.launch()
> + console_pattern = 'Kernel command line: %s' % kernel_command_line
> + self.wait_for_console_pattern(console_pattern)
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.21.0
>
>
--
Niek Linnenbank
[-- Attachment #2: Type: text/html, Size: 5806 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2019-12-21 18:23 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
2019-12-18 21:20 ` Niek Linnenbank
2019-12-19 1:05 ` Cleber Rosa
2019-12-19 18:25 ` Cleber Rosa
2019-12-21 18:22 ` Niek Linnenbank
2019-12-17 18:27 ` [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi " Philippe Mathieu-Daudé
2019-12-18 21:21 ` Niek Linnenbank
2019-12-19 18:22 ` Cleber Rosa
2019-12-17 18:27 ` [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi " Philippe Mathieu-Daudé
2019-12-18 21:22 ` Niek Linnenbank
2019-12-19 20:04 ` Cleber Rosa
2019-12-17 18:27 ` [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine" Philippe Mathieu-Daudé
2019-12-18 21:23 ` Niek Linnenbank
2019-12-17 18:27 ` [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Philippe Mathieu-Daudé
2019-12-18 21:26 ` Niek Linnenbank
2019-12-19 22:54 ` Cleber Rosa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).