* [Buildroot] [PATCH v2 1/3] board/qemu/aarch64-sbsa: use PARTLABEL to specify root
2023-03-03 12:22 [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Niklas Cassel via buildroot
@ 2023-03-03 12:22 ` Niklas Cassel via buildroot
2023-03-03 12:22 ` [Buildroot] [PATCH v2 2/3] board/qemu/aarch64-sbsa: use the default console specified by ACPI Niklas Cassel via buildroot
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Niklas Cassel via buildroot @ 2023-03-03 12:22 UTC (permalink / raw)
To: buildroot
Cc: Niklas Cassel, Romain Naour, Vincent Stehlé, Damien Le Moal
Specifying /dev/sda2 is ambigious, and when booting my arm64 machine
this tries to mount the second partition of my ATA drive, instead of
the second partition of the USB-stick, simply because the ATA driver
is probed earlier than the USB controller driver.
To solve this problem, use PARTLABEL=root to specify the root filesystem.
This is similar to how it is currently done for board/aarch64-efi/grub.cfg
and board/qemu/aarch64-ebbr/grub.cfg.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
---
board/qemu/aarch64-sbsa/grub.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/qemu/aarch64-sbsa/grub.cfg b/board/qemu/aarch64-sbsa/grub.cfg
index cd486caf4c..39b7842f8f 100644
--- a/board/qemu/aarch64-sbsa/grub.cfg
+++ b/board/qemu/aarch64-sbsa/grub.cfg
@@ -2,5 +2,5 @@ set default="0"
set timeout="5"
menuentry "Buildroot" {
- linux /Image root=/dev/sda2 rootwait console=ttyAMA0
+ linux /Image root=PARTLABEL=root rootwait console=ttyAMA0
}
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH v2 2/3] board/qemu/aarch64-sbsa: use the default console specified by ACPI
2023-03-03 12:22 [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Niklas Cassel via buildroot
2023-03-03 12:22 ` [Buildroot] [PATCH v2 1/3] board/qemu/aarch64-sbsa: use PARTLABEL to specify root Niklas Cassel via buildroot
@ 2023-03-03 12:22 ` Niklas Cassel via buildroot
2023-03-03 12:22 ` [Buildroot] [PATCH v2 3/3] support/testing: use the arch default kernel config in test_edk2.py Niklas Cassel via buildroot
2023-03-06 17:17 ` [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Vincent Stehlé
3 siblings, 0 replies; 6+ messages in thread
From: Niklas Cassel via buildroot @ 2023-03-03 12:22 UTC (permalink / raw)
To: buildroot
Cc: Niklas Cassel, Romain Naour, Vincent Stehlé, Damien Le Moal
ARM SBBR (Server Base Boot Requirements) defines SPCR (Serial Port
Console Redirection Table) as a mandatory ACPI table that specifies
the configuration of a serial console.
In the linux kernel, ARM developers have decided that consoles defined
by SPCR are always enabled when existing, see e.g.:
https://lore.kernel.org/linux-serial/20200430161438.17640-1-alpernebiyasak@gmail.com/T/
Specifying console=ttyAMA0 (which is a serial console) is thus
redundant for an ARM SBSA board. (It also blindly assumes that
the serial console is on ttyAMA0, which might not be true.)
Drop the explicit console=ttyAMA0 on the kernel command line,
such that the kernel can pick up the default console defined
by SPCR.
This is similar to how it is currently done for
board/aarch64-efi/grub.cfg.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
---
board/qemu/aarch64-sbsa/grub.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/qemu/aarch64-sbsa/grub.cfg b/board/qemu/aarch64-sbsa/grub.cfg
index 39b7842f8f..d99e19c4cd 100644
--- a/board/qemu/aarch64-sbsa/grub.cfg
+++ b/board/qemu/aarch64-sbsa/grub.cfg
@@ -2,5 +2,5 @@ set default="0"
set timeout="5"
menuentry "Buildroot" {
- linux /Image root=PARTLABEL=root rootwait console=ttyAMA0
+ linux /Image root=PARTLABEL=root rootwait
}
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH v2 3/3] support/testing: use the arch default kernel config in test_edk2.py
2023-03-03 12:22 [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Niklas Cassel via buildroot
2023-03-03 12:22 ` [Buildroot] [PATCH v2 1/3] board/qemu/aarch64-sbsa: use PARTLABEL to specify root Niklas Cassel via buildroot
2023-03-03 12:22 ` [Buildroot] [PATCH v2 2/3] board/qemu/aarch64-sbsa: use the default console specified by ACPI Niklas Cassel via buildroot
@ 2023-03-03 12:22 ` Niklas Cassel via buildroot
2023-03-06 17:17 ` [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Vincent Stehlé
3 siblings, 0 replies; 6+ messages in thread
From: Niklas Cassel via buildroot @ 2023-03-03 12:22 UTC (permalink / raw)
To: buildroot
Cc: Niklas Cassel, Romain Naour, Vincent Stehlé, Damien Le Moal
The kernel config board/qemu/aarch64-sbsa/linux.config has never been in
use by qemu_aarch64_sbsa_defconfig, neither via
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE, nor via
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES.
test_edk2.py is using the kernel config
board/qemu/aarch64-sbsa/linux.config. However, storing a kernel config
that is not used by qemu_aarch64_sbsa_defconfig, in a directory that is
"owned" by qemu_aarch64_sbsa_defconfig, is bound to cause confusion.
If test_edk2.py really wants to use its own kernel config, that kernel
config should be defined in support/testing/tests/boot/test_edk2.py,
or should be stored somewhere under support/testing/tests/boot.
Since test_edk2.py is already reusing some scripts stored in
board/qemu/aarch64-sbsa (which is "owned" by qemu_aarch64_sbsa_defconfig),
the most sensible thing is to let test_edk2.py use the same kernel config
as qemu_aarch64_sbsa_defconfig (which is the arch default kernel config).
Therefore, use the arch default kernel config in test_edk2.py and drop the
out of place kernel config.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
---
board/qemu/aarch64-sbsa/linux.config | 68 -------------------------
support/testing/tests/boot/test_edk2.py | 7 +--
2 files changed, 4 insertions(+), 71 deletions(-)
delete mode 100644 board/qemu/aarch64-sbsa/linux.config
diff --git a/board/qemu/aarch64-sbsa/linux.config b/board/qemu/aarch64-sbsa/linux.config
deleted file mode 100644
index a60cce02ec..0000000000
--- a/board/qemu/aarch64-sbsa/linux.config
+++ /dev/null
@@ -1,68 +0,0 @@
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_TASKSTATS=y
-CONFIG_SCHED_AUTOGROUP=y
-CONFIG_PROFILING=y
-CONFIG_ARCH_VEXPRESS=y
-CONFIG_COMPAT=y
-CONFIG_FW_CFG_SYSFS=y
-CONFIG_FW_CFG_SYSFS_CMDLINE=y
-CONFIG_ACPI=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_BLK_DEV_BSGLIB=y
-CONFIG_BINFMT_MISC=y
-CONFIG_TRANSPARENT_HUGEPAGE=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_PACKET_DIAG=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_BRIDGE=m
-CONFIG_NET_SCHED=y
-CONFIG_VSOCKETS=y
-CONFIG_PCI=y
-CONFIG_PCI_HOST_GENERIC=y
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_VIRTIO=y
-CONFIG_ATA=y
-CONFIG_SATA_AHCI_PLATFORM=y
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=y
-CONFIG_MACVLAN=y
-CONFIG_VIRTIO_NET=y
-CONFIG_NLMON=y
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_VIRTIO=y
-CONFIG_TCG_TPM=y
-CONFIG_TCG_TIS=y
-CONFIG_DRM=y
-CONFIG_DRM_VIRTIO_GPU=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_PL031=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_MMIO=y
-CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
-CONFIG_MAILBOX=y
-CONFIG_PL320_MBOX=y
-CONFIG_ARM_SMMU_V3=y
-CONFIG_EXT4_FS=y
-CONFIG_FUSE_FS=y
-CONFIG_VIRTIO_FS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
diff --git a/support/testing/tests/boot/test_edk2.py b/support/testing/tests/boot/test_edk2.py
index c1be8fad95..efc4fc9ebb 100644
--- a/support/testing/tests/boot/test_edk2.py
+++ b/support/testing/tests/boot/test_edk2.py
@@ -12,13 +12,14 @@ class TestEdk2(infra.basetest.BRTest):
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set
+ BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
- BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.34"
- BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
- BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-sbsa/linux.config"
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.18"
+ BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_EDK2=y
BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA=y
BR2_TARGET_GRUB2=y
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups
2023-03-03 12:22 [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Niklas Cassel via buildroot
` (2 preceding siblings ...)
2023-03-03 12:22 ` [Buildroot] [PATCH v2 3/3] support/testing: use the arch default kernel config in test_edk2.py Niklas Cassel via buildroot
@ 2023-03-06 17:17 ` Vincent Stehlé
2023-03-07 9:19 ` Niklas Cassel via buildroot
3 siblings, 1 reply; 6+ messages in thread
From: Vincent Stehlé @ 2023-03-06 17:17 UTC (permalink / raw)
To: Niklas Cassel; +Cc: Romain Naour, Damien Le Moal, buildroot
On Fri, Mar 03, 2023 at 01:22:48PM +0100, Niklas Cassel wrote:
> Hello,
>
> Here come some small aarch64-sbsa cleanups.
> Please consider for inclusion.
>
> Changes since v1:
> -Modified test_edk2.py to use the same kernel config as
> qemu_aarch64_sbsa_defconfig. (Thanks Vincent.)
Hi Niklas,
Thanks for fixing that.
I tested this v2 patch series on master and next: the
qemu_aarch64_sbsa_defconfig and the edk2 unit test work for me.
The edk2 unit test is slower due to the more complete kernel config and this
breaks the CI on gitlab. Maybe we should leave the reduced kernel config for the
unit test as it is after all? An alternative would be to extend the timeout,
somehow, but I don't know if unit tests longer than an hour are desirable.
Best regards,
Vincent.
>
>
> Kind regards,
> Niklas
>
>
> Niklas Cassel (3):
> board/qemu/aarch64-sbsa: use PARTLABEL to specify root
> board/qemu/aarch64-sbsa: use the default console specified by ACPI
> support/testing: use the arch default kernel config in test_edk2.py
>
> board/qemu/aarch64-sbsa/grub.cfg | 2 +-
> board/qemu/aarch64-sbsa/linux.config | 68 -------------------------
> support/testing/tests/boot/test_edk2.py | 7 +--
> 3 files changed, 5 insertions(+), 72 deletions(-)
> delete mode 100644 board/qemu/aarch64-sbsa/linux.config
>
> --
> 2.39.2
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups
2023-03-06 17:17 ` [Buildroot] [PATCH v2 0/3] misc aarch64-sbsa cleanups Vincent Stehlé
@ 2023-03-07 9:19 ` Niklas Cassel via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Niklas Cassel via buildroot @ 2023-03-07 9:19 UTC (permalink / raw)
To: buildroot@buildroot.org, Romain Naour, Dick Olsson,
Damien Le Moal
On Mon, Mar 06, 2023 at 06:17:07PM +0100, Vincent Stehlé wrote:
> On Fri, Mar 03, 2023 at 01:22:48PM +0100, Niklas Cassel wrote:
> > Hello,
> >
> > Here come some small aarch64-sbsa cleanups.
> > Please consider for inclusion.
> >
> > Changes since v1:
> > -Modified test_edk2.py to use the same kernel config as
> > qemu_aarch64_sbsa_defconfig. (Thanks Vincent.)
>
> Hi Niklas,
>
> Thanks for fixing that.
>
> I tested this v2 patch series on master and next: the
> qemu_aarch64_sbsa_defconfig and the edk2 unit test work for me.
>
> The edk2 unit test is slower due to the more complete kernel config and this
> breaks the CI on gitlab. Maybe we should leave the reduced kernel config for the
> unit test as it is after all? An alternative would be to extend the timeout,
> somehow, but I don't know if unit tests longer than an hour are desirable.
The config already looked like it included a bunch of unnecessary stuff to me,
e.g. CONFIG_DRM, CONFIG_DRM_VIRTIO_GPU, CONFIG_NETDEVICES, CONFIG_INET,
CONFIG_IP_MULTICAST, CONFIG_IP_ADVANCED_ROUTER, CONFIG_NET_SCHED,
CONFIG_SCSI_VIRTIO, CONFIG_VIRTIO_BLK, CONFIG_VIRTIO_FS, CONFIG_FUSE_FS.
None of which should be needed to do what test_edk2.py actually tests
(that we get Linux to boot all the way to a "login: " prompt).
QEMU is executed with:
-display none
no so need for any DRM.
-hda {...}/disk.img
which will emulate a drive at ATA level, so pointless to enable all the virtio
Kconfigs.
The buildroot config defined in test_edk2.py does not set BR2_SYSTEM_DHCP,
so no need for any network Kconfigs.
But I agree with you, it's better to keep this existing config rather than
extending the unit test timeout.
I will send a v3 which simply moves the config file.
Kind regards,
Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread