diff --git a/README.md b/README.md index e7264df..c8de6e8 100644 --- a/README.md +++ b/README.md @@ -4,38 +4,41 @@ ## 构建 -### 准备源码 +### 1.准备源码 -运行以下命令,克隆相关软件仓库: - -``` -mkdir -p loong-yocto/downloads -cd loong-yocto -git clone https://github.com/openembedded/bitbake.git -git clone https://github.com/openembedded/openembedded-core.git -git clone https://git.yoctoproject.org/poky.git -git clone https://github.com/loongarch64/meta-loongarch.git +基于WSL2 Debian构建,安装相关包,**使用非root用户编译** +``` shell +sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales tmux ``` -- `downloads` 目录用于保存下载的软件源代码,可在多次构建之间共享。 - -### 构建发行版 - -`build.sh` 默认会构建 `OpenEmbedded` 发行版,同时也支持构建 `Poky` 发行版。 - -可通过设置环境变量 `DISTRO` 来明确指定发行版,比如: +a.克隆poky仓库,进入目录 +``` shell +cd ~ +git clone https://github.com/yoctoproject/poky.git +cd poky ``` -cd loong-yocto -./meta-loongarch/build.sh # Default, to build OpenEmbedded distro -DISTRO=openembedded-core ./meta-loongarch/build.sh # Build the OpenEmbedded Distro -DISTRO=poky ./meta-loongarch/build.sh # Build the Poky Distro +b.基于yocto-4.3适配, 切换到对应tag +``` shell +git checkout -b loong yocto-4.3 ``` -### 构建目标 - -`build.sh` 脚本默认构建目标为 `core-image-minimal`, 可支持以下公共目标: +c.克隆loongarch bsp层 +``` shell +git clone https://github.com/otomam/meta-loongarch.git +``` +### 2.构建发行版 +a.配置构建环境,使用loongarch的配置文件 +``` shell +export TEMPLATECONF=$PWD/meta-loongarch/conf/templates/default +. oe-init-build-env +``` +a.构建镜像 +``` shell +bitbake core-image-minimal +`````` +可选: - core-image-minimal - core-image-full-cmdline - core-image-sato @@ -43,25 +46,39 @@ DISTRO=poky ./meta-loongarch/build.sh # Build the Poky Distro - meta-toolchain - meta-ide-support -要指定编译不同的目标,可通过设置环境变量 `TARGET` 来完成,比如: +#### 构建报错 +##### 例如构建llvm-native报错 +```shell +| g++: fatal error: Killed signal terminated program cc1plus +| compilation terminated. ``` -cd loong-yocto -TARGET=core-image-full-cmdline ./meta-loongarch/build.sh ++ 可以单独编译并查看详细输出 ``` - -## 调试 - -在编译发生错误时,可在 `build.sh` 脚本后面指定 build file,针对单一目标来构建,方便检查错误和调试。 - -当前支持以下几种用法: - +bitbake llvm-native -v -D ``` -./meta-loongarch/build.sh openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.1.bb -./meta-loongarch/build.sh openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.1.bb do_fetch -./meta-loongarch/build.sh openembedded-core/meta/recipes-kernel/linux/linux-yocto_6.1.bb:do_kernel_version_sanity_check ++ 这是在构建时内存不足导致的,可以单独构建或重复构建,或者根据实际情况减少并行编译的任务数或线程 +``` +# ./build/local.conf +BB_NUMBER_THREADS ='8' +PARALLEL_MAKE = "-j 8" ``` -## 提示 +### 3.虚拟机运行 ++ **不带nographic参数可以同时看到串口输出和图形窗口** +``` shell +runqemu nographic serialstdio +``` ++ **默认用户root,无密码** -qemu-system-longarch64需要bios。目前,edk2-loongarch提供了它的二进制代码。未来应更改为从上游拉取生成。Poky有ovmf配方,但目前还不支持loongarch。 +##### 遇到报错 +``` shell +runqemu - ERROR - Error: There are no available tap devices to use for networking, +runqemu - ERROR - and I see /etc/runqemu-nosudo exists, so I am not going to try creating +runqemu - ERROR - a new one with sudo. +``` +##### 运行以下命令 +``` shell +sudo ../scripts/runqemu-gen-tapdevs 1000 4 +``` ++ 作用:**Creating 4 tap devices for GID: 1000** \ No newline at end of file diff --git a/build.sh b/build.sh deleted file mode 100755 index d3addde..0000000 --- a/build.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -# Bootstrapper for buildbot slave -SELF_DIR=$(dirname `realpath $0`) - -export LC_ALL=en_US.UTF-8 -export BB_NUMBER_THREADS="`nproc`" -export PARALLEL_MAKE=" -j `nproc`" - -DIR="build" -MACHINE="qemuloongarch64" -CONFFILE="conf/auto.conf" -TARGET=${TARGET:-core-image-minimal} -DL_DIR=$(dirname $SELF_DIR)/downloads - -# bootstrap OE -if [[ -n "$DISTRO" && -d "$DISTRO" ]]; then - if [ -f ./$DISTRO/oe-init-build-env ]; then - DISTRO=`basename $DISTRO` - else - DISTRO="openembedded-core" - fi -else - if [ -d openembedded-core ]; then - DISTRO="openembedded-core" - elif [ -d poky ]; then - DISTRO="poky" - fi -fi - -echo "Init OE for $DISTRO" -export BASH_SOURCE="$DISTRO/oe-init-build-env" -. ./$DISTRO/oe-init-build-env $DIR - -# Symlink the downloads -if [ ! -L downloads ]; then - ln -sf ${DL_DIR} downloads -fi - -if [ -f conf/local.conf ]; then - sed -i 's/qemux86-64/qemuloongarch64/' conf/local.conf -fi -# add the missing layers -echo "Adding layers" -bitbake-layers add-layer ../meta-loongarch - -# fix the configuration -echo "Creating auto.conf" - -if [ -e $CONFFILE ]; then - rm -rf $CONFFILE -fi -cat < $CONFFILE -MACHINE ?= "${MACHINE}" -CONF_VERSION = "2" - -IMAGE_INSTALL:append = " edk2-loongarch" -KERNEL_IMAGETYPE:qemuloongarch64 = "vmlinux.efi" -QB_DEFAULT_BIOS:qemuloongarch64 = "QEMU_EFI.fd" -EXTRA_IMAGEDEPENDS:remove:qemuloongarch64 = "u-boot" -KERNEL_IMAGETYPES:remove:qemuloongarch64 = "vmlinuz" -QB_OPT_APPEND:qemuloongarch64 = "-device virtio-tablet-pci -device virtio-keyboard-pci" -QB_MEM:qemuloongarch64 = "-m 1024" -QB_NETWORK_DEVICE:qemuloongarch64 = "-device virtio-net-pci,netdev=net0,mac=@MAC@" -QB_ROOTFS_OPT:qemuloongarch64 = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-pci,drive=disk0" -QB_GRAPHICS:qemuloongarch64 = "-device virtio-vga -device qemu-xhci -device usb-kbd -device usb-mouse" -EOF - -# start build -if [ $# -eq 0 ];then - echo "To build an image run" - echo "---------------------------------------------------" - echo "MACHINE=qemuloongarch64 bitbake $TARGET" - echo "---------------------------------------------------" - echo "" - echo "Buildable machine info" - echo "---------------------------------------------------" - echo "* qemuloongarch64: The 64-bit LoongArch machine" - echo "---------------------------------------------------" - echo "Common targets are:" - echo " core-image-minimal" - echo " core-image-full-cmdline" - echo " core-image-sato" - echo " core-image-weston" - echo " meta-toolchain" - echo " meta-ide-support" - echo "---------------------------------------------------" - echo "Starting build..." - echo "$ bitbake -vDDD ${TARGET}" - read -p "Continue[Y/n]? " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]] && [ ! -z $REPLY ]; then - [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 - fi - bitbake -vDDD ${TARGET} 2>&1 | tee ../build.log -elif [ $# -eq 1 ];then - if echo $1 | grep ":";then - items=(${1//:/ }) - echo "Starting build..." - echo "$ bitbake -vDDD -b ${items[0]} -c ${items[1]}" - read -p "Continue[Y/n]? " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]] && [ ! -z $REPLY ]; then - [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 - fi - unset BB_NUMBER_THREADS - unset PARALLEL_MAKE - bitbake -vDDD -b ${items[0]} -c ${items[1]} 2>&1 | tee ../one.log - else - echo "Starting build..." - echo "$ bitbake -vDDD -b $1" - read -p "Continue[Y/n]? " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]] && [ ! -z $REPLY ]; then - [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 - fi - unset BB_NUMBER_THREADS - unset PARALLEL_MAKE - bitbake -vDDD -b $1 2>&1 | tee ../one.log - fi -elif [ $# -eq 2 ];then - echo "Starting build..." - echo "$ bitbake -vDDD -b $1 -c $2" - read -p "Continue[Y/n]? " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]] && [ ! -z $REPLY ]; then - [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 - fi - unset BB_NUMBER_THREADS - unset PARALLEL_MAKE - bitbake -vDDD -b $1 -c $2 2>&1 | tee ../one.log -fi diff --git a/conf/layer.conf b/conf/layer.conf index 0fdafcd..be3a90b 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -10,4 +10,4 @@ BBFILE_PATTERN_meta-loongarch = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-loongarch = "6" LAYERDEPENDS_meta-loongarch = "core" -LAYERSERIES_COMPAT_meta-loongarch = "mickledore" +LAYERSERIES_COMPAT_meta-loongarch = "nanbield mickledore" diff --git a/conf/templates/default/bblayers.conf.sample b/conf/templates/default/bblayers.conf.sample new file mode 100644 index 0000000..a768dc2 --- /dev/null +++ b/conf/templates/default/bblayers.conf.sample @@ -0,0 +1,13 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##OEROOT##/meta \ + ##OEROOT##/meta-poky \ + ##OEROOT##/meta-yocto-bsp \ + ##OEROOT##/meta-loongarch \ + " diff --git a/conf/templates/default/conf-notes.txt b/conf/templates/default/conf-notes.txt new file mode 100644 index 0000000..57ad02d --- /dev/null +++ b/conf/templates/default/conf-notes.txt @@ -0,0 +1,19 @@ + +### Shell environment set up for builds. ### + +You can now run 'bitbake ' + +Common targets are: + core-image-minimal + core-image-full-cmdline + core-image-sato + core-image-weston + meta-toolchain + meta-ide-support + +You can also run generated qemu images with a command like 'runqemu qemuloongarch64'. + +Other commonly useful commands are: + - 'devtool' and 'recipetool' handle common recipe tasks + - 'bitbake-layers' handles common layer tasks + - 'oe-pkgdata-util' handles common target package tasks diff --git a/conf/local.conf.sample b/conf/templates/default/local.conf.sample similarity index 92% rename from conf/local.conf.sample rename to conf/templates/default/local.conf.sample index 3236ffb..83a43b7 100644 --- a/conf/local.conf.sample +++ b/conf/templates/default/local.conf.sample @@ -36,7 +36,7 @@ #MACHINE ?= "edgerouter" # # This sets the default machine to be qemux86-64 if no other machine is selected: -MACHINE ??= "qemux86-64" +MACHINE ??= "qemuloongarch64" # These are some of the more commonly used values. Looking at the files in the # meta/conf/machine directory, or the conf/machine directory of any additional layers @@ -143,7 +143,8 @@ DISTRO ?= "poky" # "debug-tweaks" - make an image suitable for development # e.g. ssh root access has a blank password # There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# meta/classes-recipe/image.bbclass and +# meta/classes-recipe/core-image.bbclass for more details. # We default to enabling the debugging tweaks. EXTRA_IMAGE_FEATURES ?= "debug-tweaks" @@ -162,7 +163,7 @@ USER_CLASSES ?= "buildstats" # The build system can test booting virtual machine images under qemu (an emulator) # after any root filesystems are created and run tests against those images. It can also # run tests against any SDK that are built. To enable this uncomment these lines. -# See classes/test{image,sdk}.bbclass for further details. +# See meta/classes-recipe/test{image,sdk}.bbclass for further details. #IMAGE_CLASSES += "testimage testsdk" #TESTIMAGE_AUTO:qemuall = "1" @@ -227,15 +228,21 @@ BB_DISKMON_DIRS ??= "\ # Yocto Project SState Mirror # # The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following lines. This will mean the build uses +# use of these by uncommenting some of the following lines. This will mean the build uses # the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are +# initially but it will then speed up the builds by not having to build things if they are # present in the cache. It assumes you can download something faster than you can build it # which will depend on your network. # Note: For this to work you also need hash-equivalence passthrough to the matching server +# There is a choice between our sstate server directly and a faster content delivery network +# (CDN) kindly provided by JSDelivr, uncomment one of the SSTATE_MIRRORS lines, not both. +# Using the CDN rather than the yoctoproject.org address is suggested/preferred. # #BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687" -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" +#SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH" +# +###SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" + # # Qemu configuration @@ -280,7 +287,7 @@ PACKAGECONFIG:append:pn-qemu-system-native = " sdl" # this doesn't mean anything to you. CONF_VERSION = "2" -IMAGE_INSTALL:append = " edk2-loongarch" +EXTRA_IMAGEDEPENDS:append:qemuloongarch64 = " edk2-loongarch-native" KERNEL_IMAGETYPE:qemuloongarch64 = "vmlinux.efi" QB_DEFAULT_BIOS:qemuloongarch64 = "QEMU_EFI.fd" EXTRA_IMAGEDEPENDS:remove:qemuloongarch64 = "u-boot" @@ -289,4 +296,4 @@ QB_OPT_APPEND:qemuloongarch64 = "-device virtio-tablet-pci -device virtio-keyboa QB_MEM:qemuloongarch64 = "-m 1024" QB_NETWORK_DEVICE:qemuloongarch64 = "-device virtio-net-pci,netdev=net0,mac=@MAC@" QB_ROOTFS_OPT:qemuloongarch64 = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-pci,drive=disk0" -QB_GRAPHICS:qemuloongarch64 = "-device virtio-vga -device qemu-xhci -device usb-kbd -device usb-mouse" +QB_GRAPHICS:qemuloongarch64 = "-device virtio-vga -device qemu-xhci -device usb-kbd -device usb-mouse" \ No newline at end of file diff --git a/recipes-bsp/edk2-loongarch/edk2-loongarch.bb b/recipes-bsp/edk2-loongarch/edk2-loongarch.bb index 1ebefd6..02dd0cf 100644 --- a/recipes-bsp/edk2-loongarch/edk2-loongarch.bb +++ b/recipes-bsp/edk2-loongarch/edk2-loongarch.bb @@ -1,29 +1,44 @@ -# TODO: build edk2 bios from source +SUMMARY = "UEFI EDK2 Firmware" +DESCRIPTION = "EDK2 for loongarch" -DESCRIPTION = "edk2 for loongarch recipe" +LICENSE = "BSD-2-Clause-Patent" +LIC_FILES_CHKSUM = "file://edk2/License.txt;md5=2b415520383f7964e96700ae12b4570a \ + file://edk2-platforms/License.txt;md5=2b415520383f7964e96700ae12b4570a \ + " -inherit deploy +SRC_URI += "gitsm://github.com/tianocore/edk2;branch=master;protocol=https;name=edk2;destsuffix=git/edk2" +SRC_URI += "gitsm://github.com/tianocore/edk2-platforms;branch=master;protocol=https;name=edk2-platforms;destsuffix=git/edk2-platforms" +SRC_URI += "gitsm://github.com/tianocore/edk2-non-osi;branch=master;protocol=https;name=edk2-non-osi;destsuffix=git/edk2-non-osi" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://License.txt;md5=2b415520383f7964e96700ae12b4570a" +SRCREV_edk2 = "33deaa3b845f0d588ffd068003558be46f90aaac" +SRCREV_edk2-platforms = "899a9dc97cd54690513380ad01ee8b2609dbefd5" +SRCREV_edk2-non-osi = "ddae61c7547dba5b6aae060917896a2d4271fa32" -SRC_URI = "file://QEMU_EFI.fd file://License.txt" +SRC_URI += "https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz" +SRC_URI[sha256sum] = "cd7c98499e1d7476df144cca22ade2140d3f311be0b4204591bdf8466971ba27" -S = "${WORKDIR}" +SRCREV_FORMAT = "ekd2" -do_install () { - install ${WORKDIR}/QEMU_EFI.fd ${D}/QEMU_EFI.fd -} +S = "${WORKDIR}/git" + +inherit deploy -FILES:${PN} = "/QEMU_EFI.fd" +do_compile:class-native () { + cd ${S} + export PATH=${WORKDIR}/cross-tools/bin:$PATH + export WORKSPACE=${S} + export PACKAGES_PATH=${S}/edk2:${S}/edk2-platforms:${S}/edk2-non-osi + export GCC5_LOONGARCH64_PREFIX=loongarch64-unknown-linux-gnu- + . edk2/edksetup.sh + make -C edk2/BaseTools -do_deploy () { + build --buildtarget=RELEASE --tagname=GCC5 --arch=LOONGARCH64 --platform=Platform/Loongson/LoongArchQemuPkg/Loongson.dsc } -do_deploy:class-target () { - install ${WORKDIR}/QEMU_EFI.fd ${DEPLOYDIR}/QEMU_EFI.fd +do_deploy () { + install ${S}/Build/LoongArchQemu/RELEASE_GCC5/FV/QEMU_EFI.fd ${DEPLOYDIR}/QEMU_EFI.fd } -addtask do_deploy after do_compile before do_build +addtask do_deploy after do_compile -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native" \ No newline at end of file diff --git a/recipes-bsp/edk2-loongarch/edk2-loongarch/License.txt b/recipes-bsp/edk2-loongarch/edk2-loongarch/License.txt deleted file mode 100644 index ee84050..0000000 --- a/recipes-bsp/edk2-loongarch/edk2-loongarch/License.txt +++ /dev/null @@ -1,51 +0,0 @@ -Copyright (c) 2019, TianoCore and contributors. All rights reserved. - -SPDX-License-Identifier: BSD-2-Clause-Patent - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -Subject to the terms and conditions of this license, each copyright holder -and contributor hereby grants to those receiving rights under this license -a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable -(except for failure to satisfy the conditions of this license) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer this software, where such license applies only to those patent -claims, already acquired or hereafter acquired, licensable by such copyright -holder or contributor that are necessarily infringed by: - -(a) their Contribution(s) (the licensed copyrights of copyright holders and - non-copyrightable additions of contributors, in source or binary form) - alone; or - -(b) combination of their Contribution(s) with the work of authorship to - which such Contribution(s) was added by such copyright holder or - contributor, if, at the time the Contribution is added, such addition - causes such combination to be necessarily infringed. The patent license - shall not apply to any other combinations which include the - Contribution. - -Except as expressly stated above, no rights or licenses from any copyright -holder or contributor is granted under this license, whether expressly, by -implication, estoppel or otherwise. - -DISCLAIMER - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes-bsp/edk2-loongarch/edk2-loongarch/QEMU_EFI.fd b/recipes-bsp/edk2-loongarch/edk2-loongarch/QEMU_EFI.fd deleted file mode 100644 index 55ff947..0000000 Binary files a/recipes-bsp/edk2-loongarch/edk2-loongarch/QEMU_EFI.fd and /dev/null differ diff --git a/recipes-connectivity/openssl/openssl/loongarch-support.patch b/recipes-connectivity/openssl/openssl/loongarch-support.patch index 2c8d4cf..7489888 100644 --- a/recipes-connectivity/openssl/openssl/loongarch-support.patch +++ b/recipes-connectivity/openssl/openssl/loongarch-support.patch @@ -1,10 +1,15 @@ Upstream-Status: Pending Signed-off-by: Fuxin Zhang --- -diff -urN openssl-3.1.0.ori/Configurations/10-main.conf openssl-3.1.0/Configurations/10-main.conf ---- openssl-3.1.0.ori/Configurations/10-main.conf 2022-11-01 01:47:36.629532756 +0000 -+++ openssl-3.1.0/Configurations/10-main.conf 2022-11-01 01:41:39.423556741 +0000 -@@ -818,6 +818,18 @@ + Configurations/10-main.conf | 13 +++++++++++++ + util/perl/OpenSSL/config.pm | 1 + + 2 files changed, 14 insertions(+) + +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index e8084ab..e03d043 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -833,6 +833,19 @@ my %targets = ( asm_arch => 'loongarch64', }, @@ -19,14 +24,16 @@ diff -urN openssl-3.1.0.ori/Configurations/10-main.conf openssl-3.1.0/Configurat + inherit_from => [ "linux-generic64"], + perlasm_scheme => "linux64", + }, ++ + #### IA-32 targets... #### These two targets are a bit aged and are to be used on older Linux #### machines where gcc doesn't understand -m32 and -m64 -diff -urN openssl-3.1.0.ori/util/perl/OpenSSL/config.pm openssl-3.1.0/util/perl/OpenSSL/config.pm ---- openssl-3.1.0.ori/util/perl/OpenSSL/config.pm 2022-11-01 01:47:55.717852446 +0000 -+++ openssl-3.1.0/util/perl/OpenSSL/config.pm 2022-11-01 01:45:39.907578548 +0000 -@@ -681,6 +681,7 @@ +diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm +index 6350e1e..2337de8 100755 +--- a/util/perl/OpenSSL/config.pm ++++ b/util/perl/OpenSSL/config.pm +@@ -713,6 +713,7 @@ EOF ], [ '.*86-.*-linux1', { target => "linux-aout" } ], [ 'riscv64-.*-linux.', { target => "linux64-riscv64" } ], diff --git a/recipes-connectivity/openssl/openssl_3.1.1.bbappend b/recipes-connectivity/openssl/openssl_3.1.%.bbappend similarity index 52% rename from recipes-connectivity/openssl/openssl_3.1.1.bbappend rename to recipes-connectivity/openssl/openssl_3.1.%.bbappend index 02d13b6..cf38852 100644 --- a/recipes-connectivity/openssl/openssl_3.1.1.bbappend +++ b/recipes-connectivity/openssl/openssl_3.1.%.bbappend @@ -1,3 +1,3 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://loongarch-support.patch" \ No newline at end of file +SRC_URI += "file://loongarch-support.patch" diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.40.bbappend b/recipes-devtools/binutils/binutils-cross-canadian_2.41.bbappend similarity index 100% rename from recipes-devtools/binutils/binutils-cross-canadian_2.40.bbappend rename to recipes-devtools/binutils/binutils-cross-canadian_2.41.bbappend diff --git a/recipes-devtools/binutils/binutils-cross-testsuite_2.40.bbappend b/recipes-devtools/binutils/binutils-cross-testsuite_2.41.bbappend similarity index 100% rename from recipes-devtools/binutils/binutils-cross-testsuite_2.40.bbappend rename to recipes-devtools/binutils/binutils-cross-testsuite_2.41.bbappend diff --git a/recipes-devtools/binutils/binutils-cross_2.40.bbappend b/recipes-devtools/binutils/binutils-cross_2.41.bbappend similarity index 100% rename from recipes-devtools/binutils/binutils-cross_2.40.bbappend rename to recipes-devtools/binutils/binutils-cross_2.41.bbappend diff --git a/recipes-devtools/binutils/binutils-crosssdk_2.40.bbappend b/recipes-devtools/binutils/binutils-crosssdk_2.41.bbappend similarity index 100% rename from recipes-devtools/binutils/binutils-crosssdk_2.40.bbappend rename to recipes-devtools/binutils/binutils-crosssdk_2.41.bbappend diff --git a/recipes-devtools/binutils/binutils_2.40.bbappend b/recipes-devtools/binutils/binutils_2.41.bbappend similarity index 100% rename from recipes-devtools/binutils/binutils_2.40.bbappend rename to recipes-devtools/binutils/binutils_2.41.bbappend diff --git a/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend b/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend deleted file mode 100644 index eb9b1e7..0000000 --- a/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend +++ /dev/null @@ -1 +0,0 @@ -COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64|loongarch64).*-linux' diff --git a/recipes-devtools/python/python3/add-loongarch-triple.patch b/recipes-devtools/python/python3/add-loongarch-triple.patch index b10c307..dd49426 100644 --- a/recipes-devtools/python/python3/add-loongarch-triple.patch +++ b/recipes-devtools/python/python3/add-loongarch-triple.patch @@ -1,12 +1,19 @@ Upstream-Status: Backport ---- Python-3.11.1/configure.ac.ori 2023-01-02 17:22:11.811803138 +0800 -+++ Python-3.11.1/configure.ac 2023-01-02 17:21:17.849615015 +0800 -@@ -939,6 +939,8 @@ + +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 5430021..749d68a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -937,6 +937,8 @@ cat > conftest.c <