[OE-core] [PATCH v2 5/5] uboot: add a loongarch64 entry

2023-02-02 Thread Xiaotian Wu
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
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176712): 
https://lists.openembedded.org/g/openembedded-core/message/176712
Mute This Topic: https://lists.openembedded.org/mt/96718648/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 4/5] loongarch: disable seccomp from default feature

2023-02-02 Thread Xiaotian Wu
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 ?= ""
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176711): 
https://lists.openembedded.org/g/openembedded-core/message/176711
Mute This Topic: https://lists.openembedded.org/mt/96718647/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 3/5] binutils: disable gold on loongarch64

2023-02-02 Thread Xiaotian Wu
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")
 }
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176710): 
https://lists.openembedded.org/g/openembedded-core/message/176710
Mute This Topic: https://lists.openembedded.org/mt/96718646/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 2/5] linux: add loongarch64 support

2023-02-02 Thread Xiaotian Wu
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 6bd83197fb..66d397837f 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 ?= "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"
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176709): 
https://lists.openembedded.org/g/openembedded-core/message/176709
Mute This Topic: https://lists.openembedded.org/mt/96718645/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 0/5] Add support for LoongArch

2023-02-02 Thread Xiaotian Wu
LoongArch is a new architecture, already supported by linux-6.1, gcc-12, I want 
to add support to openembedded.

These patch sets add basic support, and it can run cross-compile on on x86_64.
The next step is to add support for yocto repositories, such as 
yocto-kernel-cache.

Please review these patches, thanks.

v1->v2:
- remove loongarch64 from local.conf.sample.
- update commit message for uboot.

Xiaotian Wu (5):
  base: add support for loongarch64
  linux: add loongarch64 support
  binutils: disable gold on loongarch64
  loongarch: disable seccomp from default feature
  uboot: add a loongarch64 entry

 meta/classes-recipe/kernel-arch.bbclass   |  2 ++
 meta/classes-recipe/siteinfo.bbclass  |  4 +++
 .../distro/include/default-distrovars.inc |  3 ++
 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/lib/oe/elf.py|  2 ++
 meta/recipes-bsp/u-boot/u-boot-tools.inc  |  1 +
 meta/recipes-devtools/binutils/binutils.inc   |  5 +--
 meta/recipes-devtools/meson/meson_1.0.0.bb|  2 ++
 meta/recipes-devtools/qemu/qemu.inc   |  2 +-
 meta/recipes-kernel/linux/linux-yocto-dev.bb  |  2 +-
 meta/recipes-kernel/linux/linux-yocto_6.1.bb  |  4 ++-
 meta/site/loongarch64-linux   | 11 ++
 scripts/lib/wic/canned-wks/qemuloongarch.wks  |  3 ++
 scripts/runqemu   |  4 ++-
 18 files changed, 107 insertions(+), 6 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

-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176708): 
https://lists.openembedded.org/g/openembedded-core/message/176708
Mute This Topic: https://lists.openembedded.org/mt/96718644/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 1/5] base: add support for loongarch64

2023-02-02 Thread Xiaotian Wu
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/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 ++-
 12 files changed, 94 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 00..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 00..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 00..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 = "0x8040"
+UBOOT_ENTRYPOINT_loongarch64 = "0x8020"
+
+# 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 

Re: [OE-core] [yocto] QA notification for completed autobuilder build (yocto-4.0.7.rc1)

2023-02-02 Thread Jing Hui Tham
Hi All,
 
QA for yocto-4.0.7.rc1 is completed. This is the full report for this release:  
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-testresults-contrib/tree/?h=intel-yocto-testresults
 
=== Summary 
No high milestone defects.
 
No new issue found. 
 
Thanks,
Jing Hui



> -Original Message-
> From: yo...@lists.yoctoproject.org  On
> Behalf Of Pokybuild User
> Sent: Saturday, 28 January, 2023 7:09 AM
> To: yo...@lists.yoctoproject.org
> Cc: qa-build-notificat...@lists.yoctoproject.org
> Subject: [yocto] QA notification for completed autobuilder build (yocto-
> 4.0.7.rc1)
> 
> 
> A build flagged for QA (yocto-4.0.7.rc1) was completed on the autobuilder
> and is available at:
> 
> 
> https://autobuilder.yocto.io/pub/releases/yocto-4.0.7.rc1
> 
> 
> Build hash information:
> 
> bitbake: 7e268c107bb0240d583d2c34e24a71e373382509
> meta-agl: b9d4796f44a56c6a9c8233d82e46c251a82f6020
> meta-arm: ce41be0a7fe7c6f5fd2155866980388d3c83389f
> meta-aws: 9d9400b03c22839398756f505491718392907266
> meta-gplv2: d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a
> meta-intel: f529e0594a784546926e89ce8e78385e00d0b0a9
> meta-mingw: a90614a6498c3345704e9611f2842eb933dc51c1
> meta-openembedded: 1f31570d0795da90083d1dbf28127c90908e30ee
> meta-virtualization: 9a94fa2ad76990b0eca40837a98aaf4cd83a7248
> oecore: a8c82902384f7430519a31732a4bb631f21693ac
> poky: 65dafea22018052fe7b2e17e6e4d7eb754224d38
> 
> 
> 
> This is an automated message from the Yocto Project Autobuilder
> Git: git://git.yoctoproject.org/yocto-autobuilder2
> Email: richard.pur...@linuxfoundation.org
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176706): 
https://lists.openembedded.org/g/openembedded-core/message/176706
Mute This Topic: https://lists.openembedded.org/mt/96674137/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-oe][PATCH V1] tar: add ptest

2023-02-02 Thread Yan Xin Kuan
From: Yan 

enable ptest for oss "tar".

Signed-off-by: Yanxinkuan 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-extended/tar/files/run-ptest | 10 +++
 meta/recipes-extended/tar/tar_1.34.bb | 27 +--
 3 files changed, 36 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/tar/files/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index 72162f10ee..d3e18ea4a4 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -100,6 +100,7 @@ PTESTS_SLOW = "\
 python3-cryptography-ptest \
 python3-ptest \
 strace-ptest \
+tar-ptest \
 tcl-ptest \
 util-linux-ptest \
 valgrind-ptest \
diff --git a/meta/recipes-extended/tar/files/run-ptest 
b/meta/recipes-extended/tar/files/run-ptest
new file mode 100644
index 00..9ca27153d9
--- /dev/null
+++ b/meta/recipes-extended/tar/files/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Define tar test work dir
+WORKDIR=/usr/lib/tar/ptest/tests/
+
+# Run test
+cd ${WORKDIR}
+./atconfig ./atlocal ./testsuite
+
+./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e 
'/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: 
/;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 
's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 
's/UNEXPECTED PASS.*//g'
diff --git a/meta/recipes-extended/tar/tar_1.34.bb 
b/meta/recipes-extended/tar/tar_1.34.bb
index 7307cd57a2..7a178c345f 100644
--- a/meta/recipes-extended/tar/tar_1.34.bb
+++ b/meta/recipes-extended/tar/tar_1.34.bb
@@ -6,11 +6,12 @@ SECTION = "base"
 LICENSE = "GPL-3.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
+   file://run-ptest"
 
 SRC_URI[sha256sum] = 
"b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff"
 
-inherit autotools gettext texinfo
+inherit autotools gettext texinfo ptest
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 
'acl', d)}"
@@ -42,6 +43,28 @@ do_install:append:class-target() {
 fi
 }
 
+# Tar testsuite would generate some small tests that are
+# bash scripts, so set ptest dependency to bash
+RDEPENDS:${PN}-ptest += "bash"
+
+do_compile_ptest() {
+oe_runmake -C ${B}/gnu/ check
+oe_runmake -C ${B}/lib/ check
+oe_runmake -C ${B}/rmt/ check
+oe_runmake -C ${B}/src/ check
+oe_runmake -C ${B}/tests/ genfile checkseekhole ckmtime
+}
+
+do_install_ptest() {
+install -d ${D}${PTEST_PATH}/tests/
+install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/
+install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/
+install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/
+install --mode=755 ${B}/tests/checkseekhole ${D}${PTEST_PATH}/tests/
+install --mode=755 ${B}/tests/ckmtime ${D}${PTEST_PATH}/tests/
+install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/
+}
+
 PACKAGES =+ "${PN}-rmt"
 
 FILES:${PN}-rmt = "${sbindir}/rmt*"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176705): 
https://lists.openembedded.org/g/openembedded-core/message/176705
Mute This Topic: https://lists.openembedded.org/mt/96716263/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-oe][PATCH] bc ptest: fix bugs caused by input method

2023-02-02 Thread Yan Xin Kuan
From: Yan Xinkuan 

fix some bugs related to echo function caused by input method.

echo would work fine now, difference as below:

before: “PASS: bc/*.b”

now:PASS: bc/*.b

Signed-off-by: Yan Xinkuan 
---
 meta/recipes-extended/bc/bc/run-ptest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/bc/bc/run-ptest 
b/meta/recipes-extended/bc/bc/run-ptest
index 66a1b9d708..ba5abe6805 100644
--- a/meta/recipes-extended/bc/bc/run-ptest
+++ b/meta/recipes-extended/bc/bc/run-ptest
@@ -2,8 +2,8 @@

 for TEST in *.b; do
if bc -l $TEST 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176704): 
https://lists.openembedded.org/g/openembedded-core/message/176704
Mute This Topic: https://lists.openembedded.org/mt/96716154/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 1/1] python3-certifi: fix for CVE-2022-23491

2023-02-02 Thread Narpat Mali
Certifi is a curated collection of Root Certificates for validating the
trustworthiness of SSL certificates while verifying the identity of TLS
hosts. Certifi 2022.12.07 removes root certificates from "TrustCor" from
the root store. These are in the process of being removed from Mozilla's
trust store. TrustCor's root certificates are being removed pursuant to
an investigation prompted by media reporting that TrustCor's ownership
also operated a business that produced spyware. Conclusions of Mozilla's
investigation can be found in the linked google group discussion.

Reference: https://nvd.nist.gov/vuln/detail/CVE-2022-23491

Signed-off-by: Narpat Mali 
---
 .../python3-certifi/CVE-2022-23491.patch  | 230 ++
 .../python/python3-certifi_2021.10.8.bb   |   2 +
 2 files changed, 232 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3-certifi/CVE-2022-23491.patch

diff --git a/meta/recipes-devtools/python/python3-certifi/CVE-2022-23491.patch 
b/meta/recipes-devtools/python/python3-certifi/CVE-2022-23491.patch
new file mode 100644
index 00..94ca254549
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-certifi/CVE-2022-23491.patch
@@ -0,0 +1,230 @@
+From 167413eefa9482ab3ccdcc70e511ef5fcc2b Mon Sep 17 00:00:00 2001
+From: Narpat Mali 
+Date: Thu, 2 Feb 2023 12:57:06 +
+Subject: [PATCH] Certifi is a curated collection of Root Certificates for
+ validating the trustworthiness of SSL certificates while verifying the
+ identity of TLS hosts. Certifi 2022.12.07 removes root certificates from
+ "TrustCor" from the root store. These are in the process of being removed
+ from Mozilla's trust store. TrustCor's root certificates are being removed
+ pursuant to an investigation prompted by media reporting that TrustCor's
+ ownership also operated a business that produced spyware. Conclusions of
+ Mozilla's investigation can be found in the linked google group discussion.
+
+CVE: CVE-2022-23491
+
+Upstream-Status: Backport 
[https://github.com/certifi/python-certifi/commit/9e9e840925d7b8e76c76fdac1fab7e6e88c1c3b8]
+
+Signed-off-by: Narpat Mali 
+---
+ certifi/cacert.pem | 181 -
+ 1 file changed, 181 deletions(-)
+
+diff --git a/certifi/cacert.pem b/certifi/cacert.pem
+index 6d0ccc0..6bae3e4 100644
+--- a/certifi/cacert.pem
 b/certifi/cacert.pem
+@@ -694,37 +694,6 @@ 
BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
+ ZQ==
+ -END CERTIFICATE-
+ 
+-# Issuer: CN=Network Solutions Certificate Authority O=Network Solutions 
L.L.C.
+-# Subject: CN=Network Solutions Certificate Authority O=Network Solutions 
L.L.C.
+-# Label: "Network Solutions Certificate Authority"
+-# Serial: 116697915152937497490437556386812487904
+-# MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e
+-# SHA1 Fingerprint: 
74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce
+-# SHA256 Fingerprint: 
15:f0:ba:00:a3:ac:7a:f3:ac:88:4c:07:2b:10:11:a0:77:bd:77:c0:97:f4:01:64:b2:f8:59:8a:bd:83:86:0c
+--BEGIN CERTIFICATE-
+-MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi
+-MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
+-MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp
+-dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV
+-UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO
+-ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
+-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz
+-c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP
+-OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl
+-mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF
+-BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4
+-qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw
+-gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB
+-BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
+-bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
+-dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
+-6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
+-h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
+-/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
+-wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
+-pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
+--END CERTIFICATE-
+-
+ # Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited
+ # Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited
+ # Label: "COMODO ECC Certification Authority"
+@@ -2385,46 +2354,6 @@ 
KoZIzj0EAwMDaAAwZQIxAOVpEslu28YxuglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg
+ xwy8p2Fp8fc74SrL+SvzZpA3
+ -END CERTIFICATE-
+ 
+-# Issuer: CN=Staat der Nederlanden EV Root CA O=Staat der Nederlanden
+-# Subject: CN=Staat der Nederlanden EV Root CA O=Staat der Nederlanden
+-# 

Re: [OE-core] [PATCH] rust: Upgrade 1.66.0 -> 1.66.1

2023-02-02 Thread Tim Orling
On Tue, Jan 17, 2023 at 6:08 PM Randy MacLeod 
wrote:

> 
>
> The Rust developers / community seems to want their software to work in a
> similar way.
> They have a quite exhaustive test suite (Crater) to check for regressions.
> I'll look for some actual test results from Crater and reply here when I
> find them.
>
There is a Crater  chapter in the Rust
docs 
I haven't found any test runs/results in their GitHub actions yet...
There is rust-toolstate
, but it only shows
the status per commit, not the test case results.

Ah, perhaps these are the Crater tests?
 https://github.com/rust-lang-ci/rust/actions


> I not sure what to make of the "Rust Editions" and how they'd fit into our
> distro support
> but the clear mandate from upstream is that only the 'stable' release is
> supported.
>
>https://doc.rust-lang.org/edition-guide/editions/index.html
>
> I think there's an argument to be made that until Rust releases 2.x, we
> just update
> to the latest version. If you haven't please read:
>
>
> https://internals.rust-lang.org/t/cargo-cve-2022-46176-fix-for-older-releases/18152/3?u=sundeep-kokkonda
>
Fedora's Josh Stone mentioned that they keep the latest rust
 packaged for all supported Fedora
releases:
https://packages.fedoraproject.org/pkgs/rust/rust/

Debian is on 1.64 even for experimental
. Stable releases are on _much_
older versions .

Ubuntu  is on 1.65.

It will be interesting to see what the distros do to handle this situation.


>
> Sundeep,
>
> Please also try to backporting the fixes to say Cargo/Rust for kirkstone.
> This CVE resulted in ~10 patches so it's hopefully one
> of the more complicated back ports and will prove to be a good test case.
>
> The patch series for CVE-2022-46176



> ../Randy
>
> 
>
> --
> # Randy MacLeod
> # Wind River Linux
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176702): 
https://lists.openembedded.org/g/openembedded-core/message/176702
Mute This Topic: https://lists.openembedded.org/mt/96218038/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][dunfell][PATCH] libsdl2: Add fix for CVE-2022-4743

2023-02-02 Thread Ranjitsinh Rathod
From: Ranjitsinh Rathod 

Add a patch to fix CVE-2022-4743 security issue "A potential memory leak
issue was discovered in SDL2 in GLES_CreateTexture() function in
SDL_render_gles.c. The vulnerability allows an attacker to cause a
denial of service attack. The vulnerability affects SDL2 v2.0.4 and
above. SDL-1.x are not affected." as per NVD

Signed-off-by: Ranjitsinh Rathod 
Signed-off-by: Ranjitsinh Rathod 
---
 .../libsdl2/libsdl2/CVE-2022-4743.patch   | 38 +++
 .../libsdl2/libsdl2_2.0.12.bb |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/CVE-2022-4743.patch

diff --git a/meta/recipes-graphics/libsdl2/libsdl2/CVE-2022-4743.patch 
b/meta/recipes-graphics/libsdl2/libsdl2/CVE-2022-4743.patch
new file mode 100644
index 00..b02a2169a6
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/CVE-2022-4743.patch
@@ -0,0 +1,38 @@
+From 00b67f55727bc0944c3266e2b875440da132ce4b Mon Sep 17 00:00:00 2001
+From: zhailiangliang 
+Date: Wed, 21 Sep 2022 10:30:38 +0800
+Subject: [PATCH] Fix potential memory leak in GLES_CreateTexture
+
+
+CVE: CVE-2022-4743
+Upstream-Status: Backport 
[https://github.com/libsdl-org/SDL/commit/00b67f55727bc0944c3266e2b875440da132ce4b.patch]
+Signed-off-by: Ranjitsinh Rathod 
+
+---
+ src/render/opengles/SDL_render_gles.c | 6 ++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/render/opengles/SDL_render_gles.c 
b/src/render/opengles/SDL_render_gles.c
+index a5fbab309eda..ba08a46e2805 100644
+--- a/src/render/opengles/SDL_render_gles.c
 b/src/render/opengles/SDL_render_gles.c
+@@ -359,6 +359,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * 
texture)
+ renderdata->glGenTextures(1, >texture);
+ result = renderdata->glGetError();
+ if (result != GL_NO_ERROR) {
++if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
++SDL_free(data->pixels);
++}
+ SDL_free(data);
+ return GLES_SetError("glGenTextures()", result);
+ }
+@@ -387,6 +390,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * 
texture)
+ 
+ result = renderdata->glGetError();
+ if (result != GL_NO_ERROR) {
++if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
++SDL_free(data->pixels);
++}
+ SDL_free(data);
+ return GLES_SetError("glTexImage2D()", result);
+ }
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb 
b/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb
index 44d36fca22..fa29bc99ac 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
file://directfb-renderfillrect-fix.patch \
file://CVE-2020-14409-14410.patch \
file://CVE-2021-33657.patch \
+   file://CVE-2022-4743.patch \
 "
 
 S = "${WORKDIR}/SDL2-${PV}"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176701): 
https://lists.openembedded.org/g/openembedded-core/message/176701
Mute This Topic: https://lists.openembedded.org/mt/96700171/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][kirkstone][PATCH] xorg-x11-server: fix multiple xorg-x11-server bugs.

2023-02-02 Thread vkumbhar
No changes required, As all the fixes available in this version.

-Thanks,
Vivek

On Mon, Jan 30, 2023 at 11:17 PM Steve Sakoman  wrote:

> On Wed, Jan 25, 2023 at 1:55 AM vkumbhar  wrote:
> >
> > From: Vivek Kumbhar 
> >
> > Fixed Below CVE:
> > CVE-2022-4283
> > CVE-2022-46340
> > CVE-2022-46341
> > CVE-2022-46342
> > CVE-2022-46343
> > CVE-2022-46344
> >
> > Signed-off-by: Vivek Kumbhar 
> > ---
> >  .../xserver-xorg/CVE-2022-4283.patch  | 39 +
> >  .../xserver-xorg/CVE-2022-46340.patch | 55 
> >  .../xserver-xorg/CVE-2022-46341.patch | 86 +++
> >  .../xserver-xorg/CVE-2022-46342.patch | 78 +
> >  .../xserver-xorg/CVE-2022-46343.patch | 51 +++
> >  .../xserver-xorg/CVE-2022-46344.patch | 75 
> >  .../xorg-xserver/xserver-xorg_21.1.4.bb   |  6 ++
>
> We've done a version bump to 21.1.6 in kirkstone, so you'll need to
> rework this patch (if it is still necessary)
>
> Thanks!
>
> Steve
>
> >  7 files changed, 390 insertions(+)
> >  create mode 100644
> meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-4283.patch
> >  create mode 100644
> meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46340.patch
> >  create mode 100644
> meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46341.patch
> >  create mode 100644
> meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46342.patch
> >  create mode 100644
> meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46343.patch
> >  create mode 100644
> meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46344.patch
> >
> > diff --git
> a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-4283.patch
> b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-4283.patch
> > new file mode 100644
> > index 00..ce642843ab
> > --- /dev/null
> > +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-4283.patch
> > @@ -0,0 +1,39 @@
> > +From ccdd431cd8f1cabae9d744f0514b6533c438908c Mon Sep 17 00:00:00 2001
> > +From: Peter Hutterer 
> > +Date: Mon, 5 Dec 2022 15:55:54 +1000
> > +Subject: [PATCH] xkb: reset the radio_groups pointer to NULL after
> freeing it
> > +
> > +Unlike other elements of the keymap, this pointer was freed but not
> > +reset. On a subsequent XkbGetKbdByName request, the server may access
> > +already freed memory.
> > +
> > +CVE-2022-4283, ZDI-CAN-19530
> > +
> > +This vulnerability was discovered by:
> > +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
> > +
> > +Signed-off-by: Peter Hutterer 
> > +Acked-by: Olivier Fourdan 
> > +
> > +Upstream-Status: Backport [
> https://gitlab.freedesktop.org/xorg/xserver/-/commit/ccdd431cd8f1cabae9d744f0514b6533c438908c
> ]
> > +CVE: CVE-2022-4283
> > +Signed-off-by: Vivek Kumbhar 
> > +---
> > + xkb/xkbUtils.c | 1 +
> > + 1 file changed, 1 insertion(+)
> > +
> > +diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
> > +index dd089c204..3f5791a18 100644
> > +--- a/xkb/xkbUtils.c
> >  b/xkb/xkbUtils.c
> > +@@ -1326,6 +1326,7 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst)
> > + }
> > + else {
> > + free(dst->names->radio_groups);
> > ++dst->names->radio_groups = NULL;
> > + }
> > + dst->names->num_rg = src->names->num_rg;
> > +
> > +--
> > +2.30.2
> > +
> > diff --git
> a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46340.patch
> b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46340.patch
> > new file mode 100644
> > index 00..9bdcdfa76e
> > --- /dev/null
> > +++
> b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-46340.patch
> > @@ -0,0 +1,55 @@
> > +From b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63 Mon Sep 17 00:00:00 2001
> > +From: Peter Hutterer 
> > +Date: Tue, 29 Nov 2022 12:55:45 +1000
> > +Subject: [PATCH] Xtest: disallow GenericEvents in XTestSwapFakeInput
> > +
> > +XTestSwapFakeInput assumes all events in this request are
> > +sizeof(xEvent) and iterates through these in 32-byte increments.
> > +However, a GenericEvent may be of arbitrary length longer than 32 bytes,
> > +so any GenericEvent in this list would result in subsequent events to be
> > +misparsed.
> > +
> > +Additional, the swapped event is written into a stack-allocated struct
> > +xEvent (size 32 bytes). For any GenericEvent longer than 32 bytes,
> > +swapping the event may thus smash the stack like an avocado on toast.
> > +
> > +Catch this case early and return BadValue for any GenericEvent.
> > +Which is what would happen in unswapped setups anyway since XTest
> > +doesn't support GenericEvent.
> > +
> > +CVE-2022-46340, ZDI-CAN 19265
> > +
> > +This vulnerability was discovered by:
> > +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
> > +
> > +Signed-off-by: Peter Hutterer 
> > +Acked-by: Olivier Fourdan 
> > +
> > +Upstream-Status: Backport [
> https://gitlab.freedesktop.org/xorg/xserver/-/commit/b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63
> ]

Re: [OE-core][kirkstone 10/13] native: Drop special variable handling

2023-02-02 Thread Steve Sakoman
On Thu, Feb 2, 2023 at 1:42 AM Richard Purdie
 wrote:
>
> On Wed, 2023-02-01 at 12:16 -1000, Steve Sakoman wrote:
> > From: Richard Purdie 
> >
> > Back when it was merged in 
> > https://git.yoctoproject.org/poky/commit/?id=c4257ed8b1040a5a0e9a95846d81961741239116
> > it appeared special handling in setVar was necessary. Likely due to
> > other fixes and improvements it no longer appears to be. The results of
> > "bitbake world -g" before and after this change are identical for oe-core
> > and meta-openembedded. Therefore drop the "parsing=True" special parameter 
> > to
> > setVar() meaning overrides can now be cleared.
> >
> > This means that something like:
> >
> > DEPENDS:append = " bash"
> >
> > now functions as expected, adding bash to the target recipe and bash-native 
> > to
> > the native BBCLASSEXTENDED version.
> >
> > Without this change, it would add bash to the native version as well as
> > bash-native which is clearly incorrect.
> >
> > [YOCTO #15010]
> >
> > Signed-off-by: Richard Purdie 
> > Signed-off-by: Luca Ceresoli 
> > Signed-off-by: Richard Purdie 
> > (cherry picked from commit 99a5105f7b5303cd36077b5910c662a865c1782c)
> > Signed-off-by: Steve Sakoman 
> > ---
> >  meta/classes/native.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
> > index fc7422c5d7..4de96cd59b 100644
> > --- a/meta/classes/native.bbclass
> > +++ b/meta/classes/native.bbclass
> > @@ -153,7 +153,7 @@ python native_virtclass_handler () {
> >  newdeps.append(dep.replace(pn, bpn) + "-native")
> >  else:
> >  newdeps.append(dep)
> > -d.setVar(varname, " ".join(newdeps), parsing=True)
> > +d.setVar(varname, " ".join(newdeps))
> >
> >  map_dependencies("DEPENDS", e.data, selfref=False)
> >  for pkg in e.data.getVar("PACKAGES", False).split():
>
> Steve: Did you check "bitbake world -g" is the same before and after
> this change for kirkstone?

task-depends.dot files are identical with and without this patch.

Ordering of pn-buildlist is different before and after, but sorted
they are identical.

Steve

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176699): 
https://lists.openembedded.org/g/openembedded-core/message/176699
Mute This Topic: https://lists.openembedded.org/mt/96688108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] oeqa/selftest/locales: Create selftest for locales generation

2023-02-02 Thread Louis Rannou


On 02/02/2023 11:53, Richard Purdie wrote:

On Thu, 2023-02-02 at 11:41 +0100, Louis Rannou wrote:

On 01/02/2023 18:57, Richard Purdie wrote:

On Wed, 2023-02-01 at 16:02 +0100, Louis Rannou wrote:


I was able to take a quick look at this. The locale generation on
target is broken, it throws errors upon boot. I was able to make it
work with this patch:

diff --git a/meta/recipes-core/glibc/glibc-locale.inc 
b/meta/recipes-core/glibc/glibc-locale.inc
index 7f70b3ca4f..c39007b573 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -60,7 +60,7 @@ DESCRIPTION:localedef = "glibc: compile locale definition 
files"
   # FILES:glibc-gconv will not be automatically extended in multilib.
   # Explicitly add ${MLPREFIX} for FILES:glibc-gconv.
   FILES:${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
-FILES:localedef = "${bindir}/localedef"
+FILES:localedef = "${bindir}/localedef ${libdir}/locale"
   
   LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
   
@@ -87,6 +87,7 @@ do_install() {

  find ${D}${libdir} -type d -empty -delete
  copy_locale_files ${datadir}/locale 0644
  install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED
+   install -d ${D}${libdir}/locale
   }
   
   inherit libc-package


could you see if the same test will now work with that patch applied?
I'm happy to have the basic test but if we can fix this and stop it
regressing that would be even better.


The patch does not change the result. I have actually nothing in the
image/usr/lib/locale directory.


Testing locally, if I don't have the patch and "runqemu core-image-
minimal snapshot kvm", I see errors about locale generation failing
during first boot as the directory isn't present.

If I add the patch and then boot the image, I see the locale generation
happening at first boot. If I then run the locale commands, I can see
the locales present.


I wonder which package do that, because this is not something I see on 
my qemu. I run a kirkstone qemuarm on poky. Perhaps I need something 
more recent.





I am not sure to understand... If I add to my image the packages
glibc-localedata-fr-fr and glibc-charmap-utf-8, then I have something in
/usr/share/i18n/locales and /usr/share/i18n/charmaps, and then I can
generate the locales with `localedef -c -i fr_FR -f UTF-8 fr_FR`

In the end, I believe this is correct that I have nothing in
{libdir}/locale, but perhaps the settings IMAGE_LINGUAS (or
GLIBC_GENERATE_LOCALES ?) should specify a rdepend to the locale/charmap
packages, so the locales would exist in the image, but would not be
generated at build.


The locale generation can happen at build time or it can happen at
first boot on the final target. For the second test case, the locales
will only appear during the boot process.

I've merged your patch with the first test case, thanks! I did tweak
the comment message to match that it is just one test so far. Thanks
for getting us that far, it is great to be adding tests around this.


Thank you ! It's cool if I can help more on this. As soon as I can 
reproduce what you have.


Regards
Louis

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176698): 
https://lists.openembedded.org/g/openembedded-core/message/176698
Mute This Topic: https://lists.openembedded.org/mt/96567951/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] python3-pytest: Remove dependency on python3-toml

2023-02-02 Thread Arnout Vandecappelle



On 02/02/2023 13:49, Arnout Vandecappelle via lists.openembedded.org wrote:

Since version 7.2.0 [1], pytest uses the "batteries included" tomllib
module for parsing pyproject.toml configuration files [2]. It is
therefore no longer necessary to have python3-toml in RDEPENDS.

[1] https://docs.pytest.org/en/latest/changelog.html#pytest-7-2-0-2022-10-23
[2] https://github.com/pytest-dev/pytest/pull/9741

Signed-off-by: Arnout Vandecappelle 
---
This patch only applies to kirkstone and langdale branches. On master,
Python 3.11 is used which no longer needs tomli at all. On dunfell,
pytest is still on 5.3.5.


 Meh, I copy-pasted the commit message from the kirkstone/langdale patch and 
forgot to remove this bit. I assume I don't need to resend for that?


 Regards,
 Arnout


---
  meta/recipes-devtools/python/python3-pytest_7.2.0.bb | 1 -
  1 file changed, 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-pytest_7.2.0.bb 
b/meta/recipes-devtools/python/python3-pytest_7.2.0.bb
index 02fc55fdb0..c4d1c184cf 100644
--- a/meta/recipes-devtools/python/python3-pytest_7.2.0.bb
+++ b/meta/recipes-devtools/python/python3-pytest_7.2.0.bb
@@ -26,7 +26,6 @@ RDEPENDS:${PN}:class-target += " \
  ${PYTHON_PN}-py \
  ${PYTHON_PN}-setuptools \
  ${PYTHON_PN}-six \
-${PYTHON_PN}-toml \
  ${PYTHON_PN}-wcwidth \
  "
  







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176697): 
https://lists.openembedded.org/g/openembedded-core/message/176697
Mute This Topic: https://lists.openembedded.org/mt/96698820/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH-kirkstone/langdale] python3-pytest: depend on python3-tomli instead of python3-toml

2023-02-02 Thread Arnout Vandecappelle
Since version 7.0.0 [1], pytest switched from the toml package to the
tomli package for parsing pyproject.toml configuration files [2].

This change is not immediately noticable during tests, because the
toml/tomli module is only important if a pyproject.toml is actually
present in a project.

[1] https://docs.pytest.org/en/latest/changelog.html#pytest-7-0-0rc1-2021-12-06
[2] https://github.com/pytest-dev/pytest/issues/8789

Signed-off-by: Arnout Vandecappelle 
---
This patch only applies to kirkstone and langdale branches. On master,
Python 3.11 is used which no longer needs tomli at all. On dunfell,
pytest is still on 5.3.5.
---
 meta/recipes-devtools/python/python3-pytest_7.1.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-pytest_7.1.1.bb 
b/meta/recipes-devtools/python/python3-pytest_7.1.1.bb
index 1cb2fb01c0..90a4787c17 100644
--- a/meta/recipes-devtools/python/python3-pytest_7.1.1.bb
+++ b/meta/recipes-devtools/python/python3-pytest_7.1.1.bb
@@ -26,7 +26,7 @@ RDEPENDS:${PN}:class-target += " \
 ${PYTHON_PN}-py \
 ${PYTHON_PN}-setuptools \
 ${PYTHON_PN}-six \
-${PYTHON_PN}-toml \
+${PYTHON_PN}-tomli \
 ${PYTHON_PN}-wcwidth \
 "
 
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176696): 
https://lists.openembedded.org/g/openembedded-core/message/176696
Mute This Topic: https://lists.openembedded.org/mt/96698824/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] python3-pytest: Remove dependency on python3-toml

2023-02-02 Thread Arnout Vandecappelle
Since version 7.2.0 [1], pytest uses the "batteries included" tomllib
module for parsing pyproject.toml configuration files [2]. It is
therefore no longer necessary to have python3-toml in RDEPENDS.

[1] https://docs.pytest.org/en/latest/changelog.html#pytest-7-2-0-2022-10-23
[2] https://github.com/pytest-dev/pytest/pull/9741

Signed-off-by: Arnout Vandecappelle 
---
This patch only applies to kirkstone and langdale branches. On master,
Python 3.11 is used which no longer needs tomli at all. On dunfell,
pytest is still on 5.3.5.
---
 meta/recipes-devtools/python/python3-pytest_7.2.0.bb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-pytest_7.2.0.bb 
b/meta/recipes-devtools/python/python3-pytest_7.2.0.bb
index 02fc55fdb0..c4d1c184cf 100644
--- a/meta/recipes-devtools/python/python3-pytest_7.2.0.bb
+++ b/meta/recipes-devtools/python/python3-pytest_7.2.0.bb
@@ -26,7 +26,6 @@ RDEPENDS:${PN}:class-target += " \
 ${PYTHON_PN}-py \
 ${PYTHON_PN}-setuptools \
 ${PYTHON_PN}-six \
-${PYTHON_PN}-toml \
 ${PYTHON_PN}-wcwidth \
 "
 
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176695): 
https://lists.openembedded.org/g/openembedded-core/message/176695
Mute This Topic: https://lists.openembedded.org/mt/96698820/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCHv3] sstate.bbclass: Fetch non-existing local .sig files if needed

2023-02-02 Thread Peter Kjellerstedt
Please backport this to Kirkstone and Langdale.

//Peter

> -Original Message-
> From: openembedded-core@lists.openembedded.org 
>  On Behalf Of Tobias Hagelborn
> Sent: den 30 januari 2023 15:20
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCHv3] sstate.bbclass: Fetch non-existing local .sig 
> files if needed
> 
> For the case of a global shared state cache and a local sstate cache
> with a mix of signed and un-signed entries, there is a case where
> a .sig is missing locally, but may exist in the global sstate cache.
> 
> For this case, do not just fail sstate fetch, but rather backfill
> the .sig file from the global sstate cache.
> 
> If this case is detected, re-run the fetch operation to get the
> global .sig file (if it exists).
> 
> Signed-off-by: Tobias Hagelborn 
> ---
> New in v3:
> * Use exists
> * Consolidate into previously existing fetch block (with new condition)
> 
>  meta/classes-global/sstate.bbclass | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes-global/sstate.bbclass 
> b/meta/classes-global/sstate.bbclass
> index 77e3ea34e1..567de4aba4 100644
> --- a/meta/classes-global/sstate.bbclass
> +++ b/meta/classes-global/sstate.bbclass
> @@ -365,8 +365,9 @@ def sstate_installpkg(ss, d):
>  d.setVar("SSTATE_CURRTASK", ss['task'])
>  sstatefetch = d.getVar('SSTATE_PKGNAME')
>  sstatepkg = d.getVar('SSTATE_PKG')
> +verify_sig = bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False)
> 
> -if not os.path.exists(sstatepkg):
> +if not os.path.exists(sstatepkg) or (verify_sig and not 
> os.path.exists(sstatepkg + '.sig')):
>  pstaging_fetch(sstatefetch, d)
> 
>  if not os.path.isfile(sstatepkg):
> @@ -377,7 +378,7 @@ def sstate_installpkg(ss, d):
> 
>  d.setVar('SSTATE_INSTDIR', sstateinst)
> 
> -if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False):
> +if verify_sig:
>  if not os.path.isfile(sstatepkg + '.sig'):
>  bb.warn("No signature file for sstate package %s, skipping 
> acceleration..." % sstatepkg)
>  return False
> --
> 2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176694): 
https://lists.openembedded.org/g/openembedded-core/message/176694
Mute This Topic: https://lists.openembedded.org/mt/96628441/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v1 0/5] Add support for LoongArch

2023-02-02 Thread Alexander Kanavin
Thank you, the patches overall seem fine; I only added a couple of
small comments that should be easy to address.

Alex

On Thu, 2 Feb 2023 at 09:02, Xiaotian Wu  wrote:
>
> LoongArch is a new architecture, already supported by linux-6.1, gcc-12, I 
> want to add support to openembedded.
>
> These patch sets add basic support, and it can run cross-compile on on x86_64.
> The next step is to add support for yocto repositories, such as 
> yocto-kernel-cache.
>
> Please review these patches, thanks.
>
> Xiaotian Wu (5):
>   base: add support for loongarch64
>   linux: add loongarch64 support
>   binutils: disable gold on loongarch64
>   loongarch: disable seccomp from default feature
>   uboot: loongarch64
>
>  meta/classes-recipe/kernel-arch.bbclass   |  2 ++
>  meta/classes-recipe/siteinfo.bbclass  |  4 +++
>  .../distro/include/default-distrovars.inc |  3 ++
>  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-bsp/u-boot/u-boot-tools.inc  |  1 +
>  meta/recipes-devtools/binutils/binutils.inc   |  5 +--
>  meta/recipes-devtools/meson/meson_1.0.0.bb|  2 ++
>  meta/recipes-devtools/qemu/qemu.inc   |  2 +-
>  meta/recipes-kernel/linux/linux-yocto-dev.bb  |  2 +-
>  meta/recipes-kernel/linux/linux-yocto_6.1.bb  |  4 ++-
>  meta/site/loongarch64-linux   | 11 ++
>  scripts/lib/wic/canned-wks/qemuloongarch.wks  |  3 ++
>  scripts/runqemu   |  4 ++-
>  19 files changed, 108 insertions(+), 6 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
>
> --
> 2.39.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176693): 
https://lists.openembedded.org/g/openembedded-core/message/176693
Mute This Topic: https://lists.openembedded.org/mt/96696073/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v1 5/5] uboot: loongarch64

2023-02-02 Thread Alexander Kanavin
Please adjust the commit message: something like "uboot; add a
loongarch64 entry" would be better.

Alex

On Thu, 2 Feb 2023 at 09:02, Xiaotian Wu  wrote:
>
> 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
> --
> 2.39.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176692): 
https://lists.openembedded.org/g/openembedded-core/message/176692
Mute This Topic: https://lists.openembedded.org/mt/96696078/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v1 1/5] base: add support for loongarch64

2023-02-02 Thread Alexander Kanavin
On Thu, 2 Feb 2023 at 09:02, Xiaotian Wu  wrote:
> --- 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"

Thank you for the contribution. This list, however, only contains
items that are explicitly tested on the Yocto autobuilder, as that's
the only way to guarantee that anyone setting up a project on their
local machine will get a working build out of the box. Until
loongarch64 joins the tested set, it should not be listed. (how to
join that set is a separate question that you are welcome to ask)

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176691): 
https://lists.openembedded.org/g/openembedded-core/message/176691
Mute This Topic: https://lists.openembedded.org/mt/96696074/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] sstate-cache-cleaner.py: Add a script for sstate cache cleaning

2023-02-02 Thread Tomasz Dziendzielski
Hi,

>As for the achieved performance improvement, I don't have access to exact
data (time, sstate cache size) anymore - maybe Tomasz will be able to find
original findings.
>However, from the top of my head I can say that in our case the original
version of the script was not able to finish the cleanup in couple of days
(and got finally killed), while proposed version took just couple of hours
(~4h).

The internal ticket only has a comment "CI execution time reduced from ~16
days to 5 minutes". This looks like a big improvement.

Best regards,
Tomasz Dziendzielski

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176690): 
https://lists.openembedded.org/g/openembedded-core/message/176690
Mute This Topic: https://lists.openembedded.org/mt/95169760/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][kirkstone 10/13] native: Drop special variable handling

2023-02-02 Thread Richard Purdie
On Wed, 2023-02-01 at 12:16 -1000, Steve Sakoman wrote:
> From: Richard Purdie 
> 
> Back when it was merged in 
> https://git.yoctoproject.org/poky/commit/?id=c4257ed8b1040a5a0e9a95846d81961741239116
> it appeared special handling in setVar was necessary. Likely due to
> other fixes and improvements it no longer appears to be. The results of
> "bitbake world -g" before and after this change are identical for oe-core
> and meta-openembedded. Therefore drop the "parsing=True" special parameter to
> setVar() meaning overrides can now be cleared.
> 
> This means that something like:
> 
> DEPENDS:append = " bash"
> 
> now functions as expected, adding bash to the target recipe and bash-native to
> the native BBCLASSEXTENDED version.
> 
> Without this change, it would add bash to the native version as well as
> bash-native which is clearly incorrect.
> 
> [YOCTO #15010]
> 
> Signed-off-by: Richard Purdie 
> Signed-off-by: Luca Ceresoli 
> Signed-off-by: Richard Purdie 
> (cherry picked from commit 99a5105f7b5303cd36077b5910c662a865c1782c)
> Signed-off-by: Steve Sakoman 
> ---
>  meta/classes/native.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
> index fc7422c5d7..4de96cd59b 100644
> --- a/meta/classes/native.bbclass
> +++ b/meta/classes/native.bbclass
> @@ -153,7 +153,7 @@ python native_virtclass_handler () {
>  newdeps.append(dep.replace(pn, bpn) + "-native")
>  else:
>  newdeps.append(dep)
> -d.setVar(varname, " ".join(newdeps), parsing=True)
> +d.setVar(varname, " ".join(newdeps))
>  
>  map_dependencies("DEPENDS", e.data, selfref=False)
>  for pkg in e.data.getVar("PACKAGES", False).split():

Steve: Did you check "bitbake world -g" is the same before and after
this change for kirkstone?

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176689): 
https://lists.openembedded.org/g/openembedded-core/message/176689
Mute This Topic: https://lists.openembedded.org/mt/96688108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] oeqa/selftest/locales: Create selftest for locales generation

2023-02-02 Thread Richard Purdie
On Thu, 2023-02-02 at 11:41 +0100, Louis Rannou wrote:
> On 01/02/2023 18:57, Richard Purdie wrote:
> > On Wed, 2023-02-01 at 16:02 +0100, Louis Rannou wrote:
> > 
> > 
> > I was able to take a quick look at this. The locale generation on
> > target is broken, it throws errors upon boot. I was able to make it
> > work with this patch:
> > 
> > diff --git a/meta/recipes-core/glibc/glibc-locale.inc 
> > b/meta/recipes-core/glibc/glibc-locale.inc
> > index 7f70b3ca4f..c39007b573 100644
> > --- a/meta/recipes-core/glibc/glibc-locale.inc
> > +++ b/meta/recipes-core/glibc/glibc-locale.inc
> > @@ -60,7 +60,7 @@ DESCRIPTION:localedef = "glibc: compile locale definition 
> > files"
> >   # FILES:glibc-gconv will not be automatically extended in multilib.
> >   # Explicitly add ${MLPREFIX} for FILES:glibc-gconv.
> >   FILES:${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
> > -FILES:localedef = "${bindir}/localedef"
> > +FILES:localedef = "${bindir}/localedef ${libdir}/locale"
> >   
> >   LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
> >   
> > @@ -87,6 +87,7 @@ do_install() {
> >  find ${D}${libdir} -type d -empty -delete
> >  copy_locale_files ${datadir}/locale 0644
> >  install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED
> > +   install -d ${D}${libdir}/locale
> >   }
> >   
> >   inherit libc-package
> > 
> > could you see if the same test will now work with that patch applied?
> > I'm happy to have the basic test but if we can fix this and stop it
> > regressing that would be even better.
> 
> The patch does not change the result. I have actually nothing in the 
> image/usr/lib/locale directory.

Testing locally, if I don't have the patch and "runqemu core-image-
minimal snapshot kvm", I see errors about locale generation failing
during first boot as the directory isn't present.

If I add the patch and then boot the image, I see the locale generation
happening at first boot. If I then run the locale commands, I can see
the locales present.

> I am not sure to understand... If I add to my image the packages 
> glibc-localedata-fr-fr and glibc-charmap-utf-8, then I have something in 
> /usr/share/i18n/locales and /usr/share/i18n/charmaps, and then I can 
> generate the locales with `localedef -c -i fr_FR -f UTF-8 fr_FR`
> 
> In the end, I believe this is correct that I have nothing in 
> {libdir}/locale, but perhaps the settings IMAGE_LINGUAS (or 
> GLIBC_GENERATE_LOCALES ?) should specify a rdepend to the locale/charmap 
> packages, so the locales would exist in the image, but would not be 
> generated at build.

The locale generation can happen at build time or it can happen at
first boot on the final target. For the second test case, the locales
will only appear during the boot process.

I've merged your patch with the first test case, thanks! I did tweak
the comment message to match that it is just one test so far. Thanks
for getting us that far, it is great to be adding tests around this.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176688): 
https://lists.openembedded.org/g/openembedded-core/message/176688
Mute This Topic: https://lists.openembedded.org/mt/96567951/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] oeqa/selftest/locales: Create selftest for locales generation

2023-02-02 Thread Louis Rannou

On 01/02/2023 18:57, Richard Purdie wrote:

On Wed, 2023-02-01 at 16:02 +0100, Louis Rannou wrote:


On 01/02/2023 14:49, Richard Purdie wrote:

On Fri, 2023-01-27 at 16:33 +0100, Louis Rannou wrote:

From: Louis Rannou 

[YOCTO #9070]

Add a new selftest to validate the locales generation. This selftest builds a
complete target with GLIBC_GENERATE_LOCALES, IMAGE_LINGUAS,
ENABLE_BINARY_LOCALE_GENERATION set.

The tests has two cases: GLIBC_GENERATE_LOCALES=1 and
GLIBC_GENERATE_LOCALES=0. When set to 1, we check that the locales exist in the
local-archive and if it does exist for the glibc. When set to 0, we check it
does not.

Signed-off-by: Louis Rannou 
---
   meta/lib/oeqa/selftest/cases/locales.py | 81 +
   1 file changed, 81 insertions(+)
   create mode 100644 meta/lib/oeqa/selftest/cases/locales.py

diff --git a/meta/lib/oeqa/selftest/cases/locales.py 
b/meta/lib/oeqa/selftest/cases/locales.py
new file mode 100644
index 00..f053cc8e31
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/locales.py
@@ -0,0 +1,81 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator import OETestTag
+from oeqa.utils.commands import bitbake, runqemu
+
+class LocalesTest(OESelftestTestCase):
+
+@OETestTag("runqemu")
+def test_locales_on(self):
+"""
+Summary: Test the locales are generated
+Expected: 1. Check the locale exist in the locale-archive
+  2. Check the locale exist for the glibc
+  3. Check the locale can be generated
+Product: oe-core
+Author: Louis Rannou 
+AutomatedBy: Louis Rannou 
+"""
+
+features = []
+features.append('EXTRA_IMAGE_FEATURES = "empty-root-password 
allow-empty-password allow-root-login"')
+features.append('IMAGE_INSTALL:append = " glibc-utils localedef"')
+features.append('GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8"')
+features.append('IMAGE_LINGUAS:append = " en-us fr-fr"')
+features.append('ENABLE_BINARY_LOCALE_GENERATION = "1"')
+self.write_config("\n".join(features))
+
+# Build a core-image-minimal
+bitbake('core-image-minimal')
+
+with runqemu("core-image-minimal", ssh=False, 
runqemuparams='nographic') as qemu:
+cmd = "locale -a"
+status, output = qemu.run_serial(cmd)
+# output must includes fr_FR or fr_FR.UTF-8
+self.assertEqual(status, 1, msg='localedef test failed: output: 
%s' % output)
+self.assertIn("fr_FR", output, msg='locale -a test failed: output: 
%s' % output)
+
+cmd = "localedef --list-archive -v"
+status, output = qemu.run_serial(cmd)
+# output must includes fr_FR.utf8
+self.assertEqual(status, 1, msg='localedef test failed: output: 
%s' % output)
+self.assertIn("fr_FR.utf8", output, msg='locale -a test failed: 
output: %s' % output)
+
+@OETestTag("runqemu")
+def test_locales_off(self):
+"""
+Summary: Test the locales are not generated
+Expected: 1. Check the locale does not exist in the locale-archive
+  2. Check the locale does not exist for the glibc
+  3. Check the locale cannot be generated
+Product: oe-core
+Author: Louis Rannou 
+AutomatedBy: Louis Rannou 
+"""
+
+features = []
+features.append('EXTRA_IMAGE_FEATURES = "empty-root-password 
allow-empty-password allow-root-login"')
+features.append('IMAGE_INSTALL:append = " glibc-utils localedef"')
+features.append('GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8"')
+features.append('IMAGE_LINGUAS:append = " en-us fr-fr"')
+features.append('ENABLE_BINARY_LOCALE_GENERATION = "0"')
+self.write_config("\n".join(features))
+
+# Build a core-image-minimal
+bitbake('core-image-minimal')
+
+with runqemu("core-image-minimal", ssh=False, 
runqemuparams='nographic') as qemu:
+cmd = "locale -a"
+status, output = qemu.run_serial(cmd)
+# output must not includes fr_FR or fr_FR.UTF-8
+self.assertEqual(status, 1, msg='localedef test failed: output: 
%s' % output)


This should really say locale instead of localedef here to be clear
which command the error is coming from.


+self.assertNotIn("fr_FR", output, msg='locale -a test failed: 
output: %s' % output)
+
+cmd = "localedef --list-archive -v"
+status, output = qemu.run_serial(cmd)
+# output must not includes fr_FR.utf8
+self.assertEqual(status, 1, msg='localedef test failed: output: 
%s' % output)
+self.assertNotIn("fr_FR.utf8", output, msg='locale -a test failed: 
output: %s' % output)


We did run this through tests on the autobuilder and the tests did
pass. I did wonder rather than duplicate 

[OE-core] [PATCH] python3-markupsafe: upgrade 2.1.1 -> 2.1.2

2023-02-02 Thread Richard Purdie
Signed-off-by: Richard Purdie 
---
 ...{python3-markupsafe_2.1.1.bb => python3-markupsafe_2.1.2.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-markupsafe_2.1.1.bb => 
python3-markupsafe_2.1.2.bb} (87%)

diff --git a/meta/recipes-devtools/python/python3-markupsafe_2.1.1.bb 
b/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb
similarity index 87%
rename from meta/recipes-devtools/python/python3-markupsafe_2.1.1.bb
rename to meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb
index 0544dd1b83d..f4f0ad2df0f 100644
--- a/meta/recipes-devtools/python/python3-markupsafe_2.1.1.bb
+++ b/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://github.com/mitsuhiko/markupsafe;
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
 
-SRC_URI[sha256sum] = 
"7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"
+SRC_URI[sha256sum] = 
"abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"
 
 PYPI_PACKAGE = "MarkupSafe"
 inherit pypi setuptools3
-- 
2.37.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176686): 
https://lists.openembedded.org/g/openembedded-core/message/176686
Mute This Topic: https://lists.openembedded.org/mt/96697042/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] python3-markupsafe: upgrade 2.1.1 -> 2.1.2

2023-02-02 Thread Richard Purdie
From: Upgrade Helper 

Signed-off-by: Richard Purdie 
---
 ...{python3-markupsafe_2.1.1.bb => python3-markupsafe_2.1.2.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-markupsafe_2.1.1.bb => 
python3-markupsafe_2.1.2.bb} (87%)

diff --git a/meta/recipes-devtools/python/python3-markupsafe_2.1.1.bb 
b/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb
similarity index 87%
rename from meta/recipes-devtools/python/python3-markupsafe_2.1.1.bb
rename to meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb
index 0544dd1b83d..f4f0ad2df0f 100644
--- a/meta/recipes-devtools/python/python3-markupsafe_2.1.1.bb
+++ b/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://github.com/mitsuhiko/markupsafe;
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
 
-SRC_URI[sha256sum] = 
"7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"
+SRC_URI[sha256sum] = 
"abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"
 
 PYPI_PACKAGE = "MarkupSafe"
 inherit pypi setuptools3
-- 
2.37.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176685): 
https://lists.openembedded.org/g/openembedded-core/message/176685
Mute This Topic: https://lists.openembedded.org/mt/96697042/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] scons.bbclass: Make MAXLINELENGTH overridable

2023-02-02 Thread Khem Raj
older scons do not support MAXLINELENGTH and some packages still may be
using older scons, these recipes can clear SCONS_MAXLINELENGTH in them
and get going. Set

SCONS_MAXLINELENGTH = ""

in such recipes.

Signed-off-by: Khem Raj 
Cc: Martin Jansa 
---
 meta/classes-recipe/scons.bbclass | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes-recipe/scons.bbclass 
b/meta/classes-recipe/scons.bbclass
index d510c12b9b..d20a78dc6e 100644
--- a/meta/classes-recipe/scons.bbclass
+++ b/meta/classes-recipe/scons.bbclass
@@ -10,11 +10,12 @@ DEPENDS += "python3-scons-native"
 
 EXTRA_OESCONS ?= ""
 # This value below is derived from $(getconf ARG_MAX)
-SCONS_MAXLINELENGTH ?= "2097152"
+SCONS_MAXLINELENGTH ?= "MAXLINELENGTH=2097152"
+EXTRA_OESCONS:append = " ${SCONS_MAXLINELENGTH}"
 do_configure() {
if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
if [ -e "${CONFIGURESTAMPFILE}" -a "`cat 
${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
-   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean 
PREFIX=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} prefix=${prefix} 
${EXTRA_OESCONS}
+   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean 
PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
fi
 
mkdir -p `dirname ${CONFIGURESTAMPFILE}`
@@ -23,12 +24,12 @@ do_configure() {
 }
 
 scons_do_compile() {
-   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} 
PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH} 
${EXTRA_OESCONS} || \
+   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} 
PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
die "scons build execution failed."
 }
 
 scons_do_install() {
-   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} 
install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} 
MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} install || \
+   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} 
install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} 
install || \
die "scons install execution failed."
 }
 
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176684): 
https://lists.openembedded.org/g/openembedded-core/message/176684
Mute This Topic: https://lists.openembedded.org/mt/96696439/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] oe-git-proxy: Enable oe-git-proxy for git >= 2.32

2023-02-02 Thread Florian Bezdeka
Hi Richard,

please hold this one back. Will send a v2 hopefully soon. One more side
effect discovered that needs investigations first. Sorry.

Best regards,
Florian

On Wed, 2023-02-01 at 15:04 +0100, Florian Bezdeka via
lists.openembedded.org wrote:
> Modern git versions (>= 2.32) have a optimization enabled where the
> socket communication is moved into half-duplex mode once the client has
> sent all necessary data and is waiting for RX. git is simply closing the
> TX part of the socket.
> 
> There are proxy implementations out there that will shutdown the
> complete communication once the partial shutdown was received - breaking
> the git:// protocol.
> 
> Using socat with the ignoreeof option fixes this issue. Closing one of
> stdin/stdout will not trigger a partial shutdown of the underlying
> socket.
> 
> ignoreeof is a stone old feature. It will not break in combination with
> older git versions - where the partial shutdown will not be triggerend
> anyhow.
> 
> Link: 
> https://lore.kernel.org/git/4831bbeb0ec29ec84f92e0badfc0d628ecc6921d.ca...@siemens.com/
>  
> 
> Signed-off-by: Florian Bezdeka 
> ---
>  scripts/oe-git-proxy | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
> index aa9b9dc9a9..80a7a030a7 100755
> --- a/scripts/oe-git-proxy
> +++ b/scripts/oe-git-proxy
> @@ -184,4 +184,4 @@ else
>   METHOD="PROXY:$PROXY:$1:$2,proxyport=${PORT}${PROXYAUTH}"
>  fi
>  
> -exec $SOCAT STDIO "$METHOD"
> +exec $SOCAT STDIO,ignoreeof "$METHOD"
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176683): 
https://lists.openembedded.org/g/openembedded-core/message/176683
Mute This Topic: https://lists.openembedded.org/mt/96676758/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] scons: Pass MAXLINELENGTH to scons invocation

2023-02-02 Thread Martin Jansa
Can we pass this through some variable (maybe even as default
EXTRA_OESCONS)?

Some recipes seem to use older scons which don't support this and fail with:
Unknown variables: MAXLINELENGTH
ERROR: scons build execution failed.

I've seen this with arm-compute-library-22.08

On Mon, Jan 30, 2023 at 6:03 AM Khem Raj  wrote:

> This helps in overcoming a problem when using scons with ccache enabled.
> When commands get longer, then it resorts to using response files to do
> the operations e.g. @/tmp/tmp96j6icra.lnk when this response file is
> inboked by compiler it works ok, however, this does not when ccache is
> used to invoke the complilation. We see errors e.g.
>
> ccache @/tmp/tmppsyij_0v.lnk
> ccache: error: execute_noreturn of @/tmp/tmppsyij_0v.lnk failed: No such
> file or directory
>
> Using MAXLINELENGTH setting ensures that we can use ARG_MAX to extend
> the length of commandline and hence avoid using response files. This
> issue is also reported in mongodb [1]
>
> [1] https://jira.mongodb.org/browse/SERVER-38389
>
> Signed-off-by: Khem Raj 
> ---
>  meta/classes-recipe/scons.bbclass | 13 +
>  1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes-recipe/scons.bbclass
> b/meta/classes-recipe/scons.bbclass
> index 5f0d4a910b..d510c12b9b 100644
> --- a/meta/classes-recipe/scons.bbclass
> +++ b/meta/classes-recipe/scons.bbclass
> @@ -9,11 +9,12 @@ inherit python3native
>  DEPENDS += "python3-scons-native"
>
>  EXTRA_OESCONS ?= ""
> -
> +# This value below is derived from $(getconf ARG_MAX)
> +SCONS_MAXLINELENGTH ?= "2097152"
>  do_configure() {
> if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
> if [ -e "${CONFIGURESTAMPFILE}" -a "`cat
> ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ];
> then
> -   ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
> --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
> +   ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
> --clean PREFIX=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH}
> prefix=${prefix} ${EXTRA_OESCONS}
> fi
>
> mkdir -p `dirname ${CONFIGURESTAMPFILE}`
> @@ -22,13 +23,17 @@ do_configure() {
>  }
>
>  scons_do_compile() {
> -   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE}
> PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
> +   ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE}
> PREFIX=${prefix} prefix=${prefix} MAXLINELENGTH=${SCONS_MAXLINELENGTH}
> ${EXTRA_OESCONS} || \
> die "scons build execution failed."
>  }
>
>  scons_do_install() {
> -   ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
> install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix}
> ${EXTRA_OESCONS} install || \
> +   ${STAGING_BINDIR_NATIVE}/scons --directory=${S}
> install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix}
> MAXLINELENGTH=${SCONS_MAXLINELENGTH} ${EXTRA_OESCONS} install || \
> die "scons install execution failed."
>  }
>
> +do_configure[vardepsexclude] = "SCONS_MAXLINELENGTH"
> +do_compile[vardepsexclude] = "SCONS_MAXLINELENGTH"
> +do_install[vardepsexclude] = "SCONS_MAXLINELENGTH"
> +
>  EXPORT_FUNCTIONS do_compile do_install
> --
> 2.39.1
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176682): 
https://lists.openembedded.org/g/openembedded-core/message/176682
Mute This Topic: https://lists.openembedded.org/mt/96622121/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v1 5/5] uboot: loongarch64

2023-02-02 Thread Xiaotian Wu
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
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176681): 
https://lists.openembedded.org/g/openembedded-core/message/176681
Mute This Topic: https://lists.openembedded.org/mt/96696078/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v1 4/5] loongarch: disable seccomp from default feature

2023-02-02 Thread Xiaotian Wu
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 ?= ""
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176679): 
https://lists.openembedded.org/g/openembedded-core/message/176679
Mute This Topic: https://lists.openembedded.org/mt/96696076/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v1 3/5] binutils: disable gold on loongarch64

2023-02-02 Thread Xiaotian Wu
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")
 }
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176680): 
https://lists.openembedded.org/g/openembedded-core/message/176680
Mute This Topic: https://lists.openembedded.org/mt/96696077/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v1 0/5] Add support for LoongArch

2023-02-02 Thread Xiaotian Wu
LoongArch is a new architecture, already supported by linux-6.1, gcc-12, I want 
to add support to openembedded.

These patch sets add basic support, and it can run cross-compile on on x86_64.
The next step is to add support for yocto repositories, such as 
yocto-kernel-cache.

Please review these patches, thanks.

Xiaotian Wu (5):
  base: add support for loongarch64
  linux: add loongarch64 support
  binutils: disable gold on loongarch64
  loongarch: disable seccomp from default feature
  uboot: loongarch64

 meta/classes-recipe/kernel-arch.bbclass   |  2 ++
 meta/classes-recipe/siteinfo.bbclass  |  4 +++
 .../distro/include/default-distrovars.inc |  3 ++
 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-bsp/u-boot/u-boot-tools.inc  |  1 +
 meta/recipes-devtools/binutils/binutils.inc   |  5 +--
 meta/recipes-devtools/meson/meson_1.0.0.bb|  2 ++
 meta/recipes-devtools/qemu/qemu.inc   |  2 +-
 meta/recipes-kernel/linux/linux-yocto-dev.bb  |  2 +-
 meta/recipes-kernel/linux/linux-yocto_6.1.bb  |  4 ++-
 meta/site/loongarch64-linux   | 11 ++
 scripts/lib/wic/canned-wks/qemuloongarch.wks  |  3 ++
 scripts/runqemu   |  4 ++-
 19 files changed, 108 insertions(+), 6 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

-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176676): 
https://lists.openembedded.org/g/openembedded-core/message/176676
Mute This Topic: https://lists.openembedded.org/mt/96696073/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v1 2/5] linux: add loongarch64 support

2023-02-02 Thread Xiaotian Wu
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"
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176678): 
https://lists.openembedded.org/g/openembedded-core/message/176678
Mute This Topic: https://lists.openembedded.org/mt/96696075/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v1 1/5] base: add support for loongarch64

2023-02-02 Thread Xiaotian Wu
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 00..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 00..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 00..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 = "0x8040"
+UBOOT_ENTRYPOINT_loongarch64 = "0x8020"
+
+# 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