From patchwork Tue Jul 26 13:12:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1660799 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LscmK0xh2z9s1l for ; Tue, 26 Jul 2022 23:13:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 58BA540288; Tue, 26 Jul 2022 13:13:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 58BA540288 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id elL6iKPbQgB5; Tue, 26 Jul 2022 13:13:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 2E1EA40167; Tue, 26 Jul 2022 13:13:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2E1EA40167 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 748CD1BF2B4 for ; Tue, 26 Jul 2022 13:13:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4D7BF40167 for ; Tue, 26 Jul 2022 13:13:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4D7BF40167 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v9FKK6fp08Yr for ; Tue, 26 Jul 2022 13:13:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 87ECC401DD Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) by smtp4.osuosl.org (Postfix) with ESMTPS id 87ECC401DD for ; Tue, 26 Jul 2022 13:13:01 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 21CDE24000A; Tue, 26 Jul 2022 13:12:57 +0000 (UTC) To: "Arnout Vandecappelle (Essensium/Mind)" , "Yann E. MORIN" , Buildroot List , =?utf-8?q?=C5=81ukasz_Stelmach?= Date: Tue, 26 Jul 2022 15:12:47 +0200 Message-Id: <20220726131249.2009383-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220726131249.2009383-1-thomas.petazzoni@bootlin.com> References: <20220726131249.2009383-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1658841179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bvkw2Qg2yeYeOkARRfBfC9z1NabEHZ+r1pe3vPLjoW0=; b=poGU1iJCBET31ccI5Y5dwpQVobUmAlJxPLMN1jUI/c0XLE1tmRELt+YNPacS4fYxbWJSqv eKqmqCdTxj+m08M34+ug/PwyDMfz1zr0obOSB2lYDYxUAnTy4Pg0HzgLKFYs0PXu+89DwO vqGVv9IpJYESLI9g1RonxwB3QAWY8cRoztI39ngh59O/b3YF4Gx3AsI0zn7dJ3k3nxJJjJ PwSXpRoAfZK7lgPdsj2fKMrOwwsQKUyRTIuOLgRhz6K8f4xibwI6BNa41u8njpEXPYieWk JP/Nl/CfeVOUUhw5qAcPIxFG0PUZ86DaQqgznxxGeINmwQcEifkNTsKO9JKDUg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=poGU1iJC Subject: [Buildroot] [PATCH 1/2] package/uclibc: define BR2_UCLIBC_TARGET_ARCH for ARM64 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" So far, BR2_UCLIBC_TARGET_ARCH had a value for all architectures... except for ARM64. Its value is passed as ARCH= when building uClibc... which is currently empty: /usr/bin/make -j33 -C .../build/uclibc-1.0.41 ARCH="" CROSS_COMPILE=".../host/bin/aarch64-buildroot-linux-uclibc-" And also in uclibc.mk, when we inject the architecture in uClibc's .config: $(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH)) $(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)") We enable TARGET_ (which doesn't exist) and set TARGET_ARCH to the empty string. Nobody noticed so far, and it happens to work because aarch64 is the first architecture in the choice of architectures in extra/Configs/Config.in in the uClibc code. So, when the architecture is not specified, aarch64 is used. As we are about to add some logic in uclibc.mk that will use BR2_UCLIBC_TARGET_ARCH, we noticed this missing definition. Signed-off-by: Thomas Petazzoni --- package/uclibc/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in index 2eea4d30f3..873d2053c8 100644 --- a/package/uclibc/Config.in +++ b/package/uclibc/Config.in @@ -124,6 +124,7 @@ config BR2_UCLIBC_INSTALL_UTILS # uClibc architecture names. config BR2_UCLIBC_TARGET_ARCH string + default "aarch64" if BR2_aarch64 || BR2_aarch64_be default "arc" if BR2_arcle || BR2_arceb default "arm" if BR2_arm || BR2_armeb default "m68k" if BR2_m68k From patchwork Tue Jul 26 13:12:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1660800 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lscmb718Sz9s1l for ; Tue, 26 Jul 2022 23:13:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AA79440167; Tue, 26 Jul 2022 13:13:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AA79440167 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aBWSyc5RIXEO; Tue, 26 Jul 2022 13:13:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 759B84136C; Tue, 26 Jul 2022 13:13:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 759B84136C X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 6F90C1BF2B4 for ; Tue, 26 Jul 2022 13:13:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3F75641718 for ; Tue, 26 Jul 2022 13:13:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3F75641718 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 271P0Mn2PhAW for ; Tue, 26 Jul 2022 13:13:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 96ED141089 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp2.osuosl.org (Postfix) with ESMTPS id 96ED141089 for ; Tue, 26 Jul 2022 13:13:03 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 8C1F9240008; Tue, 26 Jul 2022 13:13:00 +0000 (UTC) To: "Arnout Vandecappelle (Essensium/Mind)" , "Yann E. MORIN" , Buildroot List , =?utf-8?q?=C5=81ukasz_Stelmach?= Date: Tue, 26 Jul 2022 15:12:48 +0200 Message-Id: <20220726131249.2009383-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220726131249.2009383-1-thomas.petazzoni@bootlin.com> References: <20220726131249.2009383-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1658841181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UFkfXepOdae2QMSUEXjB7sIh4xvgBSHFol2P3XqYh5k=; b=VINR0PKOP+tVlwe177F/YUXkoMsDGipiZkpDSfQtP9eIX/+fZdrgYDO/wxJJOpDL4PsV+F JiVJ8s/+MuXJylDp0c/EYjIuK/ydVGJsFYHxthToeOK0cGo1Ke39iaVuVT54EY4TRDEDcn wtBubEwtaQQWmR9AJOcM0P71xIq6zluhzvOfkW3YfNDOPLj0vfImDyU8dypPyWLp3CMnl9 Moc3wsYI13XMzJ646JveH740gGurDuZKvDVldC66Q5nlA76D3eSnPjMcSrw7n660lBbIh7 3wWyEViHJvENYc6iehFhh0N/v3zwKBOr2oA/rNc9t9YAmmybQhkysmLoeU/FYQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=VINR0PKO Subject: [Buildroot] [PATCH 2/2] arch: add support for configurable page size on ARM64 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This commit is based on earlier work from Łukasz Stelmach to add support for different page sizes on ARM64. In his initial submission, Łukasz took an approach similar to this one, i.e make it ARM64-specific. Following the feedback on the mailing list, his second version [1] tried to generalize the logic to configure the page size between architectures. But the general consensus during the review process was that there wasn't much to generalize in the end. So, this new iteration is back to a simpler approach: * We have new options in Config.in.arm to configure the page size. Only 4 KB and 64 KB are supported, because our testing in Qemu and real hardware has not allowed to get a successful setup for 16 KB pages. We can always re-add support for 16 KB later if that is resolved. * The logic to define the ARCH_TOOLCHAIN_WRAPPER_OPTS options is moved from the ARC-specific file to arch/arch.mk, and extended to cover ARM64. * The appropriate logic in uclibc.mk and linux.mk is added to tweak the relevant configuration options. * A test case is added in the runtime test infrastructure to test building and booting under Qemu a 64 KB configuration, with all 3 C libraries. For the regular configuration of 4 KB pages, this commit makes one functional change: -Wl,-z,max-page-size=4096 is now passed in the compiler flags of the wrapper. [1] https://patchwork.ozlabs.org/project/buildroot/list/?series=275452 Signed-off-by: Thomas Petazzoni --- arch/Config.in.arm | 25 +++++++ arch/arch.mk | 11 ++++ arch/arch.mk.arc | 9 --- linux/linux.mk | 8 +++ package/uclibc/uclibc.mk | 13 ++++ .../tests/toolchain/test_aarch64_64k.py | 65 +++++++++++++++++++ 6 files changed, 122 insertions(+), 9 deletions(-) create mode 100644 support/testing/tests/toolchain/test_aarch64_64k.py diff --git a/arch/Config.in.arm b/arch/Config.in.arm index eb71d70430..a0a2e2f5e9 100644 --- a/arch/Config.in.arm +++ b/arch/Config.in.arm @@ -770,6 +770,31 @@ config BR2_ARM_INSTRUCTIONS_THUMB2 endchoice +choice + prompt "MMU Page Size" + default BR2_ARM64_PAGE_SIZE_4K + depends on BR2_aarch64 || BR2_aarch64_be + help + The default is 4KB, and you should probably keep this unless + you know what you are doing. In particular, the kernel + configuration must match this choice. If your kernel is + built by Buildroot, the kernel configuration is + automatically adjusted, but not if you built your kernel + outside of Buildroot. + +config BR2_ARM64_PAGE_SIZE_4K + bool "4KB" + +config BR2_ARM64_PAGE_SIZE_64K + bool "64KB" + +endchoice + +config BR2_ARM64_PAGE_SIZE + string + default "4K" if BR2_ARM64_PAGE_SIZE_4K + default "64K" if BR2_ARM64_PAGE_SIZE_64K + config BR2_ARCH default "arm" if BR2_arm default "armeb" if BR2_armeb diff --git a/arch/arch.mk b/arch/arch.mk index 289c5a1125..96f11eba42 100644 --- a/arch/arch.mk +++ b/arch/arch.mk @@ -18,5 +18,16 @@ GCC_TARGET_FPU := $(call qstrip,$(BR2_GCC_TARGET_FPU)) GCC_TARGET_FLOAT_ABI := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) GCC_TARGET_MODE := $(call qstrip,$(BR2_GCC_TARGET_MODE)) +# Explicitly set LD's "max-page-size" instead of relying on some defaults +ifeq ($(BR2_ARC_PAGE_SIZE_4K)$(BR2_ARM64_PAGE_SIZE_4K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=4096 +else ifeq ($(BR2_ARC_PAGE_SIZE_8K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=8192 +else ifeq ($(BR2_ARC_PAGE_SIZE_16K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=16384 +else ifeq ($(BR2_ARM64_PAGE_SIZE_64K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=65536 +endif + # Include any architecture specific makefiles. -include $(sort $(wildcard arch/arch.mk.*)) diff --git a/arch/arch.mk.arc b/arch/arch.mk.arc index 32b818b0e0..a6b56a869f 100644 --- a/arch/arch.mk.arc +++ b/arch/arch.mk.arc @@ -5,13 +5,4 @@ ifeq ($(BR2_ARC_ATOMIC_EXT),y) ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic endif -# Explicitly set LD's "max-page-size" instead of relying on some defaults -ifeq ($(BR2_ARC_PAGE_SIZE_4K),y) -ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=4096 -else ifeq ($(BR2_ARC_PAGE_SIZE_8K),y) -ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=8192 -else ifeq ($(BR2_ARC_PAGE_SIZE_16K),y) -ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=16384 -endif - endif diff --git a/linux/linux.mk b/linux/linux.mk index 322ccabbd9..3d9ac37959 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -374,6 +374,14 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K) $(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K) $(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K)) + $(if $(BR2_ARM64_PAGE_SIZE_4K), + $(call KCONFIG_ENABLE_OPT,CONFIG_ARM64_4K_PAGES) + $(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_16K_PAGES) + $(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_64K_PAGES)) + $(if $(BR2_ARM64_PAGE_SIZE_64K), + $(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_4K_PAGES) + $(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_16K_PAGES) + $(call KCONFIG_ENABLE_OPT,CONFIG_ARM64_64K_PAGES)) $(if $(BR2_TARGET_ROOTFS_CPIO), $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD)) # As the kernel gets compiled before root filesystems are diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index 5006aa0cb6..0e17a8e65d 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -73,6 +73,18 @@ define UCLIBC_BINFMT_CONFIG endef endif +# +# AArch64 definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),aarch64) +UCLIBC_ARM64_PAGE_SIZE = CONFIG_AARCH64_PAGE_SIZE_$(call qstrip,$(BR2_ARM64_PAGE_SIZE)) +define UCLIBC_AARCH64_PAGE_SIZE_CONFIG + $(SED) '/CONFIG_AARCH64_PAGE_SIZE_*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARM64_PAGE_SIZE)) +endef +endif # aarch64 + # # ARC definitions # @@ -386,6 +398,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS $(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib") $(UCLIBC_MMU_CONFIG) $(UCLIBC_BINFMT_CONFIG) + $(UCLIBC_AARCH64_PAGE_SIZE_CONFIG) $(UCLIBC_ARC_PAGE_SIZE_CONFIG) $(UCLIBC_ARC_ATOMICS_CONFIG) $(UCLIBC_ARM_ABI_CONFIG) diff --git a/support/testing/tests/toolchain/test_aarch64_64k.py b/support/testing/tests/toolchain/test_aarch64_64k.py new file mode 100644 index 0000000000..59c7834360 --- /dev/null +++ b/support/testing/tests/toolchain/test_aarch64_64k.py @@ -0,0 +1,65 @@ +import os +import re + +import infra.basetest + + +class TestAarch64Pages64kBase(infra.basetest.BRTest): + __test__ = False + config = \ + """ + BR2_aarch64=y + BR2_ARM64_PAGE_SIZE_64K=y + BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.18" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ROOTFS_CPIO_GZIP=y + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio.gz") + kern = os.path.join(self.builddir, "images", "Image") + self.emulator.boot(arch="aarch64", + kernel=kern, + kernel_cmdline=["console=ttyAMA0"], + options=["-M", "virt", "-cpu", "cortex-a57", "-m", "512M", "-initrd", img]) + self.emulator.login() + + + def test_run(self): + self.login() + + cmd = "dmesg | grep 'Dentry cache'" + output, exit_code = self.emulator.run(cmd, 120) + r = re.match(".*Dentry cache hash table entries: [0-9]* \(order: ([0-9]*), ([0-9]*) bytes.*", output[0]) + order = int(r.group(1)) + size = int(r.group(2)) + self.assertEqual(2 ** order * 64 * 1024, size) + +class TestAarch64Pages64kGlibc(TestAarch64Pages64kBase): + __test__ = True + config = TestAarch64Pages64kBase.config + \ + """ + BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + """ + +class TestAarch64Pages64kuClibc(TestAarch64Pages64kBase): + __test__ = True + config = TestAarch64Pages64kBase.config + \ + """ + BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y + """ + +class TestAarch64Pages64kMusl(TestAarch64Pages64kBase): + __test__ = True + config = TestAarch64Pages64kBase.config + \ + """ + BR2_TOOLCHAIN_BUILDROOT_MUSL=y + """ +