From patchwork Thu Feb 2 08:02:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaotian Wu X-Patchwork-Id: 18938 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78B62C05027 for ; Thu, 2 Feb 2023 08:02:34 +0000 (UTC) Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.9864.1675324949016124109 for ; Thu, 02 Feb 2023 00:02:29 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: wuxiaotian@loongson.cn) Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8BxrOoSbttjJjcMAA--.24720S3; Thu, 02 Feb 2023 16:02:26 +0800 (CST) Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxmb0NbttjxTknAA--.11392S3; Thu, 02 Feb 2023 16:02:25 +0800 (CST) From: Xiaotian Wu To: openembedded-core@lists.openembedded.org Cc: chenjiping@loongson.cn, zhuqizheng@loongson.cn, Xiaotian Wu Subject: [PATCH v1 1/5] base: add support for loongarch64 Date: Thu, 2 Feb 2023 08:02:15 +0000 Message-Id: <20230202080219.3465767-2-wuxiaotian@loongson.cn> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202080219.3465767-1-wuxiaotian@loongson.cn> References: <20230202080219.3465767-1-wuxiaotian@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxmb0NbttjxTknAA--.11392S3 X-CM-SenderInfo: 5zx0xtprwlt0o6or00hjvr0hdfq/1tbiAQAKCGPaVm8S5wAAs2 X-Coremail-Antispam: 1Uk129KBjvJXoWfJF18Cw4fuw48WF4xXFWkWFg_yoWDtF4rpF yfZF18GF4xXr93Ca9rZ345Wr4UGwn2g3Wa9FySgr10ka4q9r1DXw1xKryqv3WDXw4DtFW0 q3s5J3y29F4UX3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b0kFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4 AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x 0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE 44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E74AGY7Cv6cx26rWlOx8S6xCaFVCjc4 AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIE Y20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7Cj xVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7xRE6wZ7UUUUU== List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Feb 2023 08:02:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176677 Signed-off-by: Xiaotian Wu --- meta/classes-recipe/siteinfo.bbclass | 4 +++ meta/conf/machine-sdk/loongarch64.conf | 2 ++ .../include/loongarch/arch-loongarch.inc | 7 ++++ .../include/loongarch/qemuloongarch.inc | 35 +++++++++++++++++++ .../include/loongarch/tune-loongarch.inc | 13 +++++++ meta/conf/machine/qemuloongarch64.conf | 11 ++++++ meta/conf/templates/default/local.conf.sample | 1 + meta/lib/oe/elf.py | 2 ++ meta/recipes-devtools/meson/meson_1.0.0.bb | 2 ++ meta/recipes-devtools/qemu/qemu.inc | 2 +- meta/site/loongarch64-linux | 11 ++++++ scripts/lib/wic/canned-wks/qemuloongarch.wks | 3 ++ scripts/runqemu | 4 ++- 13 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 meta/conf/machine-sdk/loongarch64.conf create mode 100644 meta/conf/machine/include/loongarch/arch-loongarch.inc create mode 100644 meta/conf/machine/include/loongarch/qemuloongarch.inc create mode 100644 meta/conf/machine/include/loongarch/tune-loongarch.inc create mode 100644 meta/conf/machine/qemuloongarch64.conf create mode 100644 meta/site/loongarch64-linux create mode 100644 scripts/lib/wic/canned-wks/qemuloongarch.wks diff --git a/meta/classes-recipe/siteinfo.bbclass b/meta/classes-recipe/siteinfo.bbclass index d31c9b2571..05253ae90d 100644 --- a/meta/classes-recipe/siteinfo.bbclass +++ b/meta/classes-recipe/siteinfo.bbclass @@ -39,6 +39,8 @@ def siteinfo_data_for_machine(arch, os, d): "i686": "endian-little bit-32 ix86-common", "ia64": "endian-little bit-64", "lm32": "endian-big bit-32", + "loongarch32": "endian-little bit-32 loongarch", + "loongarch64": "endian-little bit-64 loongarch", "m68k": "endian-big bit-32", "microblaze": "endian-big bit-32 microblaze-common", "microblazeel": "endian-little bit-32 microblaze-common", @@ -97,6 +99,8 @@ def siteinfo_data_for_machine(arch, os, d): "arm-linux-musleabi": "arm-linux", "armeb-linux-gnueabi": "armeb-linux", "armeb-linux-musleabi": "armeb-linux", + "loongarch32-linux": "loongarch32-linux", + "loongarch64-linux": "loongarch64-linux", "microblazeel-linux" : "microblaze-linux", "microblazeel-linux-musl" : "microblaze-linux", "mips-linux-musl": "mips-linux", diff --git a/meta/conf/machine-sdk/loongarch64.conf b/meta/conf/machine-sdk/loongarch64.conf new file mode 100644 index 0000000000..40bf0039ea --- /dev/null +++ b/meta/conf/machine-sdk/loongarch64.conf @@ -0,0 +1,2 @@ +SDK_ARCH = "loongarch64" +ABIEXTENSION:class-nativesdk = "" diff --git a/meta/conf/machine/include/loongarch/arch-loongarch.inc b/meta/conf/machine/include/loongarch/arch-loongarch.inc new file mode 100644 index 0000000000..4b44614035 --- /dev/null +++ b/meta/conf/machine/include/loongarch/arch-loongarch.inc @@ -0,0 +1,7 @@ +# LoongArch Architecture definition + +DEFAULTTUNE ?= "loongarch64" + +TUNE_ARCH = "${TUNE_ARCH:tune-${DEFAULTTUNE}}" +TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}" +TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'loongarch64', ' -march=la464 -mabi=lp64d', ' ', d)}" diff --git a/meta/conf/machine/include/loongarch/qemuloongarch.inc b/meta/conf/machine/include/loongarch/qemuloongarch.inc new file mode 100644 index 0000000000..77245ff85d --- /dev/null +++ b/meta/conf/machine/include/loongarch/qemuloongarch.inc @@ -0,0 +1,35 @@ +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" + +require conf/machine/include/qemu.inc +require conf/machine/include/loongarch/tune-loongarch.inc + +MACHINE_FEATURES = "screen keyboard ext2 ext3 serial" + +KERNEL_IMAGETYPE = "vmlinuz" +KERNEL_IMAGETYPES += "vmlinuz" +KEEPUIMAGE = "no" + +SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" + +IMAGE_FSTYPES += "ext4 wic.qcow2" + +WKS_FILE ?= "qemuloongarch.wks" + +MACHINE_EXTRA_RRECOMMENDS += " kernel-modules" + +#EXTRA_IMAGEDEPENDS += "opensbi" + +UBOOT_ENTRYPOINT_loongarch32 = "0x80400000" +UBOOT_ENTRYPOINT_loongarch64 = "0x80200000" + +# qemuboot options +QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi" +QB_MACHINE = "-machine virt" +QB_DEFAULT_BIOS = "fw_jump.elf" +QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" +QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" +QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" +QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" +QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" +# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy +QB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0" diff --git a/meta/conf/machine/include/loongarch/tune-loongarch.inc b/meta/conf/machine/include/loongarch/tune-loongarch.inc new file mode 100644 index 0000000000..f02ddda474 --- /dev/null +++ b/meta/conf/machine/include/loongarch/tune-loongarch.inc @@ -0,0 +1,13 @@ +require conf/machine/include/loongarch/arch-loongarch.inc + +TUNEVALID[loongarch64] = "Enable 64-bit LoongArch optimizations" + +TUNEVALID[littleendian] = "Little endian mode" + +AVAILTUNES += "loongarch64" + +# Default +TUNE_FEATURES:tune-loongarch64 = "loongarch64" +TUNE_ARCH:tune-loongarch64 = "loongarch64" +TUNE_PKGARCH:tune-loongarch64 = "loongarch64" +PACKAGE_EXTRA_ARCHS:tune-loongarch64 = "loongarch64" diff --git a/meta/conf/machine/qemuloongarch64.conf b/meta/conf/machine/qemuloongarch64.conf new file mode 100644 index 0000000000..675d525afd --- /dev/null +++ b/meta/conf/machine/qemuloongarch64.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: generic loongarch64 machine +#@DESCRIPTION: Machine configuration for running a generic loongarch64 + +require conf/machine/include/loongarch/qemuloongarch.inc + +XVISOR_PLAT = "loongarch/virt64" + +EXTRA_IMAGEDEPENDS += "u-boot" +UBOOT_MACHINE = "qemu-loongarch64_smode_defconfig" +UBOOT_ELF = "u-boot" diff --git a/meta/conf/templates/default/local.conf.sample b/meta/conf/templates/default/local.conf.sample index be43d1aafd..c4a4373ea8 100644 --- a/meta/conf/templates/default/local.conf.sample +++ b/meta/conf/templates/default/local.conf.sample @@ -21,6 +21,7 @@ # #MACHINE ?= "qemuarm" #MACHINE ?= "qemuarm64" +#MACHINE ?= "qemuloongarch64" #MACHINE ?= "qemumips" #MACHINE ?= "qemumips64" #MACHINE ?= "qemuppc" diff --git a/meta/lib/oe/elf.py b/meta/lib/oe/elf.py index fb07995b3e..eab2349a4f 100644 --- a/meta/lib/oe/elf.py +++ b/meta/lib/oe/elf.py @@ -21,6 +21,7 @@ def machine_dict(d): "x86_64": (62, 0, 0, True, 64), "epiphany": (4643, 0, 0, True, 32), "lm32": (138, 0, 0, False, 32), + "loongarch64":(258, 0, 0, True, 64), "mips": ( 8, 0, 0, False, 32), "mipsel": ( 8, 0, 0, True, 32), "microblaze": (189, 0, 0, False, 32), @@ -45,6 +46,7 @@ def machine_dict(d): "ia64": (50, 0, 0, True, 64), "alpha": (36902, 0, 0, True, 64), "hppa": (15, 3, 0, False, 32), + "loongarch64":(258, 0, 0, True, 64), "m68k": ( 4, 0, 0, False, 32), "mips": ( 8, 0, 0, False, 32), "mipsel": ( 8, 0, 0, True, 32), diff --git a/meta/recipes-devtools/meson/meson_1.0.0.bb b/meta/recipes-devtools/meson/meson_1.0.0.bb index a7740cc6dd..578dfb9d64 100644 --- a/meta/recipes-devtools/meson/meson_1.0.0.bb +++ b/meta/recipes-devtools/meson/meson_1.0.0.bb @@ -66,6 +66,8 @@ def generate_native_link_template(d): loader = 'ld-linux-aarch64.so.1' elif 'ppc64le' in build_arch: loader = 'ld64.so.2' + elif 'loongarch64' in build_arch: + loader = 'ld-linux-loongarch-lp64d.so.1' if loader: val += ['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader] diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 80f6edd2b9..92828e8f2d 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -86,7 +86,7 @@ do_install_ptest() { } # QEMU_TARGETS is overridable variable -QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" +QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" EXTRA_OECONF = " \ --prefix=${prefix} \ diff --git a/meta/site/loongarch64-linux b/meta/site/loongarch64-linux new file mode 100644 index 0000000000..38bc5f044d --- /dev/null +++ b/meta/site/loongarch64-linux @@ -0,0 +1,11 @@ +# general +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=8 + +# glib-2.0 +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} + +# startup-notification +lf_cv_sane_realloc=${lf_cv_sane_realloc=yes} diff --git a/scripts/lib/wic/canned-wks/qemuloongarch.wks b/scripts/lib/wic/canned-wks/qemuloongarch.wks new file mode 100644 index 0000000000..8465c7a8c0 --- /dev/null +++ b/scripts/lib/wic/canned-wks/qemuloongarch.wks @@ -0,0 +1,3 @@ +# short-description: Create qcow2 image for LoongArch QEMU machines + +part / --source rootfs --fstype=ext4 --label root --align 4096 --size 5G diff --git a/scripts/runqemu b/scripts/runqemu index 5907390573..def11ea911 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1313,7 +1313,7 @@ class BaseConfig(object): """attempt to determine the appropriate qemu-system binary""" mach = self.get('MACHINE') if not mach: - search = '.*(qemux86-64|qemux86|qemuarm64|qemuarm|qemumips64|qemumips64el|qemumipsel|qemumips|qemuppc).*' + search = '.*(qemux86-64|qemux86|qemuarm64|qemuarm|qemuloongarch64|qemumips64|qemumips64el|qemumipsel|qemumips|qemuppc).*' if self.rootfs: match = re.match(search, self.rootfs) if match: @@ -1336,6 +1336,8 @@ class BaseConfig(object): qbsys = 'x86_64' elif mach == 'qemuppc': qbsys = 'ppc' + elif mach == 'qemuloongarch64': + qbsys = 'loongarch64' elif mach == 'qemumips': qbsys = 'mips' elif mach == 'qemumips64': From patchwork Thu Feb 2 08:02:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaotian Wu X-Patchwork-Id: 18936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D74C6379F for ; Thu, 2 Feb 2023 08:02:34 +0000 (UTC) Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.9865.1675324949878436850 for ; Thu, 02 Feb 2023 00:02:30 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: wuxiaotian@loongson.cn) Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8DxcvAUbttjJzcMAA--.25093S3; Thu, 02 Feb 2023 16:02:28 +0800 (CST) Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxmb0NbttjxTknAA--.11392S4; Thu, 02 Feb 2023 16:02:27 +0800 (CST) From: Xiaotian Wu To: openembedded-core@lists.openembedded.org Cc: chenjiping@loongson.cn, zhuqizheng@loongson.cn, Xiaotian Wu Subject: [PATCH v1 2/5] linux: add loongarch64 support Date: Thu, 2 Feb 2023 08:02:16 +0000 Message-Id: <20230202080219.3465767-3-wuxiaotian@loongson.cn> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202080219.3465767-1-wuxiaotian@loongson.cn> References: <20230202080219.3465767-1-wuxiaotian@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxmb0NbttjxTknAA--.11392S4 X-CM-SenderInfo: 5zx0xtprwlt0o6or00hjvr0hdfq/1tbiAQAKCGPaVm8S6QAAs4 X-Coremail-Antispam: 1Uk129KBjvJXoWxGr18ur45WF4Uuw1fKw1DAwb_yoWrJw17pr 1IvFW8Crn5tr9xZanrZ3W3uFyUuw47u343C3srGrZ5CryUCrW2q3Z8Ka12gFZ7Wa1UCw4j yFykJw4ag3yFg37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b0AFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4 AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x 0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE 44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E74AGY7Cv6cx26rWlOx8S6xCaFVCjc4 AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIE Y20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVW8JVW5JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04 k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7Cj xVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0zRVWlkUUUUU= List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Feb 2023 08:02:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176678 Signed-off-by: Xiaotian Wu --- meta/classes-recipe/kernel-arch.bbclass | 2 ++ meta/recipes-kernel/linux/linux-yocto-dev.bb | 2 +- meta/recipes-kernel/linux/linux-yocto_6.1.bb | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/kernel-arch.bbclass b/meta/classes-recipe/kernel-arch.bbclass index 1531ae6cd5..777f900241 100644 --- a/meta/classes-recipe/kernel-arch.bbclass +++ b/meta/classes-recipe/kernel-arch.bbclass @@ -19,6 +19,7 @@ valid_archs = "alpha cris ia64 \ sh sh64 um h8300 \ parisc s390 v850 \ avr32 blackfin \ + loongarch64 \ microblaze \ nios2 arc riscv xtensa" @@ -34,6 +35,7 @@ def map_kernel_arch(a, d): elif re.match('aarch64_be$', a): return 'arm64' elif re.match('aarch64_ilp32$', a): return 'arm64' elif re.match('aarch64_be_ilp32$', a): return 'arm64' + elif re.match('loongarch(32|64|)$', a): return 'loongarch' elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips' elif re.match('mcf', a): return 'm68k' elif re.match('riscv(32|64|)(eb|)$', a): return 'riscv' diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb index 8671b3d30d..05e405f81c 100644 --- a/meta/recipes-kernel/linux/linux-yocto-dev.bb +++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb @@ -50,7 +50,7 @@ PACKAGECONFIG[dt-validation] = ",,python3-dtschema-native" # we need the wrappers if validation isn't in the packageconfig DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'dt-validation', '', 'python3-dtschema-wrapper-native', d)}" -COMPATIBLE_MACHINE = "^(qemuarmv5|qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv32|qemuriscv64)$" +COMPATIBLE_MACHINE = "^(qemuarmv5|qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv32|qemuriscv64|qemuloongarch64)$" KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb" diff --git a/meta/recipes-kernel/linux/linux-yocto_6.1.bb b/meta/recipes-kernel/linux/linux-yocto_6.1.bb index f543240cd8..4c70a509ff 100644 --- a/meta/recipes-kernel/linux/linux-yocto_6.1.bb +++ b/meta/recipes-kernel/linux/linux-yocto_6.1.bb @@ -11,10 +11,12 @@ KBRANCH:qemuriscv64 ?= "v6.1/standard/base" KBRANCH:qemuriscv32 ?= "v6.1/standard/base" KBRANCH:qemux86 ?= "v6.1/standard/base" KBRANCH:qemux86-64 ?= "v6.1/standard/base" +KBRANCH:qemuloongarch64 ?= "v6.1/standard/base" KBRANCH:qemumips64 ?= "v6.1/standard/mti-malta64" SRCREV_machine:qemuarm ?= "45f7cca5081d3cb4ad4fae8e158cd58ea4db6c1f" SRCREV_machine:qemuarm64 ?= "404168c1ce77179a34bb9959a18b594a9f7105d3" +SRCREV_machine:qemuloongarch64 ?= "404168c1ce77179a34bb9959a18b594a9f7105d3" SRCREV_machine:qemumips ?= "eb204027dbb98317d002250cc594de30ecc62b90" SRCREV_machine:qemuppc ?= "404168c1ce77179a34bb9959a18b594a9f7105d3" SRCREV_machine:qemuriscv64 ?= "404168c1ce77179a34bb9959a18b594a9f7105d3" @@ -51,7 +53,7 @@ KCONF_BSP_AUDIT_LEVEL = "1" KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb" -COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32)$" +COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemuloongarch64)$" # Functionality flags KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" From patchwork Thu Feb 2 08:02:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaotian Wu X-Patchwork-Id: 18937 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F130C64EC5 for ; Thu, 2 Feb 2023 08:02:34 +0000 (UTC) Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.9826.1675324953076924995 for ; Thu, 02 Feb 2023 00:02:33 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: wuxiaotian@loongson.cn) Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8Dxi+oVbttjKDcMAA--.24896S3; Thu, 02 Feb 2023 16:02:29 +0800 (CST) Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxmb0NbttjxTknAA--.11392S5; Thu, 02 Feb 2023 16:02:29 +0800 (CST) From: Xiaotian Wu To: openembedded-core@lists.openembedded.org Cc: chenjiping@loongson.cn, zhuqizheng@loongson.cn, Xiaotian Wu Subject: [PATCH v1 3/5] binutils: disable gold on loongarch64 Date: Thu, 2 Feb 2023 08:02:17 +0000 Message-Id: <20230202080219.3465767-4-wuxiaotian@loongson.cn> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202080219.3465767-1-wuxiaotian@loongson.cn> References: <20230202080219.3465767-1-wuxiaotian@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxmb0NbttjxTknAA--.11392S5 X-CM-SenderInfo: 5zx0xtprwlt0o6or00hjvr0hdfq/1tbiAQAKCGPaVm8S6wAAs6 X-Coremail-Antispam: 1Uk129KBjvJXoW7CF4DWw1kCw1DCFWkWr4UJwb_yoW8Gw15pF 4fZF97AryFqry5XFsxAasIv398Z3yIkay5XF17Jw4UAas7XryqqF92yFn2ga4qya1fZFW8 ArZ5WFyY9ayIvFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b0AFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4 AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x 0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE 44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E74AGY7Cv6cx26rWlOx8S6xCaFVCjc4 AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIE Y20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVW8JVW5JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04 k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7Cj xVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0zRVWlkUUUUU= List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Feb 2023 08:02:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176680 Signed-off-by: Xiaotian Wu --- meta/recipes-devtools/binutils/binutils.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 98acf0a222..b2dbf241df 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -57,6 +57,7 @@ GPROFNG_ALTS:aarch64 = "${GPROFNGS}" LDGOLD_ALTS ?= "ld.gold dwp" LDGOLD_ALTS:riscv64 = "" LDGOLD_ALTS:riscv32 = "" +LDGOLD_ALTS:loongarch64 = "" LDGOLD_ALTS:libc-glibc:mipsarch = "" USE_ALTERNATIVES_FOR = " \ @@ -198,6 +199,6 @@ ALTERNATIVE_PRIORITY = "100" ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}" python () { - if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64', True, False, d): - bb.fatal("Gold linker does not _yet_ support RISC-V architecture please remove ld-is-gold from DISTRO_FEATURES") + if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64 loongarch64', True, False, d): + bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES") } From patchwork Thu Feb 2 08:02:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaotian Wu X-Patchwork-Id: 18935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E690C64EC3 for ; Thu, 2 Feb 2023 08:02:34 +0000 (UTC) Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.9825.1675324952814896184 for ; Thu, 02 Feb 2023 00:02:33 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: wuxiaotian@loongson.cn) Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8DxRukXbttjKzcMAA--.17205S3; Thu, 02 Feb 2023 16:02:31 +0800 (CST) Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxmb0NbttjxTknAA--.11392S6; Thu, 02 Feb 2023 16:02:31 +0800 (CST) From: Xiaotian Wu To: openembedded-core@lists.openembedded.org Cc: chenjiping@loongson.cn, zhuqizheng@loongson.cn, Xiaotian Wu Subject: [PATCH v1 4/5] loongarch: disable seccomp from default feature Date: Thu, 2 Feb 2023 08:02:18 +0000 Message-Id: <20230202080219.3465767-5-wuxiaotian@loongson.cn> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202080219.3465767-1-wuxiaotian@loongson.cn> References: <20230202080219.3465767-1-wuxiaotian@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxmb0NbttjxTknAA--.11392S6 X-CM-SenderInfo: 5zx0xtprwlt0o6or00hjvr0hdfq/1tbiAQAKCGPaVm8S7QAAs8 X-Coremail-Antispam: 1Uk129KBjvdXoW7JFW5Gr18Kr4kJr48Ww4fGrg_yoWDJFX_Kw 1Dtr40yF1rJ3Z2kFySvF1fGw1xtFZ5XF1kGFy5JF1UC3WxKw4qqa1kCa1q9ry3K3W5urnx XrWfAas5Cr4FqjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUU5 V7CY07I20VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I 0E14v26F4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCF FI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VCjz48v1sIEY20_WwAm72CE4IkC6x0Yz7 v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l42xK82IY6x8ErcxFaVAv 8VWrMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7xRE6wZ7UUUUU== List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Feb 2023 08:02:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176679 Signed-off-by: Xiaotian Wu --- meta/conf/distro/include/default-distrovars.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc index d05390d3cc..7554081e8b 100644 --- a/meta/conf/distro/include/default-distrovars.inc +++ b/meta/conf/distro/include/default-distrovars.inc @@ -22,6 +22,9 @@ DISTRO_FEATURES_DEFAULT:remove:arc = "seccomp" # seccomp is not yet ported to microblaze DISTRO_FEATURES_DEFAULT:remove:microblaze = "seccomp" +# seccomp is not yet ported to loongarch64 +DISTRO_FEATURES_DEFAULT:remove:loongarch64 = "seccomp" + DISTRO_FEATURES_DEFAULT ?= "acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp" DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}" IMAGE_FEATURES ?= "" From patchwork Thu Feb 2 08:02:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaotian Wu X-Patchwork-Id: 18939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 733E3C61DA4 for ; Thu, 2 Feb 2023 08:02:44 +0000 (UTC) Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.9867.1675324954977013576 for ; Thu, 02 Feb 2023 00:02:35 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: wuxiaotian@loongson.cn) Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8CxvOoYbttjLTcMAA--.25243S3; Thu, 02 Feb 2023 16:02:32 +0800 (CST) Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxmb0NbttjxTknAA--.11392S7; Thu, 02 Feb 2023 16:02:32 +0800 (CST) From: Xiaotian Wu To: openembedded-core@lists.openembedded.org Cc: chenjiping@loongson.cn, zhuqizheng@loongson.cn, Xiaotian Wu Subject: [PATCH v1 5/5] uboot: loongarch64 Date: Thu, 2 Feb 2023 08:02:19 +0000 Message-Id: <20230202080219.3465767-6-wuxiaotian@loongson.cn> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202080219.3465767-1-wuxiaotian@loongson.cn> References: <20230202080219.3465767-1-wuxiaotian@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxmb0NbttjxTknAA--.11392S7 X-CM-SenderInfo: 5zx0xtprwlt0o6or00hjvr0hdfq/1tbiAQAKCGPaVm8S7wAAs+ X-Coremail-Antispam: 1Uk129KBjvdXoW7JFW5tr17KFW8KF4rKryxGrg_yoWxZFc_Ja y3uFW8tw4Fvr95Ww1xXwnxXwnxu3yFqr1Utan5Kr15Zr13Xw1DJ3Wqv3WkuF129rWUur43 Aw4YyrWYkrnxujkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUU5 V7CY07I20VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I 0E14v26F4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCF FI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VCjz48v1sIEY20_WwAm72CE4IkC6x0Yz7 v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l42xK82IY6x8ErcxFaVAv 8VWrMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7xRE6wZ7UUUUU== List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Feb 2023 08:02:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176681 Signed-off-by: Xiaotian Wu --- meta/recipes-bsp/u-boot/u-boot-tools.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc index 0bdbce725a..09b3c3f68c 100644 --- a/meta/recipes-bsp/u-boot/u-boot-tools.inc +++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc @@ -24,6 +24,7 @@ SED_CONFIG_EFI:x86-64 = '' SED_CONFIG_EFI:arm = '' SED_CONFIG_EFI:armeb = '' SED_CONFIG_EFI:aarch64 = '' +SED_CONFIG_EFI:loongarch64 = '' do_compile () { # Yes, this is crazy. If you build on a system with git < 2.14 from scratch, the tree will