]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
linux: add loongarch64 support
authorXiaotian Wu <wuxiaotian@loongson.cn>
Fri, 3 Feb 2023 07:16:13 +0000 (07:16 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 Feb 2023 11:40:51 +0000 (11:40 +0000)
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-arch.bbclass
meta/recipes-kernel/linux/linux-yocto-dev.bb
meta/recipes-kernel/linux/linux-yocto_6.1.bb

index 1531ae6cd55b6b8a22268ce534c47f0c1ed3f109..777f9002419a1a4b596cb3fa392c20336aca312e 100644 (file)
@@ -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'
index 8671b3d30d4aa1c983fa00df1c4ae116fc5c55c1..05e405f81c4c6e770f5147bbbc02b8047cc40111 100644 (file)
@@ -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"
 
index 6bd83197fb6b39bf26273ca8615147fac1fa663a..66d397837f508257a3dcf18de34df830e960929e 100644 (file)
@@ -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 ?= "ccd3b20fb504d35147d35962254b68b0041a4c6f"
 SRCREV_machine:qemuarm64 ?= "1caf99d56881e1510afca553cd4a057f80479973"
+SRCREV_machine:qemuloongarch64 ?= "1caf99d56881e1510afca553cd4a057f80479973"
 SRCREV_machine:qemumips ?= "d60ecbda7d4de915c867f751f5c63555a14219d1"
 SRCREV_machine:qemuppc ?= "1caf99d56881e1510afca553cd4a057f80479973"
 SRCREV_machine:qemuriscv64 ?= "1caf99d56881e1510afca553cd4a057f80479973"
@@ -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"