diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b8bc1fefd767a2e449e145c2d497eca408b4ecbb --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +docs/build + diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 033cb3eb35578002bad1d3869f6e99cc38eb007d..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# yocto-meta-embedded - -#### Description -The Yocto meta layer provided by sig-Yocto - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 16ed3d8c8b58455d5aa89a6f6242704ce6880c7a..b68810d6f3f3a8b70838b69a6406369acfc1b19d 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,69 @@ # yocto-meta-embedded -#### 介绍 -The Yocto meta layer provided by sig-Yocto +## 介绍 -#### 软件架构 -软件架构说明 +yocto-meta-embedded是用于构建openEuler Embedded所需要的一系列工具、构建配方的集合, +以及当前openEuler Embedded开发使用文档的承载仓库。 +yocto-meta-embedded核心是构建Yocto Poky之上,但针对openEuler Embedded的需求做了大 +量的定制化的修改,包括但不限于: -#### 安装教程 +* 与openEuler其他场景的Linux, 共享软件包,共演进 +* 采用预先构建的工具链和libc库,以加速构建 +* 尽可能采用预先构建好的主机工具,以加速构建,同时采用容器化的构建 +* 针对嵌入式场景做相应的优化 -1. xxxx -2. xxxx -3. xxxx +## 软件架构 -#### 使用说明 +* **scripts** 为一系列辅助工具,帮助好构建环境,如下载代码仓、创建构建环境等等 +* **meta-openeuler** 为构建openEuler Embedded所创建的Yocto层,包含相应的配置、构建配方等等 +* **bsp** 为openEuler Embedded的BSP(Board Support Package)抽象层,包含当前openEuler Embedded所支持的硬件BSP, 如QEMU、树莓派4B等 +* **RTOS** 为openEuler Embeddd的RTOS(Real-Time Operating System)抽象层,主要针对Linux和RTOS混合关键部署的场景,当前支持RT-Thread和Zephyr +* **docs** 为openEuler Embedded使用和开发文档, CI会自动构建文档,并发布在如下地址: -1. xxxx -2. xxxx -3. xxxx + [**openEuler Embedded开发使用文档**](https://openeuler.gitee.io/yocto-meta-openeuler) -#### 参与贡献 +## 快速上手 + +当前只支持在Linux环境下构建openEuler Embedded。 + +1. 创建目录,推荐布局如下: +``` + +├── build 实际构建目录 +├── tools 交叉工具链所在目录 +├── src openEuler Embedded所有代码包目录 +``` +2. 在src目录下,git clone本仓库,并切换到最新开发分支,当前为**openEuler-22.03-LTS** +3. 通过工具脚本下载当前所支持的软件包仓库,如下所示,该工具会git clone所有软件包仓库 +```shell + cd src + source yocto-meta-openeuler/scripts/download.sh +``` +4. 从如下地址下载交叉编译工具链,并解压在**tools**目录下 + + [**openEuler Embedded交叉编译工具链**](https://gitee.com/openeuler/yocto-embedded-tools/releases) + + 解压后的目录如下: +``` + +├── tools 交叉工具链所在目录 + ├── openeuler_gcc_arm64le +``` +5. 在build目录下调用工具脚本准备好Yocto构建环境,如下所示: +```shell + cd build + source ../src/yocto-meta-openeuler/scripts/compile.sh <平台名称> <交叉编译工具链路径> +``` + 之后便可以运行 **bitbake <目标,例如openeuler-image-tiny>** 开始构建 + +6. 由于openEuler Embedded采取了**尽可能不构建主机工具**的策略,因此在构建主机上需要实现准备好相应的工具,具体所需要的工具可以从**src/yocto-meta-openeuler/meta-openeuler/conf/local.conf.sample**中的**HOSTTOOLS_XXX**相关变量中获得,另一种推荐的方法是采用容器构建,具体如下: + + [**openEuler Embedded容器构建**](https://openeuler.gitee.io/yocto-meta-openeuler/yocto/quickbuild/container-build.html) + +## 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/bsp/meta-openeuler-bsp/conf/distro/openeuler-bsp.conf b/bsp/meta-openeuler-bsp/conf/distro/openeuler-bsp.conf new file mode 100644 index 0000000000000000000000000000000000000000..e0ead5b7ed9be653941e6657ba9d43a61a2bb924 --- /dev/null +++ b/bsp/meta-openeuler-bsp/conf/distro/openeuler-bsp.conf @@ -0,0 +1 @@ +include conf/machine/openeuler-${MACHINE}.conf diff --git a/bsp/meta-openeuler-bsp/conf/layer.conf b/bsp/meta-openeuler-bsp/conf/layer.conf new file mode 100644 index 0000000000000000000000000000000000000000..a891932f43745f2199cde1836071e943d589b3e8 --- /dev/null +++ b/bsp/meta-openeuler-bsp/conf/layer.conf @@ -0,0 +1,24 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "openeuler-bsp" +BBFILE_PATTERN_openeuler-bsp = "^${LAYERDIR}/" +BBFILE_PRIORITY_openeuler-bsp = "25" + +LAYERSERIES_COMPAT_openeuler-bsp = "hardknott honister" +#no bb file under meta-openeuler-bsp, set it to 1 to ignore "No bb files" warning +BBFILE_PATTERN_IGNORE_EMPTY_openeuler-bsp = "1" + + +#enable .bb under raspberrypi/ when exist meta-raspberrypi +BBFILES_DYNAMIC += " \ +raspberrypi:${LAYERDIR}/raspberrypi/*/*/*.bb \ +raspberrypi:${LAYERDIR}/raspberrypi/*/*/*.bbappend \ +" + +#enable find .inc under raspberrypi/, included in .bb +BBPATH_append =. ":${LAYERDIR}/raspberrypi" diff --git a/bsp/meta-openeuler-bsp/conf/machine/openeuler-raspberrypi4-64.conf b/bsp/meta-openeuler-bsp/conf/machine/openeuler-raspberrypi4-64.conf new file mode 100644 index 0000000000000000000000000000000000000000..80dc4bede47d2692f3e833496e5eebcd740ca85a --- /dev/null +++ b/bsp/meta-openeuler-bsp/conf/machine/openeuler-raspberrypi4-64.conf @@ -0,0 +1,10 @@ +require conf/multilib.conf +MULTILIB += "multilib:lib32" +DEFAULTTUNE_virtclass-multilib-lib32 = "armv7a" + +ROOTFS_PACKAGE_ARCH = "aarch64" + +#set 0 to create zImage +RPI_USE_U_BOOT = "0" +KERNEL_IMAGETYPE_DIRECT = "Image" +ENABLE_UART = "1" diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-bsp/bootfiles/rpi-bootfiles.bbappend b/bsp/meta-openeuler-bsp/raspberrypi/recipes-bsp/bootfiles/rpi-bootfiles.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..75f469e85cb588dbe3ab353f4b7282d303dda50e --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-bsp/bootfiles/rpi-bootfiles.bbappend @@ -0,0 +1,5 @@ +SRC_URI = "file://raspberrypi-firmware/firmware-1.20210201.tar.gz \ +" + +S = "${WORKDIR}/firmware-1.20210201/boot" +#FILESEXTRAPATHS_prepend = "${OPENEULER_SP_DIR}/raspberrypi-firmware/:" diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/bsp/meta-openeuler-bsp/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..d2cb876c294b5d0de4a0b7943e38322c264b93d0 --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend @@ -0,0 +1,3 @@ +SRC_URI = "file://yocto-embedded-tools/config/${MACHINE}/config.txt \ +" +S = "${WORKDIR}/yocto-embedded-tools/config/${MACHINE}" diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..80594cb9ba6da3a688adb1991002210422273135 --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +#fix mkfs.ext4 running error, add -E no_copy_xattrs to mkfs.ext4 +WKS_FILE = "sdimage-rpi.wks" +WKS_FILE_DEPENDS = "" diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/raspberrypi4-64.inc b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/raspberrypi4-64.inc new file mode 100644 index 0000000000000000000000000000000000000000..6168e3217289a45385225b1185a17508181d5ae6 --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/raspberrypi4-64.inc @@ -0,0 +1,2 @@ +#image configuration for aarch64 +require rpi.inc diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc new file mode 100644 index 0000000000000000000000000000000000000000..0c6383dc9295483ae05967c53ffc309d1b1a17ac --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc @@ -0,0 +1,46 @@ +delete_boot_from_rootfs() { + test -d "${OUTPUT_DIR}" || mkdir -p "${OUTPUT_DIR}" + pushd "${IMAGE_ROOTFS}" + if [ -d ./boot ];then + rm -f "${OUTPUT_DIR}"/*Image* "${OUTPUT_DIR}"/vmlinux* + mv boot/${KERNEL_IMAGETYPE}-* "${OUTPUT_DIR}"/${KERNEL_IMAGETYPE} + mv boot/vmlinux* "${OUTPUT_DIR}"/ + rm -r ./boot + fi + popd +} + +copy_openeuler_distro() { + rm -f "${OUTPUT_DIR}"/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${IMAGE_FSTYPES} + cp -fp ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${IMAGE_FSTYPES} "${OUTPUT_DIR}"/ +} + +IMAGE_PREPROCESS_COMMAND += "delete_boot_from_rootfs;" +IMAGE_POSTPROCESS_COMMAND += "copy_openeuler_distro;" + + +#IMAGE_FEATURES += "splash" +IMAGE_FSTYPES = "rpi-sdimg" +SDIMG_ROOTFS_TYPE = "ext4" +EXTRA_IMAGECMD_ext4 += "-E no_copy_xattrs" + + +#not depends to native parted/mtools and so on, use host command +export OPENEULER_WIC_IMAGE_REMOVE = "parted dosfstools mtools" +python() { + all_depends = d.getVarFlag("do_image_rpi_sdimg", "depends") + bb.note("all depends of do_image_rpi_sdimg: %s" % all_depends) + for dep in ('parted', 'gptfdisk', 'dosfstools', 'mtools'): + all_depends = all_depends.replace('%s-native:do_populate_sysroot' % dep, "") + new_depends = all_depends + d.setVarFlag("do_image_rpi_sdimg", "depends", new_depends) + bb.note("new depends of do_image_rpi_sdimg: %s" % new_depends) + + all_depends = d.getVarFlag("do_image_ext4", "depends") + bb.note("all depends of do_image_ext4: %s" % all_depends) + for dep in ['e2fsprogs']: + all_depends = all_depends.replace('%s-native:do_populate_sysroot' % dep, "") + new_depends = all_depends + d.setVarFlag("do_image_ext4", "depends", new_depends) + bb.note("new depends of do_image_ext4: %s" % new_depends) +} diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-kernel/linux/linux-openeuler.bbappend b/bsp/meta-openeuler-bsp/raspberrypi/recipes-kernel/linux/linux-openeuler.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..ad6ebab9b69f1b8fa2d867532545798d93ea3b78 --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-kernel/linux/linux-openeuler.bbappend @@ -0,0 +1,8 @@ +SRC_URI += "\ + file://src-kernel-5.10/0000-raspberrypi-kernel.patch \ +" +OPENEULER_KERNEL_CONFIG = "${S}/arch/${ARCH}/configs/bcm2711_defconfig" +do_configure_prepend() { + sed -i '$a CONFIG_ACPI=y' ${OPENEULER_KERNEL_CONFIG} + cp -f "${OPENEULER_KERNEL_CONFIG}" .config +} diff --git a/bsp/meta-openeuler-bsp/wic/sdimage-rpi.wks b/bsp/meta-openeuler-bsp/wic/sdimage-rpi.wks new file mode 100644 index 0000000000000000000000000000000000000000..283d94e9d2a2562529d365f03514126132943105 --- /dev/null +++ b/bsp/meta-openeuler-bsp/wic/sdimage-rpi.wks @@ -0,0 +1,6 @@ +# short-description: Create Raspberry Pi SD card image +# long-description: Creates a partitioned SD card image for use with +# Raspberry Pi. Boot files are located in the first vfat partition. + +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 20 +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --mkfs-extraopts='-E no_copy_xattrs' diff --git a/bsp/meta-raspberrypi/COPYING.MIT b/bsp/meta-raspberrypi/COPYING.MIT new file mode 100644 index 0000000000000000000000000000000000000000..fb950dc69feb8afa93493747f33d6e1c02659b55 --- /dev/null +++ b/bsp/meta-raspberrypi/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bsp/meta-raspberrypi/README.md b/bsp/meta-raspberrypi/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7e95cc4415d77740cb012cd49af46ef49b55df71 --- /dev/null +++ b/bsp/meta-raspberrypi/README.md @@ -0,0 +1,84 @@ +# meta-raspberrypi + +Yocto BSP layer for the Raspberry Pi boards - . + +[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi1/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi1) +[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi2/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi2) +[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi3/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi3) +[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi4/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi4) +[![Documentation Status](https://readthedocs.org/projects/meta-raspberrypi/badge/?version=latest)](https://meta-raspberrypi.readthedocs.io/en/latest/?badge=latest) +[![Matrix](https://img.shields.io/matrix/meta-raspberrypi:cub.icu.svg?server_fqdn=matrix.cub.icu)](https://matrix.to/#/#meta-raspberrypi:cub.icu) + +| | | +|:-: | :-: | +| Build server sponsored by | [![balena.io](./img/balena.png)](https://www.balena.io/). | + +## Quick links + +* Git repository web frontend: + +* Mailing list (yocto mailing list): +* Issues management (Github Issues): + +* Documentation: + +## Description + +This is the general hardware specific BSP overlay for the RaspberryPi device. + +More information can be found at: (Official Site) + +The core BSP part of meta-raspberrypi should work with different +OpenEmbedded/Yocto distributions and layer stacks, such as: + +* Distro-less (only with OE-Core). +* Yoe Disto (Video and Camera Products). +* Yocto/Poky (main focus of testing). + +## Dependencies + +This layer depends on: + +* URI: git://git.yoctoproject.org/poky + * branch: master + * revision: HEAD + +* URI: git://git.openembedded.org/meta-openembedded + * layers: meta-oe, meta-multimedia, meta-networking, meta-python + * branch: master + * revision: HEAD + +## Quick Start + +1. source poky/oe-init-build-env rpi-build +2. Add this layer to bblayers.conf and the dependencies above +3. Set MACHINE in local.conf to one of the supported boards +4. bitbake core-image-base +5. Use bmaptool to copy the generated .wic.bz2 file to the SD card +6. Boot your RPI + +## Quick Start with kas + +1. Install kas build tool from PyPi (sudo pip3 install kas) +2. kas build meta-raspberrypi/kas-poky-rpi.yml +3. Use bmaptool to copy the generated .wic.bz2 file to the SD card +4. Boot your RPI + +To adjust the build configuration with specific options (I2C, SPI, ...), simply add +a section as follows: + +``` +local_conf_header: + rpi-specific: | + ENABLE_I2C = "1" + RPI_EXTRA_CONFIG = "dtoverlay=pi3-disable-bt" +``` + +To configure the machine, you have to update the `machine` variable. +And the same for the `distro`. + +For further information, you can read more at + +## Maintainers + +* Andrei Gherzan `` diff --git a/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass new file mode 100644 index 0000000000000000000000000000000000000000..e803a0da955df8bb853c97f666bfb95fcac3901f --- /dev/null +++ b/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass @@ -0,0 +1,209 @@ +inherit image_types + +# +# Create an image that can be written onto a SD card using dd. +# +# The disk layout used is: +# +# 0 -> IMAGE_ROOTFS_ALIGNMENT - reserved for other data +# IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - bootloader and kernel +# BOOT_SPACE -> SDIMG_SIZE - rootfs +# + +# Default Free space = 1.3x +# Use IMAGE_OVERHEAD_FACTOR to add more space +# <---------> +# 4MiB 48MiB SDIMG_ROOTFS +# <-----------------------> <----------> <----------------------> +# ------------------------ ------------ ------------------------ +# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | +# ------------------------ ------------ ------------------------ +# ^ ^ ^ ^ +# | | | | +# 0 4MiB 4MiB + 48MiB 4MiB + 48Mib + SDIMG_ROOTFS + +# This image depends on the rootfs image +IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" + +# Kernel image name +SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" +SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" +SDIMG_KERNELIMAGE_raspberrypi3-64 ?= "kernel8.img" + +# Boot partition volume id +# Shorten raspberrypi to just rpi to keep it under 11 characters +# now enforced by mkfs.vfat from dosfstools-4.2 +BOOTDD_VOLUME_ID ?= "${@d.getVar('MACHINE').replace('raspberrypi', 'rpi')}" + +# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) +BOOT_SPACE ?= "49152" + +# Set alignment to 4MB [in KiB] +IMAGE_ROOTFS_ALIGNMENT = "4096" + +# Use an uncompressed ext3 by default as rootfs +SDIMG_ROOTFS_TYPE ?= "ext3" +SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}" + +# For the names of kernel artifacts +inherit kernel-artifact-names + +RPI_SDIMG_EXTRA_DEPENDS ?= "" + +do_image_rpi_sdimg[depends] = " \ + parted-native:do_populate_sysroot \ + mtools-native:do_populate_sysroot \ + dosfstools-native:do_populate_sysroot \ + virtual/kernel:do_deploy \ + rpi-bootfiles:do_deploy \ + ${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \ + ${RPI_SDIMG_EXTRA_DEPENDS} \ +" + +do_image_rpi_sdimg[recrdeps] = "do_build" + +# SD card image name +SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.rpi-sdimg" + +# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. +FATPAYLOAD ?= "" + +# SD card vfat partition image name +SDIMG_VFAT_DEPLOY ?= "${RPI_USE_U_BOOT}" +SDIMG_VFAT = "${IMAGE_NAME}.vfat" +SDIMG_LINK_VFAT = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vfat" + +def split_overlays(d, out, ver=None): + dts = d.getVar("KERNEL_DEVICETREE") + # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder + if out: + overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d) + overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d) + else: + overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d) + \ + " " + oe.utils.str_filter('\S+\.dtbo$', dts, d) + + return overlays + +IMAGE_CMD_rpi-sdimg () { + + # Align partitions + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE) + + echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" + + # Check if we are building with device tree support + DTS="${KERNEL_DEVICETREE}" + + # Initialize sdcard image file + dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} + + # Create partition table + parted -s ${SDIMG} mklabel msdos + # Create boot partition and mark it as bootable + parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) + parted -s ${SDIMG} set 1 boot on + # Create rootfs partition to the end of disk + parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s + parted ${SDIMG} print + + # Create a vfat image with boot files + BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') + rm -f ${WORKDIR}/boot.img + mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* into boot.img" + if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img" + fi + if test -n "${DTS}"; then + # Copy board device trees to root folder + for dtbf in ${@split_overlays(d, True)}; do + dtb=`basename $dtbf` + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img" + done + + # Copy device tree overlays to dedicated folder + mmd -i ${WORKDIR}/boot.img overlays + for dtbf in ${@split_overlays(d, False)}; do + dtb=`basename $dtbf` + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img" + done + fi + if [ "${RPI_USE_U_BOOT}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/u-boot.bin into boot.img" + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/boot.scr into boot.img" + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img" + else + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img" + fi + else + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img" + else + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img" + fi + fi + + # Add files (eg. hypervisor binaries) from the deploy dir + if [ -n "${DEPLOYPAYLOAD}" ] ; then + echo "Copying deploy file payload into VFAT" + for entry in ${DEPLOYPAYLOAD} ; do + # Split entry at optional ':' to enable file renaming for the destination + if [ $(echo "$entry" | grep -c :) = "0" ] ; then + DEPLOY_FILE="$entry" + DEST_FILENAME="$entry" + else + DEPLOY_FILE="$(echo "$entry" | cut -f1 -d:)" + DEST_FILENAME="$(echo "$entry" | cut -f2- -d:)" + fi + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${DEPLOY_FILE} ::${DEST_FILENAME} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${DEPLOY_FILE} into boot.img" + done + fi + + if [ -n "${FATPAYLOAD}" ] ; then + echo "Copying payload into VFAT" + for entry in ${FATPAYLOAD} ; do + # use bbwarn instead of bbfatal to stop aborting on vfat issues like not supporting .~lock files + mcopy -v -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}$entry :: || bbwarn "mcopy cannot copy ${IMAGE_ROOTFS}$entry into boot.img" + done + fi + + # Add stamp file + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -v -i ${WORKDIR}/boot.img ${WORKDIR}/image-version-info :: || bbfatal "mcopy cannot copy ${WORKDIR}/image-version-info into boot.img" + + # Deploy vfat partition + if [ "${SDIMG_VFAT_DEPLOY}" = "1" ]; then + cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT} + ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT} + fi + + # Burn Partitions + dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat + if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" + then + xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + else + dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + fi +} + +ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " + +rpi_generate_sysctl_config() { + # systemd sysctl config + test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \ + echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf + + # sysv sysctl config + IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf" + test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \ + sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF} + echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF} +} diff --git a/bsp/meta-raspberrypi/conf/layer.conf b/bsp/meta-raspberrypi/conf/layer.conf new file mode 100644 index 0000000000000000000000000000000000000000..2518379ae7082ccda1645bada758ca347b8d1418 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/layer.conf @@ -0,0 +1,40 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory containing .bb and .bbappend files, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb \ + ${LAYERDIR}/recipes*/*/*.bbappend" + +BBFILE_COLLECTIONS += "raspberrypi" +BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/" +BBFILE_PRIORITY_raspberrypi = "9" + +LAYERSERIES_COMPAT_raspberrypi = "hardknott honister" +LAYERDEPENDS_raspberrypi = "core" + +# Additional license directories. +LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" + +# The dynamic-layers directory hosts the extensions and layer specific +# modifications. +# +# The .bbappend and .bb files are included if the respective layer +# collection is available. +BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + +BBFILES_DYNAMIC += " \ + openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ + openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \ + qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \ + qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \ + multimedia-layer:${LAYERDIR}/dynamic-layers/multimedia-layer/*/*/*.bb \ + multimedia-layer:${LAYERDIR}/dynamic-layers/multimedia-layer/*/*/*.bbappend \ +" + +DEFAULT_TEST_SUITES_remove_rpi = "parselogs" +DEFAULT_TEST_SUITES_append_rpi = " parselogs_rpi" diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc new file mode 100644 index 0000000000000000000000000000000000000000..a800078473b1eeade1e28e5e7506ee91e663bf59 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc @@ -0,0 +1,146 @@ +include conf/machine/include/rpi-default-settings.inc +include conf/machine/include/rpi-default-versions.inc +include conf/machine/include/rpi-default-providers.inc + +SOC_FAMILY = "rpi" +include conf/machine/include/soc-family.inc + +IMAGE_FSTYPES ?= "tar.bz2 ext3 wic.bz2 wic.bmap" +WKS_FILE ?= "sdimage-raspberrypi.wks" + +XSERVER = " \ + xserver-xorg \ + ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xserver-xorg-extension-glx", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \ + " + +RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ + overlays/overlay_map.dtb \ + overlays/at86rf233.dtbo \ + overlays/disable-bt.dtbo \ + overlays/dwc2.dtbo \ + overlays/gpio-ir.dtbo \ + overlays/gpio-ir-tx.dtbo \ + overlays/gpio-key.dtbo \ + overlays/hifiberry-amp.dtbo \ + overlays/hifiberry-dac.dtbo \ + overlays/hifiberry-dacplus.dtbo \ + overlays/hifiberry-digi.dtbo \ + overlays/justboom-both.dtbo \ + overlays/justboom-dac.dtbo \ + overlays/justboom-digi.dtbo \ + overlays/i2c-rtc.dtbo \ + overlays/imx219.dtbo \ + overlays/imx477.dtbo \ + overlays/iqaudio-dac.dtbo \ + overlays/iqaudio-dacplus.dtbo \ + overlays/mcp2515-can0.dtbo \ + overlays/mcp2515-can1.dtbo \ + overlays/miniuart-bt.dtbo \ + overlays/pitft22.dtbo \ + overlays/pitft28-capacitive.dtbo \ + overlays/pitft28-resistive.dtbo \ + overlays/pitft35-resistive.dtbo \ + overlays/pps-gpio.dtbo \ + overlays/rpi-ft5406.dtbo \ + overlays/rpi-poe.dtbo \ + overlays/vc4-fkms-v3d.dtbo \ + overlays/vc4-kms-v3d.dtbo \ + overlays/vc4-kms-v3d-pi4.dtbo \ + overlays/vc4-kms-dsi-7inch.dtbo \ + overlays/w1-gpio.dtbo \ + overlays/w1-gpio-pullup.dtbo \ + " + +RPI_KERNEL_DEVICETREE ?= " \ + bcm2708-rpi-zero.dtb \ + bcm2708-rpi-zero-w.dtb \ + bcm2708-rpi-b.dtb \ + bcm2708-rpi-b-rev1.dtb \ + bcm2708-rpi-b-plus.dtb \ + bcm2709-rpi-2-b.dtb \ + bcm2710-rpi-2-b.dtb \ + bcm2710-rpi-3-b.dtb \ + bcm2710-rpi-3-b-plus.dtb \ + bcm2711-rpi-4-b.dtb \ + bcm2711-rpi-400.dtb \ + bcm2708-rpi-cm.dtb \ + bcm2710-rpi-cm3.dtb \ + bcm2711-rpi-cm4.dtb \ + " + +KERNEL_DEVICETREE ??= " \ + ${RPI_KERNEL_DEVICETREE} \ + ${RPI_KERNEL_DEVICETREE_OVERLAYS} \ + " + +# By default: +# +# * When u-boot is disabled use the "Image" format which can be directly loaded +# by the rpi firmware. +# +# * When u-boot is enabled use the "uImage" format and the "bootm" command +# within u-boot to load the kernel. +KERNEL_BOOTCMD ??= "bootm" +KERNEL_IMAGETYPE_UBOOT ??= "uImage" +KERNEL_IMAGETYPE_DIRECT ??= "zImage" +KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ + '${KERNEL_IMAGETYPE_UBOOT}', '${KERNEL_IMAGETYPE_DIRECT}', d)}" + +MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio ${@bb.utils.contains('DISABLE_VC4GRAPHICS', '1', '', 'vc4graphics', d)}" + +# Raspberry Pi has no hardware clock +MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc" + +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules udev-rules-rpi" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "${@oe.utils.conditional('ENABLE_I2C', '1', 'kernel-module-i2c-dev kernel-module-i2c-bcm2708', '', d)}" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "${@oe.utils.conditional('ENABLE_IR', '1', 'kernel-module-gpio-ir kernel-module-gpio-ir-tx', '', d)}" + +SERIAL_CONSOLES_CHECK ??= "${SERIAL_CONSOLES}" + +# The name of the deploy directory for raspberry pi boot files. +# This variable is referred to by recipes fetching / generating the files. +BOOTFILES_DIR_NAME ?= "bootfiles" + +# Set Raspberrypi splash image +SPLASH ?= "psplash-raspberrypi" + +def make_dtb_boot_files(d): + # Generate IMAGE_BOOT_FILES entries for device tree files listed in + # KERNEL_DEVICETREE. + alldtbs = d.getVar('KERNEL_DEVICETREE') + imgtyp = d.getVar('KERNEL_IMAGETYPE') + + def transform(dtb): + base = os.path.basename(dtb) + if dtb.endswith('dtbo') or base == 'overlay_map.dtb': + # overlay dtb: + # eg: overlays/hifiberry-amp.dtbo has: + # DEPLOYDIR file: hifiberry-amp.dtbo + # destination: overlays/hifiberry-amp.dtbo + return '{};{}'.format(base, dtb) + elif dtb.endswith('dtb'): + # eg: whatever/bcm2708-rpi-b.dtb has: + # DEPLOYDIR file: bcm2708-rpi-b.dtb + # destination: bcm2708-rpi-b.dtb + return base + + return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) + + +IMAGE_BOOT_FILES ?= "${BOOTFILES_DIR_NAME}/* \ + ${@make_dtb_boot_files(d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ + '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ + '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ + " +do_image_wic[depends] += " \ + rpi-bootfiles:do_deploy \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ + " + +do_image_wic[recrdeps] = "do_build" + +# The kernel image is installed into the FAT32 boot partition and does not need +# to also be installed into the rootfs. +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc new file mode 100644 index 0000000000000000000000000000000000000000..c02d24879e66a8ab552ad78f23860f3743a15565 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc @@ -0,0 +1,15 @@ +# RaspberryPi BSP default providers + +PREFERRED_PROVIDER_virtual/kernel ??= "linux-raspberrypi" +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" +PREFERRED_PROVIDER_virtual/libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" +PREFERRED_PROVIDER_jpeg ?= "jpeg" + +PREFERRED_PROVIDER_virtual/libomxil ?= "userland" +VIRTUAL-RUNTIME_libomxil = "userland" + +PREFERRED_PROVIDER_u-boot-default-script ??= "rpi-u-boot-scr" diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-settings.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-settings.inc new file mode 100644 index 0000000000000000000000000000000000000000..bb18496c9d4808cd8f10d580747f8b546d670c74 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-settings.inc @@ -0,0 +1,9 @@ +# RaspberryPi BSP default settings + +IMAGE_CLASSES += "sdcard_image-rpi" + +# RPI kernel has errors of its own which should be filtered +# therefore use parselogs_rpi test instead of parselogs from oe-core +# +DEFAULT_TEST_SUITES_append_rpi = " parselogs_rpi" +DEFAULT_TEST_SUITES_remove_rpi = " parselogs" diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc new file mode 100644 index 0000000000000000000000000000000000000000..17d5bd6d59f1f4ff4e3cec462af024a5727362d1 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc @@ -0,0 +1,3 @@ +# RaspberryPi BSP default versions + +PREFERRED_VERSION_linux-raspberrypi ??= "5.10.%" diff --git a/bsp/meta-raspberrypi/conf/machine/include/tune-arm1176jzf-s.inc b/bsp/meta-raspberrypi/conf/machine/include/tune-arm1176jzf-s.inc new file mode 100644 index 0000000000000000000000000000000000000000..b9e0377fda4d010408f04ec78fda268fea8452f4 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/include/tune-arm1176jzf-s.inc @@ -0,0 +1,17 @@ +DEFAULTTUNE ?= "arm1176jzfshf" + +require conf/machine/include/arm/arch-armv6.inc + +TUNEVALID[arm1176jzfs] = "Enable arm1176jzfs specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1176jzfs', ' -mcpu=arm1176jzf-s', '', d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm1176jzfs', 'armv6:', '', d)}" + +AVAILTUNES += "arm1176jzfs" +ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs" +TUNE_FEATURES_tune-arm1176jzfs = "arm thumb vfp arm1176jzfs" +PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6} arm1176jzfs" + +AVAILTUNES += "arm1176jzfshf" +ARMPKGARCH_tune-arm1176jzfshf = "${ARMPKGARCH_tune-arm1176jzfs}" +TUNE_FEATURES_tune-arm1176jzfshf = "${TUNE_FEATURES_tune-arm1176jzfs} callconvention-hard" +PACKAGE_EXTRA_ARCHS_tune-arm1176jzfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} arm1176jzfshf-vfp" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf new file mode 100644 index 0000000000000000000000000000000000000000..f9371df6fb208f3f0727daf3f38a3b298f0afb3d --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@NAME: RaspberryPi Compute Module (CM1) +#@DESCRIPTION: Machine configuration for the RaspberryPi Compute Module (CM1) + +MACHINEOVERRIDES = "raspberrypi:${MACHINE}" +include conf/machine/raspberrypi.conf + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf new file mode 100644 index 0000000000000000000000000000000000000000..f1b81519f8d0d1fd147dd811928eee685c137d0f --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf @@ -0,0 +1,13 @@ +#@TYPE: Machine +#@NAME: RaspberryPi Compute Module 3 (CM3) +#@DESCRIPTION: Machine configuration for the RaspberryPi Compute Module 3 (CM3) + +DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" +require conf/machine/include/tune-cortexa7.inc +include conf/machine/include/rpi-base.inc + +SDIMG_KERNELIMAGE ?= "kernel7.img" +UBOOT_MACHINE = "rpi_3_32b_config" +SERIAL_CONSOLES ?= "115200;ttyAMA0" + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf new file mode 100644 index 0000000000000000000000000000000000000000..b23687b24a85757de1389f56863872400d33f51b --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf @@ -0,0 +1,14 @@ +#@TYPE: Machine +#@NAME: RaspberryPi Development Board +#@DESCRIPTION: Machine configuration for the RaspberryPi http://www.raspberrypi.org/ Board + +DEFAULTTUNE ?= "arm1176jzfshf" + +require conf/machine/include/tune-arm1176jzf-s.inc +include conf/machine/include/rpi-base.inc + +SERIAL_CONSOLES ?= "115200;ttyAMA0" + +UBOOT_MACHINE = "rpi_config" + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf new file mode 100644 index 0000000000000000000000000000000000000000..8689bca93f24f66345d4e5db4dfb1bacbb4b9d65 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@NAME: RaspberryPi Zero WiFi Development Board +#@DESCRIPTION: Machine configuration for the RaspberryPi Zero WiFi board (https://www.raspberrypi.org/blog/raspberry-pi-zero-w-joins-family/) + +DEFAULTTUNE ?= "arm1176jzfshf" +require conf/machine/include/tune-arm1176jzf-s.inc +include conf/machine/include/rpi-base.inc + +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43430 \ + bluez-firmware-rpidistro-bcm43430a1-hcd \ +" + +SDIMG_KERNELIMAGE ?= "kernel.img" +UBOOT_MACHINE ?= "rpi_0_w_defconfig" +SERIAL_CONSOLES ?= "115200;ttyS0" + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi0.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi0.conf new file mode 100644 index 0000000000000000000000000000000000000000..80297b563ce5564e15ac48b0094ba287071b3129 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi0.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@NAME: RaspberryPi Zero Development Board +#@DESCRIPTION: Machine configuration for the RaspberryPi Zero board (https://www.raspberrypi.org/blog/raspberry-pi-zero) + +MACHINEOVERRIDES = "raspberrypi:${MACHINE}" +include conf/machine/raspberrypi.conf + +SERIAL_CONSOLES ?= "115200;ttyAMA0" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf new file mode 100644 index 0000000000000000000000000000000000000000..505c6f2ff1b1fdad79b4ef56283d5a86c131418b --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf @@ -0,0 +1,14 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 2 Development Board +#@DESCRIPTION: Machine configuration for the RaspberryPi 2 + +DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" + +require conf/machine/include/tune-cortexa7.inc +include conf/machine/include/rpi-base.inc + +SERIAL_CONSOLES ?= "115200;ttyAMA0" + +UBOOT_MACHINE = "rpi_2_config" + +ARMSTUB ?= "armstub7.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf new file mode 100644 index 0000000000000000000000000000000000000000..5394132195ee30b5cfdc7894e1a2d78a2ae0b9f0 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf @@ -0,0 +1,36 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 3 Development Board +#@DESCRIPTION: Machine configuration for the RaspberryPi 3 in 64 bits mode + +MACHINEOVERRIDES = "raspberrypi3:${MACHINE}" + +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43430 \ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm43430a1-hcd \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ +" + +require conf/machine/include/tune-cortexa53.inc +include conf/machine/include/rpi-base.inc + +RPI_KERNEL_DEVICETREE = " \ + broadcom/bcm2710-rpi-3-b.dtb \ + broadcom/bcm2710-rpi-3-b-plus.dtb \ + broadcom/bcm2837-rpi-3-b.dtb \ + broadcom/bcm2710-rpi-cm3.dtb \ + " + +SERIAL_CONSOLES ?= "115200;ttyS0" + +UBOOT_MACHINE = "rpi_arm64_config" + +# When u-boot is enabled we need to use the "Image" format and the "booti" +# command to load the kernel +KERNEL_IMAGETYPE_UBOOT ?= "Image" +# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet +KERNEL_IMAGETYPE_DIRECT ?= "Image" +KERNEL_BOOTCMD ?= "booti" + +VC4DTBO ?= "vc4-fkms-v3d" +ARMSTUB ?= "armstub8.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf new file mode 100644 index 0000000000000000000000000000000000000000..dafb66e5a090eb6b9d4ca29f140dd96fae8e4937 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf @@ -0,0 +1,21 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 3 Development Board (32bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 3 in 32 bits mode + +DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" +require conf/machine/include/tune-cortexa7.inc +include conf/machine/include/rpi-base.inc + +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43430 \ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm43430a1-hcd \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ +" + +SDIMG_KERNELIMAGE ?= "kernel7.img" +UBOOT_MACHINE = "rpi_3_32b_config" +SERIAL_CONSOLES ?= "115200;ttyS0" + +VC4DTBO ?= "vc4-fkms-v3d" +ARMSTUB ?= "armstub7.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf new file mode 100644 index 0000000000000000000000000000000000000000..12c8954d946ae15572a0af5f9a288065d7989420 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf @@ -0,0 +1,36 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 4 Development Board (64bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 64 bits mode + +MACHINEOVERRIDES = "raspberrypi4:${MACHINE}" + +MACHINE_FEATURES += "pci" +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ +" + +require conf/machine/include/tune-cortexa72.inc +include conf/machine/include/rpi-base.inc + +RPI_KERNEL_DEVICETREE = " \ + broadcom/bcm2711-rpi-4-b.dtb \ + broadcom/bcm2711-rpi-400.dtb \ + broadcom/bcm2711-rpi-cm4.dtb \ +" + +SDIMG_KERNELIMAGE ?= "kernel8.img" +SERIAL_CONSOLES ?= "115200;ttyS0" + +UBOOT_MACHINE = "rpi_arm64_config" + +VC4DTBO ?= "vc4-fkms-v3d" + +# When u-boot is enabled we need to use the "Image" format and the "booti" +# command to load the kernel +KERNEL_IMAGETYPE_UBOOT ?= "Image" +# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet +KERNEL_IMAGETYPE_DIRECT ?= "Image" +KERNEL_BOOTCMD ?= "booti" + +ARMSTUB ?= "armstub8-gic.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf new file mode 100644 index 0000000000000000000000000000000000000000..d6b1d1bd0ec65f9f855e1e72ed2c97c71c574bc5 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf @@ -0,0 +1,21 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 4 Development Board (32bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 32 bit mode + +DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" +require conf/machine/include/tune-cortexa7.inc +include conf/machine/include/rpi-base.inc + +MACHINE_FEATURES += "pci" +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ +" + +# 'l' stands for LPAE +SDIMG_KERNELIMAGE ?= "kernel7l.img" +UBOOT_MACHINE = "rpi_4_32b_config" +SERIAL_CONSOLES ?= "115200;ttyS0" + +VC4DTBO ?= "vc4-fkms-v3d" +ARMSTUB ?= "armstub7.bin" diff --git a/bsp/meta-raspberrypi/docs/Makefile b/bsp/meta-raspberrypi/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d0de87ff7b6c1c9072d756379154ca57d3f3f2ae --- /dev/null +++ b/bsp/meta-raspberrypi/docs/Makefile @@ -0,0 +1,225 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/meta-raspberrypi.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/meta-raspberrypi.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/meta-raspberrypi" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/meta-raspberrypi" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/bsp/meta-raspberrypi/docs/conf.py b/bsp/meta-raspberrypi/docs/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..fcebbf1953239b6e1e52c3be5c1be9667e0c5041 --- /dev/null +++ b/bsp/meta-raspberrypi/docs/conf.py @@ -0,0 +1,343 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# meta-raspberrypi documentation build configuration file, created by +# sphinx-quickstart on Tue May 23 09:51:24 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = ['.rst', '.md'] + +# The encoding of source files. +# +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'meta-raspberrypi' +copyright = '2017, meta-raspberrypi contributors' +author = 'meta-raspberrypi contributors' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = 'master' +# The full version, including alpha/beta/rc tags. +release = 'master' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# +# today = '' +# +# Else, today_fmt is used as the format for a strftime call. +# +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +# html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +# +# html_title = 'meta-raspberrypi vmaster' + +# A shorter title for the navigation bar. Default is the same as html_title. +# +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# +# html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +# html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# +# html_additional_pages = {} + +# If false, no module index is generated. +# +# html_domain_indices = True + +# If false, no index is generated. +# +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'meta-raspberrypidoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'meta-raspberrypi.tex', 'meta-raspberrypi Documentation', + 'meta-raspberrypi contributors', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# +# latex_use_parts = False + +# If true, show page references after internal links. +# +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# +# latex_appendices = [] + +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + +# If false, no module index is generated. +# +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'meta-raspberrypi', 'meta-raspberrypi Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +# +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'meta-raspberrypi', 'meta-raspberrypi Documentation', + author, 'meta-raspberrypi', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# +# texinfo_appendices = [] + +# If false, no module index is generated. +# +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# +# texinfo_no_detailmenu = False + +source_parsers = { + '.md': 'recommonmark.parser.CommonMarkParser', +} diff --git a/bsp/meta-raspberrypi/docs/contributing.md b/bsp/meta-raspberrypi/docs/contributing.md new file mode 100644 index 0000000000000000000000000000000000000000..7d18400d473bacea3a87812105f98591b2b605f2 --- /dev/null +++ b/bsp/meta-raspberrypi/docs/contributing.md @@ -0,0 +1,109 @@ +# Contributing + +## Mailing list + +The main communication tool in use is the Yocto Project mailing list: + +* +* + +Feel free to ask any kind of questions but please always prepend your email +subject with `[meta-raspberrypi]` as this is the global *Yocto* mailing +list and not a dedicated *meta-raspberrypi* mailing list. + +## Formatting patches + +First and foremost, all of the contributions to the layer must be compliant +with the standard openembedded patch guidelines: + +* + +In summary, your commit log messages should be formatted as follows: + + : + + (Optional pointers to external resources, such as defect tracking) + + The intent of your change. + + (Optional: if it's not clear from above, how your change resolves + the issues in the first part) + + Signed-off-by: Your Name + +The `` is the layer component name that your changes affect. +It is important that you choose it correctly. A simple guide for selecting a +a good component name is the following: + +* For changes that affect *layer recipes*, please just use the **base names** + of the affected recipes, separated by commas (`,`), as the component name. + For example: use `omxplayer` instead of `omxplayer_git.bb`. If you are + adding new recipe(s), just use the new recipe(s) base name(s). An example + for changes to multiple recipes would be `userland,vc-graphics,wayland`. +* For changes that affect the *layer documentation*, please just use `docs` + as the component name. +* For changes that affect *other files*, i.e. under the `conf` directory, + please use the full path as the component name, e.g. `conf/layer.conf`. +* For changes that affect the *layer itself* and do not fall into any of + the above cases, please use `meta-raspberrypi` as the component name. + +A full example of a suitable commit log message is below: + + foobar: Adjusted the foo setting in bar + + When using foobar on systems with less than a gigabyte of RAM common + usage patterns often result in an Out-of-memory condition causing + slowdowns and unexpected application termination. + + Low-memory systems should continue to function without running into + memory-starvation conditions with minimal cost to systems with more + available memory. High-memory systems will be less able to use the + full extent of the system, a dynamically tunable option may be best, + long-term. + + The foo setting in bar was decreased from X to X-50% in order to + ensure we don't exhaust all system memory with foobar threads. + + Signed-off-by: Joe Developer + +A common issue during patch reviewing is commit log formatting, please review +the above formatting guidelines carefully before sending your patches. + +## Sending patches + +The preferred method to contribute to this project is to send pull +requests to the GitHub mirror of the layer: + +* + +**In addition**, you may send patches for review to the above specified +mailing list. In this case, when creating patches using `git` please make +sure to use the following formatting for the message subject: + + git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin + +Then, for sending patches to the mailing list, you may use this command: + + git send-email --to yocto@yoctoproject.org + +## GitHub issues + +In order to manage and track the layer issues more efficiently, the +GitHub issues facility is used by this project: + +* + +If you submit patches that have a GitHub issue associated, please make sure to +use standard GitHub keywords, e.g. `closes`, `resolves` or `fixes`, before the +"Signed-off-by" tag to close the relevant issues automatically: + + foobar: Adjusted the foo setting in bar + + Fixes: #324 + + Signed-off-by: Joe Developer + +More information on the available GitHub close keywords can be found here: + +* + diff --git a/bsp/meta-raspberrypi/docs/extra-apps.md b/bsp/meta-raspberrypi/docs/extra-apps.md new file mode 100644 index 0000000000000000000000000000000000000000..53007dc1f022b6adb05d0dc52a086654739b1f89 --- /dev/null +++ b/bsp/meta-raspberrypi/docs/extra-apps.md @@ -0,0 +1,9 @@ +# Extra apps + +## omxplayer + +omxplayer depends on libav which has a commercial license. So in order to be +able to compile omxplayer you will need to whiteflag the commercial +license in your local.conf: + + LICENSE_FLAGS_WHITELIST = "commercial" diff --git a/bsp/meta-raspberrypi/docs/extra-build-config.md b/bsp/meta-raspberrypi/docs/extra-build-config.md new file mode 100644 index 0000000000000000000000000000000000000000..1caf904fd57750377b71e4446174726007cae195 --- /dev/null +++ b/bsp/meta-raspberrypi/docs/extra-build-config.md @@ -0,0 +1,351 @@ +# Optional build configuration + +There are a set of ways in which a user can influence different parameters of +the build. We list here the ones that are closely related to this BSP or +specific to it. For the rest please check: + + +## Compressed deployed files + +1. Overwrite IMAGE_FSTYPES in local.conf + * `IMAGE_FSTYPES = "tar.bz2 ext3.xz"` + +2. Overwrite SDIMG_ROOTFS_TYPE in local.conf + * `SDIMG_ROOTFS_TYPE = "ext3.xz"` + +Accommodate the values above to your own needs (ex: ext3 / ext4). + +## GPU memory + +* `GPU_MEM`: GPU memory in megabyte. Sets the memory split between the ARM and + GPU. ARM gets the remaining memory. Min 16. Default 64. + +* `GPU_MEM_256`: GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by + the 512MB RP. Overrides gpu_mem. Max 192. Default not set. + +* `GPU_MEM_512`: GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by + the 256MB RP. Overrides gpu_mem. Max 448. Default not set. + +* `GPU_MEM_1024`: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by + the 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. + +See: + +## VC4 + +By default, each machine uses `vc4` for graphics. This will in turn sets mesa as provider for `gl` libraries. `DISABLE_VC4GRAPHICS` can be set to `1` to disable this behaviour falling back to using `userland`. Be aware that `userland` has not support for 64-bit arch. If you disable `vc4` on a 64-bit Raspberry Pi machine, expect build breakage. + +## Add purchased license codecs + +To add your own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in +local.conf. Example: + + KEY_DECODE_MPG2 = "12345678" + KEY_DECODE_WVC1 = "12345678" + +You can supply more licenses separated by comma. Example: + + KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" + +See: + +## Disable overscan + +By default the GPU adds a black border around the video output to compensate for +TVs which cut off part of the image. To disable this set this variable in +local.conf: + + DISABLE_OVERSCAN = "1" + +## Disable splash screen + +By default a rainbow splash screen is shown after the GPU firmware is loaded. +To disable this set this variable in local.conf: + + DISABLE_SPLASH = "1" + +## Boot delay + +The Raspberry Pi waits a number of seconds after loading the GPU firmware and +before loading the kernel. By default it is one second. This is useful if your +SD card needs a while to get ready before Linux is able to boot from it. +To remove (or adjust) this delay set these variables in local.conf: + + BOOT_DELAY = "0" + BOOT_DELAY_MS = "0" + +## Set overclocking options + +The Raspberry Pi can be overclocked. As of now overclocking up to the "Turbo +Mode" is officially supported by the Raspberry Pi and does not void warranty. Check +the config.txt for a detailed description of options and modes. The following +variables are supported in local.conf: `ARM_FREQ`, `GPU_FREQ`, `CORE_FREQ`, +`SDRAM_FREQ` and `OVER_VOLTAGE`. + +Example official settings for Turbo Mode in Raspberry Pi 2: + + ARM_FREQ = "1000" + CORE_FREQ = "500" + SDRAM_FREQ = "500" + OVER_VOLTAGE = "6" + +See: + +## HDMI and composite video options + +The Raspberry Pi can output video over HDMI or SDTV composite (the RCA connector). +By default the video mode for these is autodetected on boot: the HDMI mode is +selected according to the connected monitor's EDID information and the composite +mode is defaulted to NTSC using a 4:3 aspect ratio. Check the config.txt for a +detailed description of options and modes. The following variables are supported in +local.conf: `HDMI_FORCE_HOTPLUG`, `HDMI_DRIVE`, `HDMI_GROUP`, `HDMI_MODE`, +`CONFIG_HDMI_BOOST`, `SDTV_MODE`, `SDTV_ASPECT` and `DISPLAY_ROTATE`. + +Example to force HDMI output to 720p in CEA mode: + + HDMI_GROUP = "1" + HDMI_MODE = "4" + +See: + +## Video camera support with V4L2 drivers + +Set this variable to enable support for the video camera (Linux 3.12.4+ +required): + + VIDEO_CAMERA = "1" + +## Enable offline compositing support + +Set this variable to enable support for dispmanx offline compositing: + + DISPMANX_OFFLINE = "1" + +This will enable the firmware to fall back to off-line compositing of Dispmanx +elements. Normally the compositing is done on-line, during scanout, but cannot +handle too many elements. With off-line enabled, an off-screen buffer is +allocated for compositing. When scene complexity (number and sizes +of elements) is high, compositing will happen off-line into the buffer. + +Heavily recommended for Wayland/Weston. + +See: + +## Enable kgdb over console support + +To add the kdbg over console (kgdboc) parameter to the kernel command line, set +this variable in local.conf: + + ENABLE_KGDB = "1" + +## Disable rpi boot logo + +To disable rpi boot logo, set this variable in local.conf: + + DISABLE_RPI_BOOT_LOGO = "1" + +## Boot to U-Boot + +To have u-boot load kernel image, set in your local.conf: + + RPI_USE_U_BOOT = "1" + +This will select the appropriate image format for use with u-boot automatically. +For further customisation the KERNEL_IMAGETYPE and KERNEL_BOOTCMD variables can +be overridden to select the exact kernel image type (eg. zImage) and u-boot +command (eg. bootz) to be used. + +## Image with Initramfs + +To build an initramfs image: + +* Set this 3 kernel variables (in kernel's do_configure_prepend in linux-raspberrypi.inc after the line kernel_configure_variable LOCALVERSION "\"\"" +) + - kernel_configure_variable BLK_DEV_INITRD y + - kernel_configure_variable INITRAMFS_SOURCE "" + - kernel_configure_variable RD_GZIP y + +* Set the yocto variables (e.g. in local.conf) + - `INITRAMFS_IMAGE = ""` + - `INITRAMFS_IMAGE_BUNDLE = "1"` + - `BOOT_SPACE = "1073741"` + - `INITRAMFS_MAXSIZE = "315400"` + - `IMAGE_FSTYPES_pn-${INITRAMFS_IMAGE} = "${INITRAMFS_FSTYPES}"` + +## Including additional files in the SD card image boot partition + +The SD card image class supports adding extra files into the boot +partition, where the files are copied from either the image root +partition or from the build image deploy directory. + +To copy files that are present in the root partition into boot, +FATPAYLOAD is a simple space-separated list of files to be copied: + + FATPAYLOAD = "/boot/example1 /boot/example2" + +To copy files from the image deploy directory, the files should be +listed in the DEPLOYPAYLOAD as a space-separated list of entries. +Each entry lists a file to be copied, and an optional destination +filename can be specified by supplying it after a colon separator. + + DEPLOYPAYLOAD = "example1-${MACHINE}:example1 example2" + +Files that are to be included from the deploy directory will be produced +by tasks that image building task must depend upon, to ensure that the +files are available when they are needed, so these component deploy +tasks must be added to: RPI_SDIMG_EXTRA_DEPENDS. + + RPI_SDIMG_EXTRA_DEPENDS_append = " example:do_deploy" + +## Enable SPI bus + +When using device tree kernels, set this variable to enable the SPI bus: + + ENABLE_SPI_BUS = "1" + +## Enable I2C + +When using device tree kernels, set this variable to enable I2C: + + ENABLE_I2C = "1" + +Furthermore, to auto-load I2C kernel modules set: + + KERNEL_MODULE_AUTOLOAD_rpi += "i2c-dev i2c-bcm2708" + +## Enable PiTFT support + +Basic support for using PiTFT screens can be enabled by adding below in +local.conf: + +* `MACHINE_FEATURES += "pitft"` + - This will enable SPI bus and i2c device-trees, it will also setup + framebuffer for console and x server on PiTFT. + +NOTE: To get this working the overlay for the PiTFT model must be build, added +and specified as well (dtoverlay= in config.txt). + +Below is a list of currently supported PiTFT models in meta-raspberrypi, the +modelname should be added as a MACHINE_FEATURES in local.conf like below: + + MACHINE_FEATURES += "pitft " + +List of currently supported models: +* pitft22 +* pitft28r +* pitft28c +* pitft35r + +## Misc. display + +If you would like to use the Waveshare "C" 1024×600, 7 inch Capacitive Touch +Screen LCD, HDMI interface () Rev +2.1, please set the following in your local.conf: + + WAVESHARE_1024X600_C_2_1 = "1" + +## Enable UART + +RaspberryPi 0, 1, 2 and CM will have UART console enabled by default. + +RaspberryPi 0 WiFi and 3 does not have the UART enabled by default because this +needs a fixed core frequency and enable_uart will set it to the minimum. Certain +operations - 60fps h264 decode, high quality deinterlace - which aren't +performed on the ARM may be affected, and we wouldn't want to do that to users +who don't want to use the serial port. Users who want serial console support on +RaspberryPi 0 Wifi or 3 will have to explicitly set in local.conf: + + ENABLE_UART = "1" + +Ref.: +* +* + +## Enable USB Peripheral (Gadget) support + +The standard USB driver only supports host mode operations. Users who +want to use gadget modules like g_ether should set the following in +local.conf: + + ENABLE_DWC2_PERIPHERAL = "1" + +## Enable USB host support + +By default in case of the Compute Module 4 IO Board the standard USB driver +that usually supports host mode operations is disabled for power saving reasons. +Users who want to use the 2 USB built-in ports or the other ports provided via +the header extension should set the following in local.conf: + + ENABLE_DWC2_HOST = "1" + +## Enable Openlabs 802.15.4 radio module + +When using device tree kernels, set this variable to enable the 802.15.4 hat: + + ENABLE_AT86RF = "1" + +See: + +## Enable CAN + +In order to use CAN with an MCP2515-based module, set the following variables: + + ENABLE_SPI_BUS = "1" + ENABLE_CAN = "1" + +In case of dual CAN module (e.g. PiCAN2 Duo), set following variables instead: + + ENABLE_SPI_BUS = "1" + ENABLE_DUAL_CAN = "1" + +Some modules may require setting the frequency of the crystal oscillator used on the particular board. The frequency is usually marked on the package of the crystal. By default, it is set to 16 MHz. To change that to 8 MHz, the following variable also has to be set: + + CAN_OSCILLATOR="8000000" + +Tested modules: + +* PiCAN2 (16 MHz crystal): +* WaveShare RS485 CAN HAT (8 MHz or 12 MHz crystal): +* PiCAN2 Duo (16 MHz crystal): + +## Enable infrared + +Users who want to enable infrared support, for example for using LIRC (Linux +Infrared Remote Control), have to explicitly set in local.conf: + + ENABLE_IR = "1" + +This will add device tree overlays gpio-ir and gpio-ir-tx to config.txt. +Appropriate kernel modules will be also included in the image. By default the +GPIO pin for gpio-ir is set to 18 and the pin for gpio-ir-tx is 17. Both pins +can be easily changed by modifying variables `GPIO_IR` and `GPIO_IR_TX`. + +## Manual additions to config.txt + +The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to +the `config.txt` file if there is not a specific option above for the +configuration you need. To add multiple lines you must include `\n` separators. +If double-quotes are needed in the lines you are adding you can use single +quotes around the whole string. + +For example, to add a comment containing a double-quote and a configuration +option: + + RPI_EXTRA_CONFIG = ' \n \ + # Raspberry Pi 7\" display/touch screen \n \ + lcd_rotate=2 \n \ + ' +## Enable Raspberrypi Camera V2 + +RaspberryPi does not have the unicam device ( RaspberryPi Camera ) enabled by default. +Because this unicam device ( bcm2835-unicam ) as of now is used by libcamera opensource. +So we have to explicitly set in local.conf. + + RASPBERRYPI_CAMERA_V2 = "1" + +This will add the device tree overlays imx219 ( RaspberryPi Camera sensor V2 driver ) to config.txt. +Also, this will enable adding Contiguous Memory Allocation value in the cmdline.txt. + +Ref.: +* +* diff --git a/bsp/meta-raspberrypi/docs/index.rst b/bsp/meta-raspberrypi/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..0d7ee0755d11ae8133a601b94d6c75ecb6eb3bcc --- /dev/null +++ b/bsp/meta-raspberrypi/docs/index.rst @@ -0,0 +1,26 @@ +.. meta-raspberrypi documentation master file, created by + sphinx-quickstart on Tue May 23 09:51:24 2017. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to meta-raspberrypi's documentation! +============================================ + +Contents: + +.. toctree:: + :maxdepth: 2 + + readme + layer-contents + extra-build-config + extra-apps + contributing + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/bsp/meta-raspberrypi/docs/layer-contents.md b/bsp/meta-raspberrypi/docs/layer-contents.md new file mode 100644 index 0000000000000000000000000000000000000000..5483708d83519ce44a50ff8c3e026dafc0b0192e --- /dev/null +++ b/bsp/meta-raspberrypi/docs/layer-contents.md @@ -0,0 +1,36 @@ +# Layer Contents + +## Supported Machines + +* raspberrypi +* raspberrypi0 +* raspberrypi0-wifi +* raspberrypi2 +* raspberrypi3 +* raspberrypi3-64 (64 bit kernel & userspace) +* raspberrypi4 +* raspberrypi4-64 (64 bit kernel & userspace) +* raspberrypi-cm (dummy alias for raspberrypi) +* raspberrypi-cm3 + +Note: The raspberrypi3 machines include support for Raspberry Pi 3B+. + +## Images + +* rpi-test-image + * Image based on core-image-base which includes most of the packages in this + layer and some media samples. + +For other uses it's recommended to base images on `core-image-minimal` or +`core-image-base` as appropriate. The old image names (`rpi-hwup-image` and +`rpi-basic-image`) are deprecated. + +## WiFi and Bluetooth Firmware + +Be aware that the WiFi and Bluetooth firmware for the supported boards +is not available in the base version of `linux-firmware` from OE-Core +(poky). The files are added from Raspbian repositories in this layer's +bbappends to that recipe. All machines define +`MACHINE_EXTRA_RRECOMMENDS` to include the required wireless firmware; +raspberrypi3 supports 3, 3B, and 3B+ and so include multiple firmware +packages. diff --git a/bsp/meta-raspberrypi/docs/readme.md b/bsp/meta-raspberrypi/docs/readme.md new file mode 120000 index 0000000000000000000000000000000000000000..32d46ee883b58d6a383eed06eb98f33aa6530ded --- /dev/null +++ b/bsp/meta-raspberrypi/docs/readme.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc-gpio-ir-0.10.patch b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc-gpio-ir-0.10.patch new file mode 100644 index 0000000000000000000000000000000000000000..c0fdd189be4e0c25f0b3872513c0c58f239685c6 --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc-gpio-ir-0.10.patch @@ -0,0 +1,175 @@ +diff -ruN lirc-0.10.1.orig/lib/config_file.c lirc-0.10.1/lib/config_file.c +--- lirc-0.10.1.orig/lib/config_file.c 2017-09-10 17:52:19.000000000 +0900 ++++ lirc-0.10.1/lib/config_file.c 2019-06-26 00:39:45.734320696 +0900 +@@ -71,7 +71,7 @@ + typedef void* (*array_guest_func)(void* item, void* arg); + + +-#define LINE_LEN 1024 ++#define LINE_LEN 4096 + #define MAX_INCLUDES 10 + + const char* whitespace = " \t"; +diff -ruN lirc-0.10.1.orig/lib/ir_remote.h lirc-0.10.1/lib/ir_remote.h +--- lirc-0.10.1.orig/lib/ir_remote.h 2017-09-10 17:52:19.000000000 +0900 ++++ lirc-0.10.1/lib/ir_remote.h 2019-06-26 00:39:45.714321224 +0900 +@@ -110,12 +110,17 @@ + + static inline int is_pulse(lirc_t data) + { +- return data & PULSE_BIT ? 1 : 0; ++ return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_PULSE) ? 1 : 0; + } + + static inline int is_space(lirc_t data) + { +- return !is_pulse(data); ++ return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_SPACE) ? 1 : 0; ++} ++ ++static inline int is_timeout(lirc_t data) ++{ ++ return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_TIMEOUT) ? 1 : 0; + } + + static inline int has_repeat(const struct ir_remote* remote) +diff -ruN lirc-0.10.1.orig/lib/irrecord.c lirc-0.10.1/lib/irrecord.c +--- lirc-0.10.1.orig/lib/irrecord.c 2017-09-10 17:52:19.000000000 +0900 ++++ lirc-0.10.1/lib/irrecord.c 2019-06-26 00:39:45.724320960 +0900 +@@ -1398,9 +1398,16 @@ + state->retval = 0; + return STS_LEN_TIMEOUT; + } ++ if (is_timeout(state->data)) { ++ return STS_LEN_AGAIN; ++ } + state->count++; + if (state->mode == MODE_GET_GAP) { +- state->sum += state->data & PULSE_MASK; ++ if (state->sum != 0 || is_pulse(state->data)) { ++ state->sum += state->data & PULSE_MASK; ++ }else{ ++ return STS_LEN_AGAIN; ++ } + if (state->average == 0 && is_space(state->data)) { + if (state->data > 100000) { + state->sum = 0; +@@ -1472,6 +1479,10 @@ + state->keypresses = lastmaxcount; + return STS_LEN_AGAIN; + } else if (state->mode == MODE_HAVE_GAP) { ++ if (state->count==1 && is_space(state->data)) { ++ state->count = 0; ++ return STS_LEN_AGAIN; ++ } + if (state->count <= MAX_SIGNALS) { + signals[state->count - 1] = state->data & PULSE_MASK; + } else { +@@ -1510,7 +1521,7 @@ + /* such long pulses may appear with + * crappy hardware (receiver? / remote?) + */ +- else { ++ else if(is_pulse(state->data)) { + remote->gap = 0; + return STS_LEN_NO_GAP_FOUND; + } +@@ -1811,22 +1822,24 @@ + + static int raw_data_ok(struct button_state* btn_state) + { +- int r; ++ int r = 0; + int ref; + +- if (!is_space(btn_state->data)) { ++ if (is_pulse(btn_state->data)) { + r = 0; +- } else if (is_const(&remote)) { +- if (remote.gap > btn_state->sum) { +- ref = (remote.gap - btn_state->sum); +- ref *= (100 - remote.eps); +- ref /= 100; ++ } else if (is_space(btn_state->data)) { ++ if (is_const(&remote)) { ++ if (remote.gap > btn_state->sum) { ++ ref = (remote.gap - btn_state->sum); ++ ref *= (100 - remote.eps); ++ ref /= 100; ++ } else { ++ ref = 0; ++ } ++ r = btn_state->data > ref; + } else { +- ref = 0; ++ r = btn_state->data > (remote.gap * (100 - remote.eps)) / 100; + } +- r = btn_state->data > ref; +- } else { +- r = btn_state->data > (remote.gap * (100 - remote.eps)) / 100; + } + return r; + } +@@ -1970,7 +1983,7 @@ + btn_state->data = remote.gap; + } + if (btn_state->count == 0) { +- if (!is_space(btn_state->data) ++ if (is_pulse(btn_state->data) + || btn_state->data < + remote.gap - remote.gap * remote.eps / + 100) { +diff -ruN lirc-0.10.1.orig/lib/lirc/ir_remote.h lirc-0.10.1/lib/lirc/ir_remote.h +--- lirc-0.10.1.orig/lib/lirc/ir_remote.h 2017-09-10 17:52:58.000000000 +0900 ++++ lirc-0.10.1/lib/lirc/ir_remote.h 2019-06-26 00:39:45.724320960 +0900 +@@ -110,12 +110,17 @@ + + static inline int is_pulse(lirc_t data) + { +- return data & PULSE_BIT ? 1 : 0; ++ return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_PULSE) ? 1 : 0; + } + + static inline int is_space(lirc_t data) + { +- return !is_pulse(data); ++ return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_SPACE) ? 1 : 0; ++} ++ ++static inline int is_timeout(lirc_t data) ++{ ++ return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_TIMEOUT) ? 1 : 0; + } + + static inline int has_repeat(const struct ir_remote* remote) +diff -ruN lirc-0.10.1.orig/tools/mode2.cpp lirc-0.10.1/tools/mode2.cpp +--- lirc-0.10.1.orig/tools/mode2.cpp 2017-09-10 17:52:19.000000000 +0900 ++++ lirc-0.10.1/tools/mode2.cpp 2019-06-26 00:45:38.840404976 +0900 +@@ -326,12 +326,24 @@ + void print_mode2_data(unsigned int data) + { + static int bitno = 1; ++ static bool leading_space = true; ++ unsigned int msg = data & LIRC_MODE2_MASK; + + switch (opt_dmode) { + case 0: +- printf("%s %u\n", ( +- data & PULSE_BIT) ? "pulse" : "space", +- (uint32_t)(data & PULSE_MASK)); ++ if (leading_space && msg == LIRC_MODE2_SPACE ) { ++ break; ++ } else { ++ leading_space = false; ++ } ++ if (msg == LIRC_MODE2_PULSE) { ++ printf("pulse %u\n", (__u32)(data & PULSE_MASK)); ++ } else if (msg == LIRC_MODE2_SPACE) { ++ printf("space %u\n", (__u32)(data & PULSE_MASK)); ++ } else if (msg == LIRC_MODE2_TIMEOUT) { ++ printf("timeout %u\n", (__u32)(data & PULSE_MASK)); ++ leading_space = true; ++ } + break; + case 1: { + /* print output like irrecord raw config file data */ diff --git a/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service new file mode 100644 index 0000000000000000000000000000000000000000..03ecbb065f92b485c10c728191bbd49d888a3a49 --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service @@ -0,0 +1,11 @@ +[Unit] +Description=LIRC Infrared Signal Decoder +Wants=lircd-setup.service +After=network.target lircd-setup.service + +[Service] +Type=simple +ExecStart=/usr/sbin/lircd --nodaemon + +[Install] +WantedBy=multi-user.target diff --git a/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.1.bbappend b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.1.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..5d3ab4dfd3b37e80f3642479b4c072861c37dcc5 --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.1.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rpi = " \ + file://lirc-gpio-ir-0.10.patch \ + file://lircd.service \ +" diff --git a/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-core/packagegroups/packagegroup-rpi-test.bbappend b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-core/packagegroups/packagegroup-rpi-test.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..63fedbb54224a1cbf486a8a1580a837e2ffb015e --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-core/packagegroups/packagegroup-rpi-test.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +RDEPENDS_${PN} += "python3-sense-hat" + diff --git a/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-devtools/python/python3-sense-hat_2.2.0.bb b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-devtools/python/python3-sense-hat_2.2.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..6195d284bc61c46348d74d5c7da5968e0c61b8b8 --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/meta-python/recipes-devtools/python/python3-sense-hat_2.2.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "Python module to control the Raspberry Pi Sense HAT used in the Astro Pi mission" +HOMEPAGE = "https://github.com/RPi-Distro/python-sense-hat" +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda" + +inherit setuptools3 pypi + +PYPI_PACKAGE = "sense-hat" + +SRC_URI[md5sum] = "69929250cb72349a8a82edf2584b1d83" +SRC_URI[sha256sum] = "f000998d042d96ed722d459312e1bebd0107f9f3015cd34b3e4fabcab9c800af" + +DEPENDS += " \ + jpeg \ + zlib \ + freetype \ + " + +RDEPENDS_${PN} += " \ + ${PYTHON_PN}-numpy \ + ${PYTHON_PN}-rtimu \ + ${PYTHON_PN}-pillow \ + " diff --git a/bsp/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera.bbappend b/bsp/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..8076ac79e8fa4c6386f2825f66b31a60fe03baab --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera.bbappend @@ -0,0 +1,2 @@ +PACKAGECONFIG[raspberrypi] = "-Dpipelines=raspberrypi" +PACKAGECONFIG_append_rpi = " raspberrypi" diff --git a/bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend b/bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..933aaf6c42969f7185c6d773a5b87a10ac958535 --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE_rpi = "(null)" diff --git a/bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-core/packagegroups/packagegroup-meta-oe.bbappend b/bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-core/packagegroups/packagegroup-meta-oe.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..25423d088843f66ba0773bfa1b3ed391f19c6581 --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-core/packagegroups/packagegroup-meta-oe.bbappend @@ -0,0 +1 @@ +RDEPENDS_packagegroup-meta-oe-kernel_remove_rpi = "bpftool" diff --git a/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e48f31d117534c4c58a4c982f2fdb7f7b2fa2c3e --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -0,0 +1,19 @@ +PACKAGECONFIG_GL_rpi = "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'gl', \ + bb.utils.contains('DISTRO_FEATURES', 'opengl', 'eglfs gles2', \ + '', d), d)}" +PACKAGECONFIG_GL_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' kms', '', d)}" +PACKAGECONFIG_GL_append_rpi = " gbm" +PACKAGECONFIG_FONTS_rpi = "fontconfig" +PACKAGECONFIG_append_rpi = " libinput examples tslib xkbcommon" +PACKAGECONFIG_remove_rpi = "tests" + +OE_QTBASE_EGLFS_DEVICE_INTEGRATION_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'eglfs_brcm', d)}" + +do_configure_prepend_rpi() { + # Add the appropriate EGLFS_DEVICE_INTEGRATION + if [ "${@d.getVar('OE_QTBASE_EGLFS_DEVICE_INTEGRATION')}" != "" ]; then + echo "EGLFS_DEVICE_INTEGRATION = ${OE_QTBASE_EGLFS_DEVICE_INTEGRATION}" >> ${S}/mkspecs/oe-device-extra.pri + fi +} +RDEPENDS_${PN}_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" +DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" diff --git a/bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi b/bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi new file mode 100644 index 0000000000000000000000000000000000000000..6f3baa0ca2b962af370c15f48f9a7f1ef6f48cde --- /dev/null +++ b/bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi @@ -0,0 +1,29 @@ +Copyright (c) 2006, Broadcom Corporation. +Copyright (c) 2015, Raspberry Pi (Trading) Ltd +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* This software may only be used for the purposes of developing for, + running or using a Raspberry Pi device. +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Broadcom Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. + +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 OWNER 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/bsp/meta-raspberrypi/img/balena.png b/bsp/meta-raspberrypi/img/balena.png new file mode 100644 index 0000000000000000000000000000000000000000..a872ce9b81d127bbd0a588fc84b7d10be73bf175 Binary files /dev/null and b/bsp/meta-raspberrypi/img/balena.png differ diff --git a/bsp/meta-raspberrypi/kas-poky-rpi.yml b/bsp/meta-raspberrypi/kas-poky-rpi.yml new file mode 100644 index 0000000000000000000000000000000000000000..d629e817f1ebc34247de4caf7cb37673e55d592c --- /dev/null +++ b/bsp/meta-raspberrypi/kas-poky-rpi.yml @@ -0,0 +1,61 @@ +header: + version: 8 + +machine: raspberrypi4 +distro: poky +target: + - core-image-base + +repos: + meta-raspberry: + + poky: + url: https://git.yoctoproject.org/git/poky + path: layers/poky + refspec: master + layers: + meta: + meta-poky: + meta-yocto-bsp: + + meta-openembedded: + url: http://git.openembedded.org/meta-openembedded + path: layers/meta-openembedded + refspec: master + layers: + meta-oe: + meta-python: + meta-networking: + meta-perl: + + meta-qt5: + url: https://github.com/meta-qt5/meta-qt5/ + path: layers/meta-qt5 + refspec: master + +bblayers_conf_header: + standard: | + POKY_BBLAYERS_CONF_VERSION = "2" + BBPATH = "${TOPDIR}" + BBFILES ?= "" +local_conf_header: + reduce_diskspace: | + INHERIT += "rm_work_and_downloads" + standard: | + CONF_VERSION = "1" + PACKAGE_CLASSES = "package_rpm" + SDKMACHINE = "x86_64" + USER_CLASSES = "buildstats image-mklibs image-prelink" + PATCHRESOLVE = "noop" + debug-tweaks: | + EXTRA_IMAGE_FEATURES = "debug-tweaks" + diskmon: | + BB_DISKMON_DIRS = "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" diff --git a/bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py b/bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py new file mode 100644 index 0000000000000000000000000000000000000000..4a9431034544961ebbd2ddad4212f70e0b8fbc25 --- /dev/null +++ b/bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py @@ -0,0 +1,18 @@ +from oeqa.runtime.cases.parselogs import * + +rpi_errors = [ + 'bcmgenet fd580000.genet: failed to get enet-eee clock', + 'bcmgenet fd580000.genet: failed to get enet-wol clock', + 'bcmgenet fd580000.genet: failed to get enet clock', + 'bcmgenet fd580000.ethernet: failed to get enet-eee clock', + 'bcmgenet fd580000.ethernet: failed to get enet-wol clock', + 'bcmgenet fd580000.ethernet: failed to get enet clock', +] + +ignore_errors['raspberrypi4'] = rpi_errors + common_errors +ignore_errors['raspberrypi4-64'] = rpi_errors + common_errors +ignore_errors['raspberrypi3'] = rpi_errors + common_errors +ignore_errors['raspberrypi3-64'] = rpi_errors + common_errors + +class ParseLogsTestRpi(ParseLogsTest): + pass diff --git a/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb b/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb new file mode 100644 index 0000000000000000000000000000000000000000..7e389dff58f3cc3de396fd3153ff8fd374097fdc --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e" + +inherit deploy nopackages + +include recipes-bsp/common/raspberrypi-tools.inc + +COMPATIBLE_MACHINE = "^rpi$" + +S = "${RPITOOLS_S}/armstubs" + +export CC7="${CC}" +export LD7="${LD}" +export OBJCOPY7="${OBJCOPY}" +export OBJDUMP7="${OBJDUMP}" +export CC8="${CC}" +export LD8="${LD}" +export OBJCOPY8="${OBJCOPY}" +export OBJDUMP8="${OBJDUMP} -maarch64" + +do_compile() { + [ -z "${ARMSTUB}" ] && bbfatal "No ARMSTUB defined for your machine." + oe_runmake ${ARMSTUB} +} + +do_deploy() { + install -d ${DEPLOYDIR}/${PN} + cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN} +} + +addtask deploy before do_build after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${PN}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +TOOLCHAIN = "gcc" diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-bootfiles.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-bootfiles.bb new file mode 100644 index 0000000000000000000000000000000000000000..f1248eed10f43bbd33c71882eb8fe283c0ee3974 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-bootfiles.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "Closed source binary files to help boot all raspberry pi devices." +LICENSE = "Broadcom-RPi" + +LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d" + +inherit deploy nopackages + +include recipes-bsp/common/raspberrypi-firmware.inc + +INHIBIT_DEFAULT_DEPS = "1" + +DEPENDS = "rpi-config rpi-cmdline" + +COMPATIBLE_MACHINE = "^rpi$" + +S = "${RPIFW_S}/boot" + +PR = "r3" + +do_deploy() { + install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} + + for i in ${S}/*.elf ; do + cp $i ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} + done + for i in ${S}/*.dat ; do + cp $i ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} + done + for i in ${S}/*.bin ; do + cp $i ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} + done + + # Add stamp in deploy directory + touch ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/${PN}-${PV}.stamp +} + +do_deploy[depends] += "rpi-config:do_deploy rpi-cmdline:do_deploy" + +addtask deploy before do_build after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb new file mode 100644 index 0000000000000000000000000000000000000000..3ebd1e61c2478ef39102e0a053531d8db412569c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb @@ -0,0 +1,51 @@ +SUMMARY = "cmdline.txt file used to boot the kernel on a Raspberry Pi device" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +COMPATIBLE_MACHINE = "^rpi$" +INHIBIT_DEFAULT_DEPS = "1" +inherit deploy nopackages + +CMDLINE_DWC_OTG ?= "dwc_otg.lpm_enable=0" +CMDLINE_ROOTFS ?= "root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" + +CMDLINE_SERIAL ?= "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}" + +CMDLINE_CMA ?= "${@oe.utils.conditional("RASPBERRYPI_CAMERA_V2", "1", "cma=64M", "", d)}" + +CMDLINE_CMA ?= "${@oe.utils.conditional("RASPBERRYPI_HD_CAMERA", "1", "cma=64M", "", d)}" + +CMDLINE_PITFT ?= "${@bb.utils.contains("MACHINE_FEATURES", "pitft", "fbcon=map:10 fbcon=font:VGA8x8", "", d)}" + +# Add the kernel debugger over console kernel command line option if enabled +CMDLINE_KGDB ?= '${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}' + +# Disable rpi logo on boot +CMDLINE_LOGO ?= '${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nologo", "", d)}' + +# You can define CMDLINE_DEBUG as "debug" in your local.conf or distro.conf +# to enable kernel debugging. +CMDLINE_DEBUG ?= "" + +CMDLINE = " \ + ${CMDLINE_DWC_OTG} \ + ${CMDLINE_SERIAL} \ + ${CMDLINE_ROOTFS} \ + ${CMDLINE_CMA} \ + ${CMDLINE_KGDB} \ + ${CMDLINE_LOGO} \ + ${CMDLINE_PITFT} \ + ${CMDLINE_DEBUG} \ + " + +do_compile() { + echo "${@' '.join('${CMDLINE}'.split())}" > "${WORKDIR}/cmdline.txt" +} + +do_deploy() { + install -d "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" + install -m 0644 "${WORKDIR}/cmdline.txt" "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" +} + +addtask deploy before do_build after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..1e48ca3a438e2505d921e37c889ad990b4fbf7be --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb @@ -0,0 +1,267 @@ +DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \ + The Raspberry Pi config.txt file is read by the GPU before \ + the ARM core is initialised. It can be used to set various \ + system configuration parameters." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +COMPATIBLE_MACHINE = "^rpi$" + +SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f" +SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=https;branch=master \ + " + +S = "${WORKDIR}/git" + +PR = "r5" + +INHIBIT_DEFAULT_DEPS = "1" + +PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" +PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" +PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" +PITFT28c="${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}" +PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}" + +VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" +VC4DTBO ?= "vc4-kms-v3d" +GPIO_IR ?= "18" +GPIO_IR_TX ?= "17" + +CAN_OSCILLATOR ?= "16000000" + +inherit deploy nopackages + +do_deploy() { + install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} + CONFIG=${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + + cp ${S}/config.txt $CONFIG + + if [ -n "${KEY_DECODE_MPG2}" ]; then + sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' $CONFIG + fi + if [ -n "${KEY_DECODE_WVC1}" ]; then + sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' $CONFIG + fi + if [ -n "${DISABLE_OVERSCAN}" ]; then + sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' $CONFIG + fi + if [ "${DISABLE_SPLASH}" = "1" ]; then + sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' $CONFIG + fi + + # Set overclocking options + if [ -n "${ARM_FREQ}" ]; then + sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' $CONFIG + fi + if [ -n "${GPU_FREQ}" ]; then + sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' $CONFIG + fi + if [ -n "${CORE_FREQ}" ]; then + sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' $CONFIG + fi + if [ -n "${SDRAM_FREQ}" ]; then + sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' $CONFIG + fi + if [ -n "${OVER_VOLTAGE}" ]; then + sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' $CONFIG + fi + + # GPU memory + if [ -n "${GPU_MEM}" ]; then + sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' $CONFIG + fi + if [ -n "${GPU_MEM_256}" ]; then + sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' $CONFIG + fi + if [ -n "${GPU_MEM_512}" ]; then + sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' $CONFIG + fi + if [ -n "${GPU_MEM_1024}" ]; then + sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' $CONFIG + fi + + # Set boot delay + if [ -n "${BOOT_DELAY}" ]; then + sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' $CONFIG + fi + if [ -n "${BOOT_DELAY_MS}" ]; then + sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' $CONFIG + fi + + # Set HDMI and composite video options + if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then + sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' $CONFIG + fi + if [ -n "${HDMI_DRIVE}" ]; then + sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' $CONFIG + fi + if [ -n "${HDMI_GROUP}" ]; then + sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' $CONFIG + fi + if [ -n "${HDMI_MODE}" ]; then + sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' $CONFIG + fi + if [ -n "${CONFIG_HDMI_BOOST}" ]; then + sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' $CONFIG + fi + if [ -n "${SDTV_MODE}" ]; then + sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' $CONFIG + fi + if [ -n "${SDTV_ASPECT}" ]; then + sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' $CONFIG + fi + if [ -n "${DISPLAY_ROTATE}" ]; then + sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' $CONFIG + fi + + # Video camera support + if [ "${VIDEO_CAMERA}" = "1" ]; then + # It has been observed that Raspberry Pi 4B 4GB may fail to enable the + # camera if "start_x=1" is at the end of the file. Therefore, + # "start_x=1" has been set to replace the original occurrence in + # config.txt, which is at the middle of the file. + # The exact underlying cause is unknown. There are similar issues + # reported in the raspberrypi/firware repo and the conclusion reached + # was that there could be a file size limitation affecting certain + # variables. It was commented that this limitation could be 4k but + # not proved. + sed -i '/#start_x=/ c\start_x=1' $CONFIG + fi + + # Offline compositing support + if [ "${DISPMANX_OFFLINE}" = "1" ]; then + echo "# Enable offline compositing" >>$CONFIG + echo "dispmanx_offline=1" >>$CONFIG + fi + + # SPI bus support + if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then + echo "# Enable SPI bus" >>$CONFIG + echo "dtparam=spi=on" >>$CONFIG + fi + + # I2C support + if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then + echo "# Enable I2C" >>$CONFIG + echo "dtparam=i2c1=on" >>$CONFIG + echo "dtparam=i2c_arm=on" >>$CONFIG + fi + + # PiTFT22 display support + if [ "${PITFT22}" = "1" ]; then + echo "# Enable PITFT22 display" >>$CONFIG + echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>$CONFIG + fi + if [ "${PITFT28r}" = "1" ]; then + echo "# Enable PITFT28r display" >>$CONFIG + echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG + fi + if [ "${PITFT28c}" = "1" ]; then + echo "# Enable PITFT28c display" >>$CONFIG + echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG + echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>$CONFIG + fi + if [ "${PITFT35r}" = "1" ]; then + echo "# Enable PITFT35r display" >>$CONFIG + echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>$CONFIG + fi + + # UART support + if [ "${ENABLE_UART}" = "1" ]; then + echo "# Enable UART" >>$CONFIG + echo "enable_uart=1" >>$CONFIG + fi + + # Infrared support + if [ "${ENABLE_IR}" = "1" ]; then + echo "# Enable infrared" >>$CONFIG + echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>$CONFIG + echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>$CONFIG + fi + + # VC4 Graphics support + if [ "${VC4GRAPHICS}" = "1" ]; then + echo "# Enable VC4 Graphics" >> $CONFIG + echo "dtoverlay=${VC4DTBO}" >> $CONFIG + fi + + # Choose Camera Sensor to be used, default imx219 sensor + if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then + echo "# Enable Sony RaspberryPi Camera(imx219)" >> $CONFIG + echo "dtoverlay=imx219" >> $CONFIG + fi + + # Choose Camera Sensor to be used, default imx477 sensor + #if [ "${RASPBERRYPI_HD_CAMERA}" = "1" ]; then + # echo "# Enable Sony RaspberryPi Camera(imx477)" >> $CONFIG + # echo "dtoverlay=imx477" >> $CONFIG + #fi + + # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) + if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then + echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> $CONFIG + echo "max_usb_current=1" >> $CONFIG + echo "hdmi_group=2" >> $CONFIG + echo "hdmi_mode=87" >> $CONFIG + echo "hdmi_cvt 1024 600 60 6 0 0 0" >> $CONFIG + echo "hdmi_drive=1" >> $CONFIG + fi + + # DWC2 USB peripheral support + if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then + echo "# Enable USB peripheral mode" >> $CONFIG + echo "dtoverlay=dwc2,dr_mode=peripheral" >> $CONFIG + fi + + # DWC2 USB host mode support + if [ "${ENABLE_DWC2_HOST}" = "1" ]; then + echo "# Enable USB host mode" >> $CONFIG + echo "dtoverlay=dwc2,dr_mode=host" >> $CONFIG + fi + + # AT86RF23X support + if [ "${ENABLE_AT86RF}" = "1" ]; then + echo "# Enable AT86RF23X" >>$CONFIG + echo "dtoverlay=at86rf233,speed=3000000" >>$CONFIG + fi + + # ENABLE DUAL CAN + if [ "${ENABLE_DUAL_CAN}" = "1" ]; then + echo "# Enable DUAL CAN" >>$CONFIG + echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG + echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>$CONFIG + # ENABLE CAN + elif [ "${ENABLE_CAN}" = "1" ]; then + echo "# Enable CAN" >>$CONFIG + echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG + fi + + # Append extra config if the user has provided any + printf "${RPI_EXTRA_CONFIG}\n" >> $CONFIG + + # Handle setup with armstub file + if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then + echo "\n# ARM stub configuration" >> $CONFIG + echo "armstub=${ARMSTUB}" >> $CONFIG + case "${ARMSTUB}" in + *-gic.bin) + echo "enable_gic=1" >> $CONFIG + ;; + esac + fi +} + +do_deploy_append_raspberrypi3-64() { + echo "# have a properly sized image" >> $CONFIG + echo "disable_overscan=1" >> $CONFIG + + echo "# Enable audio (loads snd_bcm2835)" >> $CONFIG + echo "dtparam=audio=on" >> $CONFIG +} + +addtask deploy before do_build after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc new file mode 100644 index 0000000000000000000000000000000000000000..6358fba4f52a2c182c3badf40325f0ec6f04c867 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc @@ -0,0 +1,9 @@ +RPIFW_DATE ?= "20210421" +SRCREV ?= "2ac4de4eaac5c1d1b25acec4a5e0a9fdb16f0c91" +RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz;downloadfilename=raspberrypi-firmware-${SRCREV}.tar.gz" +RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}" + +SRC_URI = "${RPIFW_SRC_URI}" +SRC_URI[sha256sum] = "c687aa1b5127a8dc0773e8aefb1f009f24bf71ccb4c9e8b40a1d46cbbb7bee0c" + +PV = "${RPIFW_DATE}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc new file mode 100644 index 0000000000000000000000000000000000000000..7879c0af5f73aa0a4eea6c2dd1be12a8ea37fc53 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc @@ -0,0 +1,9 @@ +RPITOOLS_DATE ?= "20201008" +SRCREV ?= "fc0e73c13865450e95edd046200e42a6e52d8256" +RPITOOLS_SRC_URI ?= "https://github.com/raspberrypi/tools/archive/${SRCREV}.tar.gz;downloadfilename=raspberrypi-tools-${SRCREV}.tar.gz" +RPITOOLS_S ?= "${WORKDIR}/tools-${SRCREV}" + +SRC_URI = "${RPITOOLS_SRC_URI}" +SRC_URI[sha256sum] = "05217b942150830225e8ee04a8f16b8ecc2ffbbe5dd815541b15333f783e805e" + +PV = "${RPITOOLS_DATE}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig b/bsp/meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig new file mode 100644 index 0000000000000000000000000000000000000000..bef4ce3c9b9e371a440b08b4c454848c3374e1b2 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig @@ -0,0 +1,6 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +DISPLAY_DPI=133 diff --git a/bsp/meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend b/bsp/meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..72d991c7e590bcac43dd2ab6da2de898cd36f829 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in new file mode 100644 index 0000000000000000000000000000000000000000..627d1815663a30f3ffe7d1663a84febfeeb2b72b --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in @@ -0,0 +1,4 @@ +fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs +fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@ +if test ! -e mmc 0:1 uboot.env; then saveenv; fi; +@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr} diff --git a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb new file mode 100644 index 0000000000000000000000000000000000000000..9108f71394232a83ca2e6e8a6bbde9aebb6682db --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb @@ -0,0 +1,28 @@ +SUMMARY = "U-boot boot scripts for Raspberry Pi" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +COMPATIBLE_MACHINE = "^rpi$" + +DEPENDS = "u-boot-mkimage-native" + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "file://boot.cmd.in" + +do_compile() { + sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \ + -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \ + "${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd" + mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr +} + +inherit kernel-arch deploy nopackages + +do_deploy() { + install -d ${DEPLOYDIR} + install -m 0644 boot.scr ${DEPLOYDIR} +} + +addtask do_deploy after do_compile before do_build + +PROVIDES += "u-boot-default-script" diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch new file mode 100644 index 0000000000000000000000000000000000000000..996ad10740ffe21ba0890b5117a56246c45ea4fb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch @@ -0,0 +1,51 @@ +From 336d86ebd146905cf4384912f4f27699b6e37c72 Mon Sep 17 00:00:00 2001 +From: Simon Glass +Date: Sun, 29 Dec 2019 21:19:17 -0700 +Subject: [PATCH] dm: core: Move ofdata_to_platdata() call earlier + +This method is supposed to extract platform data from the device tree. It +should be done before the device itself is probed. Move it earlier in the +device_probe() function. + +Upstream-Status: Backport + +Signed-off-by: Simon Glass +--- + drivers/core/device.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/drivers/core/device.c b/drivers/core/device.c +index 4e03708..291ff4c 100644 +--- a/drivers/core/device.c ++++ b/drivers/core/device.c +@@ -375,6 +375,13 @@ int device_probe(struct udevice *dev) + return 0; + } + ++ if (drv->ofdata_to_platdata && ++ (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { ++ ret = drv->ofdata_to_platdata(dev); ++ if (ret) ++ goto fail; ++ } ++ + seq = uclass_resolve_seq(dev); + if (seq < 0) { + ret = seq; +@@ -411,13 +418,6 @@ int device_probe(struct udevice *dev) + goto fail; + } + +- if (drv->ofdata_to_platdata && +- (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { +- ret = drv->ofdata_to_platdata(dev); +- if (ret) +- goto fail; +- } +- + /* Only handle devices that have a valid ofnode */ + if (dev_of_valid(dev)) { + /* +-- +2.7.4 + diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config new file mode 100644 index 0000000000000000000000000000000000000000..d00df0cb394c9c7024fe43f00b794c6b44eca753 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config @@ -0,0 +1 @@ +/boot/uboot.env 0x0000 0x4000 diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..cdfe5bb8ba80b9fbb6634880686565d6c10e9700 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_rpi = " \ + file://fw_env.config \ +" + +# special fix for raspberrypi-cm3 +SRC_URI_append_raspberrypi-cm3 = " file://0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch" + +DEPENDS_append_rpi = " u-boot-default-script" + +do_install_append_rpi () { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config +} diff --git a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch new file mode 100644 index 0000000000000000000000000000000000000000..3bc02c49e23af98f98f8d9745806db7cec510bfc --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0001-bcm43xx-Add-bcm43xx-3wire-variant.patch @@ -0,0 +1,26 @@ +From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 16 Feb 2016 16:40:46 +0000 +Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant + +--- + tools/hciattach.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tools/hciattach.c b/tools/hciattach.c +index 59a76a7..5861d33 100644 +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1144,6 +1144,9 @@ struct uart_t uart[] = { + { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000, + FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL }, + ++ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000, ++ 0, DISABLE_PM, NULL, bcm43xx, NULL }, ++ + { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm }, + +-- +1.9.1 + diff --git a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch new file mode 100644 index 0000000000000000000000000000000000000000..5a0a434a30fc2d84cdf999863baee79d7f5a95f4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch @@ -0,0 +1,37 @@ +From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 16 Feb 2016 16:39:09 +0000 +Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware download + +--- + tools/hciattach_bcm43xx.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c +index 81f38cb..0b792e0 100644 +--- a/tools/hciattach_bcm43xx.c ++++ b/tools/hciattach_bcm43xx.c +@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti, + return -1; + + if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) { +- fprintf(stderr, "Patch not found, continue anyway\n"); ++ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name); + } else { +- if (bcm43xx_set_speed(fd, ti, speed)) +- return -1; +- + if (bcm43xx_load_firmware(fd, fw_path)) + return -1; + +@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti, + return -1; + } + ++ sleep(1); + if (bcm43xx_reset(fd)) + return -1; + } +-- +1.9.1 + diff --git a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch new file mode 100644 index 0000000000000000000000000000000000000000..f9f09ebb09ad6eaafc432bcf9e81ed8502658b1c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0003-Increase-firmware-load-timeout-to-30s.patch @@ -0,0 +1,25 @@ +From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 20 Jan 2016 16:00:37 +0000 +Subject: [PATCH 3/4] Increase firmware load timeout to 30s + +--- + tools/hciattach.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/hciattach.c b/tools/hciattach.c +index 5861d33..4141796 100644 +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[]) + { + struct uart_t *u = NULL; + int detach, printpid, raw, opt, i, n, ld, err; +- int to = 10; ++ int to = 30; + int init_speed = 0; + int send_break = 0; + pid_t pid; +-- +1.9.1 + diff --git a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch new file mode 100644 index 0000000000000000000000000000000000000000..dadce354e9abf1e46f47caae65bd58bac4f2e14c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/0004-Move-the-43xx-firmware-into-lib-firmware.patch @@ -0,0 +1,25 @@ +From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 23 Feb 2016 17:52:29 +0000 +Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware + +--- + tools/hciattach_bcm43xx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c +index 0b792e0..207f668 100644 +--- a/tools/hciattach_bcm43xx.c ++++ b/tools/hciattach_bcm43xx.c +@@ -43,7 +43,7 @@ + #include "hciattach.h" + + #ifndef FIRMWARE_DIR +-#define FIRMWARE_DIR "/etc/firmware" ++#define FIRMWARE_DIR "/lib/firmware" + #endif + + #define FW_EXT ".hcd" +-- +1.9.1 + diff --git a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..d1a07a46128d8fc2ae44f6643cba0ca780e4929f --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/${PN}:" + +SRC_URI_append_rpi = "\ + file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \ + file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \ + file://0003-Increase-firmware-load-timeout-to-30s.patch \ + file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \ +" + +RDEPENDS_${PN}_append_rpi = " pi-bluetooth" diff --git a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch new file mode 100644 index 0000000000000000000000000000000000000000..45b43c725e915811f41064d0a3e7aa55516038b6 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch @@ -0,0 +1,27 @@ +From a73bbed89fb049ac424c211629935b26013e2573 Mon Sep 17 00:00:00 2001 +From: "Peter A. Bigot" +Date: Wed, 14 Nov 2018 09:19:51 -0600 +Subject: [PATCH] bthelper: correct path for hciconfig under Yocto + +Upstream-Status: Inapproprate [OE-specific] +Signed-off-by: Peter A. Bigot +Signed-off-by: Andrei Gherzan + +--- + usr/bin/bthelper | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usr/bin/bthelper b/usr/bin/bthelper +index af597e5..5de84f6 100755 +--- a/usr/bin/bthelper ++++ b/usr/bin/bthelper +@@ -10,7 +10,7 @@ fi + + dev="$1" + # Need to bring hci up before looking at MAC as it can be all zeros during init +-/bin/hciconfig "$dev" up +-/bin/hciconfig "$dev" | grep -qE "BD Address: (B8:27:EB|DC:A6:32):" || exit 0 ++/usr/bin/hciconfig "$dev" up ++/usr/bin/hciconfig "$dev" | grep -qE "BD Address: (B8:27:EB|DC:A6:32):" || exit 0 + /usr/bin/hcitool -i "$dev" cmd 0x3f 0x1c 0x01 0x02 0x00 0x01 0x01 > /dev/null + diff --git a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb new file mode 100644 index 0000000000000000000000000000000000000000..6ad81c4c7efd68f4a1283676f3990420e9ceb0bf --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb @@ -0,0 +1,47 @@ +SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi" +HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth" +SECTION = "kernel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "\ + file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ +" + +SRC_URI = "\ + git://github.com/RPi-Distro/pi-bluetooth;branch=master;protocol=https \ + file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \ +" +SRCREV = "cbdbcb66bcc5b9af05f1a9fffe2254c872bb0ace" + +S = "${WORKDIR}/git" + +# hciuart.service replaces what was brcm43438.service +inherit systemd +SYSTEMD_SERVICE_${PN} = "\ + hciuart.service \ + bthelper@.service \ +" + +do_install() { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d + + install -d ${D}${bindir} + install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir} + install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service + install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service + fi +} + +FILES_${PN} = "\ + ${bindir} \ + ${sysconfdir} \ + ${systemd_unitdir}/system \ +" + +RDEPENDS_${PN} += " \ + udev-rules-rpi \ +" diff --git a/bsp/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb b/bsp/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb new file mode 100644 index 0000000000000000000000000000000000000000..77a3d7b2b4d52652947585d7c94c5e47270382a4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb @@ -0,0 +1,15 @@ +# Base this image on core-image-minimal +include recipes-core/images/core-image-minimal.bb + +# Include modules in rootfs +IMAGE_INSTALL += " \ + kernel-modules \ + " + +SPLASH = "psplash-raspberrypi" + +IMAGE_FEATURES += "ssh-server-dropbear splash" + +do_image_prepend() { + bb.warn("The image 'rpi-basic-image' is deprecated, please use 'core-image-base' instead") +} diff --git a/bsp/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb b/bsp/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb new file mode 100644 index 0000000000000000000000000000000000000000..86e9b6daf78e34b3dcf112adb168e45305a2cc7a --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb @@ -0,0 +1,11 @@ +# Base this image on core-image-minimal +include recipes-core/images/core-image-minimal.bb + +# Include modules in rootfs +IMAGE_INSTALL += " \ + kernel-modules \ + " + +do_image_prepend() { + bb.warn("The image 'rpi-hwup-image' is deprecated, please use 'core-image-base' instead") +} diff --git a/bsp/meta-raspberrypi/recipes-core/images/rpi-test-image.bb b/bsp/meta-raspberrypi/recipes-core/images/rpi-test-image.bb new file mode 100644 index 0000000000000000000000000000000000000000..c2f5f73209504260c347e9de993f071215ee76a5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/images/rpi-test-image.bb @@ -0,0 +1,6 @@ +# Base this image on core-image-base +include recipes-core/images/core-image-base.bb + +COMPATIBLE_MACHINE = "^rpi$" + +IMAGE_INSTALL_append = " packagegroup-rpi-test" diff --git a/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend b/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..500d871e4bb3757c7a4c1e95cf2f918bff455395 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend @@ -0,0 +1,2 @@ +# mesa-demos needs gles1 and userland driver does not have it, works ok with vc4 graphics driver +X11GLTOOLS_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mesa-demos', d)}" diff --git a/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb b/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb new file mode 100644 index 0000000000000000000000000000000000000000..a3f4ac9ae93466509689078c57669babccf88f36 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "RaspberryPi Test Packagegroup" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +COMPATIBLE_MACHINE = "^rpi$" + +OMXPLAYER = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'omxplayer', d)}" + +RDEPENDS_${PN} = "\ + ${OMXPLAYER} \ + bcm2835-tests \ + rpio \ + rpi-gpio \ + pi-blaster \ + python3-rtimu \ + connman \ + connman-client \ + wireless-regdb-static \ + bluez5 \ +" + +RRECOMMENDS_${PN} = "\ + ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-multimedia", "bigbuckbunny-1080p bigbuckbunny-480p bigbuckbunny-720p", "", d)} \ + ${MACHINE_EXTRA_RRECOMMENDS} \ +" diff --git a/bsp/meta-raspberrypi/recipes-core/psplash/files/psplash-raspberrypi-img.h b/bsp/meta-raspberrypi/recipes-core/psplash/files/psplash-raspberrypi-img.h new file mode 100644 index 0000000000000000000000000000000000000000..de29ee916560c7a41e9fecd271e92a15814cb7ca --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/psplash/files/psplash-raspberrypi-img.h @@ -0,0 +1,3210 @@ +/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ + +#define POKY_IMG_ROWSTRIDE (2280) +#define POKY_IMG_WIDTH (570) +#define POKY_IMG_HEIGHT (720) +#define POKY_IMG_BYTES_PER_PIXEL (4) /* 3:RGB, 4:RGBA */ +#define POKY_IMG_RLE_PIXEL_DATA ((uint8*) \ + "\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\332\0\0\0" \ + "\0\7\0\0\0\7\0\0\0$\0\0\0C\0\0\0U\0\0\0O\0\0\0C\0\0\0\37\377\0\0\0\0" \ + "\372\0\0\0\0\3\0\0\0\4\0\0\0)\0\0\0F\202\0\0\0U\2\0\0\0G\0\0\0\37\377" \ + "\0\0\0\0\377\0\0\0\0\262\0\0\0\0\4\0\0\0\27\0\0\0g\0\0\0\264\0\0\0\366" \ + "\206\0\0\0\377\4\0\0\0\356\0\0\0\271\0\0\0t\0\0\0-\377\0\0\0\0\363\0" \ + "\0\0\0\4\0\0\0-\0\0\0|\0\0\0\311\0\0\0\371\206\0\0\0\377\4\0\0\0\356" \ + "\0\0\0\250\0\0\0\\\0\0\0\10\377\0\0\0\0\377\0\0\0\0\223\0\0\0\0\5\0\0" \ + "\0\10\0\0\0\77\0\0\0i\0\0\0\214\0\0\0\240\202\0\0\0\252\6\0\0\0\241\0" \ + "\0\0\231\0\0\0\214\0\0\0c\0\0\0""7\0\0\0\15\214\0\0\0\0\3\0\0\0\30\0" \ + "\0\0\220\0\0\0\366\215\0\0\0\377\3\0\0\0\320\0\0\0l\0\0\0\17\377\0\0" \ + "\0\0\355\0\0\0\0\3\0\0\0\35\0\0\0\202\0\0\0\335\215\0\0\0\377\3\0\0\0" \ + "\352\0\0\0\204\0\0\0\17\214\0\0\0\0\6\0\0\0\26\0\0\0B\0\0\0l\0\0\0\223" \ + "\0\0\0\231\0\0\0\245\202\0\0\0\252\5\0\0\0\234\0\0\0\205\0\0\0a\0\0\0" \ + "1\0\0\0\2\377\0\0\0\0\364\0\0\0\0\4\0\0\0\12\0\0\0]\0\0\0\267\0\0\0\367" \ + "\214\0\0\0\377\4\0\0\0\333\0\0\0\232\0\0\0V\0\0\0\24\206\0\0\0\0\3\0" \ + "\0\0\6\0\0\0\204\0\0\0\366\221\0\0\0\377\3\0\0\0\363\0\0\0\226\0\0\0" \ + ")\377\0\0\0\0\350\0\0\0\0\4\0\0\0\1\0\0\0F\0\0\0\257\0\0\0\374\221\0" \ + "\0\0\377\3\0\0\0\350\0\0\0a\0\0\0\1\206\0\0\0\0\4\0\0\0!\0\0\0e\0\0\0" \ + "\251\0\0\0\351\214\0\0\0\377\4\0\0\0\357\0\0\0\242\0\0\0G\0\0\0\2\377" \ + "\0\0\0\0\357\0\0\0\0\3\0\0\0\16\0\0\0|\0\0\0\352\222\0\0\0\377\4\0\0" \ + "\0\375\0\0\0\311\0\0\0r\0\0\0\34\202\0\0\0\0\2\0\0\0/\0\0\0\321\225\0" \ + "\0\0\377\4\0\0\0\376\0\0\0\272\0\0\0M\0\0\0\2\213\0\0\0\0\2\0\0\0\17" \ + "\0\0\0\37\202\0\0\0\"\1\0\0\0\12\377\0\0\0\0\303\0\0\0\0\1\0\0\0\23\202" \ + "\0\0\0\"\2\0\0\0\33\0\0\0\13\213\0\0\0\0\3\0\0\0\14\0\0\0j\0\0\0\327" \ + "\226\0\0\0\377\2\0\0\0\271\0\0\0\32\202\0\0\0\0\3\0\0\0.\0\0\0\206\0" \ + "\0\0\334\223\0\0\0\377\3\0\0\0\326\0\0\0_\0\0\0\3\377\0\0\0\0\353\0\0" \ + "\0\0\3\0\0\0\2\0\0\0i\0\0\0\351\227\0\0\0\377\4\0\0\0\375\0\0\0\301\0" \ + "\0\0\223\0\0\0\371\231\0\0\0\377\3\0\0\0\334\0\0\0r\0\0\0\22\203\0\0" \ + "\0\0\6\0\0\0\3\0\0\0""4\0\0\0k\0\0\0\241\0\0\0\313\0\0\0\360\204\0\0" \ + "\0\377\5\0\0\0\376\0\0\0\341\0\0\0\251\0\0\0f\0\0\0\30\377\0\0\0\0\273" \ + "\0\0\0\0\4\0\0\0*\0\0\0w\0\0\0\270\0\0\0\353\205\0\0\0\377\5\0\0\0\350" \ + "\0\0\0\302\0\0\0\224\0\0\0^\0\0\0&\204\0\0\0\0\3\0\0\0""3\0\0\0\222\0" \ + "\0\0\357\231\0\0\0\377\3\0\0\0\354\0\0\0\215\0\0\0\325\230\0\0\0\377" \ + "\2\0\0\0\323\0\0\0F\377\0\0\0\0\351\0\0\0\0\2\0\0\0\34\0\0\0\275\270" \ + "\0\0\0\377\5\0\0\0\372\0\0\0\266\0\0\0r\0\0\0\245\0\0\0\353\215\0\0\0" \ + "\377\3\0\0\0\375\0\0\0\255\0\0\0""5\377\0\0\0\0\266\0\0\0\0\3\0\0\0\2" \ + "\0\0\0Q\0\0\0\311\216\0\0\0\377\4\0\0\0\335\0\0\0\224\0\0\0{\0\0\0\324" \ + "\270\0\0\0\377\3\0\0\0\376\0\0\0\225\0\0\0\11\377\0\0\0\0\346\0\0\0\0" \ + "\2\0\0\0""7\0\0\0\351\316\0\0\0\377\2\0\0\0\272\0\0\0""1\377\0\0\0\0" \ + "\263\0\0\0\0\2\0\0\0P\0\0\0\326\316\0\0\0\377\2\0\0\0\314\0\0\0\31\377" \ + "\0\0\0\0\326\0\0\0\0\6\0\0\0\22\0\0\0V\0\0\0\216\0\0\0\260\0\0\0\323" \ + "\0\0\0\365\203\0\0\0\377\7\0\0\0\372\0\0\0\344\0\0\0\314\0\0\0\264\0" \ + "\0\0\236\0\0\0\217\0\0\0\366\320\0\0\0\377\3\0\0\0\375\0\0\0\240\0\0" \ + "\0\33\377\0\0\0\0\257\0\0\0\0\2\0\0\0""3\0\0\0\300\321\0\0\0\377\7\0" \ + "\0\0\341\0\0\0\214\0\0\0\242\0\0\0\271\0\0\0\322\0\0\0\350\0\0\0\376" \ + "\203\0\0\0\377\6\0\0\0\355\0\0\0\313\0\0\0\250\0\0\0\205\0\0\0E\0\0\0" \ + "\10\377\0\0\0\0\304\0\0\0\0\4\0\0\0\3\0\0\0Y\0\0\0\305\0\0\0\374\341" \ + "\0\0\0\377\3\0\0\0\363\0\0\0y\0\0\0\7\377\0\0\0\0\253\0\0\0\0\3\0\0\0" \ + "\26\0\0\0\233\0\0\0\375\341\0\0\0\377\3\0\0\0\365\0\0\0\261\0\0\0<\377" \ + "\0\0\0\0\301\0\0\0\0\2\0\0\0J\0\0\0\332\346\0\0\0\377\3\0\0\0\337\0\0" \ + "\0o\0\0\0\15\202\0\0\0\0\5\0\0\0\7\0\0\0-\0\0\0G\0\0\0^\0\0\0t\202\0" \ + "\0\0w\4\0\0\0u\0\0\0f\0\0\0H\0\0\0\31\377\0\0\0\0\214\0\0\0\0\4\0\0\0" \ + "\1\0\0\0$\0\0\0T\0\0\0h\203\0\0\0w\5\0\0\0q\0\0\0Z\0\0\0\77\0\0\0&\0" \ + "\0\0\3\202\0\0\0\0\3\0\0\0\34\0\0\0\211\0\0\0\360\346\0\0\0\377\2\0\0" \ + "\0\277\0\0\0)\377\0\0\0\0\275\0\0\0\0\3\0\0\0\6\0\0\0\217\0\0\0\376\351" \ + "\0\0\0\377\4\0\0\0\360\0\0\0\262\0\0\0\327\0\0\0\373\212\0\0\0\377\4" \ + "\0\0\0\342\0\0\0\236\0\0\0O\0\0\0\4\377\0\0\0\0\205\0\0\0\0\4\0\0\0\16" \ + "\0\0\0e\0\0\0\256\0\0\0\357\212\0\0\0\377\4\0\0\0\367\0\0\0\314\0\0\0" \ + "\267\0\0\0\372\351\0\0\0\377\2\0\0\0\365\0\0\0c\377\0\0\0\0\273\0\0\0" \ + "\0\2\0\0\0\11\0\0\0\265\374\0\0\0\377\3\0\0\0\345\0\0\0w\0\0\0\14\377" \ + "\0\0\0\0\4\0\0\0\0\0\0\0\34\0\0\0\225\0\0\0\364\374\0\0\0\377\1\0\0\0" \ + "\203\377\0\0\0\0\271\0\0\0\0\2\0\0\0\6\0\0\0\274\377\0\0\0\377\3\0\0" \ + "\0\351\0\0\0_\0\0\0\1\374\0\0\0\0\3\0\0\0\11\0\0\0\204\0\0\0\370\377" \ + "\0\0\0\377\1\0\0\0\207\377\0\0\0\0\253\0\0\0\0\4\0\0\0\15\0\0\0#\0\0" \ + "\0""8\0\0\0M\203\0\0\0U\7\0\0\0P\0\0\0@\0\0\0""0\0\0\0\37\0\0\0\17\0" \ + "\0\0\0\0\0\0\235\377\0\0\0\377\203\0\0\0\377\2\0\0\0\271\0\0\0\27\372" \ + "\0\0\0\0\2\0\0\0""3\0\0\0\332\377\0\0\0\377\203\0\0\0\377\7\0\0\0c\0" \ + "\0\0\2\0\0\0\22\0\0\0#\0\0\0""3\0\0\0D\0\0\0T\203\0\0\0U\4\0\0\0I\0\0" \ + "\0""2\0\0\0\35\0\0\0\11\377\0\0\0\0\227\0\0\0\0\6\0\0\0\22\0\0\0L\0\0" \ + "\0\202\0\0\0\260\0\0\0\336\0\0\0\367\377\0\0\0\377\222\0\0\0\377\2\0" \ + "\0\0\347\0\0\0""5\370\0\0\0\0\2\0\0\0`\0\0\0\370\377\0\0\0\377\222\0" \ + "\0\0\377\6\0\0\0\363\0\0\0\324\0\0\0\246\0\0\0v\0\0\0>\0\0\0\11\377\0" \ + "\0\0\0\216\0\0\0\0\4\0\0\0*\0\0\0\177\0\0\0\322\0\0\0\376\377\0\0\0\377" \ + "\230\0\0\0\377\2\0\0\0\364\0\0\0I\366\0\0\0\0\2\0\0\0{\0\0\0\376\377" \ + "\0\0\0\377\230\0\0\0\377\4\0\0\0\371\0\0\0\277\0\0\0k\0\0\0\30\377\0" \ + "\0\0\0\210\0\0\0\0\3\0\0\0\3\0\0\0T\0\0\0\307\377\0\0\0\377\235\0\0\0" \ + "\377\2\0\0\0\373\0\0\0`\363\0\0\0\0\2\0\0\0\2\0\0\0\225\377\0\0\0\377" \ + "\235\0\0\0\377\3\0\0\0\374\0\0\0\253\0\0\0""9\377\0\0\0\0\205\0\0\0\0" \ + "\2\0\0\0R\0\0\0\333\332\0\0\0\377\1\5\7\2\377\304\0\0\0\377\2\0\0\0\376" \ + "\0\0\0e\361\0\0\0\0\2\0\0\0\2\0\0\0\236\306\0\0\0\377\1\5\7\2\377\331" \ + "\0\0\0\377\2\0\0\0\300\0\0\0""1\377\0\0\0\0\3\0\0\0\0\0\0\0$\0\0\0\276" \ + "\334\0\0\0\377\4\21\31\6\377V|\35\377/D\20\377\5\7\2\377\302\0\0\0\377" \ + "\2\0\0\0\375\0\0\0_\357\0\0\0\0\2\0\0\0\1\0\0\0\230\304\0\0\0\377\4\0" \ + "\1\0\377\37-\13\377Nq\33\377)<\16\377\332\0\0\0\377\3\0\0\0\375\0\0\0" \ + "\232\0\0\0\16\375\0\0\0\0\2\0\0\0d\0\0\0\366\300\0\0\0\377\6\4\6\1\377" \ + "Dc\27\377Ec\30\377-@\17\377\24\34\7\377\1\2\0\377\230\0\0\0\377\5#3\14" \ + "\377t\250(\377j\231$\377=W\25\377\13\20\4\377\301\0\0\0\377\2\0\0\0\376" \ + "\0\0\0g\355\0\0\0\0\2\0\0\0\2\0\0\0\235\303\0\0\0\377\5\3\4\1\377-B\20" \ + "\377^\207\40\377u\251(\377Fe\30\377\231\0\0\0\377\5\14\22\4\377%5\15" \ + "\377=Y\25\377Or\33\377\21\31\6\377\277\0\0\0\377\2\0\0\0\342\0\0\0""9" \ + "\373\0\0\0\0\1\0\0\0\206\303\0\0\0\377\2\7\13\3\377^\207\40\377\202u" \ + "\251(\377\5o\240&\377X\177\36\377:T\24\377\32&\11\377\2\3\1\377\225\0" \ + "\0\0\377\1""7P\23\377\202u\251(\377\3q\243'\377C`\27\377\14\22\4\377" \ + "\300\0\0\0\377\2\0\0\0\373\0\0\0U\354\0\0\0\0\1\0\0\0\213\302\0\0\0\377" \ + "\3\4\5\1\3771G\21\377h\226#\377\202u\251(\377\2X\177\36\377\2\3\1\377" \ + "\225\0\0\0\377\4\21\30\6\3770F\20\377Or\33\377i\227$\377\202u\251(\377" \ + "\2o\240&\377\32%\11\377\301\0\0\0\377\2\0\0\0\367\0\0\0S\370\0\0\0\0" \ + "\2\0\0\0\2\0\0\0\232\305\0\0\0\377\2\6\11\2\377X\177\36\377\205u\251" \ + "(\377\4n\237&\377Pt\33\3771F\21\377\15\23\5\377\222\0\0\0\377\2\0\1\0" \ + "\377Nq\33\377\203u\251(\377\3r\244'\377Ec\30\377\14\21\4\377\222\0\0" \ + "\0\377\2\10\13\3\377\5\7\2\377\253\0\0\0\377\2\0\0\0\374\0\0\0Z\352\0" \ + "\0\0\0\1\0\0\0\217\256\0\0\0\377\1\14\22\4\377\222\0\0\0\377\3\3\4\1" \ + "\3773J\21\377i\230$\377\203u\251(\377\2h\226$\377\12\16\3\377\222\0\0" \ + "\0\377\4\5\7\2\377'8\15\377Gf\30\377f\224#\377\205u\251(\377\2k\232%" \ + "\377\26\40\10\377\303\0\0\0\377\2\0\0\0\374\0\0\0a\367\0\0\0\0\1\0\0" \ + "\0\212\307\0\0\0\377\2\4\5\1\377Ps\33\377\207u\251(\377\4u\250(\377Z" \ + "\202\37\3772H\21\377\13\21\4\377\220\0\0\0\377\2\6\11\2\377d\220\"\377" \ + "\204u\251(\377\3o\241&\3779R\23\377\4\6\1\377\220\0\0\0\377\3\2\3\1\377" \ + "W}\36\377#3\14\377\253\0\0\0\377\2\0\0\0\371\0\0\0\\\202\0\0\0""3\1\0" \ + "\0\0""7\202\0\0\0D\1\0\0\0F\203\0\0\0U\1\0\0\0\37\324\0\0\0\0\1\0\0\0" \ + "2\202\0\0\0U\1\0\0\0S\203\0\0\0D\1\0\0\0""4\202\0\0\0""3\1\0\0\0\203" \ + "\255\0\0\0\377\3\21\30\6\377Tz\35\377\27!\10\377\221\0\0\0\377\2%6\15" \ + "\377d\221\"\377\204u\251(\377\2t\247(\377\32&\11\377\220\0\0\0\377\4" \ + "\4\6\1\377&6\15\377Np\33\377p\242&\377\207u\251(\377\2e\222#\377\21\31" \ + "\6\377\305\0\0\0\377\2\0\0\0\374\0\0\0Q\365\0\0\0\0\1\0\0\0^\311\0\0" \ + "\0\377\2\1\2\0\377Dc\27\377\211u\251(\377\4t\250(\377W}\36\377)<\16\377" \ + "\4\5\1\377\216\0\0\0\377\1#3\14\377\206u\251(\377\2g\225#\377(:\16\377" \ + "\220\0\0\0\377\4.C\20\377u\251(\377Ps\33\377\14\22\4\377\264\0\0\0\377" \ + "\3\0\0\0\367\0\0\0\200\0\0\0\6\320\0\0\0\0\2\0\0\0\23\0\0\0\252\266\0" \ + "\0\0\377\4\2\3\1\377:T\24\377q\244'\377Rv\34\377\220\0\0\0\377\2\25\36" \ + "\7\377X\177\36\377\206u\251(\377\1Gg\30\377\217\0\0\0\377\3\34(\11\377" \ + "Ij\31\377o\240&\377\211u\251(\377\2^\207\40\377\13\20\4\377\307\0\0\0" \ + "\377\2\0\0\0\364\0\0\0+\351\0\0\0\0\3\0\0\0\20\0\0\0""6\0\0\0]\204\0" \ + "\0\0f\5\0\0\0]\0\0\0M\0\0\0=\0\0\0D\0\0\0\361\256\0\0\0\377\3\15\23\5" \ + "\377\26\40\10\377\4\5\1\377\232\0\0\0\377\1B_\27\377\213u\251(\377\3" \ + "m\236%\377Ca\27\377\24\34\7\377\215\0\0\0\377\1\\\205\40\377\207u\251" \ + "(\377\2Qu\34\377\13\21\4\377\216\0\0\0\377\5\3\4\1\377n\237&\377u\251" \ + "(\377m\236%\377*=\16\377\265\0\0\0\377\2\0\0\0\307\0\0\0+\316\0\0\0\0" \ + "\2\0\0\0K\0\0\0\342\266\0\0\0\377\2\25\36\7\377_\211\40\377\202u\251" \ + "(\377\1\37-\13\377\216\0\0\0\377\3\2\3\1\377:T\24\377r\245'\377\206u" \ + "\251(\377\2t\247(\377\14\22\4\377\214\0\0\0\377\3\10\14\3\3775L\22\377" \ + "b\216\"\377\213u\251(\377\2^\210\40\377\7\12\2\377\231\0\0\0\377\3\1" \ + "\1\0\377\20\27\5\377\26\40\10\377\255\0\0\0\377\5\0\0\0\322\0\0\0""5" \ + "\0\0\0A\0\0\0Q\0\0\0a\204\0\0\0f\3\0\0\0U\0\0\0/\0\0\0\10\332\0\0\0\0" \ + "\4\0\0\0\30\0\0\0d\0\0\0\257\0\0\0\351\272\0\0\0\377\11\2\3\1\377Ij\31" \ + "\377t\247(\377d\221\"\377Qu\34\377>Z\25\377+>\17\377\30\"\10\377\6\10" \ + "\2\377\224\0\0\0\377\2\0\1\0\377Ii\31\377\214u\251(\377\3u\250(\377P" \ + "t\33\377\30\"\10\377\213\0\0\0\377\1""4K\22\377\210u\251(\377\2m\235" \ + "%\377*<\16\377\216\0\0\0\377\1Or\33\377\203u\251(\377\2Ps\33\377\12\17" \ + "\3\377\264\0\0\0\377\3\0\0\0\371\0\0\0~\0\0\0\3\312\0\0\0\0\2\0\0\0\21" \ + "\0\0\0\246\266\0\0\0\377\3\1\2\0\3778P\23\377r\245'\377\202u\251(\377" \ + "\2o\240&\377\3\4\1\377\215\0\0\0\377\2\25\36\7\377^\210\40\377\210u\251" \ + "(\377\1W~\36\377\213\0\0\0\377\3\13\17\4\377\77[\25\377o\240&\377\214" \ + "u\251(\377\2d\220\"\377\11\15\3\377\224\0\0\0\377\11\2\3\1\377\22\32" \ + "\6\377&6\15\3778Q\23\377Lm\32\377_\211\40\377q\243'\377b\216\"\377\16" \ + "\24\5\377\270\0\0\0\377\5\0\0\0\375\0\0\0\337\0\0\0\235\0\0\0R\0\0\0" \ + "\14\323\0\0\0\0\4\0\0\0\2\0\0\0N\0\0\0\275\0\0\0\376\276\0\0\0\377\2" \ + "\0\1\0\377=Y\25\377\205u\251(\377\6t\250(\377`\213!\377Fe\30\377,@\17" \ + "\377\22\33\6\377\0\1\0\377\220\0\0\0\377\2\4\6\1\377b\215!\377\216u\251" \ + "(\377\2Ty\35\377\30\"\10\377\211\0\0\0\377\1\32%\11\377\212u\251(\377" \ + "\2Ln\32\377\6\11\2\377\214\0\0\0\377\1""0F\20\377\204u\251(\377\2i\230" \ + "$\377\35*\12\377\265\0\0\0\377\2\0\0\0\276\0\0\0\27\310\0\0\0\0\2\0\0" \ + "\0""3\0\0\0\336\266\0\0\0\377\2\13\21\4\377W~\36\377\204u\251(\377\1" \ + "Ty\35\377\214\0\0\0\377\3\0\1\0\3772H\21\377r\244'\377\211u\251(\377" \ + "\1=W\25\377\211\0\0\0\377\3\12\17\3\377B_\27\377q\243'\377\215u\251(" \ + "\377\2r\245'\377\27!\10\377\221\0\0\0\377\5\13\17\4\377$4\14\377>Z\25" \ + "\377Y\200\36\377p\242&\377\205u\251(\377\2Z\202\37\377\10\14\3\377\275" \ + "\0\0\0\377\3\0\0\0\370\0\0\0\244\0\0\0""4\320\0\0\0\0\2\0\0\0M\0\0\0" \ + "\333\303\0\0\0\377\2""2H\21\377t\250(\377\210u\251(\377\5m\235%\377S" \ + "x\34\3779S\24\377\35*\12\377\3\4\1\377\215\0\0\0\377\1\33&\11\377\217" \ + "u\251(\377\3u\250(\377Np\33\377\21\31\6\377\207\0\0\0\377\1\33&\11\377" \ + "\213u\251(\377\2e\222#\377\30#\10\377\213\0\0\0\377\1&7\15\377\205u\251" \ + "(\377\3t\247(\3779R\23\377\1\1\0\377\216\0\0\0\377\2,@\17\377\20\27\5" \ + "\377\244\0\0\0\377\2\0\0\0\346\0\0\0>\306\0\0\0\0\2\0\0\0h\0\0\0\370" \ + "\245\0\0\0\377\2\3\5\1\3779R\23\377\217\0\0\0\377\2\40.\13\377j\232$" \ + "\377\205u\251(\377\1Ii\31\377\213\0\0\0\377\2\11\15\3\377Qu\34\377\213" \ + "u\251(\377\1>Y\25\377\207\0\0\0\377\3\6\10\2\377:T\24\377o\240&\377\217" \ + "u\251(\377\1=Y\25\377\216\0\0\0\377\4\24\34\7\3771G\21\377Kl\32\377e" \ + "\222#\377\211u\251(\377\2Pt\33\377\4\6\1\377\301\0\0\0\377\2\0\0\0\300" \ + "\0\0\0,\314\0\0\0\0\2\0\0\0\24\0\0\0\247\306\0\0\0\377\2.B\20\377u\250" \ + "(\377\213u\251(\377\4o\241&\377Rv\34\3771F\21\377\20\27\5\377\213\0\0" \ + "\0\377\1d\220\"\377\220u\251(\377\3s\246'\377@]\26\377\6\11\2\377\205" \ + "\0\0\0\377\1""4L\22\377\214u\251(\377\2r\245'\3770F\20\377\212\0\0\0" \ + "\377\1%5\15\377\207u\251(\377\2Rw\34\377\6\11\2\377\215\0\0\0\377\3""6" \ + "N\23\377l\234%\377\33'\11\377\244\0\0\0\377\3\0\0\0\373\0\0\0v\0\0\0" \ + "\1\302\0\0\0\0\2\0\0\0\13\0\0\0\243\246\0\0\0\377\3\11\15\3\377Y\201" \ + "\37\377Z\203\37\377\216\0\0\0\377\2""6N\23\377t\250(\377\206u\251(\377" \ + "\1Hh\31\377\212\0\0\0\377\2\27\"\10\377h\226#\377\214u\251(\377\1W~\36" \ + "\377\205\0\0\0\377\3\0\1\0\377*=\16\377j\231$\377\221u\251(\377\1\21" \ + "\31\6\377\212\0\0\0\377\4\10\13\3\377'8\15\377Hg\30\377h\226$\377\214" \ + "u\251(\377\2Pt\33\377\2\3\1\377\303\0\0\0\377\3\0\0\0\371\0\0\0\200\0" \ + "\0\0\5\311\0\0\0\0\2\0\0\0$\0\0\0\337\310\0\0\0\377\1""8P\23\377\217" \ + "u\251(\377\4d\221\"\377Db\27\377\"2\14\377\3\5\1\377\207\0\0\0\377\1" \ + "Y\200\36\377\222u\251(\377\2i\227$\377'9\15\377\203\0\0\0\377\2\4\5\1" \ + "\377e\222#\377\216u\251(\377\2Gf\30\377\3\4\1\377\210\0\0\0\377\1:T\24" \ + "\377\210u\251(\377\2a\215!\377\20\27\5\377\214\0\0\0\377\4.B\20\377u" \ + "\251(\377r\244'\377)<\16\377\245\0\0\0\377\2\0\0\0\256\0\0\0\11\300\0" \ + "\0\0\0\2\0\0\0\36\0\0\0\324\246\0\0\0\377\4\22\33\6\377e\222#\377u\251" \ + "(\377Rv\34\377\214\0\0\0\377\2\4\5\1\377Jk\31\377\210u\251(\377\1^\210" \ + "\40\377\211\0\0\0\377\2*=\16\377q\243'\377\215u\251(\377\2u\250(\377" \ + "\30\"\10\377\203\0\0\0\377\2\24\34\7\377X\177\36\377\223u\251(\377\1" \ + "\6\11\2\377\207\0\0\0\377\4\30\"\10\377:T\24\377Z\203\37\377t\247(\377" \ + "\216u\251(\377\2X\177\36\377\3\5\1\377\306\0\0\0\377\2\0\0\0\276\0\0" \ + "\0\15\307\0\0\0\0\2\0\0\0#\0\0\0\341\311\0\0\0\377\2\0\1\0\377Tz\35\377" \ + "\221u\251(\377\4n\236%\377Hh\31\377\37,\13\377\1\2\0\377\203\0\0\0\377" \ + "\2\6\10\2\377o\240&\377\224u\251(\377\4V|\35\377\22\32\6\377\0\0\0\377" \ + "Ca\27\377\220u\251(\377\2Z\203\37\377\12\16\3\377\206\0\0\0\377\2\0\1" \ + "\0\377a\214!\377\211u\251(\377\2l\234%\377\31$\11\377\213\0\0\0\377\1" \ + "%6\15\377\202u\251(\377\2u\250(\3773J\22\377\245\0\0\0\377\2\0\0\0\274" \ + "\0\0\0\16\276\0\0\0\0\2\0\0\0(\0\0\0\337\246\0\0\0\377\2\30#\10\377l" \ + "\234%\377\202u\251(\377\1Ii\31\377\213\0\0\0\377\2\7\13\3\377Z\202\37" \ + "\377\211u\251(\377\2t\250(\377\21\31\6\377\206\0\0\0\377\2\1\1\0\377" \ + "\77[\26\377\220u\251(\377\5a\215!\377\6\11\2\377\6\10\2\377@\\\26\377" \ + "s\246'\377\224u\251(\377\1\"1\14\377\204\0\0\0\377\3\22\33\6\377;U\24" \ + "\377d\220\"\377\221u\251(\377\2m\235%\377\14\22\4\377\310\0\0\0\377\2" \ + "\0\0\0\276\0\0\0\11\305\0\0\0\0\2\0\0\0\16\0\0\0\331\313\0\0\0\377\2" \ + "\16\25\5\377s\246'\377\223u\251(\377\5j\230$\377B_\26\377\31$\10\377" \ + "\0\0\0\377Ca\27\377\226u\251(\377\2r\244'\377Sw\34\377\222u\251(\377" \ + "\2e\222#\377\22\32\6\377\205\0\0\0\377\1(:\16\377\213u\251(\377\2o\241" \ + "&\377\36,\12\377\212\0\0\0\377\1\33'\11\377\204u\251(\377\1:T\24\377" \ + "\245\0\0\0\377\2\0\0\0\326\0\0\0\37\274\0\0\0\0\2\0\0\0G\0\0\0\363\246" \ + "\0\0\0\377\2\34)\12\377o\240&\377\203u\251(\377\1\77[\25\377\212\0\0" \ + "\0\377\2\13\17\4\377_\212!\377\213u\251(\377\1Km\32\377\205\0\0\0\377" \ + "\2\4\6\1\377Or\33\377\222u\251(\377\2\\\205\40\377h\226$\377\226u\251" \ + "(\377\5`\213!\377\6\11\2\377\15\23\4\3775L\22\377^\210\40\377\224u\251" \ + "(\377\1""1F\21\377\312\0\0\0\377\1\0\0\0\250\305\0\0\0\0\1\0\0\0\242" \ + "\251\0\0\0\377\10\21\30\6\377&7\15\3779R\23\377Kl\32\377Ty\35\377_\211" \ + "\40\377h\226$\377q\244'\377\202u\251(\377\1s\246'\377\202m\236%\377\7" \ + "d\221\"\377U{\35\377Gf\30\3778Q\23\377)<\16\377\27!\10\377\4\5\1\377" \ + "\220\0\0\0\377\1Or\33\377\226u\251(\377\1i\230$\377\254u\251(\377\2m" \ + "\235%\377\35*\12\377\203\0\0\0\377\2\15\23\5\377l\234%\377\214u\251(" \ + "\377\2q\244'\377#2\14\377\211\0\0\0\377\1\24\34\7\377\205u\251(\377\2" \ + "@]\26\377\0\1\0\377\244\0\0\0\377\2\0\0\0\341\0\0\0'\272\0\0\0\0\2\0" \ + "\0\0O\0\0\0\367\246\0\0\0\377\2!0\13\377p\242&\377\204u\251(\377\1""7" \ + "P\23\377\211\0\0\0\377\2\15\23\5\377d\220\"\377\215u\251(\377\1(:\16" \ + "\377\203\0\0\0\377\2\12\17\3\377[\204\37\377\254u\251(\377\2j\231$\377" \ + "t\250(\377\225u\251(\377\2m\236%\377\5\7\2\377\217\0\0\0\377\12\1\1\0" \ + "\377\21\30\6\377$4\14\3773J\22\377B_\27\377Qu\34\377`\213!\377l\234%" \ + "\377m\236%\377q\243'\377\202u\251(\377\11t\247(\377j\232$\377a\215!\377" \ + "X\177\36\377Nq\33\377\77[\25\377,@\17\377\27\"\10\377\2\3\1\377\247\0" \ + "\0\0\377\1\0\0\0h\303\0\0\0\0\1\0\0\0E\250\0\0\0\377\2\24\35\7\377j\232" \ + "$\377\223u\251(\377\6t\247(\377d\220\"\377Nq\33\3779S\24\377\35*\12\377" \ + "\4\6\1\377\213\0\0\0\377\1:T\24\377\304u\251(\377\5r\245'\377*=\16\377" \ + "\0\0\0\377\3\5\1\377\\\205\37\377\216u\251(\377\2r\244'\377!/\13\377" \ + "\210\0\0\0\377\1\23\33\6\377\206u\251(\377\1@]\26\377\245\0\0\0\377\2" \ + "\0\0\0\352\0\0\0+\270\0\0\0\0\2\0\0\0X\0\0\0\374\246\0\0\0\377\2\40." \ + "\13\377r\244'\377\205u\251(\377\1""7P\23\377\210\0\0\0\377\2\13\20\4" \ + "\377d\220\"\377\216u\251(\377\5o\241&\377\24\34\7\377\0\0\0\377\22\33" \ + "\6\377e\222#\377\304u\251(\377\1X\177\36\377\213\0\0\0\377\6\1\1\0\377" \ + "\25\36\7\3772H\21\377Hi\31\377]\207\40\377p\242&\377\223u\251(\377\2" \ + "q\244'\3772H\21\377\246\0\0\0\377\2\0\0\0\363\0\0\0\30\301\0\0\0\0\2" \ + "\0\0\0\2\0\0\0\320\251\0\0\0\377\2+>\17\377t\250(\377\227u\251(\377\5" \ + "r\245'\377Y\201\37\377=X\25\377\34)\12\377\1\2\0\377\207\0\0\0\377\1" \ + "=W\25\377\305u\251(\377\3u\250(\377:T\24\377Fe\30\377\220u\251(\377\2" \ + "p\242&\377\35*\12\377\207\0\0\0\377\1\34)\12\377\207u\251(\377\1;U\24" \ + "\377\245\0\0\0\377\2\0\0\0\351\0\0\0*\266\0\0\0\0\2\0\0\0P\0\0\0\372" \ + "\246\0\0\0\377\2\34(\11\377p\242&\377\206u\251(\377\1@]\26\377\207\0" \ + "\0\0\377\2\11\15\3\377a\214!\377\220u\251(\377\3d\220\"\377$4\14\377" \ + "m\236%\377\305u\251(\377\1`\213!\377\210\0\0\0\377\4\21\31\6\3774K\22" \ + "\377Qu\34\377m\235%\377\230u\251(\377\2Mo\32\377\1\2\0\377\247\0\0\0" \ + "\377\1\0\0\0\224\301\0\0\0\0\1\0\0\0>\253\0\0\0\377\2-B\20\377u\250(" \ + "\377\232u\251(\377\4l\234%\377Kl\32\377'8\15\377\6\11\2\377\203\0\0\0" \ + "\377\2\4\6\1\377f\223#\377\331u\251(\377\2o\240&\377\26\37\7\377\206" \ + "\0\0\0\377\1""1F\21\377\210u\251(\377\1""5L\22\377\245\0\0\0\377\2\0" \ + "\0\0\340\0\0\0\37\264\0\0\0\0\2\0\0\0E\0\0\0\367\246\0\0\0\377\2\27\"" \ + "\10\377n\237&\377\207u\251(\377\1Ty\35\377\206\0\0\0\377\2\5\7\2\377" \ + "\\\205\40\377\331u\251(\377\2u\250(\377\31$\10\377\203\0\0\0\377\4\1" \ + "\2\0\377\34)\12\377@\\\26\377c\217\"\377\233u\251(\377\2Os\33\377\2\3" \ + "\1\377\250\0\0\0\377\2\0\0\0\365\0\0\0\15\300\0\0\0\0\1\0\0\0\227\254" \ + "\0\0\0\377\2""0F\20\377u\250(\377\234u\251(\377\5r\245'\377V|\35\377" \ + "2I\21\377\22\32\6\377Or\33\377\333u\251(\377\2h\226$\377\14\22\4\377" \ + "\205\0\0\0\377\1Z\202\37\377\210u\251(\377\2u\250(\377/D\20\377\245\0" \ + "\0\0\377\2\0\0\0\335\0\0\0\30\262\0\0\0\0\2\0\0\0<\0\0\0\365\246\0\0" \ + "\0\377\2\24\34\7\377l\234%\377\210u\251(\377\2s\246'\377\13\20\4\377" \ + "\204\0\0\0\377\2\1\1\0\377Ps\33\377\333u\251(\377\5f\223#\377\26\40\10" \ + "\377'9\15\377Kl\32\377l\234%\377\235u\251(\377\2Rv\34\377\3\4\1\377\252" \ + "\0\0\0\377\1\0\0\0[\300\0\0\0\0\1\0\0\0\351\255\0\0\0\377\1""3J\21\377" \ + "\375u\251(\377\2_\211\40\377\5\7\2\377\203\0\0\0\377\1\40.\13\377\212" \ + "u\251(\377\2t\250(\377*<\16\377\245\0\0\0\377\2\0\0\0\314\0\0\0\14\260" \ + "\0\0\0\0\2\0\0\0(\0\0\0\355\246\0\0\0\377\2\21\30\6\377j\230$\377\212" \ + "u\251(\377\1Db\27\377\204\0\0\0\377\1@]\26\377\375u\251(\377\2Ty\35\377" \ + "\3\5\1\377\253\0\0\0\377\1\0\0\0\257\277\0\0\0\0\1\0\0\0\40\257\0\0\0" \ + "\377\1""6N\22\377\375u\251(\377\1Lm\32\377\202\0\0\0\377\2\16\24\5\377" \ + "k\232%\377\213u\251(\377\2s\246'\377%5\15\377\245\0\0\0\377\2\0\0\0\277" \ + "\0\0\0\7\256\0\0\0\0\2\0\0\0\35\0\0\0\345\246\0\0\0\377\2\15\23\5\377" \ + "g\224#\377\214u\251(\377\1'9\15\377\202\0\0\0\377\1(:\16\377\375u\251" \ + "(\377\2V}\35\377\4\6\1\377\254\0\0\0\377\1\0\0\0\343\277\0\0\0\0\1\0" \ + "\0\0N\260\0\0\0\377\1""8R\23\377\375u\251(\377\3""2H\21\377\31$\10\377" \ + "i\230$\377\215u\251(\377\2r\244'\377\34)\12\377\245\0\0\0\377\2\0\0\0" \ + "\246\0\0\0\1\254\0\0\0\0\2\0\0\0\20\0\0\0\324\246\0\0\0\377\2\10\14\3" \ + "\377b\216\"\377\215u\251(\377\4s\246'\3773J\21\377\23\33\6\377o\241&" \ + "\377\374u\251(\377\2X\177\36\377\5\7\2\377\256\0\0\0\377\1\0\0\0\23\276" \ + "\0\0\0\0\1\0\0\0l\261\0\0\0\377\1Z" \ + "\25\377\77[\25\377Jk\31\377X\177\36\377j\232$\377\377u\251(\377\217u" \ + "\251(\377\2_\211\40\377\6\11\2\377\212\0\0\0\377\3h\226#\377u\250(\377" \ + "1F\21\377\227\0\0\0\377\2\0\0\0\350\0\0\0\32\250\0\0\0\0\2\0\0\0E\0\0" \ + "\0\375\230\0\0\0\377\4\25\36\7\377l\234%\377u\251(\377\27!\10\377\212" \ + "\0\0\0\377\1A^\26\377\377u\251(\377\217u\251(\377\14p\242&\377\\\205" \ + "\37\377Nq\33\377A^\26\377>Z\25\377:T\24\3777O\23\3772I\21\377/D\20\377" \ + "+>\17\377'8\15\377$4\14\377\206\37-\13\377\1\36,\12\377\207\27\"\10\377" \ + "\1\21\31\6\377\206\20\27\5\377\1\6\11\2\377\220\0\0\0\377\1\0\0\0D\276" \ + "\0\0\0\0\1\0\0\0p\222\0\0\0\377\1Np\33\377\377u\251(\377\260u\251(\377" \ + "\2Y\200\36\377\3\5\1\377\210\0\0\0\377\1\16\25\5\377\202u\251(\377\2" \ + "u\250(\3771F\21\377\227\0\0\0\377\2\0\0\0\311\0\0\0\7\246\0\0\0\0\2\0" \ + "\0\0\"\0\0\0\356\230\0\0\0\377\2\27!\10\377n\236%\377\202u\251(\377\1" \ + "2H\21\377\211\0\0\0\377\1""7P\23\377\377u\251(\377\260u\251(\377\2j\230" \ + "$\377\11\15\3\377\220\0\0\0\377\1\0\0\0""5\276\0\0\0\0\1\0\0\0X\222\0" \ + "\0\0\377\2\13\17\4\377k\232%\377\377u\251(\377\260u\251(\377\2Ij\31\377" \ + "\0\1\0\377\207\0\0\0\377\1(:\16\377\203u\251(\377\2t\247(\377)<\16\377" \ + "\227\0\0\0\377\1\0\0\0\215\245\0\0\0\0\2\0\0\0\5\0\0\0\307\230\0\0\0" \ + "\377\2\21\30\6\377i\230$\377\203u\251(\377\1Ln\32\377\210\0\0\0\377\2" \ + "'8\15\377t\250(\377\377u\251(\377\260u\251(\377\1%5\15\377\221\0\0\0" \ + "\377\1\0\0\0\36\276\0\0\0\0\1\0\0\0>\223\0\0\0\377\1$4\14\377\377u\251" \ + "(\377\261u\251(\377\1\17" \ + "\377u\250(\377\211u\251(\377\4""6N\22\377\0\0\0\377\2\3\1\377Ty\35\377" \ + "\377u\251(\377\261u\251(\377\2d\220\"\377\4\6\1\377\222\0\0\0\377\2\0" \ + "\0\0\366\0\0\0\16\300\0\0\0\0\2\0\0\0\2\0\0\0\343\224\0\0\0\377\2\6\11" \ + "\2\377g\225#\377\377u\251(\377\261u\251(\377\3d\220\"\377\13\20\4\377" \ + "W}\36\377\213u\251(\377\1:T\24\377\226\0\0\0\377\1\0\0\0\264\235\0\0" \ + "\0\0\2\0\0\0\17\0\0\0\345\227\0\0\0\377\2\32&\11\377r\244'\377\212u\251" \ + "(\377\3n\236%\377\17\25\5\377Hg\30\377\377u\251(\377\261u\251(\377\2" \ + "t\250(\377\34(\11\377\223\0\0\0\377\1\0\0\0\254\302\0\0\0\0\1\0\0\0\215" \ + "\225\0\0\0\377\1%5\15\377\377u\251(\377\262u\251(\377\1o\240&\377\214" \ + "u\251(\377\2t\250(\377\40.\13\377\226\0\0\0\377\1\0\0\0N\234\0\0\0\0" \ + "\1\0\0\0\216\227\0\0\0\377\2\11\15\3\377h\226#\377\214u\251(\377\1o\240" \ + "&\377\377u\251(\377\262u\251(\377\1Gg\30\377\224\0\0\0\377\1\0\0\0R\302" \ + "\0\0\0\0\2\0\0\0\30\0\0\0\366\225\0\0\0\377\1Qu\34\377\377u\251(\377" \ + "\277u\251(\377\2m\236%\377\17\26\5\377\225\0\0\0\377\2\0\0\0\347\0\0" \ + "\0\21\232\0\0\0\0\2\0\0\0;\0\0\0\375\226\0\0\0\377\2\2\3\1\377X\177\36" \ + "\377\377u\251(\377\277u\251(\377\2k\233%\377\10\13\3\377\223\0\0\0\377" \ + "\2\0\0\0\324\0\0\0\1\303\0\0\0\0\1\0\0\0\233\225\0\0\0\377\2\21\31\6" \ + "\377r\244'\377\377u\251(\377\277u\251(\377\2[\203\37\377\2\3\1\377\225" \ + "\0\0\0\377\1\0\0\0\220\231\0\0\0\0\2\0\0\0\2\0\0\0\314\227\0\0\0\377" \ + "\1:T\24\377\377u\251(\377\300u\251(\377\1""1G\21\377\224\0\0\0\377\1" \ + "\0\0\0b\304\0\0\0\0\1\0\0\0D\226\0\0\0\377\1C`\27\377\377u\251(\377\300" \ + "u\251(\377\1Dc\27\377\225\0\0\0\377\2\0\0\0\372\0\0\0(\230\0\0\0\0\1" \ + "\0\0\0b\227\0\0\0\377\2%5\15\377u\250(\377\377u\251(\377\277u\251(\377" \ + "\2c\217\"\377\1\2\0\377\223\0\0\0\377\2\0\0\0\373\0\0\0\17\303\0\0\0" \ + "\0\2\0\0\0\3\0\0\0\311\226\0\0\0\377\2\13\20\4\377p\242&\377\377u\251" \ + "(\377\300u\251(\377\1+>\17\377\225\0\0\0\377\1\0\0\0\275\227\0\0\0\0" \ + "\2\0\0\0\20\0\0\0\352\226\0\0\0\377\2\17\26\5\377m\236%\377\377u\251" \ + "(\377\300u\251(\377\1+>\17\377\225\0\0\0\377\1\0\0\0\220\303\0\0\0\0" \ + "\1\0\0\0o\230\0\0\0\377\1Ca\27\377\377u\251(\377\300u\251(\377\2n\237" \ + "&\377\16\24\5\377\225\0\0\0\377\1\0\0\0L\226\0\0\0\0\1\0\0\0\215\226" \ + "\0\0\0\377\2\1\1\0\377X\177\36\377\377u\251(\377\300u\251(\377\2d\220" \ + "\"\377\2\3\1\377\225\0\0\0\377\2\0\0\0\375\0\0\0:\301\0\0\0\0\2\0\0\0" \ + "\27\0\0\0\361\230\0\0\0\377\2\14\21\4\377r\245'\377\377u\251(\377\300" \ + "u\251(\377\2Z\202\37\377\1\1\0\377\224\0\0\0\377\2\0\0\0\324\0\0\0\3" \ + "\224\0\0\0\0\2\0\0\0!\0\0\0\370\226\0\0\0\377\1""6N\22\377\377u\251(" \ + "\377\301u\251(\377\1-A\17\377\227\0\0\0\377\2\0\0\0\313\0\0\0\1\300\0" \ + "\0\0\0\1\0\0\0\233\232\0\0\0\377\1Km\32\377\377u\251(\377\301u\251(\377" \ + "\1""2I\21\377\225\0\0\0\377\1\0\0\0b\224\0\0\0\0\1\0\0\0\244\226\0\0" \ + "\0\377\2\24\34\7\377r\244'\377\377u\251(\377\300u\251(\377\2j\231$\377" \ + "\3\5\1\377\230\0\0\0\377\1\0\0\0`\277\0\0\0\0\2\0\0\0-\0\0\0\374\232" \ + "\0\0\0\377\1\27!\10\377\377u\251(\377\301u\251(\377\2p\242&\377\21\31" \ + "\6\377\224\0\0\0\377\2\0\0\0\340\0\0\0\7\222\0\0\0\0\2\0\0\0.\0\0\0\375" \ + "\225\0\0\0\377\2\2\3\1\377^\210\40\377\377u\251(\377\301u\251(\377\1" \ + ";U\24\377\231\0\0\0\377\2\0\0\0\344\0\0\0\12\276\0\0\0\0\1\0\0\0\246" \ + "\234\0\0\0\377\1\\\205\40\377\377u\251(\377\301u\251(\377\2X\177\36\377" \ + "\1\1\0\377\224\0\0\0\377\1\0\0\0f\222\0\0\0\0\1\0\0\0\250\226\0\0\0\377" \ + "\1""5L\22\377\377u\251(\377\301u\251(\377\2t\247(\377\14\22\4\377\232" \ + "\0\0\0\377\1\0\0\0k\275\0\0\0\0\2\0\0\0\26\0\0\0\371\234\0\0\0\377\1" \ + "1F\21\377\377u\251(\377\302u\251(\377\1""5L\22\377\224\0\0\0\377\2\0" \ + "\0\0\342\0\0\0\7\220\0\0\0\0\2\0\0\0/\0\0\0\375\225\0\0\0\377\2\25\36" \ + "\7\377r\245'\377\377u\251(\377\301u\251(\377\1Ty\35\377\233\0\0\0\377" \ + "\1\0\0\0\323\275\0\0\0\0\1\0\0\0|\235\0\0\0\377\2\12\17\3\377s\246'\377" \ + "\377u\251(\377\301u\251(\377\2p\242&\377\20\27\5\377\224\0\0\0\377\1" \ + "\0\0\0l\220\0\0\0\0\1\0\0\0\256\225\0\0\0\377\2\1\1\0\377[\204\37\377" \ + "\377u\251(\377\302u\251(\377\1,\77\17\377\234\0\0\0\377\1\0\0\0@\274" \ + "\0\0\0\0\1\0\0\0\327\236\0\0\0\377\1Rw\34\377\377u\251(\377\302u\251" \ + "(\377\1U{\35\377\224\0\0\0\377\2\0\0\0\335\0\0\0\4\216\0\0\0\0\2\0\0" \ + "\0(\0\0\0\375\225\0\0\0\377\1""1F\21\377\377u\251(\377\302u\251(\377" \ + "\2o\241&\377\5\7\2\377\234\0\0\0\377\1\0\0\0\233\273\0\0\0\0\1\0\0\0" \ + "\35\237\0\0\0\377\1-@\17\377\377u\251(\377\303u\251(\377\1\"2\14\377" \ + "\224\0\0\0\377\1\0\0\0\\\216\0\0\0\0\1\0\0\0\237\225\0\0\0\377\2\10\14" \ + "\3\377l\234%\377\377u\251(\377\302u\251(\377\1Qu\34\377\235\0\0\0\377" \ + "\1\0\0\0\340\273\0\0\0\0\1\0\0\0Q\237\0\0\0\377\2\13\20\4\377u\250(\377" \ + "\377u\251(\377\302u\251(\377\2g\225#\377\5\7\2\377\223\0\0\0\377\2\0" \ + "\0\0\330\0\0\0\2\214\0\0\0\0\2\0\0\0$\0\0\0\374\225\0\0\0\377\1Gg\30" \ + "\377\377u\251(\377\303u\251(\377\1/D\20\377\236\0\0\0\377\1\0\0\0\25" \ + "\272\0\0\0\0\1\0\0\0t\240\0\0\0\377\1`\213!\377\252u\251(\377\4q\244" \ + "'\377_\211\40\377\\\205\40\377u\250(\377\377u\251(\377\225u\251(\377" \ + "\1""8R\23\377\224\0\0\0\377\1\0\0\0L\214\0\0\0\0\1\0\0\0\217\225\0\0" \ + "\0\377\2\26\40\10\377t\247(\377\377u\251(\377\225u\251(\377\3g\225#\377" \ + "X\177\36\377l\234%\377\253u\251(\377\1\17\26\5\377\236\0\0\0\377\1\0" \ + "\0\0:\272\0\0\0\0\1\0\0\0\202\240\0\0\0\377\1>Y\25\377\254u\251(\377" \ + "\5g\225#\377;U\24\3774L\22\377Z\202\37\377u\250(\377\377u\251(\377\222" \ + "u\251(\377\2q\244'\377\20\27\5\377\223\0\0\0\377\1\0\0\0\277\213\0\0" \ + "\0\0\2\0\0\0\20\0\0\0\363\224\0\0\0\377\2\1\1\0\377^\207\40\377\377u" \ + "\251(\377\223u\251(\377\4f\224#\377;U\24\377,\77\17\377V|\35\377\254" \ + "u\251(\377\1c\216\"\377\237\0\0\0\377\1\0\0\0H\272\0\0\0\0\1\0\0\0\206" \ + "\222\0\0\0\377\7\31$\11\3778R\23\377-A\17\377$4\14\377\32&\11\377\21" \ + "\30\6\377\6\11\2\377\206\0\0\0\377\2\12\16\3\377Ca\27\377\256u\251(\377" \ + "\5]\207\40\377\40.\13\377\26\37\7\377\77[\25\377h\226#\377\377u\251(" \ + "\377\221u\251(\377\1Nq\33\377\223\0\0\0\377\2\0\0\0\376\0\0\0-\212\0" \ + "\0\0\0\1\0\0\0o\225\0\0\0\377\1,\77\17\377\377u\251(\377\221u\251(\377" \ + "\6p\242&\377Km\32\377\"2\14\377\22\32\6\377Kl\32\377t\250(\377\255u\251" \ + "(\377\3^\210\40\377\22\33\6\377\1\1\0\377\205\0\0\0\377\7\4\6\1\377\15" \ + "\23\5\377\26\40\10\377!0\13\377+>\17\3774L\22\377,@\17\377\221\0\0\0" \ + "\377\1\0\0\0K\272\0\0\0\0\1\0\0\0s\222\0\0\0\377\2\10\13\3\377n\236%" \ + "\377\205u\251(\377\2s\246'\377j\231$\377\202e\222#\377\2l\234%\377o\240" \ + "&\377\262u\251(\377\6X\177\36\377\32&\11\377\1\1\0\377\34)\12\377Fe\30" \ + "\377n\236%\377\377u\251(\377\217u\251(\377\1\34(\11\377\223\0\0\0\377" \ + "\1\0\0\0\240\211\0\0\0\0\2\0\0\0\4\0\0\0\340\224\0\0\0\377\2\4\6\1\377" \ + "j\230$\377\377u\251(\377\216u\251(\377\7t\247(\377Sx\34\377);\16\377" \ + "\5\7\2\377\13\21\4\377Dc\27\377s\246'\377\261u\251(\377\6q\244'\377m" \ + "\236%\377g\224#\377e\222#\377h\226#\377p\242&\377\206u\251(\377\1%5\15" \ + "\377\221\0\0\0\377\1\0\0\0""7\272\0\0\0\0\1\0\0\0U\223\0\0\0\377\1""8" \ + "Q\23\377\277u\251(\377\7Qu\34\377\25\36\7\377\0\0\0\377\4\5\1\377(:\16" \ + "\377Sx\34\377s\246'\377\377u\251(\377\214u\251(\377\1V}\35\377\223\0" \ + "\0\0\377\2\0\0\0\366\0\0\0\20\210\0\0\0\0\1\0\0\0I\225\0\0\0\377\1""3" \ + "J\22\377\377u\251(\377\215u\251(\377\7`\213!\3775L\22\377\13\20\4\377" \ + "\0\0\0\377\10\14\3\377>Z\25\377p\242&\377\276u\251(\377\2[\204\37\377" \ + "\0\1\0\377\221\0\0\0\377\1\0\0\0\32\272\0\0\0\0\1\0\0\0#\223\0\0\0\377" \ + "\2\3\4\1\377d\220\"\377\300u\251(\377\2V|\35\377\25\36\7\377\202\0\0" \ + "\0\377\4\7\13\3\377/D\20\377Z\202\37\377u\250(\377\377u\251(\377\212" \ + "u\251(\377\1\36+\12\377\223\0\0\0\377\1\0\0\0m\210\0\0\0\0\1\0\0\0\256" \ + "\224\0\0\0\377\2\6\10\2\377l\234%\377\377u\251(\377\212u\251(\377\3f" \ + "\223#\377;U\24\377\22\32\6\377\202\0\0\0\377\3\7\13\3\377>Z\25\377p\242" \ + "&\377\277u\251(\377\2t\247(\377\27!\10\377\221\0\0\0\377\1\0\0\0\345" \ + "\273\0\0\0\0\2\0\0\0\2\0\0\0\347\223\0\0\0\377\1$4\14\377\301u\251(\377" \ + "\3s\246'\377Ec\30\377\13\20\4\377\203\0\0\0\377\3\26\40\10\377B_\26\377" \ + "k\232%\377\377u\251(\377\210u\251(\377\1V}\35\377\223\0\0\0\377\1\0\0" \ + "\0\313\207\0\0\0\0\2\0\0\0\24\0\0\0\371\224\0\0\0\377\1""3J\22\377\377" \ + "u\251(\377\210u\251(\377\4r\244'\377Nq\33\377#3\14\377\2\3\1\377\202" \ + "\0\0\0\377\3\3\4\1\3772H\21\377j\232$\377\301u\251(\377\1Hg\30\377\222" \ + "\0\0\0\377\1\0\0\0\253\274\0\0\0\0\1\0\0\0\225\224\0\0\0\377\1Or\33\377" \ + "\302u\251(\377\3p\242&\377Z\25\377\22\33\6\377\204\0\0\0\377\3\0\1\0\377'8\15\377" \ + "c\216\"\377\303u\251(\377\2u\250(\377\37,\13\377\222\0\0\0\377\2\0\0" \ + "\0\363\0\0\0\20\275\0\0\0\0\1\0\0\0\312\224\0\0\0\377\2\37-\13\377s\246" \ + "'\377\304u\251(\377\3f\223#\377*<\16\377\1\1\0\377\204\0\0\0\377\4\0" \ + "\1\0\377\36+\12\377Km\32\377q\244'\377\377u\251(\377\202u\251(\377\1" \ + "\34(\12\377\222\0\0\0\377\2\0\0\0\355\0\0\0\7\204\0\0\0\0\1\0\0\0""7" \ + "\224\0\0\0\377\2\5\7\2\377j\231$\377\377u\251(\377\5u\251(\377u\250(" \ + "\377Y\201\36\377+>\17\377\5\7\2\377\205\0\0\0\377\2\27\"\10\377V|\35" \ + "\377\305u\251(\377\1A]\26\377\223\0\0\0\377\1\0\0\0\220\276\0\0\0\0\1" \ + "\0\0\0[\225\0\0\0\377\1""3J\21\377\306u\251(\377\2_\211\40\377!0\13\377" \ + "\206\0\0\0\377\3\10\13\3\3772H\21\377_\212!\377\377u\251(\377\1U{\35" \ + "\377\223\0\0\0\377\1\0\0\0S\204\0\0\0\0\1\0\0\0\225\224\0\0\0\377\1""2" \ + "H\21\377\377u\251(\377\3j\232$\377\77[\25\377\22\32\6\377\206\0\0\0\377" \ + "\3\21\30\6\377Mo\32\377u\250(\377\305u\251(\377\2Tz\35\377\1\2\0\377" \ + "\222\0\0\0\377\2\0\0\0\372\0\0\0#\276\0\0\0\0\2\0\0\0\2\0\0\0\321\225" \ + "\0\0\0\377\1=X\25\377\307u\251(\377\2\\\205\37\377\35*\12\377\207\0\0" \ + "\0\377\3\23\33\6\377>Z\25\377m\236%\377\375u\251(\377\1\26\40\10\377" \ + "\222\0\0\0\377\1\0\0\0\263\203\0\0\0\0\2\0\0\0\10\0\0\0\356\223\0\0\0" \ + "\377\2\2\3\1\377g\224#\377\374u\251(\377\4t\247(\377Nq\33\377\37-\13" \ + "\377\1\1\0\377\206\0\0\0\377\3\17\26\5\377Nq\33\377t\250(\377\306u\251" \ + "(\377\2Y\201\37\377\5\7\2\377\223\0\0\0\377\1\0\0\0\227\300\0\0\0\0\1" \ + "\0\0\0J\225\0\0\0\377\2\0\1\0\377Ii\31\377\307u\251(\377\3u\250(\377" \ + "Nq\33\377\21\31\6\377\207\0\0\0\377\3\10\14\3\3774L\22\377d\220\"\377" \ + "\373u\251(\377\1Hg\30\377\222\0\0\0\377\2\0\0\0\371\0\0\0\17\202\0\0" \ + "\0\0\1\0\0\0L\224\0\0\0\377\1&6\15\377\373u\251(\377\3n\236%\377B_\27" \ + "\377\23\33\6\377\207\0\0\0\377\3\6\11\2\377;U\24\377o\241&\377\307u\251" \ + "(\377\2c\216\"\377\12\16\3\377\223\0\0\0\377\2\0\0\0\364\0\0\0\32\301" \ + "\0\0\0\0\1\0\0\0\246\225\0\0\0\377\2\2\3\1\377Pt\33\377\310u\251(\377" \ + "\3s\246'\377Ca\27\377\12\16\3\377\207\0\0\0\377\4\0\1\0\377\37,\13\377" \ + "Nq\33\377s\246'\377\370u\251(\377\2q\244'\377\12\17\3\377\222\0\0\0\377" \ + "\1\0\0\0]\202\0\0\0\0\1\0\0\0\237\224\0\0\0\377\1Y\201\37\377\371u\251" \ + "(\377\3]\206\40\377-A\17\377\5\7\2\377\207\0\0\0\377\3\2\3\1\3770E\20" \ + "\377j\232$\377\310u\251(\377\2g\225#\377\15\23\5\377\224\0\0\0\377\1" \ + "\0\0\0l\302\0\0\0\0\2\0\0\0\24\0\0\0\352\225\0\0\0\377\2\3\5\1\377Ps" \ + "\33\377\311u\251(\377\3n\237&\3777P\23\377\4\6\1\377\210\0\0\0\377\3" \ + "\13\21\4\3779R\23\377h\226$\377\367u\251(\377\1""5M\22\377\222\0\0\0" \ + "\377\4\0\0\0\256\0\0\0\0\0\0\0\4\0\0\0\354\223\0\0\0\377\1\24\34\7\377" \ + "\367u\251(\377\3p\242&\377Hg\30\377\27\"\10\377\211\0\0\0\377\2$4\14" \ + "\377c\216\"\377\311u\251(\377\2e\222#\377\21\30\6\377\224\0\0\0\377\2" \ + "\0\0\0\303\0\0\0\2\303\0\0\0\0\1\0\0\0Z\226\0\0\0\377\2\0\1\0\377;U\24" \ + "\377\312u\251(\377\3l\234%\3773J\21\377\2\3\1\377\210\0\0\0\377\4\1\1" \ + "\0\377\37-\13\377Rw\34\377u\250(\377\364u\251(\377\2d\220\"\377\0\1\0" \ + "\377\221\0\0\0\377\3\0\0\0\363\0\0\0\10\0\0\0>\224\0\0\0\377\1B_\27\377" \ + "\365u\251(\377\3b\215!\377/D\20\377\6\11\2\377\211\0\0\0\377\2\35*\12" \ + "\377]\206\40\377\312u\251(\377\2Y\201\36\377\10\14\3\377\224\0\0\0\377" \ + "\2\0\0\0\365\0\0\0*\305\0\0\0\0\1\0\0\0\224\227\0\0\0\377\2""6N\22\377" \ + "u\250(\377\312u\251(\377\2_\211\40\377\37-\13\377\212\0\0\0\377\3\26" \ + "\40\10\377Hi\31\377q\244'\377\363u\251(\377\1\33&\11\377\222\0\0\0\377" \ + "\2\0\0\0P\0\0\0\221\223\0\0\0\377\2\2\3\1\377k\232%\377\363u\251(\377" \ + "\3X\177\36\377&6\15\377\1\2\0\377\211\0\0\0\377\3\17\26\5\377Mo\32\377" \ + "u\250(\377\312u\251(\377\2Ty\35\377\6\10\2\377\225\0\0\0\377\1\0\0\0" \ + "V\306\0\0\0\0\2\0\0\0\11\0\0\0\331\227\0\0\0\377\2&7\15\377p\242&\377" \ + "\313u\251(\377\2Ty\35\377\24\35\7\377\212\0\0\0\377\3\12\16\3\3778Q\23" \ + "\377h\226$\377\361u\251(\377\1Gg\30\377\222\0\0\0\377\2\0\0\0\236\0\0" \ + "\0\337\223\0\0\0\377\1%5\15\377\361u\251(\377\3q\243'\377Gg\30\377\25" \ + "\36\7\377\212\0\0\0\377\3\10\13\3\377@]\26\377r\244'\377\313u\251(\377" \ + "\2Ca\27\377\2\3\1\377\225\0\0\0\377\1\0\0\0\251\307\0\0\0\0\2\0\0\0\7" \ + "\0\0\0\353\230\0\0\0\377\2\27\"\10\377i\227$\377\313u\251(\377\3t\247" \ + "(\377Hg\30\377\14\21\4\377\212\0\0\0\377\3\2\3\1\377'9\15\377Z\203\37" \ + "\377\357u\251(\377\2m\235%\377\2\3\1\377\221\0\0\0\377\1\0\0\0\370\224" \ + "\0\0\0\377\1Mo\32\377\357u\251(\377\3h\226$\3777O\23\377\11\15\3\377" \ + "\212\0\0\0\377\3\3\5\1\3774L\22\377m\235%\377\313u\251(\377\2s\246'\377" \ + "1F\21\377\227\0\0\0\377\1\0\0\0\270\307\0\0\0\0\1\0\0\0Z\232\0\0\0\377" \ + "\2\14\22\4\377^\207\40\377\314u\251(\377\3p\242&\3779R\23\377\4\6\1\377" \ + "\213\0\0\0\377\3\34(\11\377Rv\34\377u\250(\377\355u\251(\377\1!0\13\377" \ + "\245\0\0\0\377\2\5\7\2\377p\242&\377\355u\251(\377\3a\215!\377,\77\17" \ + "\377\3\4\1\377\213\0\0\0\377\2%6\15\377e\222#\377\314u\251(\377\2n\236" \ + "%\377\40.\13\377\230\0\0\0\377\2\0\0\0\376\0\0\0#\306\0\0\0\0\1\0\0\0" \ + "\273\233\0\0\0\377\2\3\5\1\377Jk\31\377\315u\251(\377\3j\230$\377/D\20" \ + "\377\1\1\0\377\213\0\0\0\377\3\17\26\5\377C`\27\377p\242&\377\353u\251" \ + "(\377\1Kl\32\377\245\0\0\0\377\1(:\16\377\353u\251(\377\3u\250(\377R" \ + "w\34\377\34(\11\377\214\0\0\0\377\2\32&\11\377]\206\40\377\315u\251(" \ + "\377\2b\215!\377\20\27\5\377\232\0\0\0\377\1\0\0\0\177\305\0\0\0\0\2" \ + "\0\0\0\15\0\0\0\373\234\0\0\0\377\2\0\1\0\377A^\26\377\316u\251(\377" \ + "\2X\177\36\377\26\40\10\377\214\0\0\0\377\3\15\23\5\377A^\26\377o\241" \ + "&\377\351u\251(\377\2m\235%\377\2\3\1\377\244\0\0\0\377\1Ln\32\377\351" \ + "u\251(\377\3u\250(\377Rv\34\377\33'\11\377\214\0\0\0\377\3\11\15\3\377" \ + "Dc\27\377s\246'\377\315u\251(\377\2]\206\40\377\10\14\3\377\233\0\0\0" \ + "\377\1\0\0\0\314\305\0\0\0\0\1\0\0\0\77\236\0\0\0\377\2\0\1\0\377Ca\27" \ + "\377\316u\251(\377\3t\247(\377Fe\30\377\12\16\3\377\214\0\0\0\377\3\10" \ + "\13\3\3779R\23\377k\232%\377\350u\251(\377\1\34(\11\377\243\0\0\0\377" \ + "\2\1\2\0\377l\234%\377\347u\251(\377\3r\245'\377Ii\31\377\23\34\7\377" \ + "\214\0\0\0\377\3\2\3\1\3772H\21\377m\235%\377\316u\251(\377\2_\211\40" \ + "\377\10\13\3\377\234\0\0\0\377\2\0\0\0\373\0\0\0\10\304\0\0\0\0\1\0\0" \ + "\0d\237\0\0\0\377\2\0\1\0\377Jk\31\377\317u\251(\377\3n\236%\3774L\22" \ + "\377\2\3\1\377\214\0\0\0\377\3\4\6\1\3772H\21\377h\226#\377\346u\251" \ + "(\377\1=X\25\377\243\0\0\0\377\1\32&\11\377\346u\251(\377\3q\243'\377" \ + "Ca\27\377\15\23\5\377\215\0\0\0\377\2\40.\13\377a\215!\377\317u\251(" \ + "\377\2e\222#\377\12\16\3\377\236\0\0\0\377\1\0\0\0*\304\0\0\0\0\1\0\0" \ + "\0y\240\0\0\0\377\2\4\6\1\377d\220\"\377\320u\251(\377\2c\217\"\377\"" \ + "1\14\377\215\0\0\0\377\3\3\4\1\377-B\20\377d\220\"\377\344u\251(\377" \ + "\1_\211\40\377\243\0\0\0\377\1;U\24\377\344u\251(\377\3o\240&\377>Y\25" \ + "\377\12\17\3\377\215\0\0\0\377\2\21\30\6\377Qu\34\377\320u\251(\377\2" \ + "t\250(\377\27\"\10\377\237\0\0\0\377\1\0\0\0>\304\0\0\0\0\1\0\0\0\200" \ + "\222\0\0\0\377\2\15\23\4\377\2\3\1\377\215\0\0\0\377\1@]\26\377\322u" \ + "\251(\377\2Sw\34\377\20\27\5\377\215\0\0\0\377\3\1\2\0\377(:\16\377`" \ + "\213!\377\342u\251(\377\2t\250(\377\10\14\3\377\242\0\0\0\377\1Y\200" \ + "\36\377\342u\251(\377\3l\234%\3779S\24\377\7\13\3\377\215\0\0\0\377\3" \ + "\5\7\2\377=Y\25\377r\244'\377\321u\251(\377\2`\213!\377\4\6\1\377\215" \ + "\0\0\0\377\1\17\26\5\377\221\0\0\0\377\1\0\0\0D\304\0\0\0\0\1\0\0\0s" \ + "\222\0\0\0\377\5\34(\11\377n\236%\377Nq\33\377,@\17\377\13\17\4\377\207" \ + "\0\0\0\377\3\0\1\0\377\35*\12\377Ty\35\377\324u\251(\377\3q\244'\377" \ + ";U\24\377\4\6\1\377\215\0\0\0\377\3\0\1\0\377$4\14\377\\\205\37\377\341" \ + "u\251(\377\1#2\14\377\241\0\0\0\377\2\3\5\1\377q\244'\377\340u\251(\377" \ + "\3i\230$\3774L\22\377\5\7\2\377\216\0\0\0\377\2&7\15\377g\225#\377\324" \ + "u\251(\377\3e\222#\377+>\17\377\4\6\1\377\207\0\0\0\377\5\4\6\1\377!" \ + "0\13\377Db\27\377e\222#\377@\\\26\377\221\0\0\0\377\1\0\0\0""7\304\0" \ + "\0\0\0\1\0\0\0U\223\0\0\0\377\1Ps\33\377\203u\251(\377\10f\224#\377P" \ + "s\33\377B_\26\3778P\23\3777O\23\3779S\24\377Mo\32\377e\222#\377\330u" \ + "\251(\377\2f\223#\377$4\14\377\217\0\0\0\377\2\37-\13\377Z\202\37\377" \ + "\337u\251(\377\1>Y\25\377\241\0\0\0\377\1\33'\11\377\337u\251(\377\3" \ + "h\226$\3770F\20\377\3\5\1\377\216\0\0\0\377\2\22\32\6\377U{\35\377\330" \ + "u\251(\377\3m\236%\377Sx\34\377>Y\25\377\2027O\23\377\4>Y\25\377Kl\32" \ + "\377_\212!\377s\246'\377\202u\251(\377\2l\234%\377\7\13\3\377\221\0\0" \ + "\0\377\1\0\0\0\32\304\0\0\0\0\1\0\0\0!\223\0\0\0\377\2\21\31\6\377s\246" \ + "'\377\344u\251(\377\2Sx\34\377\20\27\5\377\217\0\0\0\377\2!/\13\377\\" \ + "\205\40\377\335u\251(\377\1X\177\36\377\241\0\0\0\377\1""5M\22\377\335" \ + "u\251(\377\3j\230$\3772I\21\377\4\5\1\377\216\0\0\0\377\3\5\7\2\377>" \ + "Y\25\377r\245'\377\344u\251(\377\1""2I\21\377\221\0\0\0\377\1\0\0\0\345" \ + "\306\0\0\0\0\1\0\0\0\354\223\0\0\0\377\1=Y\25\377\345u\251(\377\3q\244" \ + "'\377\17\377\0\1\0\377\217\0\0\0\377\2\37-\13\377\\\205\40\377\332u\251" \ + "(\377\1\14\22\4\377\240\0\0\0\377\1_\211\40\377\331u\251(\377\3i\230" \ + "$\377/D\20\377\3\4\1\377\217\0\0\0\377\2\25\36\7\377Y\201\36\377\346" \ + "u\251(\377\2o\240&\377\20\27\5\377\222\0\0\0\377\1\0\0\0z\306\0\0\0\0" \ + "\1\0\0\0T\224\0\0\0\377\2\20\27\5\377o\240&\377\347u\251(\377\2Rw\34" \ + "\377\17\25\5\377\217\0\0\0\377\3\1\1\0\377'9\15\377b\215!\377\330u\251" \ + "(\377\1\40.\13\377\237\0\0\0\377\2\1\2\0\377q\243'\377\327u\251(\377" \ + "\3n\236%\3779S\24\377\6\11\2\377\217\0\0\0\377\3\4\6\1\377=X\25\377r" \ + "\245'\377\347u\251(\377\1-A\17\377\222\0\0\0\377\2\0\0\0\374\0\0\0\33" \ + "\306\0\0\0\0\2\0\0\0\6\0\0\0\353\224\0\0\0\377\2(:\16\377u\250(\377\347" \ + "u\251(\377\3p\242&\3777P\23\377\2\3\1\377\217\0\0\0\377\3\1\2\0\377-" \ + "B\20\377h\226$\377\326u\251(\377\1""0F\20\377\237\0\0\0\377\1\15\23\5" \ + "\377\326u\251(\377\3r\244'\377@]\26\377\10\14\3\377\220\0\0\0\377\2\"" \ + "1\14\377e\222#\377\350u\251(\377\1Km\32\377\223\0\0\0\377\1\0\0\0\267" \ + "\310\0\0\0\0\1\0\0\0\225\225\0\0\0\377\1""6N\23\377\351u\251(\377\2e" \ + "\222#\377!0\13\377\220\0\0\0\377\3\2\3\1\377/D\20\377j\232$\377\324u" \ + "\251(\377\1=X\25\377\237\0\0\0\377\1\33&\11\377\324u\251(\377\3s\246" \ + "'\377C`\27\377\12\16\3\377\220\0\0\0\377\2\17\26\5\377Sw\34\377\351u" \ + "\251(\377\2U{\35\377\2\3\1\377\223\0\0\0\377\1\0\0\0X\310\0\0\0\0\2\0" \ + "\0\0\33\0\0\0\365\225\0\0\0\377\1Db\27\377\352u\251(\377\2Rw\34\377\15" \ + "\23\5\377\220\0\0\0\377\3\6\10\2\3777O\23\377o\240&\377\322u\251(\377" \ + "\1Ij\31\377\237\0\0\0\377\1'8\15\377\322u\251(\377\3u\250(\377Nq\33\377" \ + "\22\32\6\377\220\0\0\0\377\3\3\5\1\377;U\24\377q\243'\377\351u\251(\377" \ + "\2`\213!\377\6\11\2\377\223\0\0\0\377\2\0\0\0\323\0\0\0\3\311\0\0\0\0" \ + "\1\0\0\0\206\225\0\0\0\377\2\2\3\1\377Tz\35\377\352u\251(\377\3m\235" \ + "%\377.B\20\377\0\1\0\377\220\0\0\0\377\3\16\25\5\377Kl\32\377t\250(\377" \ + "\320u\251(\377\1U{\35\377\237\0\0\0\377\1""3J\21\377\321u\251(\377\2" \ + "]\206\40\377\36+\12\377\221\0\0\0\377\2\31$\11\377_\211\40\377\352u\251" \ + "(\377\2j\231$\377\20\27\5\377\224\0\0\0\377\1\0\0\0K\312\0\0\0\0\2\0" \ + "\0\0\15\0\0\0\351\225\0\0\0\377\2\4\6\1\377V}\35\377\353u\251(\377\2" \ + "Z\202\37\377\25\36\7\377\221\0\0\0\377\2\26\40\10\377U{\35\377\317u\251" \ + "(\377\1[\204\37\377\237\0\0\0\377\1""9S\24\377\317u\251(\377\3e\222#" \ + "\377'9\15\377\0\1\0\377\220\0\0\0\377\3\7\13\3\377Ed\30\377t\250(\377" \ + "\352u\251(\377\2j\232$\377\23\34\7\377\224\0\0\0\377\1\0\0\0\274\314" \ + "\0\0\0\0\1\0\0\0l\226\0\0\0\377\2\3\4\1\377Sw\34\377\353u\251(\377\3" \ + "t\250(\377Fe\30\377\6\10\2\377\221\0\0\0\377\2\36,\12\377`\213!\377\315" \ + "u\251(\377\1`\213!\377\237\0\0\0\377\1=Y\25\377\315u\251(\377\3l\234" \ + "%\377/D\20\377\2\3\1\377\221\0\0\0\377\2/D\20\377m\236%\377\353u\251" \ + "(\377\2i\230$\377\21\31\6\377\224\0\0\0\377\2\0\0\0\373\0\0\0""4\315" \ + "\0\0\0\0\1\0\0\0\262\226\0\0\0\377\2\5\7\2\377W~\36\377\354u\251(\377" \ + "\2c\217\"\377\34(\12\377\221\0\0\0\377\3\3\4\1\3775M\22\377n\237&\377" \ + "\313u\251(\377\1d\221\"\377\237\0\0\0\377\1B_\27\377\313u\251(\377\3" \ + "t\250(\377Hi\31\377\13\21\4\377\221\0\0\0\377\2\14\21\4\377Pt\33\377" \ + "\354u\251(\377\2k\232%\377\25\36\7\377\225\0\0\0\377\1\0\0\0y\316\0\0" \ + "\0\0\2\0\0\0\25\0\0\0\347\226\0\0\0\377\2\4\5\1\377Rv\34\377\354u\251" \ + "(\377\3u\250(\377Ed\30\377\7\12\2\377\221\0\0\0\377\3\12\17\3\377Fe\30" \ + "\377t\247(\377\311u\251(\377\1g\224#\377\237\0\0\0\377\1Db\27\377\312" \ + "u\251(\377\2Z\202\37\377\30\"\10\377\221\0\0\0\377\3\0\1\0\377/D\20\377" \ + "n\237&\377\354u\251(\377\2g\225#\377\21\31\6\377\225\0\0\0\377\2\0\0" \ + "\0\277\0\0\0\2\317\0\0\0\0\2\0\0\0H\0\0\0\376\226\0\0\0\377\2\1\2\0\377" \ + "Gf\30\377\355u\251(\377\2k\232%\377+>\17\377\222\0\0\0\377\2\21\31\6" \ + "\377Rw\34\377\310u\251(\377\1b\216\"\377\237\0\0\0\377\1@\\\26\377\310" \ + "u\251(\377\2b\215!\377\37-\13\377\222\0\0\0\377\2\27!\10\377_\211\40" \ + "\377\355u\251(\377\2_\212!\377\13\20\4\377\225\0\0\0\377\2\0\0\0\356" \ + "\0\0\0\34\321\0\0\0\0\1\0\0\0\217\227\0\0\0\377\2\1\1\0\377Db\27\377" \ + "\356u\251(\377\2Nq\33\377\13\20\4\377\222\0\0\0\377\2&7\15\377g\224#" \ + "\377\306u\251(\377\1^\207\40\377\237\0\0\0\377\1Z\25\377s\246'\377\357u\251(\377" \ + "\2C`\27\377\0\1\0\377\227\0\0\0\377\1\0\0\0\234\327\0\0\0\0\2\0\0\0\11" \ + "\0\0\0\373\232\0\0\0\377\2\34(\12\377n\236%\377\357u\251(\377\2j\232" \ + "$\377%6\15\377\223\0\0\0\377\2\22\32\6\377V}\35\377\276u\251(\377\1\"" \ + "1\14\377\237\0\0\0\377\2\3\4\1\377r\244'\377\275u\251(\377\2g\224#\377" \ + "#3\14\377\223\0\0\0\377\2\21\31\6\377[\203\37\377\360u\251(\377\2Ca\27" \ + "\377\0\1\0\377\230\0\0\0\377\1\0\0\0\311\327\0\0\0\0\1\0\0\0+\234\0\0" \ + "\0\377\2\26\40\10\377l\234%\377\360u\251(\377\2Kl\32\377\10\13\3\377" \ + "\222\0\0\0\377\3\0\1\0\377,\77\17\377l\234%\377\274u\251(\377\1\12\16" \ + "\3\377\240\0\0\0\377\1\\\205\40\377\273u\251(\377\3t\247(\377B_\26\377" \ + "\6\10\2\377\222\0\0\0\377\3\0\1\0\3772I\21\377p\242&\377\360u\251(\377" \ + "\1>Y\25\377\232\0\0\0\377\1\0\0\0\356\327\0\0\0\0\1\0\0\0E\235\0\0\0" \ + "\377\2\22\32\6\377i\230$\377\360u\251(\377\2k\232%\377$4\14\377\223\0" \ + "\0\0\377\3\7\13\3\377C`\27\377t\250(\377\271u\251(\377\1e\222#\377\241" \ + "\0\0\0\377\1C`\27\377\272u\251(\377\2\\\205\37\377\25\36\7\377\223\0" \ + "\0\0\377\2\21\30\6\377[\204\37\377\360u\251(\377\2u\250(\3771G\21\377" \ + "\234\0\0\0\377\1\0\0\0\12\326\0\0\0\0\1\0\0\0V\236\0\0\0\377\2\25\36" \ + "\7\377k\233%\377\360u\251(\377\3u\250(\377B_\26\377\4\5\1\377\223\0\0" \ + "\0\377\2!0\13\377f\224#\377\270u\251(\377\1Mo\32\377\241\0\0\0\377\1" \ + "*=\16\377\270u\251(\377\3q\243'\3778P\23\377\2\3\1\377\223\0\0\0\377" \ + "\2(:\16\377m\236%\377\360u\251(\377\2u\250(\3772I\21\377\235\0\0\0\377" \ + "\1\0\0\0\32\326\0\0\0\0\1\0\0\0]\235\0\0\0\377\3\14\21\4\377Ca\27\377" \ + "r\245'\377\362u\251(\377\2a\215!\377\26\40\10\377\223\0\0\0\377\3\5\7" \ + "\2\377A^\26\377t\247(\377\266u\251(\377\1*=\16\377\241\0\0\0\377\2\11" \ + "\15\3\377t\247(\377\266u\251(\377\2W~\36\377\21\31\6\377\223\0\0\0\377" \ + "\2\7\13\3\377Ln\32\377\363u\251(\377\2V}\35\377\32%\11\377\234\0\0\0" \ + "\377\1\0\0\0\40\326\0\0\0\0\1\0\0\0V\222\0\0\0\377\5""2I\21\377Lm\32" \ + "\377Ca\27\377:T\24\3772H\21\377\202/D\20\377\5""6N\22\3777O\23\377Fe" \ + "\30\377^\207\40\377t\250(\377\365u\251(\377\3r\245'\3776N\23\377\1\1" \ + "\0\377\223\0\0\0\377\2\30\"\10\377_\212!\377\264u\251(\377\2s\246'\377" \ + "\10\13\3\377\242\0\0\0\377\1W~\36\377\264u\251(\377\3m\236%\377-A\17" \ + "\377\0\1\0\377\223\0\0\0\377\2\36,\12\377h\226#\377\366u\251(\377\5g" \ + "\224#\377Mo\32\3779S\24\3777O\23\3771F\21\377\202/D\20\377\5""8Q\23\377" \ + "A]\26\377Ij\31\377Fe\30\377\5\7\2\377\220\0\0\0\377\1\0\0\0\31\326\0" \ + "\0\0\0\1\0\0\0F\222\0\0\0\377\2\3\5\1\377Sw\34\377\377u\251(\377\202" \ + "u\251(\377\2Y\200\36\377\16\25\5\377\223\0\0\0\377\3\2\3\1\377;U\24\377" \ + "s\246'\377\262u\251(\377\1U{\35\377\243\0\0\0\377\1""2H\21\377\263u\251" \ + "(\377\2Sx\34\377\14\21\4\377\223\0\0\0\377\3\4\5\1\377A]\26\377t\250" \ + "(\377\377u\251(\377\3u\251(\377i\230$\377\21\31\6\377\221\0\0\0\377\1" \ + "\0\0\0\12\326\0\0\0\0\1\0\0\0%\223\0\0\0\377\2\3\5\1\377Sw\34\377\377" \ + "u\251(\377\202u\251(\377\2n\237&\377(:\16\377\224\0\0\0\377\2\27\"\10" \ + "\377a\214!\377\261u\251(\377\1);\16\377\243\0\0\0\377\2\11\15\3\377q" \ + "\244'\377\260u\251(\377\2n\237&\377-A\17\377\224\0\0\0\377\2\23\33\6" \ + "\377`\213!\377\377u\251(\377\202u\251(\377\2i\230$\377\21\31\6\377\221" \ + "\0\0\0\377\1\0\0\0\350\327\0\0\0\0\2\0\0\0\5\0\0\0\370\223\0\0\0\377" \ + "\2\1\2\0\377Mo\32\377\377u\251(\377\203u\251(\377\2Jk\31\377\6\10\2\377" \ + "\223\0\0\0\377\3\2\3\1\3777O\23\377r\245'\377\256u\251(\377\2h\226#\377" \ + "\2\3\1\377\244\0\0\0\377\1Gf\30\377\257u\251(\377\2Pt\33\377\13\17\4" \ + "\377\224\0\0\0\377\2""3J\21\377r\244'\377\377u\251(\377\202u\251(\377" \ + "\2f\223#\377\16\24\5\377\222\0\0\0\377\1\0\0\0\301\330\0\0\0\0\1\0\0" \ + "\0\302\224\0\0\0\377\2\1\2\0\377Mo\32\377\377u\251(\377\203u\251(\377" \ + "\2d\220\"\377\26\40\10\377\224\0\0\0\377\2\25\36\7\377_\211\40\377\255" \ + "u\251(\377\1""8P\23\377\245\0\0\0\377\2\24\34\7\377u\250(\377\254u\251" \ + "(\377\2m\235%\377'8\15\377\224\0\0\0\377\2\10\13\3\377Pt\33\377\377u" \ + "\251(\377\203u\251(\377\2f\223#\377\16\24\5\377\223\0\0\0\377\1\0\0\0" \ + "\206\330\0\0\0\0\1\0\0\0\200\225\0\0\0\377\2\3\5\1\377Sw\34\377\377u" \ + "\251(\377\203u\251(\377\2p\242&\377,@\17\377\224\0\0\0\377\3\4\6\1\377" \ + "A^\26\377t\250(\377\252u\251(\377\2n\237&\377\11\15\3\377\246\0\0\0\377" \ + "\1Tz\35\377\253u\251(\377\2X\177\36\377\17\26\5\377\224\0\0\0\377\2\26" \ + "\40\10\377c\217\"\377\377u\251(\377\203u\251(\377\2i\227$\377\21\31\6" \ + "\377\224\0\0\0\377\1\0\0\0D\330\0\0\0\0\1\0\0\0)\226\0\0\0\377\2\2\3" \ + "\1\377Hi\31\377\377u\251(\377\204u\251(\377\2Jk\31\377\6\10\2\377\224" \ + "\0\0\0\377\2\34)\12\377g\224#\377\251u\251(\377\1""7O\23\377\247\0\0" \ + "\0\377\2\26\37\7\377t\250(\377\250u\251(\377\3r\244'\3774K\22\377\1\1" \ + "\0\377\224\0\0\0\377\2""0F\20\377q\244'\377\377u\251(\377\203u\251(\377" \ + "\2a\214!\377\16\24\5\377\224\0\0\0\377\2\0\0\0\350\0\0\0\3\331\0\0\0" \ + "\0\1\0\0\0\275\227\0\0\0\377\2:T\24\377u\250(\377\377u\251(\377\203u" \ + "\251(\377\2c\217\"\377\25\36\7\377\224\0\0\0\377\2\7\13\3\377Mo\32\377" \ + "\247u\251(\377\2h\226#\377\4\6\1\377\250\0\0\0\377\1Ii\31\377\247u\251" \ + "(\377\2b\215!\377\26\37\7\377\224\0\0\0\377\2\6\11\2\377Nq\33\377\377" \ + "u\251(\377\204u\251(\377\2W}\36\377\7\13\3\377\225\0\0\0\377\1\0\0\0" \ + "\202\332\0\0\0\0\1\0\0\0L\230\0\0\0\377\2,\77\17\377s\246'\377\377u\251" \ + "(\377\203u\251(\377\2p\242&\377*<\16\377\225\0\0\0\377\2,\77\17\377o" \ + "\240&\377\245u\251(\377\1'8\15\377\251\0\0\0\377\2\14\21\4\377m\236%" \ + "\377\244u\251(\377\3u\250(\377Ec\30\377\4\6\1\377\224\0\0\0\377\2\24" \ + "\34\7\377c\217\"\377\377u\251(\377\204u\251(\377\2Jk\31\377\3\4\1\377" \ + "\225\0\0\0\377\2\0\0\0\366\0\0\0\34\333\0\0\0\0\1\0\0\0\264\230\0\0\0" \ + "\377\2\32&\11\377k\233%\377\377u\251(\377\204u\251(\377\2Jk\31\377\5" \ + "\7\2\377\224\0\0\0\377\2\15\23\5\377X\177\36\377\243u\251(\377\1Hh\31" \ + "\377\253\0\0\0\377\1$4\14\377\243u\251(\377\2i\227$\377\37,\13\377\225" \ + "\0\0\0\377\2.C\20\377q\244'\377\377u\251(\377\203u\251(\377\2t\250(\377" \ + "3J\21\377\227\0\0\0\377\1\0\0\0z\334\0\0\0\0\2\0\0\0#\0\0\0\370\230\0" \ + "\0\0\377\2\21\30\6\377d\220\"\377\377u\251(\377\204u\251(\377\2_\211" \ + "\40\377\20\27\5\377\224\0\0\0\377\3\0\1\0\3773J\21\377r\245'\377\240" \ + "u\251(\377\2d\220\"\377\5\7\2\377\254\0\0\0\377\1Ii\31\377\241u\251(" \ + "\377\2Qu\34\377\11\15\3\377\224\0\0\0\377\2\4\6\1\377Jk\31\377\377u\251" \ + "(\377\204u\251(\377\2q\244'\377'8\15\377\227\0\0\0\377\2\0\0\0\331\0" \ + "\0\0\6\335\0\0\0\0\1\0\0\0\203\231\0\0\0\377\2\14\21\4\377Y\201\36\377" \ + "\377u\251(\377\204u\251(\377\2k\232%\377\36,\12\377\225\0\0\0\377\2\34" \ + ")\12\377g\225#\377\236u\251(\377\2q\244'\377\33'\11\377\255\0\0\0\377" \ + "\2\7\13\3\377b\216\"\377\236u\251(\377\3r\244'\3774L\22\377\0\1\0\377" \ + "\224\0\0\0\377\2\14\21\4\377Z\202\37\377\377u\251(\377\204u\251(\377" \ + "\2k\232%\377\37,\13\377\227\0\0\0\377\2\0\0\0\375\0\0\0I\336\0\0\0\0" \ + "\2\0\0\0\1\0\0\0\253\231\0\0\0\377\3\2\3\1\377>Y\25\377u\250(\377\377" \ + "u\251(\377\203u\251(\377\3t\247(\3776N\23\377\0\1\0\377\224\0\0\0\377" \ + "\2\10\14\3\377Rv\34\377\234u\251(\377\2t\250(\377'8\15\377\257\0\0\0" \ + "\377\2\17\25\5\377j\230$\377\234u\251(\377\2e\222#\377\27\"\10\377\225" \ + "\0\0\0\377\2\34)\12\377j\232$\377\377u\251(\377\204u\251(\377\2X\177" \ + "\36\377\13\21\4\377\230\0\0\0\377\1\0\0\0w\340\0\0\0\0\2\0\0\0\15\0\0" \ + "\0\324\232\0\0\0\377\2\35*\12\377j\230$\377\377u\251(\377\204u\251(\377" \ + "\2Sw\34\377\6\11\2\377\225\0\0\0\377\2/D\20\377r\244'\377\232u\251(\377" \ + "\1/D\20\377\261\0\0\0\377\2\23\34\7\377m\236%\377\232u\251(\377\2Lm\32" \ + "\377\6\10\2\377\225\0\0\0\377\2""7O\23\377t\247(\377\377u\251(\377\203" \ + "u\251(\377\3s\246'\3773J\21\377\0\1\0\377\230\0\0\0\377\2\0\0\0\247\0" \ + "\0\0\1\341\0\0\0\0\2\0\0\0&\0\0\0\344\232\0\0\0\377\2\15\23\4\377Z\202" \ + "\37\377\377u\251(\377\204u\251(\377\2]\207\40\377\15\23\4\377\225\0\0" \ + "\0\377\2\33'\11\377h\226$\377\230u\251(\377\1:T\24\377\263\0\0\0\377" \ + "\2\34)\12\377o\240&\377\227u\251(\377\3s\246'\3774K\22\377\0\1\0\377" \ + "\224\0\0\0\377\2\2\3\1\377Dc\27\377\377u\251(\377\204u\251(\377\2k\232" \ + "%\377\40.\13\377\231\0\0\0\377\2\0\0\0\303\0\0\0\14\343\0\0\0\0\2\0\0" \ + "\0\35\0\0\0\332\232\0\0\0\377\3\0\1\0\3777O\23\377t\247(\377\377u\251" \ + "(\377\203u\251(\377\2l\234%\377\36,\12\377\225\0\0\0\377\2\6\11\2\377" \ + "Nq\33\377\225u\251(\377\2t\250(\377/D\20\377\265\0\0\0\377\2\26\40\10" \ + "\377k\233%\377\225u\251(\377\2d\221\"\377\26\40\10\377\225\0\0\0\377" \ + "\2\13\20\4\377[\203\37\377\377u\251(\377\204u\251(\377\2Ty\35\377\11" \ + "\15\3\377\231\0\0\0\377\2\0\0\0\257\0\0\0\7\345\0\0\0\0\2\0\0\0\35\0" \ + "\0\0\330\233\0\0\0\377\2!0\13\377h\226$\377\377u\251(\377\203u\251(\377" \ + "\2r\244'\377,@\17\377\225\0\0\0\377\3\1\1\0\3779R\23\377t\247(\377\222" \ + "u\251(\377\2t\247(\377/D\20\377\267\0\0\0\377\2\25\36\7\377j\231$\377" \ + "\223u\251(\377\2Sw\34\377\11\15\3\377\225\0\0\0\377\2\24\35\7\377e\222" \ + "#\377\377u\251(\377\203u\251(\377\3r\245'\3779S\24\377\1\2\0\377\231" \ + "\0\0\0\377\2\0\0\0\262\0\0\0\10\347\0\0\0\0\2\0\0\0\14\0\0\0\247\233" \ + "\0\0\0\377\3\7\12\2\377Hh\31\377u\250(\377\377u\251(\377\203u\251(\377" \ + "\2A^\26\377\1\2\0\377\225\0\0\0\377\2\36+\12\377j\231$\377\220u\251(" \ + "\377\2k\232%\377\37,\13\377\271\0\0\0\377\2\14\22\4\377Z\202\37\377\220" \ + "u\251(\377\3s\246'\3777P\23\377\0\1\0\377\225\0\0\0\377\2$4\14\377o\240" \ + "&\377\377u\251(\377\203u\251(\377\2^\210\40\377\25\36\7\377\231\0\0\0" \ + "\377\3\0\0\0\374\0\0\0w\0\0\0\1\352\0\0\0\0\2\0\0\0f\0\0\0\371\233\0" \ + "\0\0\377\2\33'\11\377d\220\"\377\377u\251(\377\203u\251(\377\2V|\35\377" \ + "\7\12\2\377\225\0\0\0\377\2\11\15\3\377W}\36\377\216u\251(\377\2U{\35" \ + "\377\12\16\3\377\273\0\0\0\377\3\1\2\0\377;U\24\377t\250(\377\215u\251" \ + "(\377\2j\230$\377\33'\11\377\226\0\0\0\377\2;U\24\377u\250(\377\377u" \ + "\251(\377\202u\251(\377\3p\242&\377/D\20\377\0\1\0\377\231\0\0\0\377" \ + "\2\0\0\0\347\0\0\0@\355\0\0\0\0\1\0\0\0\214\234\0\0\0\377\3\6\11\2\377" \ + "Gf\30\377u\250(\377\377u\251(\377\202u\251(\377\2]\206\40\377\13\20\4" \ + "\377\225\0\0\0\377\2\3\5\1\377Gg\30\377\213u\251(\377\3s\246'\377=X\25" \ + "\377\2\3\1\377\276\0\0\0\377\2%5\15\377j\230$\377\213u\251(\377\2_\211" \ + "\40\377\17\25\5\377\225\0\0\0\377\2\1\2\0\377C`\27\377\377u\251(\377" \ + "\203u\251(\377\2]\207\40\377\24\35\7\377\233\0\0\0\377\1\0\0\0S\356\0" \ + "\0\0\0\1\0\0\0\216\236\0\0\0\377\2\33&\11\377c\217\"\377\377u\251(\377" \ + "\202u\251(\377\2j\230$\377\27!\10\377\226\0\0\0\377\2*<\16\377p\242&" \ + "\377\210u\251(\377\2U{\35\377\20\27\5\377\301\0\0\0\377\3\5\7\2\377>" \ + "Z\25\377s\246'\377\210u\251(\377\2Gg\30\377\3\5\1\377\225\0\0\0\377\2" \ + "\7\12\2\377V|\35\377\377u\251(\377\202u\251(\377\3o\241&\377/D\20\377" \ + "\0\1\0\377\234\0\0\0\377\1\0\0\0T\356\0\0\0\0\1\0\0\0\230\236\0\0\0\377" \ + "\2\2\3\1\377Ca\27\377\377u\251(\377\203u\251(\377\2n\236%\377\36+\12" \ + "\377\226\0\0\0\377\2\33'\11\377j\230$\377\205u\251(\377\3l\234%\377/" \ + "D\20\377\1\1\0\377\304\0\0\0\377\2\32&\11\377_\211\40\377\205u\251(\377" \ + "\2t\247(\3775M\22\377\226\0\0\0\377\2\13\21\4\377]\207\40\377\377u\251" \ + "(\377\203u\251(\377\2_\211\40\377\13\17\4\377\235\0\0\0\377\1\0\0\0^" \ + "\356\0\0\0\0\1\0\0\0\222\232\0\0\0\377\5\1\1\0\377\17\25\5\377$4\14\377" \ + "Ca\27\377j\230$\377\377u\251(\377\205u\251(\377\2r\245'\377*=\16\377" \ + "\226\0\0\0\377\2\14\21\4\377[\204\37\377\202u\251(\377\3o\241&\377;U" \ + "\24\377\6\11\2\377\307\0\0\0\377\3\1\1\0\377);\16\377d\220\"\377\202" \ + "u\251(\377\2l\234%\377\37-\13\377\226\0\0\0\377\2\23\33\6\377g\224#\377" \ + "\377u\251(\377\205u\251(\377\5q\244'\377Nq\33\377-A\17\377\24\35\7\377" \ + "\3\5\1\377\231\0\0\0\377\1\0\0\0W\356\0\0\0\0\1\0\0\0z\222\0\0\0\377" \ + "\11+>\17\377Nq\33\377Ty\35\377V|\35\377Z\203\37\377_\212!\377e\222#\377" \ + "l\234%\377q\244'\377\377u\251(\377\212u\251(\377\2t\250(\3772H\21\377" \ + "\226\0\0\0\377\4\3\5\1\377Fe\30\377B_\27\377\12\17\3\377\313\0\0\0\377" \ + "\4\2\3\1\377/D\20\377Tz\35\377\17\26\5\377\226\0\0\0\377\2\27\"\10\377" \ + "l\234%\377\377u\251(\377\212u\251(\377\5t\247(\377m\236%\377g\224#\377" \ + "b\215!\377]\206\40\377\202V|\35\377\3Nq\33\377A]\26\377\3\4\1\377\220" \ + "\0\0\0\377\1\0\0\0>\356\0\0\0\0\1\0\0\0`\222\0\0\0\377\2\0\1\0\377@]" \ + "\26\377\377u\251(\377\223u\251(\377\2>Z\25\377\0\1\0\377\374\0\0\0\377" \ + "\2!0\13\377p\242&\377\377u\251(\377\222u\251(\377\2^\207\40\377\13\17" \ + "\4\377\221\0\0\0\377\1\0\0\0%\356\0\0\0\0\1\0\0\0,\224\0\0\0\377\2""3" \ + "J\21\377u\250(\377\377u\251(\377\222u\251(\377\2Fe\30\377\1\1\0\377\372" \ + "\0\0\0\377\2'9\15\377r\245'\377\377u\251(\377\222u\251(\377\2Ty\35\377" \ + "\5\7\2\377\221\0\0\0\377\2\0\0\0\355\0\0\0\1\356\0\0\0\0\2\0\0\0\1\0" \ + "\0\0\355\224\0\0\0\377\2/D\20\377r\245'\377\377u\251(\377\222u\251(\377" \ + "\2Ij\31\377\2\3\1\377\370\0\0\0\377\2*<\16\377s\246'\377\377u\251(\377" \ + "\222u\251(\377\2Mo\32\377\3\5\1\377\222\0\0\0\377\1\0\0\0\263\360\0\0" \ + "\0\0\1\0\0\0\253\225\0\0\0\377\2\32&\11\377i\227$\377\377u\251(\377\222" \ + "u\251(\377\2Os\33\377\2\3\1\377\366\0\0\0\377\2/D\20\377t\250(\377\377" \ + "u\251(\377\221u\251(\377\2s\246'\3773J\22\377\224\0\0\0\377\1\0\0\0n" \ + "\360\0\0\0\0\1\0\0\0M\226\0\0\0\377\2\10\14\3\377Ty\35\377\377u\251(" \ + "\377\222u\251(\377\2Tz\35\377\4\6\1\377\364\0\0\0\377\1""8P\23\377\377" \ + "u\251(\377\222u\251(\377\2f\223#\377\27!\10\377\224\0\0\0\377\2\0\0\0" \ + "\372\0\0\0\25\360\0\0\0\0\2\0\0\0\6\0\0\0\351\226\0\0\0\377\3\1\2\0\377" \ + "\17\377\2\3\1\377\240\0\0\0\377\2\0\0\0\270\0\0\0\22\377" \ + "\0\0\0\0\206\0\0\0\0\2\0\0\0\15\0\0\0\255\243\0\0\0\377\2\37-\13\377" \ + "\\\205\40\377\376u\251(\377\1A^\26\377\351\0\0\0\377\1\36,\12\377\376" \ + "u\251(\377\3j\230$\377/D\20\377\3\4\1\377\240\0\0\0\377\3\0\0\0\375\0" \ + "\0\0w\0\0\0\1\377\0\0\0\0\210\0\0\0\0\3\0\0\0\3\0\0\0{\0\0\0\371\242" \ + "\0\0\0\377\2\40.\13\377o\240&\377\375u\251(\377\1\27!\10\377\351\0\0" \ + "\0\377\2\1\1\0\377h\226#\377\375u\251(\377\2=W\25\377\2\3\1\377\240\0" \ + "\0\0\377\2\0\0\0\352\0\0\0S\377\0\0\0\0\214\0\0\0\0\2\0\0\0#\0\0\0\302" \ + "\237\0\0\0\377\2\24\34\7\377Km\32\377\376u\251(\377\1^\207\40\377\353" \ + "\0\0\0\377\1;U\24\377\376u\251(\377\3_\211\40\377\"2\14\377\1\1\0\377" \ + "\235\0\0\0\377\2\0\0\0\231\0\0\0\20\377\0\0\0\0\216\0\0\0\0\3\0\0\0\3" \ + "\0\0\0w\0\0\0\370\231\0\0\0\377\5\0\1\0\377\21\31\6\3772H\21\377X\177" \ + "\36\377u\250(\377\377u\251(\377\1(:\16\377\353\0\0\0\377\2\11\15\3\377" \ + "p\242&\377\377u\251(\377\4e\222#\377=X\25\377\33&\11\377\3\4\1\377\230" \ + "\0\0\0\377\2\0\0\0\345\0\0\0J\377\0\0\0\0\222\0\0\0\0\2\0\0\0""2\0\0" \ + "\0\340\221\0\0\0\377\2\6\11\2\377Hg\30\377\204^\207\40\377\2^\210\40" \ + "\377n\237&\377\377u\251(\377\203u\251(\377\2e\222#\377\1\2\0\377\354" \ + "\0\0\0\377\1Ca\27\377\377u\251(\377\203u\251(\377\2s\246'\377a\214!\377" \ + "\204^\207\40\377\2W}\36\377\25\36\7\377\220\0\0\0\377\2\0\0\0\300\0\0" \ + "\0\31\377\0\0\0\0\224\0\0\0\0\1\0\0\0\205\222\0\0\0\377\3\3\5\1\377@" \ + "]\26\377u\250(\377\377u\251(\377\207u\251(\377\1""0E\20\377\355\0\0\0" \ + "\377\2\17\25\5\377s\246'\377\377u\251(\377\207u\251(\377\2Y\200\36\377" \ + "\16\25\5\377\221\0\0\0\377\1\0\0\0L\377\0\0\0\0\225\0\0\0\0\1\0\0\0J" \ + "\224\0\0\0\377\2\37,\13\377c\217\"\377\377u\251(\377\205u\251(\377\2" \ + "d\221\"\377\3\4\1\377\356\0\0\0\377\1Ec\30\377\377u\251(\377\205u\251" \ + "(\377\3o\240&\3775M\22\377\1\2\0\377\221\0\0\0\377\2\0\0\0\375\0\0\0" \ + "\21\377\0\0\0\0\225\0\0\0\0\2\0\0\0\17\0\0\0\374\224\0\0\0\377\3\1\1" \ + "\0\377+>\17\377j\231$\377\377u\251(\377\203u\251(\377\1#2\14\377\357" \ + "\0\0\0\377\2\10\13\3\377l\234%\377\377u\251(\377\202u\251(\377\3r\245" \ + "'\377>Z\25\377\10\13\3\377\223\0\0\0\377\1\0\0\0\322\377\0\0\0\0\227" \ + "\0\0\0\0\1\0\0\0\304\226\0\0\0\377\3\10\14\3\377@]\26\377o\241&\377\377" \ + "u\251(\377\1W~\36\377\361\0\0\0\377\1""4K\22\377\377u\251(\377\3u\250" \ + "(\377Rv\34\377\26\37\7\377\225\0\0\0\377\1\0\0\0\211\377\0\0\0\0\227" \ + "\0\0\0\0\1\0\0\0h\230\0\0\0\377\3\10\14\3\377:T\24\377l\234%\377\374" \ + "u\251(\377\2r\245'\377\25\36\7\377\361\0\0\0\377\2\3\4\1\377`\213!\377" \ + "\374u\251(\377\3s\246'\377Jk\31\377\24\35\7\377\227\0\0\0\377\1\0\0\0" \ + "-\377\0\0\0\0\227\0\0\0\0\2\0\0\0\22\0\0\0\371\231\0\0\0\377\3\5\7\2" \ + "\3771F\21\377`\213!\377\372u\251(\377\1""8Q\23\377\363\0\0\0\377\2\27" \ + "!\10\377s\246'\377\371u\251(\377\3k\233%\377\77[\26\377\16\24\5\377\230" \ + "\0\0\0\377\1\0\0\0\323\377\0\0\0\0\231\0\0\0\0\1\0\0\0\253\234\0\0\0" \ + "\377\3\23\34\7\377C`\27\377o\240&\377\366u\251(\377\2Y\200\36\377\1\1" \ + "\0\377\364\0\0\0\377\1""8R\23\377\366u\251(\377\4t\247(\377Nq\33\377" \ + "\37-\13\377\1\1\0\377\232\0\0\0\377\1\0\0\0q\377\0\0\0\0\231\0\0\0\0" \ + "\2\0\0\0)\0\0\0\374\235\0\0\0\377\4\10\13\3\377,@\17\377Sw\34\377r\244" \ + "'\377\362u\251(\377\2o\240&\377\22\33\6\377\365\0\0\0\377\2\2\3\1\377" \ + "\\\205\40\377\363u\251(\377\3^\210\40\3778Q\23\377\21\31\6\377\234\0" \ + "\0\0\377\2\0\0\0\343\0\0\0\7\377\0\0\0\0\232\0\0\0\0\1\0\0\0\245\240" \ + "\0\0\0\377\4\4\6\1\377#3\14\377Jk\31\377o\240&\377\356u\251(\377\2t\247" \ + "(\377\40.\13\377\367\0\0\0\377\2\13\17\4\377h\226$\377\356u\251(\377" \ + "\4s\246'\377Rw\34\377+>\17\377\12\16\3\377\237\0\0\0\377\1\0\0\0j\377" \ + "\0\0\0\0\233\0\0\0\0\2\0\0\0'\0\0\0\367\242\0\0\0\377\4\4\5\1\377#3\14" \ + "\377Jk\31\377n\237&\377\353u\251(\377\1""8Q\23\377\371\0\0\0\377\2\26" \ + "\40\10\377p\242&\377\352u\251(\377\4s\246'\377Rw\34\377+>\17\377\11\15" \ + "\3\377\241\0\0\0\377\2\0\0\0\332\0\0\0\10\377\0\0\0\0\234\0\0\0\0\1\0" \ + "\0\0p\245\0\0\0\377\4\5\7\2\377&6\15\377Jk\31\377m\235%\377\347u\251" \ + "(\377\2Np\33\377\1\1\0\377\372\0\0\0\377\2,\77\17\377u\250(\377\346u" \ + "\251(\377\4s\246'\377U{\35\3771F\21\377\14\22\4\377\243\0\0\0\377\2\0" \ + "\0\0\373\0\0\0""8\377\0\0\0\0\236\0\0\0\0\1\0\0\0\235\247\0\0\0\377\4" \ + "\1\1\0\377\27\"\10\377;U\24\377b\215!\377\343u\251(\377\2Sx\34\377\2" \ + "\3\1\377\374\0\0\0\377\1""1F\21\377\343u\251(\377\4j\232$\377Fe\30\377" \ + "#3\14\377\4\6\1\377\246\0\0\0\377\1\0\0\0i\377\0\0\0\0\237\0\0\0\0\2" \ + "\0\0\0\13\0\0\0\305\252\0\0\0\377\4\20\27\5\3773J\21\377Z\202\37\377" \ + "t\250(\377\336u\251(\377\2Y\201\37\377\4\6\1\377\376\0\0\0\377\1=W\25" \ + "\377\337u\251(\377\4d\220\"\377>Z\25\377\34(\11\377\1\2\0\377\250\0\0" \ + "\0\377\1\0\0\0\225\377\0\0\0\0\241\0\0\0\0\2\0\0\0\16\0\0\0\307\253\0" \ + "\0\0\377\2\25\36\7\377q\244'\377\335u\251(\377\2\\\205\37\377\11\15\3" \ + "\377\377\0\0\0\377\2\0\1\0\377A^\26\377\336u\251(\377\1""6N\22\377\252" \ + "\0\0\0\377\2\0\0\0\230\0\0\0\1\377\0\0\0\0\242\0\0\0\0\2\0\0\0\7\0\0" \ + "\0\247\251\0\0\0\377\2\7\12\2\377b\215!\377\335u\251(\377\2V|\35\377" \ + "\6\10\2\377\377\0\0\0\377\203\0\0\0\377\1""8Q\23\377\335u\251(\377\2" \ + "r\244'\377\32&\11\377\247\0\0\0\377\2\0\0\0\375\0\0\0o\377\0\0\0\0\245" \ + "\0\0\0\0\3\0\0\0\3\0\0\0~\0\0\0\373\246\0\0\0\377\2\6\11\2\377W~\36\377" \ + "\335u\251(\377\2Mo\32\377\3\5\1\377\377\0\0\0\377\205\0\0\0\377\2.C\20" \ + "\377s\246'\377\334u\251(\377\2k\233%\377\26\40\10\377\245\0\0\0\377\2" \ + "\0\0\0\354\0\0\0S\377\0\0\0\0\250\0\0\0\0\2\0\0\0""5\0\0\0\313\244\0" \ + "\0\0\377\2\26\40\10\377a\215!\377\334u\251(\377\3u\250(\377:T\24\377" \ + "\0\1\0\377\377\0\0\0\377\207\0\0\0\377\2\37,\13\377m\235%\377\334u\251" \ + "(\377\2o\240&\377,\77\17\377\243\0\0\0\377\2\0\0\0\252\0\0\0\32\377\0" \ + "\0\0\0\252\0\0\0\0\3\0\0\0\2\0\0\0c\0\0\0\344\237\0\0\0\377\4\0\1\0\377" \ + "\33&\11\377Jk\31\377s\246'\377\334u\251(\377\2p\242&\377&7\15\377\377" \ + "\0\0\0\377\212\0\0\0\377\2\21\31\6\377c\216\"\377\335u\251(\377\3\\\205" \ + "\37\377'9\15\377\4\6\1\377\236\0\0\0\377\2\0\0\0\315\0\0\0A\377\0\0\0" \ + "\0\256\0\0\0\0\3\0\0\0\11\0\0\0r\0\0\0\347\232\0\0\0\377\4\15\23\4\377" \ + "2H\21\377Nq\33\377j\231$\377\336u\251(\377\2_\211\40\377\22\32\6\377" \ + "\377\0\0\0\377\214\0\0\0\377\2\6\10\2\377Hi\31\377\336u\251(\377\4p\242" \ + "&\377W~\36\377;U\24\377\32%\11\377\231\0\0\0\377\3\0\0\0\321\0\0\0S\0" \ + "\0\0\1\377\0\0\0\0\261\0\0\0\0\4\0\0\0\5\0\0\0V\0\0\0\276\0\0\0\375\227" \ + "\0\0\0\377\3\2\3\1\377,@\17\377e\222#\377\335u\251(\377\3u\250(\377A" \ + "^\26\377\3\5\1\377\377\0\0\0\377\217\0\0\0\377\2(:\16\377n\237&\377\335" \ + "u\251(\377\3o\241&\377>Y\25\377\11\15\3\377\226\0\0\0\377\3\0\0\0\367" \ + "\0\0\0\246\0\0\0=\377\0\0\0\0\267\0\0\0\0\4\0\0\0\35\0\0\0s\0\0\0\313" \ + "\0\0\0\376\226\0\0\0\377\4\2\3\1\377&7\15\377V|\35\377u\250(\377\331" \ + "u\251(\377\2b\216\"\377\34)\12\377\377\0\0\0\377\222\0\0\0\377\2\14\22" \ + "\4\377Pt\33\377\332u\251(\377\3d\220\"\3775L\22\377\11\15\3\377\225\0" \ + "\0\0\377\4\0\0\0\371\0\0\0\267\0\0\0_\0\0\0\17\377\0\0\0\0\274\0\0\0" \ + "\0\3\0\0\0\31\0\0\0c\0\0\0\264\227\0\0\0\377\4\20\27\5\3774K\22\377V" \ + "}\35\377s\246'\377\324u\251(\377\3r\244'\377:T\24\377\3\5\1\377\377\0" \ + "\0\0\377\225\0\0\0\377\2%5\15\377h\226$\377\325u\251(\377\4a\214!\377" \ + ">Z\25\377\33'\11\377\0\1\0\377\224\0\0\0\377\4\0\0\0\373\0\0\0\234\0" \ + "\0\0R\0\0\0\15\377\0\0\0\0\301\0\0\0\0\2\0\0\0\6\0\0\0\363\231\0\0\0" \ + "\377\5\5\7\2\377\37,\13\377;U\24\377Ty\35\377g\224#\377\317u\251(\377" \ + "\2Nq\33\377\17\26\5\377\377\0\0\0\377\230\0\0\0\377\3\5\7\2\377;U\24" \ + "\377p\242&\377\316u\251(\377\5m\236%\377Y\201\37\377Ca\27\377'9\15\377" \ + "\13\20\4\377\230\0\0\0\377\1\0\0\0\300\377\0\0\0\0\305\0\0\0\0\1\0\0" \ + "\0\263\236\0\0\0\377\10\6\11\2\377\31$\11\377-B\20\377@]\26\377Mo\32" \ + "\377Y\201\36\377d\220\"\377p\242&\377\305u\251(\377\2\\\205\40\377\34" \ + "(\12\377\377\0\0\0\377\234\0\0\0\377\3\15\23\4\377Ij\31\377t\247(\377" \ + "\304u\251(\377\10s\246'\377h\226$\377\\\205\37\377Qu\34\377Dc\27\377" \ + "3J\22\377\37-\13\377\14\21\4\377\235\0\0\0\377\1\0\0\0y\377\0\0\0\0\305" \ + "\0\0\0\0\1\0\0\0e\246\0\0\0\377\14\6\10\2\377\20\27\5\377\27\"\10\377" \ + "\37-\13\377'8\15\377/D\20\3778R\23\377C`\27\377Mo\32\377X\177\36\377" \ + "d\220\"\377t\247(\377\267u\251(\377\2Z\202\37\377!/\13\377\377\0\0\0" \ + "\377\240\0\0\0\377\3\21\31\6\377Ii\31\377s\246'\377\267u\251(\377\13" \ + "i\230$\377Z\203\37\377Qu\34\377Ed\30\377;U\24\3771G\21\377)<\16\377!" \ + "0\13\377\32%\11\377\22\33\6\377\13\17\4\377\245\0\0\0\377\1\0\0\0)\377" \ + "\0\0\0\0\305\0\0\0\0\2\0\0\0\13\0\0\0\362\260\0\0\0\377\5\5\7\2\377\30" \ + "#\10\377.C\20\377Kl\32\377n\236%\377\260u\251(\377\3t\250(\377Rw\34\377" \ + "\35*\12\377\377\0\0\0\377\244\0\0\0\377\3\17\26\5\377Ca\27\377o\240&" \ + "\377\260u\251(\377\5s\246'\377V}\35\3775M\22\377\37-\13\377\12\16\3\377" \ + "\257\0\0\0\377\1\0\0\0\303\377\0\0\0\0\307\0\0\0\0\1\0\0\0\230\264\0" \ + "\0\0\377\2\6\11\2\377Mo\32\377\255u\251(\377\3o\240&\377Db\27\377\21" \ + "\31\6\377\377\0\0\0\377\250\0\0\0\377\3\7\12\2\3775L\22\377e\222#\377" \ + "\255u\251(\377\2e\222#\377\22\33\6\377\263\0\0\0\377\1\0\0\0\\\377\0" \ + "\0\0\0\307\0\0\0\0\2\0\0\0\31\0\0\0\366\264\0\0\0\377\1Tz\35\377\253" \ + "u\251(\377\3Z\203\37\377-A\17\377\5\7\2\377\377\0\0\0\377\254\0\0\0\377" \ + "\4\1\1\0\377\37-\13\377Mo\32\377r\244'\377\252u\251(\377\2p\242&\377" \ + "\10\14\3\377\262\0\0\0\377\2\0\0\0\321\0\0\0\2\377\0\0\0\0\310\0\0\0" \ + "\0\1\0\0\0\210\263\0\0\0\377\1!/\13\377\251u\251(\377\3d\220\"\377;U" \ + "\24\377\22\33\6\377\377\0\0\0\377\262\0\0\0\377\4\11\15\3\377/D\20\377" \ + "X\177\36\377t\250(\377\250u\251(\377\1Dc\27\377\262\0\0\0\377\1\0\0\0" \ + "K\377\0\0\0\0\311\0\0\0\0\2\0\0\0\7\0\0\0\323\261\0\0\0\377\2\14\22\4" \ + "\377i\227$\377\245u\251(\377\4t\247(\377[\204\37\377;U\24\377\30\"\10" \ + "\377\377\0\0\0\377\270\0\0\0\377\4\14\22\4\3771F\21\377Qu\34\377o\241" \ + "&\377\245u\251(\377\2t\250(\377%5\15\377\260\0\0\0\377\1\0\0\0\236\377" \ + "\0\0\0\0\313\0\0\0\0\2\0\0\0\40\0\0\0\352\257\0\0\0\377\2\13\21\4\377" \ + "`\213!\377\243u\251(\377\4h\226#\377Hg\30\377'8\15\377\10\13\3\377\377" \ + "\0\0\0\377\276\0\0\0\377\5\2\3\1\377\35*\12\377=Y\25\377^\210\40\377" \ + "u\250(\377\242u\251(\377\2p\242&\377\37-\13\377\256\0\0\0\377\2\0\0\0" \ + "\310\0\0\0\10\377\0\0\0\0\314\0\0\0\0\2\0\0\0B\0\0\0\365\255\0\0\0\377" \ + "\2\33&\11\377g\224#\377\237u\251(\377\5s\246'\377_\212!\377Gf\30\377" \ + ".B\20\377\23\34\7\377\377\0\0\0\377\306\0\0\0\377\5\12\17\3\377'8\15" \ + "\377\77[\26\377X\177\36\377o\240&\377\237u\251(\377\3r\245'\3772I\21" \ + "\377\0\1\0\377\253\0\0\0\377\2\0\0\0\336\0\0\0\35\377\0\0\0\0\316\0\0" \ + "\0\0\2\0\0\0>\0\0\0\360\252\0\0\0\377\3\2\3\1\377=W\25\377t\247(\377" \ + "\233u\251(\377\6r\244'\377`\213!\377Mo\32\3774K\22\377\34(\11\377\5\7" \ + "\2\377\377\0\0\0\377\316\0\0\0\377\6\1\2\0\377\24\34\7\377-@\17\377E" \ + "d\30\377[\203\37\377m\236%\377\234u\251(\377\2U{\35\377\14\21\4\377\251" \ + "\0\0\0\377\2\0\0\0\326\0\0\0\34\377\0\0\0\0\320\0\0\0\0\2\0\0\0&\0\0" \ + "\0\325\250\0\0\0\377\2#3\14\377`\213!\377\226u\251(\377\10q\243'\377" \ + "e\222#\377Y\200\36\377Gf\30\3775L\22\377\"1\14\377\20\27\5\377\1\2\0" \ + "\377\377\0\0\0\377\331\0\0\0\377\7\12\17\3\377\35*\12\377/D\20\377A]" \ + "\26\377Ty\35\377a\215!\377m\236%\377\226u\251(\377\3m\235%\3776N\23\377" \ + "\5\7\2\377\246\0\0\0\377\2\0\0\0\262\0\0\0\16\377\0\0\0\0\322\0\0\0\0" \ + "\3\0\0\0\11\0\0\0\204\0\0\0\371\244\0\0\0\377\4\14\21\4\377Ec\30\377" \ + "e\222#\377j\232$\377\210m\236%\377\1k\233%\377\202e\222#\377\13c\216" \ + "\"\377[\204\37\377Ty\35\377Ln\32\377Dc\27\377=X\25\3776N\22\377+>\17" \ + "\377\37-\13\377\24\34\7\377\10\13\3\377\377\0\0\0\377\350\0\0\0\377\13" \ + "\4\6\1\377\20\27\5\377\34(\11\377(:\16\3773J\21\377;U\24\377B_\27\377" \ + "Jk\31\377Qu\34\377Y\200\36\377`\213!\377\202e\222#\377\1i\230$\377\210" \ + "m\236%\377\4m\235%\377e\222#\377V|\35\377\33&\11\377\243\0\0\0\377\3" \ + "\0\0\0\353\0\0\0_\0\0\0\1\377\0\0\0\0\325\0\0\0\0\3\0\0\0\25\0\0\0\210" \ + "\0\0\0\366\377\0\0\0\377\377\0\0\0\377\340\0\0\0\377\3\0\0\0\346\0\0" \ + "\0o\0\0\0\12\377\0\0\0\0\331\0\0\0\0\3\0\0\0\40\0\0\0\230\0\0\0\360\377" \ + "\0\0\0\377\245\0\0\0\377\6\1\0\0\377\22\2\6\377\31\2\11\377!\3\14\377" \ + "&\3\15\3771\4\21\377\2022\5\22\377\7.\4\20\377&\3\15\377\"\3\14\377\31" \ + "\2\11\377\27\2\10\377\15\1\4\377\14\1\4\377\377\0\0\0\377\250\0\0\0\377" \ + "\3\0\0\0\342\0\0\0}\0\0\0\17\377\0\0\0\0\335\0\0\0\0\4\0\0\0\11\0\0\0" \ + "V\0\0\0\262\0\0\0\372\377\0\0\0\377\233\0\0\0\377\10\15\1\4\3771\4\21" \ + "\377M\7\33\377f\11$\377\200\14-\377\227\16""5\377\251\17;\377\271\21" \ + "A\377\216\274\21B\377\10\265\20@\377\235\16""7\377\206\14/\377o\12'\377" \ + "X\10\37\377@\6\27\377&\3\15\377\5\0\2\377\377\0\0\0\377\235\0\0\0\377" \ + "\4\0\0\0\360\0\0\0\235\0\0\0@\0\0\0\2\377\0\0\0\0\342\0\0\0\0\4\0\0\0" \ + "\11\0\0\0D\0\0\0\221\0\0\0\341\377\0\0\0\377\222\0\0\0\377\6\1\0\0\377" \ + "\40\3\13\377E\6\30\377k\12&\377\221\15""3\377\257\20>\377\236\274\21" \ + "B\377\5\252\17<\377\204\14.\377^\11!\3779\5\24\377\17\1\5\377\377\0\0" \ + "\0\377\224\0\0\0\377\5\0\0\0\376\0\0\0\314\0\0\0\200\0\0\0""3\0\0\0\2" \ + "\377\0\0\0\0\350\0\0\0\0\5\0\0\0\2\0\0\0""5\0\0\0z\0\0\0\300\0\0\0\371" \ + "\377\0\0\0\377\213\0\0\0\377\4\4\0\2\3771\4\21\377h\11$\377\240\16""8" \ + "\377\247\274\21B\377\5\272\21A\377\223\15""4\377^\11!\377*\4\17\377\2" \ + "\0\1\377\377\0\0\0\377\215\0\0\0\377\4\0\0\0\361\0\0\0\260\0\0\0j\0\0" \ + "\0%\377\0\0\0\0\357\0\0\0\0\3\0\0\0\12\0\0\0\217\0\0\0\376\377\0\0\0" \ + "\377\207\0\0\0\377\4\22\2\6\377H\7\31\377\177\13-\377\262\20\77\377\256" \ + "\274\21B\377\4\257\20>\377}\13,\377I\7\32\377\22\2\6\377\377\0\0\0\377" \ + "\211\0\0\0\377\3\0\0\0\370\0\0\0e\0\0\0\1\377\0\0\0\0\357\0\0\0\0\3\0" \ + "\0\0\1\0\0\0^\0\0\0\346\377\0\0\0\377\206\0\0\0\377\3\17\1\5\377R\7\35" \ + "\377\226\16""5\377\266\274\21B\377\3\235\16""7\377X\10\37\377\22\2\6" \ + "\377\377\0\0\0\377\210\0\0\0\377\2\0\0\0\317\0\0\0""9\377\0\0\0\0\355" \ + "\0\0\0\0\2\0\0\0+\0\0\0\300\377\0\0\0\377\205\0\0\0\377\4\4\0\2\377\77" \ + "\6\26\377\204\14.\377\267\21@\377\272\274\21B\377\4\273\21A\377\221\15" \ + "3\377R\7\35\377\17\1\5\377\377\0\0\0\377\206\0\0\0\377\3\0\0\0\376\0" \ + "\0\0\242\0\0\0\25\377\0\0\0\0\351\0\0\0\0\3\0\0\0\15\0\0\0\221\0\0\0" \ + "\372\377\0\0\0\377\204\0\0\0\377\3\20\1\6\377^\11!\377\250\17;\377\300" \ + "\274\21B\377\3\264\20\77\377o\12'\377\36\3\13\377\377\0\0\0\377\206\0" \ + "\0\0\377\3\0\0\0\356\0\0\0o\0\0\0\3\377\0\0\0\0\346\0\0\0\0\2\0\0\0@" \ + "\0\0\0\333\377\0\0\0\377\204\0\0\0\377\3(\4\16\377}\13,\377\270\21A\377" \ + "\305\274\21B\377\3\226\16""5\377E\6\30\377\3\0\1\377\377\0\0\0\377\205" \ + "\0\0\0\377\2\0\0\0\276\0\0\0#\377\0\0\0\0\343\0\0\0\0\2\0\0\0\24\0\0" \ + "\0\252\377\0\0\0\377\204\0\0\0\377\3/\4\21\377\203\14.\377\273\21A\377" \ + "\311\274\21B\377\3\241\17""8\377P\7\34\377\7\1\3\377\377\0\0\0\377\204" \ + "\0\0\0\377\3\0\0\0\372\0\0\0\210\0\0\0\6\377\0\0\0\0\340\0\0\0\0\2\0" \ + "\0\0^\0\0\0\351\377\0\0\0\377\203\0\0\0\377\2.\4\20\377\221\15""3\377" \ + "\316\274\21B\377\3\252\17<\377R\7\35\377\6\1\2\377\377\0\0\0\377\204" \ + "\0\0\0\377\2\0\0\0\322\0\0\0""5\377\0\0\0\0\335\0\0\0\0\2\0\0\0\34\0" \ + "\0\0\264\377\0\0\0\377\203\0\0\0\377\2""0\4\21\377\222\15""3\377\322" \ + "\274\21B\377\3\255\20=\377^\11!\377\12\1\4\377\377\0\0\0\377\203\0\0" \ + "\0\377\3\0\0\0\373\0\0\0\221\0\0\0\13\377\0\0\0\0\332\0\0\0\0\2\0\0\0" \ + "O\0\0\0\352\377\0\0\0\377\202\0\0\0\377\3\40\3\13\377\200\14-\377\273" \ + "\21B\377\325\274\21B\377\3\247\17:\377L\7\33\377\3\0\1\377\377\0\0\0" \ + "\377\203\0\0\0\377\2\0\0\0\321\0\0\0-\377\0\0\0\0\327\0\0\0\0\2\0\0\0" \ + "\22\0\0\0\252\377\0\0\0\377\202\0\0\0\377\3\12\1\4\377k\12&\377\272\21" \ + "A\377\331\274\21B\377\2\232\16""6\377-\4\20\377\377\0\0\0\377\203\0\0" \ + "\0\377\3\0\0\0\373\0\0\0\200\0\0\0\3\377\0\0\0\0\324\0\0\0\0\2\0\0\0" \ + "@\0\0\0\341\276\0\0\0\377\3\6\1\2\377\15\1\4\377\25\2\7\377\205\31\2" \ + "\11\377\2\15\1\4\377\1\0\1\377\270\0\0\0\377\3\1\0\0\377K\7\32\377\257" \ + "\20=\377\335\274\21B\377\2\204\14.\377\30\2\10\377\377\0\0\0\377\203" \ + "\0\0\0\377\2\0\0\0\307\0\0\0$\377\0\0\0\0\321\0\0\0\0\3\0\0\0\7\0\0\0" \ + "\221\0\0\0\376\264\0\0\0\377\12\24\2\7\377.\4\20\377F\6\31\377Z\10\40" \ + "\377k\12&\377~\13,\377\221\15""3\377\243\17""9\377\257\20>\377\263\20" \ + "\77\377\213\274\21B\377\13\263\20\77\377\250\17;\377\236\16""7\377\223" \ + "\15""4\377\202\14.\377q\12(\377_\11!\377P\7\34\377<\5\25\377+\4\17\377" \ + "\17\1\5\377\254\0\0\0\377\2\35\3\12\377\216\15""2\377\340\274\21B\377" \ + "\3\265\20@\377^\11!\377\6\1\2\377\377\0\0\0\377\202\0\0\0\377\2\0\0\0" \ + "\362\0\0\0f\377\0\0\0\0\317\0\0\0\0\2\0\0\0\35\0\0\0\307\260\0\0\0\377" \ + "\6\23\2\7\377:\5\24\377a\11\"\377\202\14.\377\234\16""7\377\265\20@\377" \ + "\240\274\21B\377\6\260\20>\377\224\15""4\377y\13*\377\\\10\40\377<\5" \ + "\25\377\12\1\4\377\244\0\0\0\377\3\1\0\0\377O\7\34\377\264\20\77\377" \ + "\343\274\21B\377\2\232\16""6\377#\3\14\377\260\0\0\0\377\2\12\1\4\377" \ + "\25\2\7\377\204\31\2\11\377\3\30\2\11\377\15\1\4\377\12\1\3\377\311\0" \ + "\0\0\377\2\0\0\0\237\0\0\0\11\377\0\0\0\0\314\0\0\0\0\2\0\0\0P\0\0\0" \ + "\361\254\0\0\0\377\5\3\0\1\377*\4\17\377X\10\37\377\202\14.\377\251\17" \ + ";\377\253\274\21B\377\2\255\20=\377-\4\20\377\242\0\0\0\377\2\24\2\7" \ + "\377\213\15""1\377\346\274\21B\377\3\271\21A\377d\11#\377\5\0\2\377\242" \ + "\0\0\0\377\14\7\1\3\377#\3\14\3778\5\24\377H\7\31\377[\10\40\377k\12" \ + "&\377}\13,\377\217\15""2\377\231\16""6\377\244\17:\377\257\20>\377\273" \ + "\21B\377\212\274\21B\377\13\270\21@\377\257\20>\377\251\17;\377\226\16" \ + "5\377\204\14.\377r\12(\377^\11!\377M\7\33\3775\5\23\377\33\2\12\377\4" \ + "\0\2\377\276\0\0\0\377\2\0\0\0\330\0\0\0*\377\0\0\0\0\311\0\0\0\0\3\0" \ + "\0\0\2\0\0\0\210\0\0\0\376\251\0\0\0\377\5\1\0\0\377&\3\15\377X\10\37" \ + "\377\210\14""0\377\263\20\77\377\260\274\21B\377\1\236\16""7\377\241" \ + "\0\0\0\377\2:\5\24\377\255\20=\377\351\274\21B\377\2\234\16""7\377%\3" \ + "\15\377\233\0\0\0\377\6\1\0\1\377-\4\20\377T\10\36\377o\12'\377\213\15" \ + "1\377\247\17:\377\240\274\21B\377\7\272\21A\377\244\17""9\377\212\14" \ + "0\377l\12&\377F\6\31\377\40\3\13\377\2\0\1\377\271\0\0\0\377\2\0\0\0" \ + "\362\0\0\0T\377\0\0\0\0\307\0\0\0\0\2\0\0\0\21\0\0\0\265\250\0\0\0\377" \ + "\4\4\0\2\3773\5\22\377n\12'\377\247\17;\377\264\274\21B\377\2\273\21" \ + "B\377\1\0\1\377\236\0\0\0\377\3\4\0\2\377f\11$\377\273\21B\377\353\274" \ + "\21B\377\2\265\20@\377Q\7\34\377\231\0\0\0\377\2\15\1\5\377\221\15""3" \ + "\377\253\274\21B\377\5\263\20\77\377\216\15""2\377f\11$\3778\5\24\377" \ + "\13\1\4\377\266\0\0\0\377\3\0\0\0\376\0\0\0\210\0\0\0\3\377\0\0\0\0\304" \ + "\0\0\0\0\2\0\0\0'\0\0\0\325\246\0\0\0\377\4\1\0\0\377/\4\21\377v\13)" \ + "\377\261\20>\377\267\274\21B\377\1\255\20=\377\236\0\0\0\377\2\25\2\10" \ + "\377\230\16""5\377\357\274\21B\377\2}\13,\377\10\1\3\377\227\0\0\0\377" \ + "\1b\11\"\377\260\274\21B\377\5\272\21A\377\226\16""5\377g\11$\3777\5" \ + "\23\377\7\1\2\377\264\0\0\0\377\2\0\0\0\262\0\0\0\20\377\0\0\0\0\302" \ + "\0\0\0\0\2\0\0\0L\0\0\0\363\245\0\0\0\377\3#\3\14\377k\12&\377\252\17" \ + "<\377\272\274\21B\377\1w\13*\377\235\0\0\0\377\2'\4\16\377\251\17;\377" \ + "\361\274\21B\377\2\232\16""6\377\30\2\10\377\226\0\0\0\377\1\202\14." \ + "\377\264\274\21B\377\4\264\20\77\377\200\14-\377E\6\30\377\16\1\5\377" \ + "\262\0\0\0\377\2\0\0\0\335\0\0\0'\377\0\0\0\0\300\0\0\0\0\2\0\0\0j\0" \ + "\0\0\374\243\0\0\0\377\4\1\0\1\3777\5\23\377\210\14""0\377\273\21B\377" \ + "\274\274\21B\377\1A\6\27\377\234\0\0\0\377\2C\6\30\377\266\20@\377\363" \ + "\274\21B\377\2\256\20=\3770\4\21\377\225\0\0\0\377\1s\12(\377\267\274" \ + "\21B\377\4\272\21A\377\213\15""1\377E\6\30\377\10\1\3\377\260\0\0\0\377" \ + "\2\0\0\0\355\0\0\0>\377\0\0\0\0\275\0\0\0\0\2\0\0\0\2\0\0\0\221\243\0" \ + "\0\0\377\3\17\1\5\377^\11!\377\252\17<\377\276\274\21B\377\2\244\17:" \ + "\377\4\0\1\377\233\0\0\0\377\2T\10\36\377\273\21A\377\365\274\21B\377" \ + "\2\266\20@\377A\6\27\377\224\0\0\0\377\1=\6\25\377\272\274\21B\377\4" \ + "\267\21@\377}\13,\3779\5\24\377\3\0\1\377\256\0\0\0\377\2\0\0\0\370\0" \ + "\0\0Y\377\0\0\0\0\273\0\0\0\0\2\0\0\0\11\0\0\0\254\242\0\0\0\377\3\13" \ + "\1\4\377^\11!\377\261\20>\377\300\274\21B\377\1O\7\34\377\233\0\0\0\377" \ + "\1f\11$\377\370\274\21B\377\2\273\21B\377S\7\35\377\223\0\0\0\377\2\12" \ + "\1\4\377\267\21@\377\274\274\21B\377\3\237\16""8\377P\7\34\377\12\1\3" \ + "\377\255\0\0\0\377\2\0\0\0\376\0\0\0\200\377\0\0\0\0\271\0\0\0\0\2\0" \ + "\0\0\16\0\0\0\274\241\0\0\0\377\3\12\1\4\377\\\10\40\377\257\20>\377" \ + "\301\274\21B\377\2\247\17:\377\5\0\2\377\232\0\0\0\377\1g\11$\377\373" \ + "\274\21B\377\1^\10!\377\223\0\0\0\377\1o\12'\377\276\274\21B\377\3\267" \ + "\21@\377w\13*\377!\3\14\377\255\0\0\0\377\2\0\0\0\214\0\0\0\1\377\0\0" \ + "\0\0\266\0\0\0\0\2\0\0\0\23\0\0\0\317\240\0\0\0\377\3\4\0\1\377T\10\36" \ + "\377\257\20=\377\303\274\21B\377\1=\6\25\377\231\0\0\0\377\2\1\0\0\377" \ + "o\12'\377\375\274\21B\377\1d\11#\377\222\0\0\0\377\2\30\2\11\377\270" \ + "\21A\377\277\274\21B\377\3\273\21A\377|\13+\377\37\3\13\377\254\0\0\0" \ + "\377\2\0\0\0\240\0\0\0\2\377\0\0\0\0\264\0\0\0\0\2\0\0\0\22\0\0\0\317" \ + "\240\0\0\0\377\2E\6\30\377\247\17:\377\304\274\21B\377\1\177\13-\377" \ + "\232\0\0\0\377\1c\11#\377\377\274\21B\377\1_\11!\377\222\0\0\0\377\1" \ + "r\12(\377\301\274\21B\377\3\273\21A\377z\13+\377\35\3\12\377\253\0\0" \ + "\0\377\2\0\0\0\237\0\0\0\2\377\0\0\0\0\262\0\0\0\0\2\0\0\0\22\0\0\0\316" \ + "\237\0\0\0\377\2\30\2\11\377\202\14.\377\305\274\21B\377\2\263\20\77" \ + "\377\26\2\10\377\231\0\0\0\377\1Q\7\34\377\377\274\21B\377\202\274\21" \ + "B\377\1M\7\33\377\221\0\0\0\377\2\20\1\6\377\257\20=\377\302\274\21B" \ + "\377\3\272\21A\377u\13)\377\22\2\6\377\252\0\0\0\377\2\0\0\0\236\0\0" \ + "\0\2\377\0\0\0\0\260\0\0\0\0\2\0\0\0\22\0\0\0\315\236\0\0\0\377\3\1\0" \ + "\1\377S\7\35\377\265\20\77\377\306\274\21B\377\1K\7\32\377\231\0\0\0" \ + "\377\2;\5\25\377\273\21A\377\377\274\21B\377\202\274\21B\377\2\270\21" \ + "A\3771\4\21\377\221\0\0\0\377\1E\6\30\377\304\274\21B\377\3\265\20@\377" \ + "^\11!\377\7\1\2\377\251\0\0\0\377\2\0\0\0\235\0\0\0\2\377\0\0\0\0\256" \ + "\0\0\0\0\2\0\0\0\21\0\0\0\315\236\0\0\0\377\2%\3\15\377\231\16""6\377" \ + "\307\274\21B\377\1w\13*\377\231\0\0\0\377\2)\4\16\377\265\20@\377\377" \ + "\274\21B\377\204\274\21B\377\2\257\20>\377\35\3\12\377\220\0\0\0\377" \ + "\2\1\0\0\377\216\15""2\377\305\274\21B\377\2\237\16""8\3775\5\23\377" \ + "\251\0\0\0\377\2\0\0\0\235\0\0\0\2\377\0\0\0\0\254\0\0\0\0\2\0\0\0\5" \ + "\0\0\0\274\235\0\0\0\377\3\1\0\0\377V\10\36\377\266\20@\377\307\274\21" \ + "B\377\2\243\17""9\377\13\1\4\377\230\0\0\0\377\2\14\1\4\377\245\17:\377" \ + "\377\274\21B\377\206\274\21B\377\2\236\16""7\377\12\1\4\377\220\0\0\0" \ + "\377\2\33\2\11\377\262\20>\377\306\274\21B\377\2x\13*\377\16\1\5\377" \ + "\250\0\0\0\377\1\0\0\0\204\377\0\0\0\0\253\0\0\0\0\2\0\0\0\1\0\0\0\251" \ + "\235\0\0\0\377\2\16\1\5\377\205\14/\377\310\274\21B\377\2\270\21@\377" \ + "(\4\16\377\231\0\0\0\377\1\200\14-\377\377\274\21B\377\210\274\21B\377" \ + "\1\200\14-\377\221\0\0\0\377\1=\6\25\377\307\274\21B\377\2\260\20>\377" \ + "K\7\32\377\250\0\0\0\377\1\0\0\0l\377\0\0\0\0\252\0\0\0\0\1\0\0\0\204" \ + "\235\0\0\0\377\2""2\5\22\377\254\20<\377\311\274\21B\377\1E\6\30\377" \ + "\231\0\0\0\377\1E\6\30\377\377\274\21B\377\212\274\21B\377\1E\6\30\377" \ + "\221\0\0\0\377\1t\12)\377\310\274\21B\377\2}\13,\377\15\1\4\377\246\0" \ + "\0\0\377\2\0\0\0\374\0\0\0O\377\0\0\0\0\250\0\0\0\0\1\0\0\0h\235\0\0" \ + "\0\377\2P\7\34\377\270\21@\377\311\274\21B\377\1o\12'\377\231\0\0\0\377" \ + "\2\30\2\11\377\262\20>\377\377\274\21B\377\212\274\21B\377\2\260\20>" \ + "\377\23\2\7\377\220\0\0\0\377\2\10\1\3\377\236\16""7\377\310\274\21B" \ + "\377\2\244\17:\377(\4\16\377\246\0\0\0\377\2\0\0\0\363\0\0\0""1\377\0" \ + "\0\0\0\246\0\0\0\0\2\0\0\0E\0\0\0\372\233\0\0\0\377\2\6\1\2\377{\13+" \ + "\377\312\274\21B\377\2\207\14/\377\2\0\1\377\231\0\0\0\377\1\200\14-" \ + "\377\377\274\21B\377\214\274\21B\377\1\200\14-\377\221\0\0\0\377\2\30" \ + "\2\10\377\255\20=\377\310\274\21B\377\3\271\21A\377^\11!\377\1\0\1\377" \ + "\245\0\0\0\377\2\0\0\0\346\0\0\0\36\377\0\0\0\0\244\0\0\0\0\2\0\0\0'" \ + "\0\0\0\355\233\0\0\0\377\2\14\1\4\377\211\14""0\377\312\274\21B\377\2" \ + "\246\17:\377\20\1\6\377\231\0\0\0\377\1/\4\21\377\377\274\21B\377\216" \ + "\274\21B\377\1""6\5\23\377\221\0\0\0\377\2""6\5\23\377\272\21A\377\311" \ + "\274\21B\377\2\177\13-\377\11\1\3\377\245\0\0\0\377\2\0\0\0\314\0\0\0" \ + "\13\377\0\0\0\0\242\0\0\0\0\2\0\0\0\20\0\0\0\333\233\0\0\0\377\2\31\2" \ + "\11\377\236\16""7\377\312\274\21B\377\2\261\20>\377\40\3\13\377\232\0" \ + "\0\0\377\1\221\15""3\377\377\274\21B\377\216\274\21B\377\2\233\16""6" \ + "\377\1\0\1\377\221\0\0\0\377\1R\7\35\377\312\274\21B\377\2\241\17""8" \ + "\377\33\2\12\377\245\0\0\0\377\2\0\0\0\261\0\0\0\1\377\0\0\0\0\240\0" \ + "\0\0\0\2\0\0\0\2\0\0\0\263\233\0\0\0\377\2#\3\14\377\254\20<\377\312" \ + "\274\21B\377\2\267\21@\377-\4\20\377\232\0\0\0\377\1""3\5\22\377\377" \ + "\274\21B\377\220\274\21B\377\1:\5\24\377\222\0\0\0\377\1y\13*\377\312" \ + "\274\21B\377\2\251\17;\377&\3\15\377\245\0\0\0\377\1\0\0\0v\377\0\0\0" \ + "\0\240\0\0\0\0\1\0\0\0u\233\0\0\0\377\2*\4\17\377\260\20>\377\312\274" \ + "\21B\377\2\273\21B\377@\6\27\377\233\0\0\0\377\1\206\14/\377\377\274" \ + "\21B\377\220\274\21B\377\1\216\15""2\377\222\0\0\0\377\2\6\1\2\377\221" \ + "\15""3\377\312\274\21B\377\2\265\20\77\377<\5\25\377\244\0\0\0\377\2" \ + "\0\0\0\372\0\0\0<\377\0\0\0\0\236\0\0\0\0\2\0\0\0>\0\0\0\375\232\0\0" \ + "\0\377\2""2\5\22\377\264\20\77\377\313\274\21B\377\1]\10!\377\233\0\0" \ + "\0\377\2\22\2\6\377\272\21A\377\377\274\21B\377\221\274\21B\377\1\40" \ + "\3\13\377\222\0\0\0\377\2\12\1\4\377\233\16""6\377\312\274\21B\377\2" \ + "\273\21B\377R\7\35\377\244\0\0\0\377\2\0\0\0\346\0\0\0\24\377\0\0\0\0" \ + "\234\0\0\0\0\2\0\0\0\15\0\0\0\336\232\0\0\0\377\2)\4\16\377\263\20\77" \ + "\377\313\274\21B\377\2v\13)\377\1\0\0\377\233\0\0\0\377\1J\7\32\377\377" \ + "\274\21B\377\222\274\21B\377\1e\11#\377\223\0\0\0\377\2\30\2\10\377\253" \ + "\17<\377\312\274\21B\377\2\273\21B\377V\10\36\377\244\0\0\0\377\1\0\0" \ + "\0\257\377\0\0\0\0\234\0\0\0\0\1\0\0\0\234\232\0\0\0\377\2%\3\15\377" \ + "\262\20>\377\313\274\21B\377\2|\13+\377\1\0\1\377\234\0\0\0\377\1w\13" \ + "*\377\377\274\21B\377\222\274\21B\377\1\244\17""9\377\224\0\0\0\377\2" \ + "&\3\15\377\264\20\77\377\313\274\21B\377\1d\11#\377\244\0\0\0\377\1\0" \ + "\0\0b\377\0\0\0\0\232\0\0\0\0\2\0\0\0F\0\0\0\376\231\0\0\0\377\2\35\3" \ + "\12\377\255\20=\377\313\274\21B\377\2\207\14/\377\4\0\1\377\235\0\0\0" \ + "\377\1\231\16""6\377\377\274\21B\377\223\274\21B\377\1\33\2\12\377\224" \ + "\0\0\0\377\2>\6\26\377\272\21A\377\313\274\21B\377\1Z\10\40\377\243\0" \ + "\0\0\377\2\0\0\0\357\0\0\0\32\377\0\0\0\0\230\0\0\0\0\2\0\0\0\21\0\0" \ + "\0\346\231\0\0\0\377\2\17\1\5\377\240\16""8\377\313\274\21B\377\2\227" \ + "\16""5\377\12\1\4\377\236\0\0\0\377\1\253\17<\377\377\274\21B\377\223" \ + "\274\21B\377\1K\7\32\377\225\0\0\0\377\2D\6\30\377\273\21A\377\313\274" \ + "\21B\377\1T\10\36\377\243\0\0\0\377\1\0\0\0\266\377\0\0\0\0\230\0\0\0" \ + "\0\1\0\0\0\233\231\0\0\0\377\2\4\0\1\377\217\15""2\377\313\274\21B\377" \ + "\2\237\16""8\377\20\1\6\377\237\0\0\0\377\1\262\20\77\377\377\274\21" \ + "B\377\223\274\21B\377\1n\12'\377\226\0\0\0\377\1O\7\34\377\313\274\21" \ + "B\377\2\273\21B\377G\6\31\377\243\0\0\0\377\1\0\0\0_\377\0\0\0\0\226" \ + "\0\0\0\0\2\0\0\0=\0\0\0\376\231\0\0\0\377\1w\13*\377\313\274\21B\377" \ + "\2\234\16""7\377\17\1\5\377\240\0\0\0\377\1\254\20<\377\377\274\21B\377" \ + "\223\274\21B\377\1\213\15""1\377\227\0\0\0\377\1g\11$\377\313\274\21" \ + "B\377\2\267\21@\3771\4\21\377\242\0\0\0\377\2\0\0\0\353\0\0\0\22\377" \ + "\0\0\0\0\224\0\0\0\0\2\0\0\0\5\0\0\0\325\231\0\0\0\377\1M\7\33\377\313" \ + "\274\21B\377\2\234\16""7\377\20\1\6\377\241\0\0\0\377\1\237\16""8\377" \ + "\377\274\21B\377\223\274\21B\377\1\237\16""8\377\227\0\0\0\377\2\1\0" \ + "\0\377t\12)\377\313\274\21B\377\2\260\20>\377\33\2\12\377\242\0\0\0\377" \ + "\1\0\0\0\231\377\0\0\0\0\224\0\0\0\0\1\0\0\0n\231\0\0\0\377\2(\4\16\377" \ + "\267\21@\377\312\274\21B\377\2\242\17""9\377\25\2\10\377\242\0\0\0\377" \ + "\1\206\14/\377\377\274\21B\377\223\274\21B\377\1\251\17;\377\230\0\0" \ + "\0\377\2\1\0\0\377o\12'\377\313\274\21B\377\2\241\17""8\377\14\1\4\377" \ + "\241\0\0\0\377\2\0\0\0\375\0\0\0""6\377\0\0\0\0\222\0\0\0\0\2\0\0\0\22" \ + "\0\0\0\354\230\0\0\0\377\2\16\1\5\377\247\17;\377\312\274\21B\377\2\235" \ + "\16""7\377\21\2\6\377\243\0\0\0\377\1h\11$\377\377\274\21B\377\223\274" \ + "\21B\377\1\255\20=\377\231\0\0\0\377\2\1\0\0\377o\12'\377\313\274\21" \ + "B\377\2\210\14""0\377\2\0\1\377\241\0\0\0\377\1\0\0\0\301\377\0\0\0\0" \ + "\222\0\0\0\0\1\0\0\0\222\231\0\0\0\377\1\200\14-\377\312\274\21B\377" \ + "\2\236\16""7\377\21\2\6\377\244\0\0\0\377\1>\6\26\377\377\274\21B\377" \ + "\223\274\21B\377\1\244\17:\377\232\0\0\0\377\2\2\0\1\377z\13+\377\313" \ + "\274\21B\377\1]\10!\377\242\0\0\0\377\1\0\0\0V\377\0\0\0\0\220\0\0\0" \ + "\0\2\0\0\0%\0\0\0\372\230\0\0\0\377\1K\7\32\377\312\274\21B\377\2\242" \ + "\17""9\377\25\2\7\377\245\0\0\0\377\2\16\1\5\377\272\21A\377\377\274" \ + "\21B\377\222\274\21B\377\1\226\16""5\377\233\0\0\0\377\2\1\0\1\377v\13" \ + ")\377\312\274\21B\377\2\273\21A\3773\5\22\377\241\0\0\0\377\2\0\0\0\336" \ + "\0\0\0\6\377\0\0\0\0\217\0\0\0\0\1\0\0\0\252\230\0\0\0\377\2\33\2\12" \ + "\377\263\20\77\377\311\274\21B\377\2\247\17:\377\31\2\11\377\247\0\0" \ + "\0\377\1\217\15""2\377\377\274\21B\377\222\274\21B\377\1~\13,\377\234" \ + "\0\0\0\377\2\1\0\1\377w\13*\377\312\274\21B\377\2\253\17<\377\21\2\6" \ + "\377\241\0\0\0\377\1\0\0\0l\377\0\0\0\0\216\0\0\0\0\2\0\0\0""0\0\0\0" \ + "\376\227\0\0\0\377\2\1\0\1\377\223\15""4\377\311\274\21B\377\2\243\17" \ + "9\377\25\2\10\377\250\0\0\0\377\1K\7\32\377\377\274\21B\377\222\274\21" \ + "B\377\1`\11\"\377\235\0\0\0\377\2\2\0\1\377x\13*\377\312\274\21B\377" \ + "\2\206\14/\377\1\0\0\377\240\0\0\0\377\2\0\0\0\346\0\0\0\11\377\0\0\0" \ + "\0\215\0\0\0\0\1\0\0\0\257\230\0\0\0\377\1K\7\32\377\311\274\21B\377" \ + "\2\244\17""9\377\26\2\10\377\251\0\0\0\377\2\12\1\3\377\262\20\77\377" \ + "\377\274\21B\377\221\274\21B\377\1""5\5\23\377\236\0\0\0\377\2\4\0\1" \ + "\377\200\14-\377\312\274\21B\377\1K\7\32\377\241\0\0\0\377\1\0\0\0q\377" \ + "\0\0\0\0\214\0\0\0\0\2\0\0\0-\0\0\0\376\227\0\0\0\377\2\17\1\5\377\255" \ + "\20=\377\310\274\21B\377\2\246\17:\377\33\2\12\377\253\0\0\0\377\1e\11" \ + "#\377\377\274\21B\377\220\274\21B\377\2\266\20@\377\11\1\3\377\237\0" \ + "\0\0\377\2\2\0\1\377z\13+\377\311\274\21B\377\2\265\20\77\377\30\2\11" \ + "\377\240\0\0\0\377\2\0\0\0\347\0\0\0\11\377\0\0\0\0\213\0\0\0\0\1\0\0" \ + "\0\246\230\0\0\0\377\1z\13+\377\310\274\21B\377\2\233\16""6\377\22\2" \ + "\6\377\254\0\0\0\377\2\20\1\6\377\263\20\77\377\377\274\21B\377\217\274" \ + "\21B\377\1\204\14.\377\241\0\0\0\377\2\2\0\1\377z\13+\377\311\274\21" \ + "B\377\1\206\14/\377\241\0\0\0\377\1\0\0\0j\377\0\0\0\0\212\0\0\0\0\2" \ + "\0\0\0\36\0\0\0\373\227\0\0\0\377\2*\4\17\377\273\21B\377\307\274\21" \ + "B\377\2\233\16""6\377\22\2\6\377\256\0\0\0\377\1O\7\34\377\377\274\21" \ + "B\377\217\274\21B\377\1>\6\26\377\242\0\0\0\377\2\5\0\2\377\201\14-\377" \ + "\311\274\21B\377\1:\5\24\377\240\0\0\0\377\2\0\0\0\332\0\0\0\2\377\0" \ + "\0\0\0\211\0\0\0\0\1\0\0\0\215\227\0\0\0\377\2\1\0\0\377\224\15""4\377" \ + "\307\274\21B\377\2\213\15""1\377\11\1\3\377\257\0\0\0\377\2\2\0\1\377" \ + "\227\16""5\377\377\274\21B\377\215\274\21B\377\2\254\20<\377\4\0\2\377" \ + "\243\0\0\0\377\2\2\0\1\377r\12(\377\310\274\21B\377\2\252\17<\377\14" \ + "\1\4\377\240\0\0\0\377\1\0\0\0Q\377\0\0\0\0\210\0\0\0\0\2\0\0\0\16\0" \ + "\0\0\362\227\0\0\0\377\1>\6\26\377\307\274\21B\377\2\207\14/\377\7\1" \ + "\3\377\261\0\0\0\377\2!\3\14\377\270\21A\377\377\274\21B\377\214\274" \ + "\21B\377\1V\10\36\377\245\0\0\0\377\2\1\0\1\377o\12'\377\310\274\21B" \ + "\377\1d\11#\377\240\0\0\0\377\1\0\0\0\300\377\0\0\0\0\210\0\0\0\0\1\0" \ + "\0\0j\227\0\0\0\377\2\4\0\2\377\243\17""9\377\306\274\21B\377\2~\13," \ + "\377\4\0\2\377\263\0\0\0\377\1a\11\"\377\377\274\21B\377\213\274\21B" \ + "\377\2\254\20<\377\11\1\3\377\247\0\0\0\377\1X\10\37\377\307\274\21B" \ + "\377\2\270\21@\377\31\2\11\377\237\0\0\0\377\2\0\0\0\376\0\0\0-\377\0" \ + "\0\0\0\206\0\0\0\0\2\0\0\0\1\0\0\0\330\227\0\0\0\377\1J\7\32\377\306" \ + "\274\21B\377\2}\13,\377\4\0\1\377\264\0\0\0\377\2\1\0\0\377|\13+\377" \ + "\377\274\21B\377\212\274\21B\377\1C\6\30\377\251\0\0\0\377\2P\7\34\377" \ + "\273\21B\377\306\274\21B\377\1w\13*\377\240\0\0\0\377\1\0\0\0\230\377" \ + "\0\0\0\0\206\0\0\0\0\1\0\0\0""9\227\0\0\0\377\2\4\0\2\377\247\17:\377" \ + "\305\274\21B\377\2i\12%\377\1\0\0\377\266\0\0\0\377\2\12\1\4\377\235" \ + "\16""7\377\377\274\21B\377\210\274\21B\377\2\214\15""1\377\1\0\0\377" \ + "\252\0\0\0\377\2K\7\32\377\273\21A\377\305\274\21B\377\2\273\21A\377" \ + "%\3\15\377\237\0\0\0\377\2\0\0\0\361\0\0\0\12\377\0\0\0\0\205\0\0\0\0" \ + "\1\0\0\0\233\227\0\0\0\377\1E\6\30\377\305\274\21B\377\1^\11!\377\271" \ + "\0\0\0\377\2\32\2\11\377\256\20=\377\377\274\21B\377\206\274\21B\377" \ + "\2\261\20>\377\26\2\10\377\254\0\0\0\377\2H\7\31\377\272\21A\377\305" \ + "\274\21B\377\1\204\14.\377\240\0\0\0\377\1\0\0\0]\377\0\0\0\0\204\0\0" \ + "\0\0\2\0\0\0\14\0\0\0\363\226\0\0\0\377\2\1\0\1\377\236\16""7\377\304" \ + "\274\21B\377\1X\10\37\377\273\0\0\0\377\2#\3\14\377\255\20=\377\377\274" \ + "\21B\377\204\274\21B\377\2\272\21A\3779\5\24\377\256\0\0\0\377\2""8\5" \ + "\24\377\266\20@\377\305\274\21B\377\1)\4\16\377\237\0\0\0\377\1\0\0\0" \ + "\300\377\0\0\0\0\204\0\0\0\0\1\0\0\0X\227\0\0\0\377\1""7\5\23\377\303" \ + "\274\21B\377\2\273\21A\377S\10\35\377\275\0\0\0\377\2\34\3\12\377\250" \ + "\17;\377\377\274\21B\377\203\274\21B\377\1H\7\31\377\260\0\0\0\377\2" \ + "/\4\21\377\262\20\77\377\304\274\21B\377\1\177\13-\377\237\0\0\0\377" \ + "\2\0\0\0\375\0\0\0\34\377\0\0\0\0\203\0\0\0\0\1\0\0\0\262\227\0\0\0\377" \ + "\1\214\15""1\377\302\274\21B\377\2\266\20@\377\77\6\26\377\277\0\0\0" \ + "\377\2\30\2\10\377\244\17""9\377\377\274\21B\377\2\274\21B\377_\11!\377" \ + "\262\0\0\0\377\2'\4\16\377\256\20=\377\303\274\21B\377\2\273\21A\377" \ + "\37\3\13\377\237\0\0\0\377\1\0\0\0u\377\0\0\0\0\202\0\0\0\0\2\0\0\0\22" \ + "\0\0\0\372\226\0\0\0\377\1\40\3\13\377\302\274\21B\377\2\253\17<\377" \ + "'\4\16\377\301\0\0\0\377\2\32\2\11\377\234\16""7\377\376\274\21B\377" \ + "\2r\12(\377\1\0\0\377\263\0\0\0\377\2'\4\16\377\254\20<\377\303\274\21" \ + "B\377\1q\12(\377\237\0\0\0\377\1\0\0\0\314\377\0\0\0\0\202\0\0\0\0\1" \ + "\0\0\0b\227\0\0\0\377\1i\12%\377\301\274\21B\377\2\237\16""8\377\30\2" \ + "\11\377\303\0\0\0\377\2\6\1\2\377w\13*\377\374\274\21B\377\1X\10\37\377" \ + "\266\0\0\0\377\2\32\2\11\377\240\16""8\377\302\274\21B\377\2\267\21@" \ + "\377\21\2\6\377\237\0\0\0\377\1\0\0\0%\377\0\0\0\0\2\0\0\0\0\0\0\0\263" \ + "\226\0\0\0\377\2\7\1\3\377\260\20>\377\300\274\21B\377\2\220\15""2\377" \ + "\15\1\5\377\306\0\0\0\377\2R\7\35\377\272\21A\377\370\274\21B\377\2\271" \ + "\21A\377G\6\31\377\270\0\0\0\377\2\14\1\4\377\215\15""1\377\302\274\21" \ + "B\377\1Z\10\40\377\237\0\0\0\377\1\0\0\0u\377\0\0\0\0\2\0\0\0\12\0\0" \ + "\0\367\226\0\0\0\377\1D\6\30\377\300\274\21B\377\2}\13,\377\5\0\2\377" \ + "\310\0\0\0\377\2:\5\24\377\254\20<\377\366\274\21B\377\2\263\20\77\377" \ + "@\6\27\377\272\0\0\0\377\2\4\0\2\377y\13*\377\301\274\21B\377\2\244\17" \ + "9\377\1\0\1\377\236\0\0\0\377\1\0\0\0\303\377\0\0\0\0\1\0\0\0M\227\0" \ + "\0\0\377\1\212\14""0\377\277\274\21B\377\2r\12(\377\3\0\1\377\312\0\0" \ + "\0\377\3\13\1\4\377q\12(\377\273\21B\377\363\274\21B\377\2\221\15""3" \ + "\377\27\2\10\377\274\0\0\0\377\2\1\0\0\377^\11!\377\301\274\21B\377\1" \ + "4\5\22\377\236\0\0\0\377\2\0\0\0\374\0\0\0\24\376\0\0\0\0\1\0\0\0\230" \ + "\226\0\0\0\377\2\20\1\6\377\272\21A\377\275\274\21B\377\2\273\21A\377" \ + "R\7\35\377\316\0\0\0\377\2.\4\20\377\241\17""8\377\360\274\21B\377\3" \ + "\273\21A\377^\11!\377\3\0\1\377\277\0\0\0\377\2I\7\32\377\271\21A\377" \ + "\277\274\21B\377\1~\13,\377\237\0\0\0\377\1\0\0\0\\\376\0\0\0\0\1\0\0" \ + "\0\340\226\0\0\0\377\1L\7\33\377\275\274\21B\377\2\265\20@\377<\5\25" \ + "\377\320\0\0\0\377\3\13\1\4\377m\12&\377\271\21A\377\355\274\21B\377" \ + "\2\245\17:\3778\5\24\377\302\0\0\0\377\2\77\6\26\377\266\20@\377\276" \ + "\274\21B\377\2\267\21@\377\15\1\4\377\236\0\0\0\377\1\0\0\0\244\375\0" \ + "\0\0\0\1\0\0\0'\227\0\0\0\377\1\211\14""0\377\274\274\21B\377\2\255\20" \ + "=\377*\4\17\377\323\0\0\0\377\3\25\2\10\377q\12(\377\273\21A\377\351" \ + "\274\21B\377\3\262\20>\377R\7\35\377\4\0\1\377\304\0\0\0\377\2'\4\16" \ + "\377\253\17<\377\276\274\21B\377\1I\7\32\377\236\0\0\0\377\2\0\0\0\351" \ + "\0\0\0\1\374\0\0\0\0\1\0\0\0i\226\0\0\0\377\2\15\1\4\377\270\21A\377" \ + "\273\274\21B\377\2\245\17:\377\"\3\14\377\326\0\0\0\377\2&\3\15\377\214" \ + "\15""1\377\346\274\21B\377\3\273\21A\377q\12(\377\22\2\6\377\307\0\0" \ + "\0\377\2\30\2\11\377\237\16""8\377\275\274\21B\377\1\206\14/\377\237" \ + "\0\0\0\377\1\0\0\0,\374\0\0\0\0\1\0\0\0\252\226\0\0\0\377\1E\6\30\377" \ + "\273\274\21B\377\2\222\15""3\377\21\2\6\377\330\0\0\0\377\3\1\0\0\377" \ + "<\5\25\377\224\15""4\377\342\274\21B\377\3\273\21B\377\203\14.\377*\4" \ + "\17\377\312\0\0\0\377\2\15\1\5\377\217\15""2\377\274\274\21B\377\2\270" \ + "\21A\377\15\1\5\377\236\0\0\0\377\1\0\0\0m\373\0\0\0\0\2\0\0\0\2\0\0" \ + "\0\354\226\0\0\0\377\1|\13+\377\272\274\21B\377\2m\12&\377\3\0\1\377" \ + "\334\0\0\0\377\3$\3\15\377w\13*\377\272\21A\377\335\274\21B\377\3\266" \ + "\20@\377k\12&\377\31\2\11\377\315\0\0\0\377\2\11\1\3\377\202\14.\377" \ + "\274\274\21B\377\1C\6\30\377\236\0\0\0\377\1\0\0\0\256\373\0\0\0\0\1" \ + "\0\0\0)\226\0\0\0\377\2\1\0\1\377\256\20=\377\270\274\21B\377\2\271\21" \ + "A\377K\7\32\377\340\0\0\0\377\3\"\3\14\377y\13*\377\270\21A\377\331\274" \ + "\21B\377\3\257\20>\377k\12&\377\30\2\11\377\320\0\0\0\377\2\1\0\1\377" \ + "e\11#\377\273\274\21B\377\1\200\14-\377\236\0\0\0\377\1\0\0\0\352\373" \ + "\0\0\0\0\1\0\0\0a\226\0\0\0\377\1%\3\15\377\270\274\21B\377\2\260\20" \ + ">\3774\5\22\377\343\0\0\0\377\4\13\1\4\377E\6\30\377\204\14.\377\272" \ + "\21A\377\323\274\21B\377\4\271\21A\377}\13,\3772\5\22\377\2\0\1\377\324" \ + "\0\0\0\377\2\77\6\26\377\265\20\77\377\271\274\21B\377\2\262\20\77\377" \ + "\4\0\1\377\236\0\0\0\377\1\0\0\0$\372\0\0\0\0\1\0\0\0\230\226\0\0\0\377" \ + "\1X\10\37\377\267\274\21B\377\2\237\16""8\377\33\2\12\377\347\0\0\0\377" \ + "\3\34\3\12\377_\11!\377\243\17""9\377\317\274\21B\377\3\245\17:\377f" \ + "\11$\377\34\3\12\377\330\0\0\0\377\2#\3\14\377\247\17:\377\271\274\21" \ + "B\377\1,\4\20\377\236\0\0\0\377\1\0\0\0[\372\0\0\0\0\1\0\0\0\320\226" \ + "\0\0\0\377\1\210\14""0\377\266\274\21B\377\2\223\15""4\377\22\2\6\377" \ + "\352\0\0\0\377\5\1\0\0\377'\4\16\377^\11!\377\226\16""5\377\273\21B\377" \ + "\307\274\21B\377\4\273\21B\377\227\16""5\377]\10!\377#\3\14\377\334\0" \ + "\0\0\377\2\23\2\7\377\225\15""4\377\270\274\21B\377\1_\11!\377\236\0" \ + "\0\0\377\1\0\0\0\222\371\0\0\0\0\2\0\0\0\12\0\0\0\373\225\0\0\0\377\2" \ + "\3\0\1\377\265\20\77\377\265\274\21B\377\2m\12&\377\3\0\1\377\357\0\0" \ + "\0\377\4\22\2\6\377J\7\32\377\201\14-\377\264\20\77\377\301\274\21B\377" \ + "\4\255\20=\377\202\14.\377N\7\33\377\25\2\10\377\340\0\0\0\377\2\6\1" \ + "\2\377z\13+\377\267\274\21B\377\1\222\15""3\377\236\0\0\0\377\1\0\0\0" \ + "\310\371\0\0\0\0\1\0\0\0""8\226\0\0\0\377\1\40\3\13\377\264\274\21B\377" \ + "\2\271\21A\377K\7\32\377\364\0\0\0\377\5\4\0\2\377*\4\17\377U\10\36\377" \ + "\201\14-\377\253\17<\377\271\274\21B\377\4\241\17""8\377u\13)\377I\7" \ + "\32\377\35\3\12\377\345\0\0\0\377\2\2\0\1\377g\11$\377\266\274\21B\377" \ + "\2\270\21A\377\12\1\4\377\235\0\0\0\377\2\0\0\0\367\0\0\0\4\370\0\0\0" \ + "\0\1\0\0\0e\226\0\0\0\377\1H\7\31\377\263\274\21B\377\2\261\20>\3774" \ + "\5\22\377\372\0\0\0\377\5\33\2\12\377F\6\31\377p\12'\377\222\15""3\377" \ + "\260\20>\377\256\274\21B\377\6\270\21@\377\231\16""6\377w\13*\377V\10" \ + "\36\3773\5\22\377\20\1\6\377\353\0\0\0\377\2\77\6\26\377\265\20@\377" \ + "\265\274\21B\377\1""4\5\22\377\236\0\0\0\377\1\0\0\0(\370\0\0\0\0\1\0" \ + "\0\0\222\226\0\0\0\377\1n\12'\377\262\274\21B\377\2\241\17""8\377\"\3" \ + "\14\377\377\0\0\0\377\10\0\0\0\377\22\2\6\3771\4\21\377P\7\34\377o\12" \ + "'\377\215\15""1\377\247\17:\377\267\21@\377\240\274\21B\377\10\262\20" \ + ">\377\234\16""7\377\205\14/\377o\12'\377Z\10\40\377B\6\27\377!\3\14\377" \ + "\4\0\1\377\361\0\0\0\377\2)\4\16\377\252\17<\377\264\274\21B\377\1[\10" \ + "\40\377\236\0\0\0\377\1\0\0\0U\370\0\0\0\0\1\0\0\0\300\226\0\0\0\377" \ + "\1\226\16""5\377\261\274\21B\377\2{\13+\377\11\1\3\377\377\0\0\0\377" \ + "\211\0\0\0\377\15\15\1\5\377\37\3\13\3770\4\21\377C\6\30\377S\10\35\377" \ + "f\11$\377q\12(\377y\13*\377}\13,\377\212\14""0\377\216\15""2\377\226" \ + "\16""5\377\240\16""8\377\205\243\17""9\377\204\226\16""5\377\12\213\15" \ + "1\377\177\13-\377r\12(\377e\11#\377X\10\37\377L\7\33\377\77\6\26\377" \ + "2\5\22\377\40\3\13\377\13\1\4\377\372\0\0\0\377\2\24\2\7\377\226\16""5" \ + "\377\263\274\21B\377\1\202\14.\377\236\0\0\0\377\1\0\0\0\202\370\0\0" \ + "\0\0\1\0\0\0\353\225\0\0\0\377\2\3\0\1\377\267\21@\377\257\274\21B\377" \ + "\3\271\21A\377W\10\37\377\1\0\0\377\377\0\0\0\377\377\0\0\0\377\246\0" \ + "\0\0\377\2\12\1\3\377~\13,\377\262\274\21B\377\1\251\17;\377\236\0\0" \ + "\0\377\1\0\0\0\255\367\0\0\0\0\1\0\0\0\25\226\0\0\0\377\1\35\3\12\377" \ + "\257\274\21B\377\2\245\17:\377&\3\15\377\377\0\0\0\377\377\0\0\0\377" \ + "\252\0\0\0\377\2K\7\32\377\267\21@\377\261\274\21B\377\1\25\2\10\377" \ + "\235\0\0\0\377\1\0\0\0\326\367\0\0\0\0\1\0\0\0""8\226\0\0\0\377\1:\5" \ + "\24\377\256\274\21B\377\2\211\14""0\377\17\1\5\377\377\0\0\0\377\344" \ + "\0\0\0\377\6\4\0\1\377\23\2\7\377%\3\15\3777\5\23\377\77\6\26\377E\6" \ + "\30\377\205K\7\32\377\5\77\6\26\3775\5\23\377+\4\17\377\"\3\14\377\15" \ + "\1\5\377\267\0\0\0\377\2-\4\20\377\252\17<\377\260\274\21B\377\1:\5\24" \ + "\377\235\0\0\0\377\2\0\0\0\370\0\0\0\3\366\0\0\0\0\1\0\0\0\\\226\0\0" \ + "\0\377\1V\10\36\377\254\274\21B\377\3\273\21A\377^\11!\377\2\0\1\377" \ + "\377\0\0\0\377\337\0\0\0\377\6\13\1\4\3771\4\21\377V\10\36\377r\12(\377" \ + "\215\15""1\377\250\17;\377\220\274\21B\377\7\262\20>\377\232\16""6\377" \ + "\201\14-\377d\11#\377E\6\30\377&\3\15\377\10\1\3\377\261\0\0\0\377\2" \ + "\16\1\5\377\210\14""0\377\257\274\21B\377\1X\10\37\377\236\0\0\0\377" \ + "\1\0\0\0\37\366\0\0\0\0\1\0\0\0\200\226\0\0\0\377\1r\12(\377\253\274" \ + "\21B\377\2\257\20>\3778\5\24\377\377\0\0\0\377\335\0\0\0\377\5\23\2\7" \ + "\377E\6\30\377w\13*\377\240\16""8\377\273\21B\377\233\274\21B\377\5\271" \ + "\21A\377\231\16""6\377p\12'\377H\6\31\377\30\2\11\377\256\0\0\0\377\3" \ + "\1\0\0\377X\10\37\377\273\21A\377\255\274\21B\377\1t\13)\377\236\0\0" \ + "\0\377\1\0\0\0C\366\0\0\0\0\1\0\0\0\242\226\0\0\0\377\1\217\15""2\377" \ + "\252\274\21B\377\2\231\16""6\377\33\2\11\377\377\0\0\0\377\333\0\0\0" \ + "\377\3&\3\15\377d\11#\377\235\16""7\377\245\274\21B\377\4\241\17""9\377" \ + "o\12'\377;\5\25\377\7\1\2\377\254\0\0\0\377\2""7\5\23\377\257\20=\377" \ + "\254\274\21B\377\1\221\15""3\377\236\0\0\0\377\1\0\0\0f\366\0\0\0\0\1" \ + "\0\0\0\302\226\0\0\0\377\1\247\17;\377\251\274\21B\377\2}\13,\377\11" \ + "\1\3\377\306\0\0\0\377\5\17\1\5\377#\3\14\377-\4\20\3777\5\23\377@\6" \ + "\27\377\205K\7\32\377\6E\6\30\377\77\6\26\3776\5\23\377#\3\14\377\22" \ + "\2\6\377\3\0\1\377\377\0\0\0\377\203\0\0\0\377\3\35\3\12\377d\11#\377" \ + "\244\17:\377\253\274\21B\377\4\264\20\77\377}\13,\377@\6\27\377\10\1" \ + "\3\377\252\0\0\0\377\2\25\2\10\377\224\15""4\377\253\274\21B\377\1\256" \ + "\20=\377\236\0\0\0\377\1\0\0\0\206\366\0\0\0\0\1\0\0\0\336\225\0\0\0" \ + "\377\2\1\0\1\377\271\21A\377\247\274\21B\377\2\264\20\77\377E\6\30\377" \ + "\301\0\0\0\377\7\12\1\3\377)\4\16\377H\7\31\377f\11$\377\203\14.\377" \ + "\234\16""7\377\264\20\77\377\217\274\21B\377\7\273\21B\377\246\17:\377" \ + "\213\15""1\377o\12'\377S\7\35\377.\4\20\377\11\1\3\377\371\0\0\0\377" \ + "\4\5\0\2\377E\6\30\377\217\15""2\377\273\21B\377\260\274\21B\377\4\264" \ + "\20\77\377w\13*\3773\5\22\377\1\0\1\377\250\0\0\0\377\2\5\0\2\377k\12" \ + "&\377\253\274\21B\377\1\16\1\5\377\235\0\0\0\377\1\0\0\0\241\365\0\0" \ + "\0\0\2\0\0\0\1\0\0\0\370\225\0\0\0\377\1\17\1\5\377\247\274\21B\377\2" \ + "\231\16""6\377\35\3\12\377\276\0\0\0\377\5\34\3\12\377J\7\32\377t\12" \ + ")\377\234\16""7\377\273\21A\377\233\274\21B\377\5\272\21A\377\234\16" \ + "7\377r\12(\377A\6\27\377\20\1\6\377\363\0\0\0\377\3\14\1\4\377X\10\37" \ + "\377\252\17<\377\266\274\21B\377\3\250\17;\377^\11!\377\22\2\6\377\250" \ + "\0\0\0\377\2O\7\34\377\270\21@\377\251\274\21B\377\1&\3\15\377\235\0" \ + "\0\0\377\1\0\0\0\274\365\0\0\0\0\1\0\0\0\25\226\0\0\0\377\1\"\3\14\377" \ + "\246\274\21B\377\2k\12&\377\6\1\2\377\273\0\0\0\377\4\12\1\3\377\77\6" \ + "\26\377r\12(\377\245\17:\377\244\274\21B\377\4\273\21B\377\231\16""6" \ + "\377^\11!\377!\3\14\377\356\0\0\0\377\3\14\1\4\377b\11\"\377\262\20\77" \ + "\377\272\274\21B\377\3\270\21@\377z\13+\377)\4\16\377\247\0\0\0\377\2" \ + "\37\3\13\377\234\16""7\377\250\274\21B\377\1""9\5\24\377\235\0\0\0\377" \ + "\1\0\0\0\327\365\0\0\0\0\1\0\0\0""0\226\0\0\0\377\1""4\5\22\377\244\274" \ + "\21B\377\2\257\20>\377<\5\25\377\272\0\0\0\377\4\14\1\4\377E\6\30\377" \ + "\202\14.\377\266\20@\377\253\274\21B\377\3\240\16""8\377_\11!\377\30" \ + "\2\10\377\351\0\0\0\377\3\7\1\3\377X\10\37\377\257\20=\377\277\274\21" \ + "B\377\3\216\15""2\3777\5\23\377\1\0\0\377\245\0\0\0\377\2\7\1\2\377q" \ + "\12(\377\247\274\21B\377\1K\7\32\377\235\0\0\0\377\1\0\0\0\362\365\0" \ + "\0\0\0\1\0\0\0I\226\0\0\0\377\1E\6\30\377\243\274\21B\377\2\224\15""4" \ + "\377\35\3\12\377\270\0\0\0\377\4\4\0\1\3778\5\24\377}\13,\377\266\20" \ + "@\377\260\274\21B\377\4\273\21A\377\210\14""0\377\77\6\26\377\3\0\1\377" \ + "\345\0\0\0\377\2""7\5\23\377\245\17:\377\303\274\21B\377\3\232\16""6" \ + "\377=\6\25\377\1\0\0\377\245\0\0\0\377\2E\6\30\377\263\20\77\377\245" \ + "\274\21B\377\1^\10!\377\236\0\0\0\377\1\0\0\0\13\364\0\0\0\0\1\0\0\0" \ + "\\\226\0\0\0\377\1S\10\35\377\241\274\21B\377\3\271\21A\377^\10!\377" \ + "\3\0\1\377\267\0\0\0\377\3\27\2\10\377d\11#\377\254\20<\377\266\274\21" \ + "B\377\3\244\17:\377Q\7\34\377\10\1\3\377\341\0\0\0\377\2\23\2\7\377~" \ + "\13,\377\307\274\21B\377\2\224\15""4\3771\4\21\377\245\0\0\0\377\2\35" \ + "\3\12\377\231\16""6\377\244\274\21B\377\1o\12'\377\236\0\0\0\377\1\0" \ + "\0\0\36\364\0\0\0\0\1\0\0\0n\226\0\0\0\377\1\\\10\40\377\240\274\21B" \ + "\377\2\230\16""5\377\40\3\13\377\267\0\0\0\377\3""0\4\21\377\200\14-" \ + "\377\272\21A\377\272\274\21B\377\3\257\20=\377Z\10\40\377\10\1\3\377" \ + "\336\0\0\0\377\2B\6\27\377\260\20>\377\312\274\21B\377\2\210\14""0\377" \ + "\35\3\12\377\244\0\0\0\377\3\10\1\3\377o\12'\377\273\21B\377\242\274" \ + "\21B\377\1\201\14-\377\236\0\0\0\377\1\0\0\0""1\364\0\0\0\0\1\0\0\0\200" \ + "\226\0\0\0\377\1d\11#\377\236\274\21B\377\3\273\21B\377l\12&\377\7\1" \ + "\2\377\265\0\0\0\377\3\1\0\1\377=\6\25\377\225\15""4\377\277\274\21B" \ + "\377\3\253\17<\377P\7\34\377\4\0\2\377\332\0\0\0\377\2\23\2\7\377\207" \ + "\14/\377\315\274\21B\377\3\273\21A\377w\13*\377\16\1\5\377\244\0\0\0" \ + "\377\2""6\5\23\377\252\17<\377\241\274\21B\377\1\217\15""2\377\236\0" \ + "\0\0\377\1\0\0\0D\364\0\0\0\0\1\0\0\0\223\226\0\0\0\377\1l\12&\377\235" \ + "\274\21B\377\2\236\16""7\377)\4\16\377\265\0\0\0\377\3\1\0\1\377E\6\30" \ + "\377\240\16""8\377\303\274\21B\377\2\237\16""8\377/\4\21\377\330\0\0" \ + "\0\377\2(\4\16\377\247\17;\377\320\274\21B\377\2\250\17;\377<\5\25\377" \ + "\244\0\0\0\377\2\12\1\4\377q\12(\377\240\274\21B\377\1\230\16""5\377" \ + "\236\0\0\0\377\1\0\0\0W\364\0\0\0\0\1\0\0\0\245\226\0\0\0\377\1u\13)" \ + "\377\233\274\21B\377\3\270\21A\377^\11!\377\6\1\2\377\265\0\0\0\377\2" \ + ":\5\24\377\234\16""7\377\306\274\21B\377\3\273\21B\377v\13)\377\17\1" \ + "\5\377\325\0\0\0\377\2X\10\37\377\271\21A\377\323\274\21B\377\2\206\14" \ + "/\377\26\2\10\377\244\0\0\0\377\2C\6\30\377\260\20>\377\236\274\21B\377" \ + "\1\240\16""8\377\236\0\0\0\377\1\0\0\0i\364\0\0\0\0\1\0\0\0\262\226\0" \ + "\0\0\377\1}\13,\377\232\274\21B\377\2\230\16""5\377#\3\14\377\265\0\0" \ + "\0\377\2%\3\15\377\221\15""3\377\312\274\21B\377\2\254\20<\377:\5\24" \ + "\377\322\0\0\0\377\2\2\0\1\377l\12&\377\326\274\21B\377\2\257\20=\377" \ + "D\6\30\377\244\0\0\0\377\2\20\1\6\377w\13*\377\235\274\21B\377\1\251" \ + "\17;\377\236\0\0\0\377\1\0\0\0w\364\0\0\0\0\1\0\0\0\275\226\0\0\0\377" \ + "\1\202\14.\377\230\274\21B\377\3\270\21A\377c\11#\377\7\1\2\377\264\0" \ + "\0\0\377\3\21\2\6\377w\13*\377\273\21B\377\315\274\21B\377\2}\13,\377" \ + "\15\1\5\377\317\0\0\0\377\2\12\1\3\377\211\14""0\377\331\274\21B\377" \ + "\2\201\14-\377\16\1\5\377\244\0\0\0\377\2""8\5\24\377\251\17;\377\233" \ + "\274\21B\377\1\261\20>\377\236\0\0\0\377\1\0\0\0\201\364\0\0\0\0\1\0" \ + "\0\0\310\226\0\0\0\377\1\201\14-\377\227\274\21B\377\2\210\14""0\377" \ + "\32\2\11\377\265\0\0\0\377\2F\6\31\377\255\20=\377\320\274\21B\377\2" \ + "\241\17""8\377\40\3\13\377\315\0\0\0\377\2\15\1\4\377\217\15""2\377\333" \ + "\274\21B\377\2\244\17""9\377*\4\17\377\244\0\0\0\377\2\14\1\4\377q\12" \ + "(\377\232\274\21B\377\1\271\21A\377\236\0\0\0\377\1\0\0\0\214\364\0\0" \ + "\0\0\1\0\0\0\322\226\0\0\0\377\1\200\14-\377\225\274\21B\377\2\247\17" \ + ";\3779\5\24\377\265\0\0\0\377\2\35\3\12\377\221\15""3\377\323\274\21" \ + "B\377\2\266\20@\377G\6\31\377\313\0\0\0\377\2\22\2\6\377\237\16""8\377" \ + "\335\274\21B\377\3\272\21A\377^\11!\377\1\0\1\377\244\0\0\0\377\2>\6" \ + "\26\377\251\17;\377\231\274\21B\377\1\2\0\1\377\235\0\0\0\377\1\0\0\0" \ + "\226\364\0\0\0\0\1\0\0\0\335\226\0\0\0\377\1\177\13-\377\223\274\21B" \ + "\377\3\271\21A\377o\12'\377\17\1\5\377\264\0\0\0\377\3\1\0\0\377P\7\34" \ + "\377\263\20\77\377\325\274\21B\377\3\273\21B\377_\11!\377\1\0\0\377\310" \ + "\0\0\0\377\2\17\1\5\377\232\16""6\377\340\274\21B\377\2\204\14.\377\14" \ + "\1\4\377\244\0\0\0\377\3\7\1\2\377^\11!\377\270\21@\377\227\274\21B\377" \ + "\1\1\0\0\377\235\0\0\0\377\1\0\0\0\241\364\0\0\0\0\1\0\0\0\346\226\0" \ + "\0\0\377\1}\13,\377\221\274\21B\377\3\273\21B\377w\13*\377\26\2\10\377" \ + "\265\0\0\0\377\2\24\2\7\377\214\15""1\377\331\274\21B\377\2\177\13-\377" \ + "\6\1\2\377\306\0\0\0\377\2\12\1\4\377\226\16""5\377\342\274\21B\377\2" \ + "\235\16""7\377\32\2\11\377\245\0\0\0\377\2\34\3\12\377\213\15""1\377" \ + "\226\274\21B\377\236\0\0\0\377\1\0\0\0\253\364\0\0\0\0\1\0\0\0\352\226" \ + "\0\0\0\377\1}\13,\377\220\274\21B\377\2\231\16""6\3773\5\22\377\266\0" \ + "\0\0\377\2""3\5\22\377\252\17<\377\333\274\21B\377\2\205\14/\377\10\1" \ + "\3\377\304\0\0\0\377\2\6\1\2\377\216\15""2\377\344\274\21B\377\2\257" \ + "\20>\3770\4\21\377\245\0\0\0\377\3\2\0\1\377L\7\33\377\254\20<\377\223" \ + "\274\21B\377\1\273\21B\377\236\0\0\0\377\1\0\0\0\257\364\0\0\0\0\1\0" \ + "\0\0\355\226\0\0\0\377\1w\13*\377\216\274\21B\377\3\226\16""5\377;\5" \ + "\25\377\1\0\0\377\265\0\0\0\377\3\4\0\1\377k\12&\377\273\21B\377\335" \ + "\274\21B\377\2\222\15""3\377\12\1\4\377\302\0\0\0\377\2\1\0\1\377}\13" \ + ",\377\346\274\21B\377\2\270\21@\377E\6\30\377\246\0\0\0\377\3\7\1\3\377" \ + "X\10\37\377\262\20\77\377\221\274\21B\377\1\273\21A\377\236\0\0\0\377" \ + "\1\0\0\0\262\364\0\0\0\0\1\0\0\0\360\226\0\0\0\377\1Y\10\37\377\214\274" \ + "\21B\377\2\220\15""2\3777\5\23\377\267\0\0\0\377\2\22\2\6\377\216\15" \ + "2\377\340\274\21B\377\2\222\15""3\377\12\1\4\377\301\0\0\0\377\1^\10" \ + "!\377\350\274\21B\377\2\273\21B\377S\10\35\377\247\0\0\0\377\3\30\2\10" \ + "\377{\13+\377\273\21A\377\217\274\21B\377\1\272\21A\377\236\0\0\0\377" \ + "\1\0\0\0\265\364\0\0\0\0\1\0\0\0\362\226\0\0\0\377\2\26\2\10\377\264" \ + "\20\77\377\210\274\21B\377\3\261\20>\377m\12&\377!\3\14\377\270\0\0\0" \ + "\377\2#\3\14\377\244\17:\377\342\274\21B\377\2\214\15""1\377\6\1\2\377" \ + "\277\0\0\0\377\2>\6\26\377\273\21B\377\352\274\21B\377\2l\12&\377\1\0" \ + "\0\377\247\0\0\0\377\3\37\3\13\377z\13+\377\272\21A\377\215\274\21B\377" \ + "\1\265\20\77\377\236\0\0\0\377\1\0\0\0\270\364\0\0\0\0\1\0\0\0\365\227" \ + "\0\0\0\377\2.\4\20\377\242\17""9\377\204\274\21B\377\4\247\17;\377s\12" \ + "(\377\77\6\26\377\7\1\3\377\271\0\0\0\377\2:\5\24\377\265\20\77\377\344" \ + "\274\21B\377\2\204\14.\377\3\0\1\377\275\0\0\0\377\2\37\3\13\377\263" \ + "\20\77\377\354\274\21B\377\2w\13*\377\3\0\1\377\250\0\0\0\377\3\33\2" \ + "\12\377t\13)\377\267\21@\377\213\274\21B\377\1\225\15""4\377\236\0\0" \ + "\0\377\1\0\0\0\274\363\0\0\0\0\2\0\0\0\12\0\0\0\372\230\0\0\0\377\5\1" \ + "\0\0\377!\3\14\3772\5\22\377*\4\17\377\26\2\10\377\274\0\0\0\377\2^\11" \ + "!\377\273\21B\377\346\274\21B\377\1q\12(\377\274\0\0\0\377\2\4\0\2\377" \ + "\227\16""5\377\356\274\21B\377\2s\12(\377\1\0\0\377\251\0\0\0\377\3\17" \ + "\1\5\377V\10\36\377\240\16""8\377\211\274\21B\377\1I\7\32\377\236\0\0" \ + "\0\377\1\0\0\0\314\363\0\0\0\0\1\0\0\0\203\331\0\0\0\377\1a\11\"\377" \ + "\351\274\21B\377\1M\7\33\377\273\0\0\0\377\1f\11$\377\360\274\21B\377" \ + "\2v\13)\377\1\0\1\377\252\0\0\0\377\5\1\0\0\377-\4\20\377c\11#\377\227" \ + "\16""5\377\273\21A\377\203\274\21B\377\2\262\20\77\377Y\10\37\377\240" \ + "\0\0\0\377\1\0\0\0K\361\0\0\0\0\2\0\0\0\37\0\0\0\366\327\0\0\0\377\2" \ + "\3\0\1\377x\13*\377\352\274\21B\377\2\271\21A\377/\4\21\377\271\0\0\0" \ + "\377\2""1\4\21\377\273\21A\377\361\274\21B\377\2t\12)\377\1\0\0\377\255" \ + "\0\0\0\377\5\15\1\5\377#\3\14\3772\5\22\377*\4\17\377\7\1\3\377\241\0" \ + "\0\0\377\2\0\0\0\327\0\0\0\5\360\0\0\0\0\1\0\0\0\243\327\0\0\0\377\2" \ + "\6\1\2\377\202\14.\377\354\274\21B\377\2\254\20<\377\25\2\7\377\267\0" \ + "\0\0\377\2\6\1\2\377\241\17""8\377\363\274\21B\377\1a\11\"\377\324\0" \ + "\0\0\377\1\0\0\0k\357\0\0\0\0\2\0\0\0""6\0\0\0\376\326\0\0\0\377\2\4" \ + "\0\1\377\200\14-\377\356\274\21B\377\2\213\15""1\377\1\0\1\377\266\0" \ + "\0\0\377\1d\11#\377\365\274\21B\377\1X\10\37\377\323\0\0\0\377\2\0\0" \ + "\0\353\0\0\0\20\355\0\0\0\0\2\0\0\0\1\0\0\0\306\326\0\0\0\377\2\4\0\1" \ + "\377\201\14-\377\360\274\21B\377\1X\10\37\377\265\0\0\0\377\2#\3\14\377" \ + "\271\21A\377\365\274\21B\377\2\273\21B\377J\7\32\377\323\0\0\0\377\1" \ + "\0\0\0\212\355\0\0\0\0\1\0\0\0T\326\0\0\0\377\2\3\0\1\377\200\14-\377" \ + "\361\274\21B\377\2\270\21@\377#\3\14\377\264\0\0\0\377\1\213\15""1\377" \ + "\367\274\21B\377\2\270\21A\3772\5\22\377\322\0\0\0\377\2\0\0\0\371\0" \ + "\0\0$\353\0\0\0\0\2\0\0\0\7\0\0\0\336\326\0\0\0\377\1p\12'\377\363\274" \ + "\21B\377\2\226\16""5\377\2\0\1\377\262\0\0\0\377\1:\5\24\377\371\274" \ + "\21B\377\2\262\20\77\377\37\3\13\377\322\0\0\0\377\1\0\0\0\252\353\0" \ + "\0\0\0\1\0\0\0t\326\0\0\0\377\1l\12&\377\365\274\21B\377\1V\10\36\377" \ + "\261\0\0\0\377\2\4\0\1\377\237\16""8\377\372\274\21B\377\2\237\16""8" \ + "\377\14\1\4\377\322\0\0\0\377\1\0\0\0=\351\0\0\0\0\2\0\0\0(\0\0\0\355" \ + "\325\0\0\0\377\1X\10\37\377\366\274\21B\377\2\265\20\77\377\31\2\11\377" \ + "\260\0\0\0\377\1F\6\31\377\374\274\21B\377\2\201\14-\377\1\0\0\377\321" \ + "\0\0\0\377\2\0\0\0\312\0\0\0\22\346\0\0\0\0\3\0\0\0\6\0\0\0\210\0\0\0" \ + "\372\325\0\0\0\377\2\77\6\26\377\273\21A\377\367\274\21B\377\1}\13,\377" \ + "\257\0\0\0\377\2\3\0\1\377\242\17""9\377\375\274\21B\377\1\\\10\40\377" \ + "\322\0\0\0\377\2\0\0\0\356\0\0\0f\344\0\0\0\0\2\0\0\0""2\0\0\0\322\326" \ + "\0\0\0\377\2(\4\16\377\266\20@\377\371\274\21B\377\1,\4\20\377\256\0" \ + "\0\0\377\1@\6\27\377\376\274\21B\377\2\273\21A\3774\5\22\377\323\0\0" \ + "\0\377\2\0\0\0\263\0\0\0\32\341\0\0\0\0\2\0\0\0j\0\0\0\367\326\0\0\0" \ + "\377\2\24\2\7\377\252\17<\377\372\274\21B\377\2\223\15""4\377\1\0\0\377" \ + "\255\0\0\0\377\1\226\16""5\377\377\274\21B\377\2\252\17<\377\21\2\6\377" \ + "\323\0\0\0\377\2\0\0\0\344\0\0\0A\336\0\0\0\0\2\0\0\0\31\0\0\0\273\327" \ + "\0\0\0\377\2\3\0\1\377\215\15""1\377\374\274\21B\377\1""7\5\23\377\254" \ + "\0\0\0\377\1+\4\17\377\377\274\21B\377\202\274\21B\377\2\210\14""0\377" \ + "\1\0\0\377\323\0\0\0\377\3\0\0\0\376\0\0\0\221\0\0\0\6\333\0\0\0\0\2" \ + "\0\0\0<\0\0\0\342\330\0\0\0\377\1k\12&\377\375\274\21B\377\1\225\15""4" \ + "\377\254\0\0\0\377\1}\13,\377\377\274\21B\377\203\274\21B\377\1S\10\35" \ + "\377\325\0\0\0\377\2\0\0\0\305\0\0\0\35\331\0\0\0\0\2\0\0\0w\0\0\0\374" \ + "\330\0\0\0\377\1C\6\30\377\377\274\21B\377\1""1\4\21\377\252\0\0\0\377" \ + "\2\24\2\7\377\271\21A\377\377\274\21B\377\203\274\21B\377\2\267\21@\377" \ + "!\3\14\377\325\0\0\0\377\2\0\0\0\355\0\0\0B\326\0\0\0\0\2\0\0\0\5\0\0" \ + "\0\232\331\0\0\0\377\2\31\2\11\377\260\20>\377\377\274\21B\377\1\210" \ + "\14""0\377\252\0\0\0\377\1V\10\36\377\377\274\21B\377\205\274\21B\377" \ + "\2\223\15""4\377\3\0\1\377\325\0\0\0\377\2\0\0\0\373\0\0\0k\324\0\0\0" \ + "\0\2\0\0\0\15\0\0\0\266\331\0\0\0\377\2\3\0\1\377\225\15""4\377\377\274" \ + "\21B\377\3\274\21B\377\273\21B\377\35\3\12\377\251\0\0\0\377\1\235\16" \ + "7\377\377\274\21B\377\206\274\21B\377\1X\10\37\377\327\0\0\0\377\2\0" \ + "\0\0\206\0\0\0\1\321\0\0\0\0\2\0\0\0\33\0\0\0\325\332\0\0\0\377\1a\11" \ + "\"\377\377\274\21B\377\203\274\21B\377\1l\12&\377\250\0\0\0\377\1#\3" \ + "\14\377\377\274\21B\377\207\274\21B\377\2\265\20@\377\33\2\11\377\327" \ + "\0\0\0\377\2\0\0\0\256\0\0\0\7\317\0\0\0\0\2\0\0\0$\0\0\0\336\332\0\0" \ + "\0\377\2)\4\16\377\271\21A\377\377\274\21B\377\203\274\21B\377\2\262" \ + "\20\77\377\12\1\4\377\247\0\0\0\377\1b\11\"\377\377\274\21B\377\210\274" \ + "\21B\377\1\205\14/\377\330\0\0\0\377\2\0\0\0\275\0\0\0\15\315\0\0\0\0" \ + "\2\0\0\0(\0\0\0\342\332\0\0\0\377\2\6\1\2\377\235\16""7\377\377\274\21" \ + "B\377\205\274\21B\377\1F\6\31\377\247\0\0\0\377\1\234\16""7\377\377\274" \ + "\21B\377\211\274\21B\377\1\77\6\26\377\330\0\0\0\377\2\0\0\0\277\0\0" \ + "\0\16\313\0\0\0\0\2\0\0\0-\0\0\0\353\333\0\0\0\377\1e\11#\377\377\274" \ + "\21B\377\206\274\21B\377\1\214\15""1\377\246\0\0\0\377\1\33\2\11\377" \ + "\377\274\21B\377\212\274\21B\377\2\250\17;\377\11\1\3\377\330\0\0\0\377" \ + "\2\0\0\0\317\0\0\0\22\311\0\0\0\0\2\0\0\0+\0\0\0\352\333\0\0\0\377\2" \ + "%\3\15\377\271\21A\377\377\274\21B\377\206\274\21B\377\2\273\21A\377" \ + "\25\2\10\377\245\0\0\0\377\1R\7\35\377\377\274\21B\377\213\274\21B\377" \ + "\1a\11\"\377\253\0\0\0\377\5\25\2\7\3776\5\23\377\77\6\26\3775\5\23\377" \ + "\31\2\11\377\251\0\0\0\377\2\0\0\0\310\0\0\0\16\307\0\0\0\0\2\0\0\0)" \ + "\0\0\0\351\333\0\0\0\377\2\1\0\1\377\222\15""3\377\377\274\21B\377\210" \ + "\274\21B\377\1T\10\36\377\245\0\0\0\377\1\204\14.\377\377\274\21B\377" \ + "\213\274\21B\377\2\264\20\77\377\25\2\7\377\247\0\0\0\377\3\1\0\1\377" \ + "C\6\30\377\226\16""5\377\205\274\21B\377\3\254\20<\377J\7\32\377\1\0" \ + "\1\377\247\0\0\0\377\2\0\0\0\306\0\0\0\15\305\0\0\0\0\2\0\0\0\33\0\0" \ + "\0\337\243\0\0\0\377\6\7\1\2\377(\4\16\377:\5\24\377=\6\25\377+\4\17" \ + "\377\5\0\2\377\263\0\0\0\377\1N\7\33\377\377\274\21B\377\211\274\21B" \ + "\377\1\216\15""2\377\244\0\0\0\377\2\2\0\1\377\260\20>\377\377\274\21" \ + "B\377\214\274\21B\377\1v\13)\377\246\0\0\0\377\2\30\2\10\377\220\15""2" \ + "\377\211\274\21B\377\2\223\15""4\377#\3\14\377\247\0\0\0\377\2\0\0\0" \ + "\270\0\0\0\5\303\0\0\0\0\2\0\0\0\22\0\0\0\326\242\0\0\0\377\3\22\2\6" \ + "\377z\13+\377\271\21A\377\204\274\21B\377\3\264\20\77\377u\13)\377\35" \ + "\3\12\377\260\0\0\0\377\2\17\1\5\377\260\20>\377\377\274\21B\377\211" \ + "\274\21B\377\2\272\21A\377\17\1\5\377\243\0\0\0\377\1&\3\15\377\377\274" \ + "\21B\377\215\274\21B\377\2\273\21A\377\"\3\14\377\244\0\0\0\377\2(\4" \ + "\16\377\255\20=\377\213\274\21B\377\3\271\21A\377j\12%\377\12\1\4\377" \ + "\246\0\0\0\377\2\0\0\0\251\0\0\0\2\301\0\0\0\0\2\0\0\0\10\0\0\0\302\241" \ + "\0\0\0\377\3\2\0\1\377Q\7\34\377\261\20>\377\210\274\21B\377\3\267\21" \ + "@\377Z\10\40\377\1\0\1\377\256\0\0\0\377\1o\12'\377\377\274\21B\377\213" \ + "\274\21B\377\1C\6\30\377\243\0\0\0\377\1S\7\35\377\377\274\21B\377\216" \ + "\274\21B\377\1|\13+\377\243\0\0\0\377\2\33\2\11\377\255\20=\377\216\274" \ + "\21B\377\2\251\17;\377:\5\24\377\246\0\0\0\377\1\0\0\0\212\300\0\0\0" \ + "\0\2\0\0\0\2\0\0\0\251\241\0\0\0\377\2)\4\16\377\230\16""5\377\214\274" \ + "\21B\377\2\201\14-\377\4\0\2\377\254\0\0\0\377\2\37\3\13\377\271\21A" \ + "\377\377\274\21B\377\213\274\21B\377\1v\13)\377\243\0\0\0\377\1|\13+" \ + "\377\377\274\21B\377\216\274\21B\377\2\273\21B\377'\4\16\377\241\0\0" \ + "\0\377\2\7\1\2\377\234\16""7\377\221\274\21B\377\2}\13,\377\14\1\4\377" \ + "\245\0\0\0\377\1\0\0\0n\277\0\0\0\0\1\0\0\0~\240\0\0\0\377\3\10\1\3\377" \ + "o\12'\377\273\21A\377\216\274\21B\377\1x\13*\377\254\0\0\0\377\1\205" \ + "\14/\377\377\274\21B\377\214\274\21B\377\1\244\17""9\377\243\0\0\0\377" \ + "\1\240\16""8\377\377\274\21B\377\217\274\21B\377\1~\13,\377\241\0\0\0" \ + "\377\1\\\10\40\377\223\274\21B\377\2\236\16""7\377$\3\15\377\244\0\0" \ + "\0\377\2\0\0\0\373\0\0\0E\275\0\0\0\0\2\0\0\0U\0\0\0\376\237\0\0\0\377" \ + "\2-\4\20\377\245\17:\377\221\274\21B\377\1O\7\34\377\252\0\0\0\377\1" \ + "/\4\21\377\377\274\21B\377\216\274\21B\377\1\30\2\10\377\241\0\0\0\377" \ + "\2\14\1\4\377\273\21B\377\377\274\21B\377\217\274\21B\377\2\273\21B\377" \ + "\40\3\13\377\237\0\0\0\377\2\26\2\10\377\265\20@\377\224\274\21B\377" \ + "\3\267\21@\377V\10\36\377\1\0\1\377\243\0\0\0\377\2\0\0\0\357\0\0\0$" \ + "\273\0\0\0\0\2\0\0\0+\0\0\0\363\236\0\0\0\377\3\1\0\1\377X\10\37\377" \ + "\270\21A\377\222\274\21B\377\2\263\20\77\377\25\2\7\377\251\0\0\0\377" \ + "\1\213\15""1\377\377\274\21B\377\216\274\21B\377\1D\6\30\377\241\0\0" \ + "\0\377\1,\4\20\377\377\274\21B\377\221\274\21B\377\1r\12(\377\237\0\0" \ + "\0\377\1i\11%\377\227\274\21B\377\2\203\14.\377\12\1\4\377\243\0\0\0" \ + "\377\2\0\0\0\327\0\0\0\16\271\0\0\0\0\2\0\0\0\17\0\0\0\331\236\0\0\0" \ + "\377\2\25\2\10\377\214\15""1\377\225\274\21B\377\1{\13+\377\250\0\0\0" \ + "\377\1""4\5\22\377\377\274\21B\377\217\274\21B\377\1m\12&\377\241\0\0" \ + "\0\377\1J\7\32\377\377\274\21B\377\221\274\21B\377\2\270\21A\377\26\2" \ + "\10\377\235\0\0\0\377\2\14\1\4\377\263\20\77\377\230\274\21B\377\2\242" \ + "\17""9\377\40\3\13\377\243\0\0\0\377\2\0\0\0\256\0\0\0\1\270\0\0\0\0" \ + "\1\0\0\0\247\236\0\0\0\377\2""0\4\21\377\255\20=\377\226\274\21B\377" \ + "\2\272\21A\377\32\2\11\377\247\0\0\0\377\1\216\15""2\377\377\274\21B" \ + "\377\217\274\21B\377\1\221\15""3\377\241\0\0\0\377\1d\11#\377\377\274" \ + "\21B\377\222\274\21B\377\1a\11\"\377\235\0\0\0\377\1U\10\36\377\232\274" \ + "\21B\377\2\262\20\77\377;\5\25\377\243\0\0\0\377\1\0\0\0k\267\0\0\0\0" \ + "\1\0\0\0h\236\0\0\0\377\2X\10\37\377\272\21A\377\230\274\21B\377\1m\12" \ + "&\377\246\0\0\0\377\1-\4\20\377\377\274\21B\377\220\274\21B\377\2\265" \ + "\20@\377\3\0\1\377\240\0\0\0\377\1\200\14-\377\377\274\21B\377\222\274" \ + "\21B\377\2\255\20=\377\6\1\2\377\234\0\0\0\377\1\237\16""8\377\233\274" \ + "\21B\377\2\271\21A\377S\7\35\377\242\0\0\0\377\2\0\0\0\372\0\0\0""7\265" \ + "\0\0\0\0\2\0\0\0.\0\0\0\367\234\0\0\0\377\2\7\1\3\377{\13+\377\232\274" \ + "\21B\377\2\265\20\77\377\16\1\5\377\245\0\0\0\377\1\201\14-\377\377\274" \ + "\21B\377\221\274\21B\377\1\36\3\13\377\240\0\0\0\377\1\227\16""5\377" \ + "\377\274\21B\377\223\274\21B\377\1@\6\27\377\233\0\0\0\377\1\"\3\14\377" \ + "\236\274\21B\377\2o\12'\377\1\0\1\377\241\0\0\0\377\2\0\0\0\333\0\0\0" \ + "\15\263\0\0\0\0\2\0\0\0\11\0\0\0\324\234\0\0\0\377\2\20\1\6\377\220\15" \ + "2\377\234\274\21B\377\1O\7\34\377\244\0\0\0\377\2\40\3\13\377\273\21" \ + "B\377\377\274\21B\377\221\274\21B\377\1<\5\25\377\240\0\0\0\377\1\253" \ + "\17<\377\377\274\21B\377\223\274\21B\377\1\220\15""2\377\233\0\0\0\377" \ + "\1]\10!\377\237\274\21B\377\2z\13+\377\4\0\1\377\241\0\0\0\377\1\0\0" \ + "\0\237\263\0\0\0\0\1\0\0\0\214\234\0\0\0\377\2\33\2\12\377\245\17:\377" \ + "\235\274\21B\377\1\215\15""1\377\244\0\0\0\377\1p\12'\377\377\274\21" \ + "B\377\222\274\21B\377\1V\10\36\377\237\0\0\0\377\2\3\0\1\377\273\21A" \ + "\377\377\274\21B\377\223\274\21B\377\2\273\21B\377\33\2\11\377\232\0" \ + "\0\0\377\1\231\16""6\377\240\274\21B\377\2\203\14.\377\6\1\2\377\241" \ + "\0\0\0\377\1\0\0\0R\261\0\0\0\0\2\0\0\0D\0\0\0\376\233\0\0\0\377\2#\3" \ + "\14\377\253\17<\377\236\274\21B\377\2\272\21A\377\17\1\5\377\242\0\0" \ + "\0\377\2\15\1\4\377\265\20@\377\377\274\21B\377\222\274\21B\377\1r\12" \ + "(\377\237\0\0\0\377\1\25\2\7\377\377\274\21B\377\225\274\21B\377\1a\11" \ + "\"\377\231\0\0\0\377\2\24\2\7\377\273\21B\377\241\274\21B\377\2\205\14" \ + "/\377\7\1\2\377\240\0\0\0\377\2\0\0\0\354\0\0\0\27\257\0\0\0\0\2\0\0" \ + "\0\14\0\0\0\336\233\0\0\0\377\2*\4\17\377\257\20>\377\240\274\21B\377" \ + "\1G\6\31\377\242\0\0\0\377\1O\7\34\377\377\274\21B\377\223\274\21B\377" \ + "\1\213\15""1\377\237\0\0\0\377\1#\3\14\377\377\274\21B\377\225\274\21" \ + "B\377\2\241\17""9\377\1\0\0\377\230\0\0\0\377\1\77\6\26\377\243\274\21" \ + "B\377\2\213\15""1\377\6\1\2\377\240\0\0\0\377\1\0\0\0\252\257\0\0\0\0" \ + "\1\0\0\0\217\233\0\0\0\377\2+\4\17\377\260\20>\377\241\274\21B\377\1" \ + "~\13,\377\241\0\0\0\377\2\1\0\0\377\237\16""8\377\377\274\21B\377\223" \ + "\274\21B\377\1\236\16""7\377\237\0\0\0\377\1,\4\20\377\377\274\21B\377" \ + "\226\274\21B\377\1+\4\17\377\230\0\0\0\377\1h\11$\377\244\274\21B\377" \ + "\2\202\14.\377\3\0\1\377\240\0\0\0\377\1\0\0\0S\255\0\0\0\0\2\0\0\0<" \ + "\0\0\0\375\232\0\0\0\377\2-\4\20\377\265\20\77\377\242\274\21B\377\1" \ + "\254\20<\377\241\0\0\0\377\1)\4\16\377\377\274\21B\377\224\274\21B\377" \ + "\1\257\20>\377\237\0\0\0\377\1""6\5\23\377\377\274\21B\377\226\274\21" \ + "B\377\1l\12&\377\230\0\0\0\377\1\221\15""3\377\245\274\21B\377\2x\13" \ + "*\377\1\0\1\377\237\0\0\0\377\2\0\0\0\347\0\0\0\22\253\0\0\0\0\2\0\0" \ + "\0\3\0\0\0\320\232\0\0\0\377\2&\3\15\377\261\20>\377\244\274\21B\377" \ + "\1\27\2\10\377\240\0\0\0\377\1p\12'\377\377\274\21B\377\225\274\21B\377" \ + "\1\7\1\2\377\236\0\0\0\377\1\77\6\26\377\377\274\21B\377\226\274\21B" \ + "\377\1\244\17:\377\227\0\0\0\377\2\3\0\1\377\264\20\77\377\246\274\21" \ + "B\377\1f\11$\377\240\0\0\0\377\1\0\0\0\226\253\0\0\0\0\1\0\0\0q\232\0" \ + "\0\0\377\2\36\3\13\377\255\20=\377\245\274\21B\377\1@\6\27\377\237\0" \ + "\0\0\377\2\4\0\2\377\255\20=\377\377\274\21B\377\225\274\21B\377\1\25" \ + "\2\7\377\236\0\0\0\377\1E\6\30\377\377\274\21B\377\227\274\21B\377\1" \ + "%\3\15\377\226\0\0\0\377\1\40\3\13\377\250\274\21B\377\1M\7\33\377\237" \ + "\0\0\0\377\2\0\0\0\375\0\0\0""7\251\0\0\0\0\2\0\0\0\31\0\0\0\362\231" \ + "\0\0\0\377\2\24\2\7\377\244\17""9\377\246\274\21B\377\1g\11$\377\237" \ + "\0\0\0\377\1:\5\24\377\377\274\21B\377\226\274\21B\377\1\35\3\12\377" \ + "\236\0\0\0\377\1E\6\30\377\377\274\21B\377\227\274\21B\377\1^\10!\377" \ + "\226\0\0\0\377\1=\6\25\377\250\274\21B\377\2\272\21A\3776\5\23\377\237" \ + "\0\0\0\377\2\0\0\0\314\0\0\0\2\250\0\0\0\0\1\0\0\0\240\231\0\0\0\377" \ + "\2\7\1\3\377\230\16""5\377\247\274\21B\377\1\215\15""1\377\237\0\0\0" \ + "\377\1{\13+\377\377\274\21B\377\226\274\21B\377\1(\4\16\377\236\0\0\0" \ + "\377\1G\6\31\377\377\274\21B\377\227\274\21B\377\1\226\16""5\377\226" \ + "\0\0\0\377\1Y\10\37\377\251\274\21B\377\2\257\20=\377\33\2\11\377\237" \ + "\0\0\0\377\1\0\0\0d\247\0\0\0\0\2\0\0\0""5\0\0\0\375\230\0\0\0\377\2" \ + "\1\0\1\377\202\14.\377\250\274\21B\377\1\252\17<\377\236\0\0\0\377\2" \ + "\4\0\1\377\260\20>\377\377\274\21B\377\226\274\21B\377\1""1\4\21\377" \ + "\236\0\0\0\377\1H\6\31\377\377\274\21B\377\227\274\21B\377\2\272\21A" \ + "\377\15\1\5\377\225\0\0\0\377\1t\13)\377\252\274\21B\377\2\236\16""7" \ + "\377\12\1\4\377\236\0\0\0\377\2\0\0\0\347\0\0\0\16\245\0\0\0\0\2\0\0" \ + "\0\1\0\0\0\310\231\0\0\0\377\1^\10!\377\252\274\21B\377\1\12\1\3\377" \ + "\235\0\0\0\377\1""5\5\23\377\377\274\21B\377\227\274\21B\377\1""6\5\23" \ + "\377\236\0\0\0\377\1C\6\30\377\377\274\21B\377\230\274\21B\377\1\77\6" \ + "\26\377\225\0\0\0\377\1\217\15""2\377\253\274\21B\377\1w\13*\377\237" \ + "\0\0\0\377\1\0\0\0\210\245\0\0\0\0\1\0\0\0P\231\0\0\0\377\2\77\6\26\377" \ + "\273\21B\377\252\274\21B\377\1#\3\14\377\235\0\0\0\377\1m\12&\377\377" \ + "\274\21B\377\227\274\21B\377\1""7\5\23\377\236\0\0\0\377\1<\5\25\377" \ + "\377\274\21B\377\230\274\21B\377\1q\12(\377\225\0\0\0\377\1\252\17<\377" \ + "\254\274\21B\377\1\77\6\26\377\236\0\0\0\377\2\0\0\0\367\0\0\0\35\243" \ + "\0\0\0\0\2\0\0\0\4\0\0\0\330\230\0\0\0\377\2\30\2\10\377\261\20>\377" \ + "\253\274\21B\377\1>\6\26\377\235\0\0\0\377\1\246\17:\377\377\274\21B" \ + "\377\227\274\21B\377\1""7\5\23\377\236\0\0\0\377\1""4\5\22\377\377\274" \ + "\21B\377\230\274\21B\377\1\237\16""8\377\224\0\0\0\377\2\2\0\1\377\272" \ + "\21A\377\254\274\21B\377\2\261\20>\377\26\2\10\377\236\0\0\0\377\1\0" \ + "\0\0\234\243\0\0\0\0\1\0\0\0e\230\0\0\0\377\2\1\0\1\377\216\15""2\377" \ + "\254\274\21B\377\1X\10\37\377\234\0\0\0\377\1\33\2\11\377\377\274\21" \ + "B\377\230\274\21B\377\1""9\5\24\377\236\0\0\0\377\1,\4\20\377\377\274" \ + "\21B\377\230\274\21B\377\2\273\21B\377\15\1\4\377\223\0\0\0\377\1\20" \ + "\1\6\377\256\274\21B\377\2\217\15""2\377\1\0\1\377\235\0\0\0\377\2\0" \ + "\0\0\374\0\0\0+\241\0\0\0\0\2\0\0\0\7\0\0\0\341\230\0\0\0\377\1[\10\40" \ + "\377\255\274\21B\377\1j\12%\377\234\0\0\0\377\1N\7\33\377\377\274\21" \ + "B\377\230\274\21B\377\1""4\5\22\377\236\0\0\0\377\1\36\3\13\377\377\274" \ + "\21B\377\231\274\21B\377\1""7\5\23\377\223\0\0\0\377\1\40\3\13\377\257" \ + "\274\21B\377\1O\7\34\377\236\0\0\0\377\1\0\0\0\252\241\0\0\0\0\1\0\0" \ + "\0h\230\0\0\0\377\2(\4\16\377\271\21A\377\255\274\21B\377\1{\13+\377" \ + "\234\0\0\0\377\1\177\13-\377\377\274\21B\377\230\274\21B\377\1-\4\20" \ + "\377\236\0\0\0\377\1\17\1\5\377\377\274\21B\377\231\274\21B\377\1^\11" \ + "!\377\223\0\0\0\377\1""1\4\21\377\257\274\21B\377\2\265\20\77\377\30" \ + "\2\11\377\235\0\0\0\377\2\0\0\0\376\0\0\0,\237\0\0\0\0\2\0\0\0\4\0\0" \ + "\0\335\227\0\0\0\377\2\5\0\2\377\233\16""6\377\256\274\21B\377\1\213" \ + "\15""1\377\233\0\0\0\377\2\1\0\0\377\256\20=\377\377\274\21B\377\230" \ + "\274\21B\377\1&\3\15\377\236\0\0\0\377\2\1\0\1\377\271\21A\377\377\274" \ + "\21B\377\230\274\21B\377\1\203\14.\377\223\0\0\0\377\1A\6\27\377\260" \ + "\274\21B\377\1\201\14-\377\236\0\0\0\377\1\0\0\0\242\237\0\0\0\0\1\0" \ + "\0\0Y\230\0\0\0\377\1`\11\"\377\257\274\21B\377\1\234\16""7\377\233\0" \ + "\0\0\377\1\32\2\11\377\377\274\21B\377\231\274\21B\377\1\36\3\13\377" \ + "\237\0\0\0\377\1\253\17<\377\377\274\21B\377\230\274\21B\377\1\243\17" \ + "9\377\223\0\0\0\377\1O\7\34\377\261\274\21B\377\1""4\5\22\377\235\0\0" \ + "\0\377\2\0\0\0\373\0\0\0\40\235\0\0\0\0\2\0\0\0\1\0\0\0\321\227\0\0\0" \ + "\377\2\35\3\12\377\270\21@\377\257\274\21B\377\1\255\20=\377\233\0\0" \ + "\0\377\1E\6\30\377\377\274\21B\377\231\274\21B\377\1\20\1\6\377\237\0" \ + "\0\0\377\1\224\15""4\377\377\274\21B\377\230\274\21B\377\2\273\21B\377" \ + "\12\1\4\377\222\0\0\0\377\1W\10\37\377\261\274\21B\377\2\245\17:\377" \ + "\10\1\3\377\235\0\0\0\377\1\0\0\0\224\235\0\0\0\0\1\0\0\0E\230\0\0\0" \ + "\377\1\204\14.\377\260\274\21B\377\1\272\21A\377\233\0\0\0\377\1m\12" \ + "&\377\377\274\21B\377\230\274\21B\377\2\272\21A\377\2\0\1\377\237\0\0" \ + "\0\377\1}\13,\377\377\274\21B\377\231\274\21B\377\1)\4\16\377\222\0\0" \ + "\0\377\1^\11!\377\262\274\21B\377\1Z\10\40\377\235\0\0\0\377\2\0\0\0" \ + "\364\0\0\0\23\234\0\0\0\0\1\0\0\0\266\227\0\0\0\377\1>\6\26\377\262\274" \ + "\21B\377\1\6\1\2\377\232\0\0\0\377\1\223\15""4\377\377\274\21B\377\230" \ + "\274\21B\377\1\253\17<\377\240\0\0\0\377\1c\11#\377\377\274\21B\377\231" \ + "\274\21B\377\1F\6\31\377\222\0\0\0\377\1f\11$\377\262\274\21B\377\2\263" \ + "\20\77\377\17\1\5\377\235\0\0\0\377\1\0\0\0y\233\0\0\0\0\2\0\0\0&\0\0" \ + "\0\376\226\0\0\0\377\2\5\0\2\377\244\17:\377\262\274\21B\377\1\15\1\5" \ + "\377\231\0\0\0\377\2\1\0\0\377\262\20>\377\377\274\21B\377\230\274\21" \ + "B\377\1\233\16""6\377\240\0\0\0\377\1K\7\32\377\377\274\21B\377\231\274" \ + "\21B\377\1^\10!\377\222\0\0\0\377\1n\12'\377\263\274\21B\377\1e\11#\377" \ + "\235\0\0\0\377\2\0\0\0\341\0\0\0\3\232\0\0\0\0\1\0\0\0\215\227\0\0\0" \ + "\377\1T\10\36\377\263\274\21B\377\1\25\2\7\377\231\0\0\0\377\1\30\2\10" \ + "\377\377\274\21B\377\231\274\21B\377\1\205\14/\377\240\0\0\0\377\1+\4" \ + "\17\377\377\274\21B\377\231\274\21B\377\1w\13*\377\222\0\0\0\377\1u\13" \ + ")\377\263\274\21B\377\2\265\20@\377\24\2\7\377\235\0\0\0\377\1\0\0\0" \ + "O\231\0\0\0\0\2\0\0\0\13\0\0\0\357\226\0\0\0\377\2\12\1\4\377\255\20" \ + "=\377\263\274\21B\377\1\35\3\12\377\231\0\0\0\377\1""8\5\24\377\377\274" \ + "\21B\377\231\274\21B\377\1m\12&\377\240\0\0\0\377\2\14\1\4\377\273\21" \ + "B\377\377\274\21B\377\230\274\21B\377\1\216\15""2\377\222\0\0\0\377\1" \ + "{\13+\377\264\274\21B\377\1i\11%\377\235\0\0\0\377\1\0\0\0\272\231\0" \ + "\0\0\0\1\0\0\0_\227\0\0\0\377\1\\\10\40\377\264\274\21B\377\1$\3\15\377" \ + "\231\0\0\0\377\1U\10\36\377\377\274\21B\377\231\274\21B\377\1T\10\36" \ + "\377\241\0\0\0\377\1\245\17:\377\377\274\21B\377\230\274\21B\377\1\242" \ + "\17""9\377\222\0\0\0\377\1{\13+\377\264\274\21B\377\2\265\20@\377\17" \ + "\1\5\377\234\0\0\0\377\2\0\0\0\375\0\0\0#\230\0\0\0\0\1\0\0\0\304\226" \ + "\0\0\0\377\2\13\1\4\377\257\20=\377\264\274\21B\377\1*\4\17\377\231\0" \ + "\0\0\377\1l\12&\377\377\274\21B\377\231\274\21B\377\1<\5\25\377\241\0" \ + "\0\0\377\1\205\14/\377\377\274\21B\377\230\274\21B\377\1\262\20>\377" \ + "\222\0\0\0\377\1{\13+\377\265\274\21B\377\1_\11!\377\235\0\0\0\377\1" \ + "\0\0\0\206\227\0\0\0\0\2\0\0\0#\0\0\0\376\226\0\0\0\377\1[\10\40\377" \ + "\265\274\21B\377\1+\4\17\377\231\0\0\0\377\1\206\14/\377\377\274\21B" \ + "\377\231\274\21B\377\1\34\3\12\377\241\0\0\0\377\1[\10\40\377\377\274" \ + "\21B\377\231\274\21B\377\1\7\1\2\377\221\0\0\0\377\1{\13+\377\265\274" \ + "\21B\377\2\255\20=\377\7\1\2\377\234\0\0\0\377\2\0\0\0\344\0\0\0\3\226" \ + "\0\0\0\0\1\0\0\0\177\226\0\0\0\377\2\6\1\2\377\255\20=\377\265\274\21" \ + "B\377\1+\4\17\377\231\0\0\0\377\1\237\16""8\377\377\274\21B\377\230\274" \ + "\21B\377\2\265\20@\377\2\0\1\377\241\0\0\0\377\1""3\5\22\377\377\274" \ + "\21B\377\231\274\21B\377\1\26\2\10\377\221\0\0\0\377\1{\13+\377\266\274" \ + "\21B\377\1I\7\32\377\235\0\0\0\377\1\0\0\0A\225\0\0\0\0\2\0\0\0\1\0\0" \ + "\0\334\226\0\0\0\377\1H\7\31\377\266\274\21B\377\1+\4\17\377\231\0\0" \ + "\0\377\1\262\20\77\377\377\274\21B\377\230\274\21B\377\1\226\16""5\377" \ + "\242\0\0\0\377\2\12\1\3\377\272\21A\377\377\274\21B\377\230\274\21B\377" \ + "\1!\3\14\377\221\0\0\0\377\1{\13+\377\266\274\21B\377\1\231\16""6\377" \ + "\235\0\0\0\377\1\0\0\0\236\225\0\0\0\0\1\0\0\0""9\226\0\0\0\377\2\1\0" \ + "\0\377\234\16""7\377\266\274\21B\377\1+\4\17\377\230\0\0\0\377\1\5\0" \ + "\2\377\377\274\21B\377\231\274\21B\377\1u\13)\377\243\0\0\0\377\1\233" \ + "\16""6\377\377\274\21B\377\230\274\21B\377\1(\4\16\377\221\0\0\0\377" \ + "\1{\13+\377\267\274\21B\377\1)\4\16\377\234\0\0\0\377\2\0\0\0\361\0\0" \ + "\0\12\224\0\0\0\0\1\0\0\0\216\226\0\0\0\377\1/\4\21\377\267\274\21B\377" \ + "\1+\4\17\377\230\0\0\0\377\1\25\2\7\377\377\274\21B\377\231\274\21B\377" \ + "\1M\7\33\377\243\0\0\0\377\1i\12%\377\377\274\21B\377\230\274\21B\377" \ + "\1""0\4\21\377\221\0\0\0\377\1w\13*\377\267\274\21B\377\1o\12'\377\235" \ + "\0\0\0\377\1\0\0\0P\223\0\0\0\0\2\0\0\0\1\0\0\0\340\226\0\0\0\377\1{" \ + "\13+\377\267\274\21B\377\1+\4\17\377\230\0\0\0\377\1$\3\15\377\377\274" \ + "\21B\377\231\274\21B\377\1$\3\15\377\243\0\0\0\377\1:\5\24\377\377\274" \ + "\21B\377\230\274\21B\377\1""7\5\23\377\221\0\0\0\377\1p\12'\377\267\274" \ + "\21B\377\2\257\20>\377\5\0\2\377\234\0\0\0\377\1\0\0\0\242\223\0\0\0" \ + "\0\1\0\0\0""0\226\0\0\0\377\2\14\1\4\377\266\20@\377\267\274\21B\377" \ + "\1&\3\15\377\230\0\0\0\377\1/\4\21\377\377\274\21B\377\230\274\21B\377" \ + "\2\263\20\77\377\2\0\1\377\243\0\0\0\377\2\12\1\3\377\270\21A\377\377" \ + "\274\21B\377\227\274\21B\377\1""8\5\24\377\221\0\0\0\377\1i\12%\377\270" \ + "\274\21B\377\1<\5\25\377\234\0\0\0\377\2\0\0\0\355\0\0\0\4\222\0\0\0" \ + "\0\1\0\0\0\177\226\0\0\0\377\1J\7\32\377\270\274\21B\377\1\37\3\13\377" \ + "\230\0\0\0\377\1""7\5\23\377\377\274\21B\377\230\274\21B\377\1\216\15" \ + "2\377\245\0\0\0\377\1\222\15""3\377\377\274\21B\377\227\274\21B\377\1" \ + "7\5\23\377\221\0\0\0\377\1d\11#\377\270\274\21B\377\1~\13,\377\235\0" \ + "\0\0\377\1\0\0\0A\222\0\0\0\0\1\0\0\0\316\226\0\0\0\377\1\216\15""2\377" \ + "\270\274\21B\377\1\30\2\11\377\230\0\0\0\377\1\77\6\26\377\377\274\21" \ + "B\377\230\274\21B\377\1\\\10\40\377\245\0\0\0\377\1W\10\37\377\377\274" \ + "\21B\377\227\274\21B\377\1""7\5\23\377\221\0\0\0\377\1\\\10\40\377\270" \ + "\274\21B\377\2\265\20@\377\10\1\3\377\234\0\0\0\377\1\0\0\0\220\221\0" \ + "\0\0\0\2\0\0\0\33\0\0\0\376\225\0\0\0\377\2\26\2\10\377\273\21A\377\270" \ + "\274\21B\377\1\22\2\6\377\230\0\0\0\377\1F\6\31\377\377\274\21B\377\230" \ + "\274\21B\377\1+\4\17\377\245\0\0\0\377\1\35\3\12\377\377\274\21B\377" \ + "\227\274\21B\377\1""5\5\23\377\221\0\0\0\377\1V\10\36\377\271\274\21" \ + "B\377\1:\5\24\377\234\0\0\0\377\1\0\0\0\333\221\0\0\0\0\1\0\0\0_\226" \ + "\0\0\0\377\1T\10\36\377\271\274\21B\377\1\13\1\4\377\230\0\0\0\377\1" \ + "H\6\31\377\377\274\21B\377\227\274\21B\377\2\257\20>\377\2\0\1\377\246" \ + "\0\0\0\377\1\234\16""7\377\377\274\21B\377\226\274\21B\377\1,\4\20\377" \ + "\221\0\0\0\377\1N\7\33\377\271\274\21B\377\1p\12'\377\235\0\0\0\377\1" \ + "\0\0\0!\220\0\0\0\0\1\0\0\0\237\226\0\0\0\377\1\214\15""1\377\271\274" \ + "\21B\377\1\4\0\2\377\230\0\0\0\377\1F\6\31\377\377\274\21B\377\227\274" \ + "\21B\377\1\202\14.\377\247\0\0\0\377\1a\11\"\377\377\274\21B\377\226" \ + "\274\21B\377\1#\3\14\377\221\0\0\0\377\1B\6\27\377\271\274\21B\377\2" \ + "\252\17<\377\1\0\0\377\234\0\0\0\377\1\0\0\0b\220\0\0\0\0\1\0\0\0\337" \ + "\225\0\0\0\377\2\12\1\4\377\270\21@\377\270\274\21B\377\1\270\21A\377" \ + "\231\0\0\0\377\1E\6\30\377\377\274\21B\377\227\274\21B\377\1G\6\31\377" \ + "\247\0\0\0\377\2\33\2\12\377\273\21B\377\377\274\21B\377\225\274\21B" \ + "\377\1\32\2\11\377\221\0\0\0\377\1""6\5\23\377\272\274\21B\377\1$\3\15" \ + "\377\234\0\0\0\377\1\0\0\0\243\217\0\0\0\0\1\0\0\0\40\226\0\0\0\377\1" \ + "@\6\27\377\271\274\21B\377\1\255\20=\377\231\0\0\0\377\1D\6\30\377\377" \ + "\274\21B\377\226\274\21B\377\2\272\21A\377\17\1\5\377\250\0\0\0\377\1" \ + "\226\16""5\377\377\274\21B\377\225\274\21B\377\1\17\1\5\377\221\0\0\0" \ + "\377\1)\4\16\377\272\274\21B\377\1V\10\36\377\234\0\0\0\377\1\0\0\0\345" \ + "\217\0\0\0\0\1\0\0\0a\226\0\0\0\377\1v\13)\377\271\274\21B\377\1\240" \ + "\16""8\377\231\0\0\0\377\1;\5\25\377\377\274\21B\377\226\274\21B\377" \ + "\1\214\15""1\377\251\0\0\0\377\1P\7\34\377\377\274\21B\377\224\274\21" \ + "B\377\2\271\21A\377\1\0\1\377\221\0\0\0\377\1\33\2\12\377\272\274\21" \ + "B\377\1\202\14.\377\235\0\0\0\377\1\0\0\0%\216\0\0\0\0\1\0\0\0\234\226" \ + "\0\0\0\377\1\250\17;\377\271\274\21B\377\1\223\15""4\377\231\0\0\0\377" \ + "\1""2\5\22\377\377\274\21B\377\226\274\21B\377\1R\7\35\377\251\0\0\0" \ + "\377\2\21\2\6\377\270\21A\377\377\274\21B\377\223\274\21B\377\1\251\17" \ + ";\377\222\0\0\0\377\1\17\1\5\377\272\274\21B\377\2\255\20=\377\1\0\0" \ + "\377\234\0\0\0\377\1\0\0\0a\216\0\0\0\0\1\0\0\0\321\225\0\0\0\377\1\30" \ + "\2\10\377\272\274\21B\377\1\206\14/\377\231\0\0\0\377\1)\4\16\377\377" \ + "\274\21B\377\225\274\21B\377\2\270\21A\377\17\1\5\377\252\0\0\0\377\1" \ + "z\13+\377\377\274\21B\377\223\274\21B\377\1\226\16""5\377\222\0\0\0\377" \ + "\2\3\0\1\377\273\21B\377\272\274\21B\377\1\36\3\13\377\234\0\0\0\377" \ + "\1\0\0\0\226\215\0\0\0\0\2\0\0\0\13\0\0\0\374\225\0\0\0\377\1D\6\30\377" \ + "\272\274\21B\377\1z\13+\377\231\0\0\0\377\1\36\3\13\377\377\274\21B\377" \ + "\225\274\21B\377\1\207\14/\377\253\0\0\0\377\1""0\4\21\377\377\274\21" \ + "B\377\223\274\21B\377\1\203\14.\377\223\0\0\0\377\1\260\20>\377\272\274" \ + "\21B\377\1H\7\31\377\234\0\0\0\377\1\0\0\0\311\215\0\0\0\0\1\0\0\0""9" \ + "\226\0\0\0\377\1o\12'\377\272\274\21B\377\1m\12&\377\231\0\0\0\377\1" \ + "\14\1\4\377\377\274\21B\377\225\274\21B\377\1@\6\27\377\254\0\0\0\377" \ + "\1\233\16""6\377\377\274\21B\377\222\274\21B\377\1f\11$\377\223\0\0\0" \ + "\377\1\236\16""7\377\272\274\21B\377\1n\12'\377\234\0\0\0\377\2\0\0\0" \ + "\367\0\0\0\5\214\0\0\0\0\1\0\0\0m\226\0\0\0\377\1\232\16""6\377\272\274" \ + "\21B\377\1_\11!\377\232\0\0\0\377\1\266\20@\377\377\274\21B\377\223\274" \ + "\21B\377\2\262\20>\377\7\1\3\377\254\0\0\0\377\1P\7\34\377\377\274\21" \ + "B\377\222\274\21B\377\1L\7\33\377\223\0\0\0\377\1\213\15""1\377\272\274" \ + "\21B\377\1\217\15""2\377\235\0\0\0\377\1\0\0\0/\214\0\0\0\0\1\0\0\0\240" \ + "\225\0\0\0\377\2\7\1\2\377\272\21A\377\272\274\21B\377\1L\7\33\377\232" \ + "\0\0\0\377\1\244\17""9\377\377\274\21B\377\223\274\21B\377\1l\12&\377" \ + "\255\0\0\0\377\2\7\1\3\377\255\20=\377\377\274\21B\377\221\274\21B\377" \ + "\1/\4\21\377\223\0\0\0\377\1z\13+\377\272\274\21B\377\1\257\20>\377\235" \ + "\0\0\0\377\1\0\0\0c\214\0\0\0\0\1\0\0\0\313\225\0\0\0\377\1%\3\15\377" \ + "\273\274\21B\377\1:\5\24\377\232\0\0\0\377\1\220\15""2\377\377\274\21" \ + "B\377\223\274\21B\377\1!\3\14\377\256\0\0\0\377\1a\11\"\377\377\274\21" \ + "B\377\221\274\21B\377\1\21\2\6\377\223\0\0\0\377\1g\11$\377\273\274\21" \ + "B\377\1\24\2\7\377\234\0\0\0\377\1\0\0\0\216\213\0\0\0\0\2\0\0\0\1\0" \ + "\0\0\362\225\0\0\0\377\1E\6\30\377\273\274\21B\377\1(\4\16\377\232\0" \ + "\0\0\377\1t\12)\377\377\274\21B\377\222\274\21B\377\1\216\15""2\377\257" \ + "\0\0\0\377\2\16\1\5\377\264\20\77\377\377\274\21B\377\217\274\21B\377" \ + "\1\247\17;\377\224\0\0\0\377\1V\10\36\377\273\274\21B\377\1""4\5\22\377" \ + "\234\0\0\0\377\1\0\0\0\264\213\0\0\0\0\1\0\0\0\31\226\0\0\0\377\1f\11" \ + "$\377\273\274\21B\377\1\25\2\10\377\232\0\0\0\377\1Z\10\40\377\377\274" \ + "\21B\377\222\274\21B\377\1B\6\27\377\260\0\0\0\377\1o\12'\377\377\274" \ + "\21B\377\217\274\21B\377\1\204\14.\377\224\0\0\0\377\1C\6\30\377\273" \ + "\274\21B\377\1N\7\33\377\234\0\0\0\377\1\0\0\0\332\213\0\0\0\0\1\0\0" \ + "\0\77\226\0\0\0\377\1\205\14/\377\272\274\21B\377\2\273\21B\377\5\0\2" \ + "\377\232\0\0\0\377\1=\6\25\377\377\274\21B\377\221\274\21B\377\2\241" \ + "\17""9\377\2\0\1\377\260\0\0\0\377\2\25\2\7\377\266\20@\377\377\274\21" \ + "B\377\216\274\21B\377\1_\11!\377\224\0\0\0\377\1/\4\21\377\273\274\21" \ + "B\377\1c\11#\377\234\0\0\0\377\2\0\0\0\373\0\0\0\5\212\0\0\0\0\1\0\0" \ + "\0d\226\0\0\0\377\1\237\16""8\377\272\274\21B\377\1\256\20=\377\233\0" \ + "\0\0\377\1\37\3\13\377\377\274\21B\377\221\274\21B\377\1R\7\35\377\262" \ + "\0\0\0\377\1d\11#\377\377\274\21B\377\216\274\21B\377\1""3\5\22\377\224" \ + "\0\0\0\377\1\27\2\10\377\273\274\21B\377\1y\13*\377\235\0\0\0\377\1\0" \ + "\0\0'\212\0\0\0\0\1\0\0\0\210\226\0\0\0\377\1\264\20\77\377\272\274\21" \ + "B\377\1\232\16""6\377\233\0\0\0\377\2\1\0\1\377\263\20\77\377\377\274" \ + "\21B\377\217\274\21B\377\2\255\20=\377\7\1\3\377\262\0\0\0\377\2\14\1" \ + "\4\377\257\20>\377\377\274\21B\377\214\274\21B\377\2\270\21@\377\7\1" \ + "\3\377\224\0\0\0\377\2\2\0\1\377\270\21A\377\272\274\21B\377\1\216\15" \ + "2\377\235\0\0\0\377\1\0\0\0K\212\0\0\0\0\1\0\0\0\245\225\0\0\0\377\1" \ + "\16\1\5\377\273\274\21B\377\1\202\14.\377\234\0\0\0\377\1\223\15""4\377" \ + "\377\274\21B\377\217\274\21B\377\1`\11\"\377\264\0\0\0\377\1\\\10\40" \ + "\377\377\274\21B\377\214\274\21B\377\1\222\15""3\377\226\0\0\0\377\1" \ + "\244\17:\377\272\274\21B\377\1\243\17""9\377\235\0\0\0\377\1\0\0\0i\212" \ + "\0\0\0\0\1\0\0\0\275\225\0\0\0\377\1#\3\14\377\273\274\21B\377\1j\12" \ + "%\377\234\0\0\0\377\1n\12'\377\377\274\21B\377\216\274\21B\377\2\257" \ + "\20=\377\14\1\4\377\264\0\0\0\377\2\7\1\3\377\247\17;\377\377\274\21" \ + "B\377\213\274\21B\377\1b\11\"\377\226\0\0\0\377\1\214\15""1\377\272\274" \ + "\21B\377\1\263\20\77\377\235\0\0\0\377\1\0\0\0\200\212\0\0\0\0\1\0\0" \ + "\0\324\225\0\0\0\377\1""9\5\24\377\273\274\21B\377\1T\10\36\377\234\0" \ + "\0\0\377\1B\6\27\377\377\274\21B\377\216\274\21B\377\1V\10\36\377\266" \ + "\0\0\0\377\1A\6\27\377\377\274\21B\377\213\274\21B\377\1)\4\16\377\226" \ + "\0\0\0\377\1t\13)\377\272\274\21B\377\2\273\21B\377\3\0\1\377\234\0\0" \ + "\0\377\1\0\0\0\227\212\0\0\0\0\1\0\0\0\354\225\0\0\0\377\1H\6\31\377" \ + "\273\274\21B\377\1<\5\25\377\234\0\0\0\377\1\22\2\6\377\377\274\21B\377" \ + "\215\274\21B\377\2\247\17;\377\6\1\2\377\266\0\0\0\377\2\1\0\0\377\221" \ + "\15""3\377\377\274\21B\377\211\274\21B\377\2\253\17<\377\1\0\1\377\226" \ + "\0\0\0\377\1^\10!\377\273\274\21B\377\1\15\1\5\377\234\0\0\0\377\1\0" \ + "\0\0\256\211\0\0\0\0\2\0\0\0\6\0\0\0\376\225\0\0\0\377\1S\7\35\377\273" \ + "\274\21B\377\1%\3\15\377\235\0\0\0\377\1\241\17""8\377\377\274\21B\377" \ + "\214\274\21B\377\1M\7\33\377\270\0\0\0\377\2)\4\16\377\273\21A\377\377" \ + "\274\21B\377\210\274\21B\377\1w\13*\377\227\0\0\0\377\1D\6\30\377\273" \ + "\274\21B\377\1\31\2\11\377\234\0\0\0\377\1\0\0\0\306\211\0\0\0\0\1\0" \ + "\0\0\33\226\0\0\0\377\1^\10!\377\273\274\21B\377\1\15\1\5\377\235\0\0" \ + "\0\377\1q\12(\377\377\274\21B\377\213\274\21B\377\2\235\16""7\377\3\0" \ + "\1\377\271\0\0\0\377\1l\12&\377\377\274\21B\377\210\274\21B\377\1:\5" \ + "\24\377\227\0\0\0\377\1'\4\16\377\273\274\21B\377\1$\3\15\377\234\0\0" \ + "\0\377\1\0\0\0\334\211\0\0\0\0\1\0\0\0(\226\0\0\0\377\1h\11$\377\272" \ + "\274\21B\377\1\261\20>\377\236\0\0\0\377\1""8\5\24\377\377\274\21B\377" \ + "\213\274\21B\377\1""1\4\21\377\272\0\0\0\377\2\7\1\3\377\243\17""9\377" \ + "\377\274\21B\377\206\274\21B\377\2\253\17<\377\3\0\1\377\227\0\0\0\377" \ + "\2\12\1\3\377\273\21B\377\272\274\21B\377\1)\4\16\377\234\0\0\0\377\1" \ + "\0\0\0\352\211\0\0\0\0\1\0\0\0""1\226\0\0\0\377\1s\12(\377\272\274\21" \ + "B\377\1\223\15""4\377\236\0\0\0\377\2\7\1\2\377\265\20\77\377\377\274" \ + "\21B\377\211\274\21B\377\1\204\14.\377\274\0\0\0\377\1:\5\24\377\377" \ + "\274\21B\377\206\274\21B\377\1o\12'\377\231\0\0\0\377\1\251\17;\377\272" \ + "\274\21B\377\1*\4\17\377\234\0\0\0\377\1\0\0\0\363\211\0\0\0\0\1\0\0" \ + "\0:\226\0\0\0\377\1y\13*\377\272\274\21B\377\1v\13)\377\237\0\0\0\377" \ + "\1\205\14/\377\377\274\21B\377\210\274\21B\377\2\267\21@\377\35\3\12" \ + "\377\275\0\0\0\377\1w\13*\377\377\274\21B\377\205\274\21B\377\1*\4\17" \ + "\377\231\0\0\0\377\1\214\15""1\377\272\274\21B\377\1+\4\17\377\234\0" \ + "\0\0\377\1\0\0\0\374\211\0\0\0\0\1\0\0\0C\226\0\0\0\377\1z\13+\377\272" \ + "\274\21B\377\1Y\10\37\377\237\0\0\0\377\1H\7\31\377\377\274\21B\377\210" \ + "\274\21B\377\1^\11!\377\276\0\0\0\377\2\10\1\3\377\240\16""8\377\377" \ + "\274\21B\377\203\274\21B\377\1\226\16""5\377\232\0\0\0\377\1o\12'\377" \ + "\272\274\21B\377\1+\4\17\377\235\0\0\0\377\1\0\0\0\6\210\0\0\0\0\1\0" \ + "\0\0L\226\0\0\0\377\1{\13+\377\272\274\21B\377\1<\5\25\377\237\0\0\0" \ + "\377\2\12\1\3\377\265\20\77\377\377\274\21B\377\206\274\21B\377\2\231" \ + "\16""6\377\3\0\1\377\277\0\0\0\377\2&\3\15\377\270\21A\377\377\274\21" \ + "B\377\202\274\21B\377\1I\7\32\377\232\0\0\0\377\1S\10\35\377\272\274" \ + "\21B\377\1,\4\20\377\235\0\0\0\377\1\0\0\0\20\210\0\0\0\0\1\0\0\0T\226" \ + "\0\0\0\377\1}\13,\377\272\274\21B\377\1\37\3\13\377\240\0\0\0\377\1~" \ + "\13,\377\377\274\21B\377\205\274\21B\377\2\273\21B\377.\4\20\377\301" \ + "\0\0\0\377\1c\11#\377\377\274\21B\377\3\274\21B\377\261\20>\377\10\1" \ + "\3\377\232\0\0\0\377\1""4\5\22\377\272\274\21B\377\1'\4\16\377\235\0" \ + "\0\0\377\1\0\0\0\31\210\0\0\0\0\1\0\0\0S\226\0\0\0\377\1}\13,\377\271" \ + "\274\21B\377\2\272\21A\377\5\0\2\377\240\0\0\0\377\1:\5\24\377\377\274" \ + "\21B\377\205\274\21B\377\1i\12%\377\302\0\0\0\377\2\1\0\1\377\211\14" \ + "0\377\377\274\21B\377\1a\11\"\377\233\0\0\0\377\1\21\2\6\377\272\274" \ + "\21B\377\1\35\3\12\377\235\0\0\0\377\1\0\0\0\27\210\0\0\0\0\1\0\0\0N" \ + "\226\0\0\0\377\1x\13*\377\271\274\21B\377\1\237\16""8\377\241\0\0\0\377" \ + "\2\1\0\1\377\244\17""9\377\377\274\21B\377\203\274\21B\377\2\231\16""6" \ + "\377\4\0\2\377\303\0\0\0\377\2\21\2\6\377\252\17<\377\375\274\21B\377" \ + "\2\263\20\77\377\16\1\5\377\234\0\0\0\377\1\253\17<\377\271\274\21B\377" \ + "\1\25\2\7\377\235\0\0\0\377\1\0\0\0\21\210\0\0\0\0\1\0\0\0H\226\0\0\0" \ + "\377\1o\12'\377\271\274\21B\377\1|\13+\377\242\0\0\0\377\1X\10\37\377" \ + "\377\274\21B\377\202\274\21B\377\2\265\20@\377\36\3\13\377\305\0\0\0" \ + "\377\2""6\5\23\377\273\21A\377\374\274\21B\377\1m\12&\377\235\0\0\0\377" \ + "\1\211\14""0\377\271\274\21B\377\1\14\1\4\377\235\0\0\0\377\1\0\0\0\14" \ + "\210\0\0\0\0\1\0\0\0C\226\0\0\0\377\1f\11$\377\271\274\21B\377\1[\10" \ + "\40\377\242\0\0\0\377\2\21\2\6\377\267\21@\377\377\274\21B\377\2\274" \ + "\21B\377T\10\36\377\307\0\0\0\377\1\\\10\40\377\373\274\21B\377\2\266" \ + "\20@\377\26\2\10\377\235\0\0\0\377\1i\11%\377\271\274\21B\377\1\3\0\1" \ + "\377\235\0\0\0\377\1\0\0\0\6\210\0\0\0\0\1\0\0\0>\226\0\0\0\377\1^\10" \ + "!\377\271\274\21B\377\1""9\5\24\377\243\0\0\0\377\1p\12'\377\377\274" \ + "\21B\377\1\177\13-\377\311\0\0\0\377\1r\12(\377\372\274\21B\377\1b\11" \ + "\"\377\236\0\0\0\377\1F\6\31\377\270\274\21B\377\1\257\20>\377\236\0" \ + "\0\0\377\1\0\0\0\1\210\0\0\0\0\1\0\0\0""8\226\0\0\0\377\1U\10\36\377" \ + "\271\274\21B\377\1\30\2\10\377\243\0\0\0\377\2\31\2\11\377\271\21A\377" \ + "\375\274\21B\377\2\243\17""9\377\13\1\4\377\311\0\0\0\377\2\4\0\2\377" \ + "\216\15""2\377\370\274\21B\377\2\253\17<\377\12\1\3\377\236\0\0\0\377" \ + "\1%\3\15\377\270\274\21B\377\1\235\16""7\377\235\0\0\0\377\1\0\0\0\372" \ + "\211\0\0\0\0\1\0\0\0(\226\0\0\0\377\1E\6\30\377\270\274\21B\377\2\260" \ + "\20>\377\1\0\0\377\244\0\0\0\377\1}\13,\377\374\274\21B\377\2\270\21" \ + "A\377*\4\17\377\313\0\0\0\377\2\24\2\7\377\246\17:\377\367\274\21B\377" \ + "\1S\7\35\377\237\0\0\0\377\2\4\0\1\377\265\20@\377\267\274\21B\377\1" \ + "\212\14""0\377\235\0\0\0\377\1\0\0\0\351\211\0\0\0\0\1\0\0\0\24\226\0" \ + "\0\0\377\1""3\5\22\377\270\274\21B\377\1\220\15""2\377\245\0\0\0\377" \ + "\2!\3\14\377\272\21A\377\373\274\21B\377\1M\7\33\377\315\0\0\0\377\2" \ + "\32\2\11\377\253\17<\377\365\274\21B\377\2\223\15""4\377\1\0\1\377\240" \ + "\0\0\0\377\1\223\15""4\377\267\274\21B\377\1w\13*\377\235\0\0\0\377\1" \ + "\0\0\0\325\211\0\0\0\0\2\0\0\0\2\0\0\0\374\225\0\0\0\377\1\40\3\13\377" \ + "\270\274\21B\377\1i\12%\377\246\0\0\0\377\1q\12(\377\372\274\21B\377" \ + "\1h\11$\377\317\0\0\0\377\2&\3\15\377\263\20\77\377\363\274\21B\377\2" \ + "\272\21A\377&\3\15\377\241\0\0\0\377\1l\12&\377\267\274\21B\377\1d\11" \ + "#\377\235\0\0\0\377\1\0\0\0\301\212\0\0\0\0\1\0\0\0\352\225\0\0\0\377" \ + "\1\15\1\4\377\270\274\21B\377\1B\6\27\377\246\0\0\0\377\2\20\1\6\377" \ + "\262\20\77\377\370\274\21B\377\2\204\14.\377\1\0\1\377\320\0\0\0\377" \ + "\2""9\5\24\377\270\21A\377\362\274\21B\377\1o\12'\377\242\0\0\0\377\1" \ + "D\6\30\377\267\274\21B\377\1J\7\32\377\235\0\0\0\377\1\0\0\0\254\212" \ + "\0\0\0\0\1\0\0\0\326\225\0\0\0\377\2\1\0\0\377\266\20@\377\267\274\21" \ + "B\377\1\33\2\12\377\247\0\0\0\377\1`\11\"\377\367\274\21B\377\2\236\16" \ + "7\377\15\1\4\377\322\0\0\0\377\2""4\5\22\377\266\20@\377\360\274\21B" \ + "\377\2\234\16""7\377\6\1\2\377\242\0\0\0\377\1\34\3\12\377\267\274\21" \ + "B\377\1.\4\20\377\235\0\0\0\377\1\0\0\0\230\212\0\0\0\0\1\0\0\0\303\226" \ + "\0\0\0\377\1\234\16""7\377\266\274\21B\377\2\255\20=\377\1\0\0\377\247" \ + "\0\0\0\377\2\4\0\2\377\237\16""8\377\365\274\21B\377\2\244\17:\377\23" \ + "\2\7\377\324\0\0\0\377\2""5\5\23\377\266\20@\377\356\274\21B\377\2\270" \ + "\21A\377%\3\15\377\243\0\0\0\377\2\1\0\0\377\257\20>\377\266\274\21B" \ + "\377\1\20\1\6\377\235\0\0\0\377\1\0\0\0\205\212\0\0\0\0\1\0\0\0\244\226" \ + "\0\0\0\377\1\200\14-\377\266\274\21B\377\1\206\14/\377\251\0\0\0\377" \ + "\1""3\5\22\377\364\274\21B\377\2\254\20<\377\33\2\11\377\326\0\0\0\377" \ + "\2=\6\25\377\270\21@\377\355\274\21B\377\1_\11!\377\245\0\0\0\377\1\211" \ + "\14""0\377\265\274\21B\377\1\261\20>\377\236\0\0\0\377\1\0\0\0g\212\0" \ + "\0\0\0\1\0\0\0\200\226\0\0\0\377\1b\11\"\377\266\274\21B\377\1^\11!\377" \ + "\252\0\0\0\377\1~\13,\377\362\274\21B\377\2\265\20\77\377.\4\20\377\330" \ + "\0\0\0\377\2.\4\20\377\262\20>\377\353\274\21B\377\2\200\14-\377\1\0" \ + "\0\377\245\0\0\0\377\1^\10!\377\265\274\21B\377\1\223\15""4\377\236\0" \ + "\0\0\377\1\0\0\0C\212\0\0\0\0\1\0\0\0]\226\0\0\0\377\1G\6\31\377\266" \ + "\274\21B\377\1""8\5\24\377\252\0\0\0\377\2\14\1\4\377\247\17:\377\360" \ + "\274\21B\377\2\262\20\77\377+\4\17\377\332\0\0\0\377\2&\3\15\377\255" \ + "\20=\377\351\274\21B\377\2\236\16""7\377\12\1\3\377\246\0\0\0\377\1." \ + "\4\20\377\265\274\21B\377\1m\12&\377\236\0\0\0\377\1\0\0\0\37\212\0\0" \ + "\0\0\1\0\0\0""9\226\0\0\0\377\1)\4\16\377\265\274\21B\377\2\273\21A\377" \ + "\15\1\5\377\253\0\0\0\377\2""2\5\22\377\273\21B\377\356\274\21B\377\2" \ + "\262\20\77\377+\4\17\377\334\0\0\0\377\2\"\3\14\377\250\17;\377\347\274" \ + "\21B\377\2\262\20\77\377#\3\14\377\247\0\0\0\377\2\6\1\2\377\266\20@" \ + "\377\264\274\21B\377\1F\6\31\377\235\0\0\0\377\2\0\0\0\367\0\0\0\2\212" \ + "\0\0\0\0\1\0\0\0\25\226\0\0\0\377\2\6\1\2\377\270\21A\377\264\274\21" \ + "B\377\1\231\16""6\377\255\0\0\0\377\1o\12'\377\355\274\21B\377\2\264" \ + "\20\77\3771\4\21\377\336\0\0\0\377\2\22\2\6\377\225\15""4\377\345\274" \ + "\21B\377\2\267\21@\377.\4\20\377\251\0\0\0\377\1\220\15""2\377\264\274" \ + "\21B\377\1\37\3\13\377\235\0\0\0\377\1\0\0\0\326\214\0\0\0\0\1\0\0\0" \ + "\360\226\0\0\0\377\1\231\16""6\377\264\274\21B\377\1l\12&\377\255\0\0" \ + "\0\377\2\4\0\1\377\216\15""2\377\353\274\21B\377\2\255\20=\377%\3\15" \ + "\377\340\0\0\0\377\2\6\1\2\377|\13+\377\343\274\21B\377\2\273\21A\377" \ + "@\6\27\377\252\0\0\0\377\1c\11#\377\263\274\21B\377\2\262\20>\377\1\0" \ + "\1\377\235\0\0\0\377\1\0\0\0\263\214\0\0\0\0\1\0\0\0\306\226\0\0\0\377" \ + "\1r\12(\377\264\274\21B\377\1\77\6\26\377\256\0\0\0\377\2\21\2\6\377" \ + "\250\17;\377\351\274\21B\377\2\247\17:\377\35\3\12\377\342\0\0\0\377" \ + "\3\3\0\1\377f\11$\377\273\21B\377\341\274\21B\377\1V\10\36\377\253\0" \ + "\0\0\377\1""7\5\23\377\263\274\21B\377\1\215\15""1\377\236\0\0\0\377" \ + "\1\0\0\0\211\214\0\0\0\0\1\0\0\0\220\226\0\0\0\377\1K\7\32\377\264\274" \ + "\21B\377\1\22\2\6\377\257\0\0\0\377\2.\4\20\377\270\21@\377\347\274\21" \ + "B\377\2\241\17""8\377\32\2\11\377\345\0\0\0\377\2""7\5\23\377\257\20" \ + ">\377\336\274\21B\377\2\273\21B\377K\7\32\377\254\0\0\0\377\2\13\1\4" \ + "\377\271\21A\377\262\274\21B\377\1]\10!\377\236\0\0\0\377\1\0\0\0T\214" \ + "\0\0\0\0\1\0\0\0]\226\0\0\0\377\1$\3\15\377\263\274\21B\377\1\243\17" \ + "9\377\261\0\0\0\377\2""9\5\24\377\272\21A\377\345\274\21B\377\2\206\14" \ + "/\377\12\1\3\377\347\0\0\0\377\2\35\3\12\377\234\16""7\377\335\274\21" \ + "B\377\1W\10\37\377\256\0\0\0\377\1\217\15""2\377\262\274\21B\377\1+\4" \ + "\17\377\236\0\0\0\377\1\0\0\0\40\214\0\0\0\0\1\0\0\0)\226\0\0\0\377\2" \ + "\1\0\1\377\257\20=\377\262\274\21B\377\1t\12)\377\262\0\0\0\377\1M\7" \ + "\33\377\344\274\21B\377\2o\12'\377\3\0\1\377\351\0\0\0\377\3\4\0\1\377" \ + "^\11!\377\273\21A\377\331\274\21B\377\2\270\21@\377D\6\30\377\257\0\0" \ + "\0\377\1[\10\40\377\261\274\21B\377\2\262\20\77\377\3\0\1\377\235\0\0" \ + "\0\377\1\0\0\0\354\215\0\0\0\0\2\0\0\0\2\0\0\0\361\226\0\0\0\377\1}\13" \ + ",\377\262\274\21B\377\1>\6\26\377\263\0\0\0\377\1d\11#\377\341\274\21" \ + "B\377\3\272\21A\377Z\10\40\377\1\0\0\377\354\0\0\0\377\2""2\5\22\377" \ + "\251\17;\377\327\274\21B\377\2\262\20>\3771\4\21\377\260\0\0\0\377\1" \ + "&\3\15\377\261\274\21B\377\1\207\14/\377\236\0\0\0\377\1\0\0\0\270\216" \ + "\0\0\0\0\1\0\0\0\300\226\0\0\0\377\1M\7\33\377\261\274\21B\377\2\271" \ + "\21A\377\14\1\4\377\264\0\0\0\377\1^\11!\377\337\274\21B\377\2\252\17" \ + "<\377,\4\20\377\357\0\0\0\377\2\22\2\6\377\200\14-\377\325\274\21B\377" \ + "\2\247\17:\377(\4\16\377\261\0\0\0\377\2\2\0\1\377\256\20=\377\260\274" \ + "\21B\377\1S\7\35\377\236\0\0\0\377\1\0\0\0\205\216\0\0\0\0\1\0\0\0\211" \ + "\226\0\0\0\377\1\35\3\12\377\261\274\21B\377\1\222\15""3\377\266\0\0" \ + "\0\377\1e\11#\377\335\274\21B\377\2\223\15""4\377\26\2\10\377\362\0\0" \ + "\0\377\2""6\5\23\377\246\17:\377\322\274\21B\377\2\200\14-\377\12\1\4" \ + "\377\263\0\0\0\377\1z\13+\377\257\274\21B\377\2\273\21B\377\24\2\7\377" \ + "\236\0\0\0\377\1\0\0\0N\216\0\0\0\0\1\0\0\0C\227\0\0\0\377\1\244\17:" \ + "\377\260\274\21B\377\1_\11!\377\267\0\0\0\377\2P\7\34\377\273\21A\377" \ + "\331\274\21B\377\3\270\21A\377R\7\35\377\1\0\1\377\364\0\0\0\377\3\15" \ + "\1\4\377o\12'\377\273\21A\377\316\274\21B\377\3\272\21A\377`\11\"\377" \ + "\2\0\1\377\264\0\0\0\377\1H\6\31\377\257\274\21B\377\1\227\16""5\377" \ + "\236\0\0\0\377\2\0\0\0\372\0\0\0\15\216\0\0\0\0\2\0\0\0\10\0\0\0\366" \ + "\226\0\0\0\377\1g\11$\377\260\274\21B\377\1)\4\16\377\270\0\0\0\377\2" \ + ";\5\25\377\265\20@\377\327\274\21B\377\2\242\17""9\377(\4\16\377\370" \ + "\0\0\0\377\2\35\3\12\377\210\14""0\377\314\274\21B\377\2\241\17""8\377" \ + "'\4\16\377\266\0\0\0\377\2\16\1\5\377\271\21A\377\256\274\21B\377\1Y" \ + "\10\37\377\236\0\0\0\377\1\0\0\0\303\220\0\0\0\0\1\0\0\0\272\226\0\0" \ + "\0\377\1-\4\20\377\257\274\21B\377\2\257\20>\377\3\0\1\377\271\0\0\0" \ + "\377\2""1\4\21\377\255\20=\377\324\274\21B\377\3\273\21B\377u\13)\377" \ + "\15\1\4\377\260\0\0\0\377\12\1\0\1\377\23\2\7\377)\4\16\377<\5\25\377" \ + "H\7\31\377T\10\36\377`\11\"\377l\12&\377q\12(\377w\13*\377\203}\13,\377" \ + "\12y\13*\377q\12(\377n\12'\377a\11\"\377V\10\36\377I\7\32\377=\6\25\377" \ + "+\4\17\377\25\2\7\377\2\0\1\377\263\0\0\0\377\3\1\0\0\377E\6\30\377\245" \ + "\17:\377\311\274\21B\377\2{\13+\377\15\1\4\377\270\0\0\0\377\1\216\15" \ + "2\377\256\274\21B\377\1\36\3\13\377\236\0\0\0\377\1\0\0\0~\220\0\0\0" \ + "\0\1\0\0\0v\226\0\0\0\377\2\1\0\1\377\252\17<\377\256\274\21B\377\1v" \ + "\13)\377\273\0\0\0\377\2\17\1\5\377\212\14""0\377\322\274\21B\377\2\237" \ + "\16""8\377+\4\17\377\254\0\0\0\377\7\11\1\3\377*\4\17\377J\7\32\377i" \ + "\11%\377\210\14""0\377\244\17:\377\270\21A\377\225\274\21B\377\7\271" \ + "\21A\377\247\17:\377\213\15""1\377l\12&\377M\7\33\377.\4\20\377\13\1" \ + "\4\377\257\0\0\0\377\3\3\0\1\377K\7\32\377\250\17;\377\305\274\21B\377" \ + "\2\233\16""6\377-\4\20\377\272\0\0\0\377\1Q\7\34\377\255\274\21B\377" \ + "\1\223\15""4\377\237\0\0\0\377\1\0\0\0""9\220\0\0\0\0\1\0\0\0""2\227" \ + "\0\0\0\377\1p\12'\377\256\274\21B\377\1=\6\25\377\274\0\0\0\377\3\4\0" \ + "\2\377k\12&\377\273\21B\377\316\274\21B\377\3\270\21A\377f\11$\377\10" \ + "\1\3\377\251\0\0\0\377\5\40\3\13\377P\7\34\377w\13*\377\234\16""7\377" \ + "\272\21A\377\241\274\21B\377\6\273\21B\377\240\16""8\377z\13+\377S\10" \ + "\35\377%\3\15\377\1\0\1\377\254\0\0\0\377\3\12\1\3\377V\10\36\377\251" \ + "\17;\377\301\274\21B\377\3\262\20>\377Y\10\37\377\4\0\2\377\273\0\0\0" \ + "\377\2\26\2\10\377\273\21B\377\254\274\21B\377\1N\7\33\377\236\0\0\0" \ + "\377\2\0\0\0\360\0\0\0\4\220\0\0\0\0\2\0\0\0\2\0\0\0\352\226\0\0\0\377" \ + "\1)\4\16\377\255\274\21B\377\2\264\20\77\377\7\1\2\377\276\0\0\0\377" \ + "\2""0\4\21\377\247\17;\377\314\274\21B\377\2\204\14.\377\31\2\11\377" \ + "\247\0\0\0\377\4\15\1\4\377@\6\27\377t\13)\377\250\17;\377\253\274\21" \ + "B\377\4\254\20<\377z\13+\377E\6\30\377\17\1\5\377\253\0\0\0\377\3\5\0" \ + "\2\377J\7\32\377\240\16""8\377\275\274\21B\377\3\266\20@\377h\11$\377" \ + "\17\1\5\377\276\0\0\0\377\1\227\16""5\377\253\274\21B\377\2\267\21@\377" \ + "\15\1\5\377\236\0\0\0\377\1\0\0\0\257\222\0\0\0\0\1\0\0\0\225\227\0\0" \ + "\0\377\1\237\16""8\377\254\274\21B\377\1\201\14-\377\300\0\0\0\377\2" \ + "\21\2\6\377\203\14.\377\311\274\21B\377\2\237\16""8\377<\5\25\377\246" \ + "\0\0\0\377\4\32\2\11\377U\10\36\377\214\15""1\377\271\21A\377\261\274" \ + "\21B\377\4\273\21A\377\222\15""3\377Y\10\37\377\40\3\13\377\252\0\0\0" \ + "\377\4\1\0\1\3775\5\23\377\205\14/\377\273\21A\377\270\274\21B\377\3" \ + "\266\20@\377n\12'\377\25\2\7\377\300\0\0\0\377\1]\10!\377\253\274\21" \ + "B\377\1\202\14.\377\237\0\0\0\377\1\0\0\0X\222\0\0\0\0\1\0\0\0@\227\0" \ + "\0\0\377\1Y\10\37\377\254\274\21B\377\1F\6\31\377\302\0\0\0\377\2""1" \ + "\4\21\377\236\16""7\377\305\274\21B\377\3\241\17""9\377\77\6\26\377\1" \ + "\0\0\377\244\0\0\0\377\3\17\1\5\377X\10\37\377\235\16""7\377\271\274" \ + "\21B\377\3\237\16""8\377X\10\37\377\22\2\6\377\252\0\0\0\377\3\33\2\11" \ + "\377f\11$\377\252\17<\377\264\274\21B\377\3\262\20\77\377e\11#\377\22" \ + "\2\6\377\302\0\0\0\377\2\27\2\10\377\273\21B\377\252\274\21B\377\1""1" \ + "\4\21\377\236\0\0\0\377\2\0\0\0\364\0\0\0\12\222\0\0\0\0\2\0\0\0\2\0" \ + "\0\0\345\226\0\0\0\377\2\27\2\10\377\273\21A\377\252\274\21B\377\2\271" \ + "\21A\377\17\1\5\377\303\0\0\0\377\3\7\1\3\377b\11\"\377\265\20\77\377" \ + "\301\274\21B\377\3\244\17:\377O\7\34\377\7\1\2\377\244\0\0\0\377\3'\4" \ + "\16\377t\12)\377\264\20\77\377\275\274\21B\377\4\267\21@\377{\13+\377" \ + "/\4\21\377\1\0\0\377\251\0\0\0\377\4\4\0\1\377:\5\24\377\202\14.\377" \ + "\266\20@\377\257\274\21B\377\3\223\15""4\377J\7\32\377\12\1\3\377\305" \ + "\0\0\0\377\1\217\15""2\377\251\274\21B\377\1\231\16""6\377\237\0\0\0" \ + "\377\1\0\0\0\253\224\0\0\0\0\1\0\0\0\222\227\0\0\0\377\1\201\14-\377" \ + "\252\274\21B\377\1\202\14.\377\306\0\0\0\377\3\23\2\7\377o\12'\377\270" \ + "\21A\377\275\274\21B\377\3\231\16""6\377C\6\30\377\3\0\1\377\243\0\0" \ + "\0\377\3\6\1\2\377J\7\32\377\227\16""5\377\303\274\21B\377\3\236\16""7" \ + "\377R\7\35\377\12\1\3\377\252\0\0\0\377\4\11\1\3\377=\6\25\377w\13*\377" \ + "\256\20=\377\251\274\21B\377\3\237\16""8\377a\11\"\377\40\3\13\377\310" \ + "\0\0\0\377\1J\7\32\377\251\274\21B\377\1F\6\31\377\237\0\0\0\377\1\0" \ + "\0\0V\224\0\0\0\0\1\0\0\0=\227\0\0\0\377\1.\4\20\377\252\274\21B\377" \ + "\1>\6\26\377\310\0\0\0\377\3\33\2\11\377t\13)\377\270\21A\377\270\274" \ + "\21B\377\3\271\21A\377\177\13-\377/\4\21\377\244\0\0\0\377\3\16\1\5\377" \ + "d\11#\377\262\20>\377\307\274\21B\377\3\263\20\77\377k\12&\377\24\2\7" \ + "\377\253\0\0\0\377\5\2\0\1\377'\4\16\377Z\10\40\377\215\15""1\377\267" \ + "\21@\377\241\274\21B\377\4\267\21@\377\214\15""1\377Z\10\40\377\40\3" \ + "\13\377\313\0\0\0\377\2\13\1\4\377\265\20@\377\247\274\21B\377\2\252" \ + "\17<\377\4\0\2\377\236\0\0\0\377\2\0\0\0\364\0\0\0\12\224\0\0\0\0\2\0" \ + "\0\0\3\0\0\0\345\227\0\0\0\377\1\225\15""4\377\250\274\21B\377\2\260" \ + "\20>\377\6\1\2\377\312\0\0\0\377\3\26\2\10\377l\12&\377\265\20@\377\264" \ + "\274\21B\377\3\247\17:\377`\11\"\377\25\2\10\377\244\0\0\0\377\3\12\1" \ + "\3\377^\11!\377\260\20>\377\313\274\21B\377\3\264\20\77\377g\11$\377" \ + "\17\1\5\377\255\0\0\0\377\6\4\0\2\377)\4\16\377P\7\34\377y\13*\377\231" \ + "\16""6\377\267\21@\377\227\274\21B\377\6\273\21B\377\242\17""9\377~\13" \ + ",\377[\10\40\3774\5\22\377\7\1\3\377\317\0\0\0\377\1\200\14-\377\247" \ + "\274\21B\377\1X\10\37\377\237\0\0\0\377\1\0\0\0\253\226\0\0\0\0\1\0\0" \ + "\0\177\227\0\0\0\377\1D\6\30\377\250\274\21B\377\1q\12(\377\315\0\0\0" \ + "\377\3\15\1\4\377P\7\34\377\231\16""6\377\257\274\21B\377\4\265\20\77" \ + "\377}\13,\3774\5\22\377\1\0\1\377\244\0\0\0\377\3\12\1\4\377d\11#\377" \ + "\263\20\77\377\317\274\21B\377\3\265\20\77\377d\11#\377\15\1\4\377\260" \ + "\0\0\0\377\11\2\0\1\377\33\2\11\3778\5\24\377Q\7\34\377i\11%\377\200" \ + "\14-\377\224\15""4\377\241\17""9\377\257\20>\377\206\274\21B\377\12\265" \ + "\20@\377\257\20>\377\247\17:\377\223\15""4\377\203\14.\377s\12(\377[" \ + "\10\40\377\77\6\26\377$\3\15\377\11\1\3\377\324\0\0\0\377\1""7\5\23\377" \ + "\246\274\21B\377\2\256\20=\377\12\1\3\377\237\0\0\0\377\1\0\0\0B\226" \ + "\0\0\0\0\2\0\0\0\31\0\0\0\372\226\0\0\0\377\2\4\0\2\377\246\17:\377\247" \ + "\274\21B\377\1.\4\20\377\320\0\0\0\377\3&\3\15\377f\11$\377\244\17""9" \ + "\377\251\274\21B\377\4\253\17<\377r\12(\3779\5\24\377\7\1\2\377\246\0" \ + "\0\0\377\2@\6\27\377\247\17:\377\323\274\21B\377\3\254\20<\377J\7\32" \ + "\377\1\0\1\377\377\0\0\0\377\234\0\0\0\377\2\1\0\0\377\240\16""8\377" \ + "\245\274\21B\377\1V\10\36\377\237\0\0\0\377\1\0\0\0\324\230\0\0\0\0\1" \ + "\0\0\0\254\227\0\0\0\377\1M\7\33\377\246\274\21B\377\2\241\17""9\377" \ + "\1\0\0\377\323\0\0\0\377\4%\3\15\377^\11!\377\221\15""3\377\271\21A\377" \ + "\241\274\21B\377\5\265\20\77\377\211\14""0\377V\10\36\377#\3\14\377\1" \ + "\0\0\377\247\0\0\0\377\2*\4\17\377\226\16""5\377\327\274\21B\377\2\237" \ + "\16""8\3775\5\23\377\377\0\0\0\377\234\0\0\0\377\1T\10\36\377\244\274" \ + "\21B\377\2\254\20<\377\10\1\3\377\237\0\0\0\377\1\0\0\0o\230\0\0\0\0" \ + "\1\0\0\0C\227\0\0\0\377\2\4\0\1\377\244\17""9\377\245\274\21B\377\1R" \ + "\7\35\377\327\0\0\0\377\5\12\1\3\3778\5\24\377^\11!\377\202\14.\377\244" \ + "\17:\377\230\274\21B\377\6\265\20\77\377\227\16""5\377v\13)\377M\7\33" \ + "\377%\3\15\377\3\0\1\377\251\0\0\0\377\3\6\1\2\377e\11#\377\272\21A\377" \ + "\331\274\21B\377\3\273\21B\377q\12(\377\12\1\4\377\377\0\0\0\377\232" \ + "\0\0\0\377\2\16\1\5\377\266\20@\377\243\274\21B\377\1T\10\36\377\237" \ + "\0\0\0\377\2\0\0\0\364\0\0\0\20\230\0\0\0\0\2\0\0\0\1\0\0\0\330\227\0" \ + "\0\0\377\1J\7\32\377\244\274\21B\377\2\264\20\77\377\13\1\4\377\334\0" \ + "\0\0\377\12\12\1\4\377&\3\15\377B\6\27\377]\10!\377t\13)\377\204\14." \ + "\377\226\16""5\377\247\17;\377\257\20>\377\266\20@\377\205\274\21B\377" \ + "\12\273\21B\377\256\20=\377\241\17""8\377\223\15""4\377~\13,\377f\11" \ + "$\377O\7\34\3776\5\23\377\30\2\11\377\1\0\1\377\255\0\0\0\377\2""0\4" \ + "\21\377\244\17""9\377\335\274\21B\377\2\253\17<\377;\5\25\377\377\0\0" \ + "\0\377\232\0\0\0\377\1s\12(\377\242\274\21B\377\2\233\16""6\377\2\0\1" \ + "\377\237\0\0\0\377\1\0\0\0\234\232\0\0\0\0\1\0\0\0t\227\0\0\0\377\2\4" \ + "\0\2\377\241\17""8\377\243\274\21B\377\1t\12)\377\377\0\0\0\377\242\0" \ + "\0\0\377\3\3\0\1\377a\11\"\377\272\21A\377\337\274\21B\377\3\273\21B" \ + "\377m\12&\377\7\1\2\377\377\0\0\0\377\230\0\0\0\377\2$\3\15\377\273\21" \ + "B\377\241\274\21B\377\1""5\5\23\377\240\0\0\0\377\1\0\0\0""6\232\0\0" \ + "\0\0\2\0\0\0\13\0\0\0\353\227\0\0\0\377\1""2\5\22\377\243\274\21B\377" \ + "\1#\3\14\377\377\0\0\0\377\241\0\0\0\377\2!\3\14\377\234\16""7\377\343" \ + "\274\21B\377\2\244\17""9\377+\4\17\377\377\0\0\0\377\230\0\0\0\377\1" \ + "\205\14/\377\240\274\21B\377\1\204\14.\377\240\0\0\0\377\1\0\0\0\274" \ + "\234\0\0\0\0\1\0\0\0\177\230\0\0\0\377\1\207\14/\377\241\274\21B\377" \ + "\1\220\15""2\377\377\0\0\0\377\241\0\0\0\377\2B\6\27\377\262\20\77\377" \ + "\345\274\21B\377\2\266\20@\377O\7\34\377\377\0\0\0\377\227\0\0\0\377" \ + "\1'\4\16\377\237\274\21B\377\2\260\20>\377\23\2\7\377\240\0\0\0\377\1" \ + "\0\0\0A\234\0\0\0\0\2\0\0\0\17\0\0\0\360\227\0\0\0\377\2\35\3\12\377" \ + "\270\21A\377\240\274\21B\377\1""5\5\23\377\377\0\0\0\377\237\0\0\0\377" \ + "\2\4\0\2\377q\12(\377\351\274\21B\377\2\202\14.\377\13\1\4\377\377\0" \ + "\0\0\377\226\0\0\0\377\1\210\14""0\377\236\274\21B\377\1M\7\33\377\240" \ + "\0\0\0\377\1\0\0\0\304\236\0\0\0\0\1\0\0\0\210\230\0\0\0\377\1]\10!\377" \ + "\237\274\21B\377\1\221\15""3\377\377\0\0\0\377\237\0\0\0\377\2\17\1\5" \ + "\377\216\15""2\377\353\274\21B\377\2\230\16""5\377\27\2\10\377\377\0" \ + "\0\0\377\225\0\0\0\377\1""1\4\21\377\235\274\21B\377\2\222\15""3\377" \ + "\1\0\1\377\240\0\0\0\377\1\0\0\0L\236\0\0\0\0\2\0\0\0\26\0\0\0\365\227" \ + "\0\0\0\377\2\3\0\1\377\230\16""5\377\236\274\21B\377\1""9\5\24\377\377" \ + "\0\0\0\377\236\0\0\0\377\2\35\3\12\377\245\17:\377\355\274\21B\377\2" \ + "\257\20=\377+\4\17\377\377\0\0\0\377\225\0\0\0\377\1\206\14/\377\233" \ + "\274\21B\377\2\265\20\77\377\36\3\13\377\240\0\0\0\377\1\0\0\0\315\240" \ + "\0\0\0\0\1\0\0\0\226\230\0\0\0\377\2*\4\17\377\273\21A\377\234\274\21" \ + "B\377\2\234\16""7\377\1\0\0\377\377\0\0\0\377\235\0\0\0\377\2+\4\17\377" \ + "\257\20=\377\357\274\21B\377\2\264\20\77\3777\5\23\377\377\0\0\0\377" \ + "\224\0\0\0\377\2\31\2\11\377\266\20@\377\232\274\21B\377\1@\6\27\377" \ + "\241\0\0\0\377\1\0\0\0[\240\0\0\0\0\2\0\0\0\26\0\0\0\361\230\0\0\0\377" \ + "\1g\11$\377\234\274\21B\377\1""6\5\23\377\377\0\0\0\377\235\0\0\0\377" \ + "\2/\4\21\377\262\20\77\377\361\274\21B\377\2\270\21@\377>\6\26\377\377" \ + "\0\0\0\377\224\0\0\0\377\1a\11\"\377\231\274\21B\377\1n\12'\377\241\0" \ + "\0\0\377\2\0\0\0\313\0\0\0\2\241\0\0\0\0\1\0\0\0|\230\0\0\0\377\2\3\0" \ + "\1\377\217\15""2\377\232\274\21B\377\1\200\14-\377\377\0\0\0\377\235" \ + "\0\0\0\377\2<\5\25\377\270\21@\377\363\274\21B\377\2\273\21B\377O\7\34" \ + "\377\377\0\0\0\377\223\0\0\0\377\2\12\1\3\377\251\17;\377\227\274\21" \ + "B\377\2\231\16""6\377\7\1\2\377\241\0\0\0\377\1\0\0\0\77\242\0\0\0\0" \ + "\2\0\0\0\11\0\0\0\340\230\0\0\0\377\2\22\2\6\377\252\17<\377\230\274" \ + "\21B\377\2\265\20\77\377\25\2\10\377\377\0\0\0\377\234\0\0\0\377\2:\5" \ + "\24\377\267\21@\377\365\274\21B\377\2\273\21A\377I\7\32\377\377\0\0\0" \ + "\377\223\0\0\0\377\2.\4\20\377\272\21A\377\225\274\21B\377\2\247\17;" \ + "\377\23\2\7\377\241\0\0\0\377\1\0\0\0\257\244\0\0\0\0\1\0\0\0\\\231\0" \ + "\0\0\377\2""6\5\23\377\273\21A\377\227\274\21B\377\1b\11\"\377\377\0" \ + "\0\0\377\234\0\0\0\377\2>\6\26\377\272\21A\377\367\274\21B\377\2\273" \ + "\21B\377K\7\32\377\377\0\0\0\377\223\0\0\0\377\1e\11#\377\224\274\21" \ + "B\377\2\264\20\77\377%\3\15\377\241\0\0\0\377\2\0\0\0\370\0\0\0#\244" \ + "\0\0\0\0\2\0\0\0\1\0\0\0\311\231\0\0\0\377\1S\7\35\377\226\274\21B\377" \ + "\2\224\15""4\377\4\0\1\377\377\0\0\0\377\233\0\0\0\377\2""4\5\22\377" \ + "\270\21@\377\371\274\21B\377\2\273\21A\377@\6\27\377\377\0\0\0\377\222" \ + "\0\0\0\377\2\4\0\1\377\223\15""4\377\222\274\21B\377\2\273\21A\377<\5" \ + "\25\377\242\0\0\0\377\1\0\0\0\216\246\0\0\0\0\2\0\0\0""9\0\0\0\376\231" \ + "\0\0\0\377\1n\12'\377\224\274\21B\377\2\262\20\77\377\33\2\11\377\377" \ + "\0\0\0\377\233\0\0\0\377\2#\3\14\377\261\20>\377\373\274\21B\377\2\266" \ + "\20@\377/\4\21\377\377\0\0\0\377\222\0\0\0\377\2\35\3\12\377\255\20=" \ + "\377\221\274\21B\377\1T\10\36\377\242\0\0\0\377\2\0\0\0\354\0\0\0\21" \ + "\247\0\0\0\0\1\0\0\0\247\231\0\0\0\377\2\2\0\1\377\205\14/\377\223\274" \ + "\21B\377\1J\7\32\377\377\0\0\0\377\233\0\0\0\377\2\33\2\11\377\255\20" \ + "=\377\375\274\21B\377\2\262\20\77\377#\3\14\377\355\0\0\0\377\6\15\1" \ + "\4\3774\5\22\377P\7\34\377i\12%\377}\13,\377\207\14/\377\202\212\14""0" \ + "\377\6\210\14""0\377x\13*\377i\11%\377R\7\35\3771\4\21\377\16\1\5\377" \ + "\226\0\0\0\377\2!\3\14\377\257\20>\377\216\274\21B\377\2\273\21B\377" \ + "J\7\32\377\243\0\0\0\377\1\0\0\0k\250\0\0\0\0\2\0\0\0\22\0\0\0\350\231" \ + "\0\0\0\377\2\15\1\4\377\227\16""5\377\221\274\21B\377\2y\13*\377\1\0" \ + "\0\377\377\0\0\0\377\232\0\0\0\377\2\15\1\4\377\236\16""7\377\377\274" \ + "\21B\377\2\251\17;\377\25\2\7\377\350\0\0\0\377\5\15\1\5\377\77\6\26" \ + "\377q\12(\377\237\16""8\377\273\21B\377\214\274\21B\377\4\273\21A\377" \ + "\230\16""5\377e\11#\377#\3\14\377\224\0\0\0\377\2""1\4\21\377\267\21" \ + "@\377\215\274\21B\377\1V\10\36\377\243\0\0\0\377\2\0\0\0\272\0\0\0\1" \ + "\251\0\0\0\0\1\0\0\0V\232\0\0\0\377\2\12\1\4\377\223\15""4\377\217\274" \ + "\21B\377\2~\13,\377\2\0\1\377\377\0\0\0\377\232\0\0\0\377\2\1\0\1\377" \ + "\205\14/\377\377\274\21B\377\202\274\21B\377\2\223\15""4\377\5\0\2\377" \ + "\344\0\0\0\377\4\5\0\2\377<\5\25\377\202\14.\377\270\21@\377\224\274" \ + "\21B\377\3\233\16""6\377E\6\30\377\3\0\1\377\222\0\0\0\377\2.\4\20\377" \ + "\255\20=\377\212\274\21B\377\2\271\21A\377J\7\32\377\243\0\0\0\377\2" \ + "\0\0\0\363\0\0\0\40\253\0\0\0\0\1\0\0\0\255\232\0\0\0\377\2\16\1\5\377" \ + "\231\16""6\377\215\274\21B\377\2\221\15""3\377\7\1\3\377\377\0\0\0\377" \ + "\233\0\0\0\377\1b\11\"\377\377\274\21B\377\204\274\21B\377\1x\13*\377" \ + "\342\0\0\0\377\3(\4\16\377o\12'\377\257\20>\377\231\274\21B\377\2\241" \ + "\17""9\377\77\6\26\377\222\0\0\0\377\2\26\2\10\377\210\14""0\377\210" \ + "\274\21B\377\2\262\20\77\3775\5\23\377\244\0\0\0\377\1\0\0\0s\254\0\0" \ + "\0\0\2\0\0\0\30\0\0\0\356\232\0\0\0\377\2\14\1\4\377\213\15""1\377\213" \ + "\274\21B\377\2\203\14.\377\12\1\3\377\377\0\0\0\377\233\0\0\0\377\2<" \ + "\5\25\377\273\21B\377\377\274\21B\377\205\274\21B\377\1J\7\32\377\336" \ + "\0\0\0\377\3\1\0\0\3779\5\24\377\217\15""2\377\236\274\21B\377\2\217" \ + "\15""2\377\37\3\13\377\222\0\0\0\377\3""7\5\23\377\213\15""1\377\273" \ + "\21A\377\203\274\21B\377\3\272\21A\377\213\15""1\377#\3\14\377\244\0" \ + "\0\0\377\2\0\0\0\305\0\0\0\2\255\0\0\0\0\1\0\0\0c\233\0\0\0\377\2\4\0" \ + "\2\377w\13*\377\210\274\21B\377\3\265\20\77\377S\10\35\377\1\0\1\377" \ + "\377\0\0\0\377\233\0\0\0\377\2\23\2\7\377\255\20=\377\377\274\21B\377" \ + "\206\274\21B\377\2\265\20\77\377\37\3\13\377\333\0\0\0\377\3\7\1\3\377" \ + "R\7\35\377\244\17""9\377\241\274\21B\377\3\270\21A\377^\11!\377\1\0\1" \ + "\377\222\0\0\0\377\5\17\1\5\377-\4\20\3772\5\22\377,\4\20\377\13\1\4" \ + "\377\245\0\0\0\377\2\0\0\0\371\0\0\0-\256\0\0\0\0\2\0\0\0\1\0\0\0\270" \ + "\233\0\0\0\377\3\1\0\0\377U\10\36\377\245\17:\377\204\274\21B\377\3\256" \ + "\20=\377i\12%\377\24\2\7\377\377\0\0\0\377\234\0\0\0\377\2\1\0\1\377" \ + "\217\15""2\377\377\274\21B\377\210\274\21B\377\2\235\16""7\377\6\1\2" \ + "\377\330\0\0\0\377\3\1\0\0\377E\6\30\377\247\17:\377\245\274\21B\377" \ + "\1f\11$\377\274\0\0\0\377\1\0\0\0~\260\0\0\0\0\2\0\0\0\21\0\0\0\340\234" \ + "\0\0\0\377\2\1\0\0\377\32\2\11\377\2022\5\22\377\2#\3\14\377\4\0\1\377" \ + "\377\0\0\0\377\236\0\0\0\377\1S\7\35\377\377\274\21B\377\212\274\21B" \ + "\377\1d\11#\377\327\0\0\0\377\2,\4\20\377\225\15""4\377\250\274\21B\377" \ + "\1R\7\35\377\272\0\0\0\377\2\0\0\0\263\0\0\0\1\261\0\0\0\0\2\0\0\0=\0" \ + "\0\0\373\377\0\0\0\377\276\0\0\0\377\2\32\2\11\377\264\20\77\377\377" \ + "\274\21B\377\212\274\21B\377\2\271\21A\377&\3\15\377\324\0\0\0\377\2" \ + "\40\3\13\377\212\14""0\377\252\274\21B\377\2\273\21A\3774\5\22\377\270" \ + "\0\0\0\377\2\0\0\0\345\0\0\0\25\263\0\0\0\0\1\0\0\0{\377\0\0\0\377\275" \ + "\0\0\0\377\2\1\0\0\377\216\15""2\377\377\274\21B\377\214\274\21B\377" \ + "\2\234\16""7\377\4\0\1\377\321\0\0\0\377\3\3\0\1\377Y\10\37\377\266\20" \ + "@\377\254\274\21B\377\2\250\17;\377\12\1\4\377\266\0\0\0\377\2\0\0\0" \ + "\374\0\0\0\77\264\0\0\0\0\2\0\0\0\2\0\0\0\272\377\0\0\0\377\274\0\0\0" \ + "\377\1F\6\31\377\377\274\21B\377\216\274\21B\377\1X\10\37\377\320\0\0" \ + "\0\377\2%\3\15\377\234\16""7\377\257\274\21B\377\1n\12'\377\266\0\0\0" \ + "\377\1\0\0\0\201\266\0\0\0\0\2\0\0\0\26\0\0\0\346\302\0\0\0\377\3\22" \ + "\2\6\377%\3\15\377.\4\20\377\2032\5\22\377\3&\3\15\377\26\2\10\377\10" \ + "\1\3\377\356\0\0\0\377\2\13\1\4\377\253\17<\377\377\274\21B\377\216\274" \ + "\21B\377\2\263\20\77\377\25\2\10\377\315\0\0\0\377\3\4\0\2\377d\11#\377" \ + "\271\21A\377\260\274\21B\377\2\273\21A\377)\4\16\377\264\0\0\0\377\2" \ + "\0\0\0\275\0\0\0\2\267\0\0\0\0\2\0\0\0E\0\0\0\373\274\0\0\0\377\5\40" \ + "\3\13\377P\7\34\377t\13)\377\231\16""6\377\264\20\77\377\211\274\21B" \ + "\377\6\256\20=\377\226\16""5\377z\13+\377S\7\35\377+\4\17\377\7\1\2\377" \ + "\350\0\0\0\377\1g\11$\377\377\274\21B\377\220\274\21B\377\1z\13+\377" \ + "\314\0\0\0\377\2\33\2\12\377\222\15""3\377\263\274\21B\377\2\223\15""4" \ + "\377\1\0\1\377\262\0\0\0\377\2\0\0\0\347\0\0\0\35\271\0\0\0\0\1\0\0\0" \ + "`\270\0\0\0\377\4\1\0\0\377)\4\16\377l\12&\377\246\17:\377\223\274\21" \ + "B\377\5\270\21A\377\227\16""5\377m\12&\3775\5\23\377\4\0\2\377\343\0" \ + "\0\0\377\2\32\2\11\377\270\21@\377\377\274\21B\377\220\274\21B\377\2" \ + "\273\21B\377&\3\15\377\312\0\0\0\377\2B\6\27\377\262\20\77\377\265\274" \ + "\21B\377\1B\6\27\377\261\0\0\0\377\2\0\0\0\364\0\0\0""1\273\0\0\0\0\1" \ + "\0\0\0\214\265\0\0\0\377\3\7\1\2\377L\7\33\377\237\16""8\377\232\274" \ + "\21B\377\4\261\20>\377z\13+\377>\6\26\377\10\1\3\377\340\0\0\0\377\1" \ + "w\13*\377\377\274\21B\377\222\274\21B\377\1\210\14""0\377\310\0\0\0\377" \ + "\2\10\1\3\377w\13*\377\267\274\21B\377\2\237\16""8\377\1\0\1\377\257" \ + "\0\0\0\377\2\0\0\0\375\0\0\0R\274\0\0\0\0\2\0\0\0\2\0\0\0\261\262\0\0" \ + "\0\377\3\2\0\1\377L\7\33\377\253\17<\377\237\274\21B\377\3\265\20@\377" \ + "{\13+\377.\4\20\377\335\0\0\0\377\2\40\3\13\377\273\21A\377\377\274\21" \ + "B\377\223\274\21B\377\1/\4\21\377\306\0\0\0\377\2!\3\14\377\237\16""8" \ + "\377\271\274\21B\377\1:\5\24\377\257\0\0\0\377\1\0\0\0|\276\0\0\0\0\2" \ + "\0\0\0\15\0\0\0\321\260\0\0\0\377\2\34\3\12\377\232\16""6\377\244\274" \ + "\21B\377\3\235\16""7\377P\7\34\377\13\1\4\377\332\0\0\0\377\1y\13*\377" \ + "\377\274\21B\377\224\274\21B\377\1\213\15""1\377\305\0\0\0\377\2@\6\27" \ + "\377\262\20>\377\272\274\21B\377\1\220\15""2\377\256\0\0\0\377\2\0\0" \ + "\0\244\0\0\0\1\277\0\0\0\0\2\0\0\0\37\0\0\0\350\256\0\0\0\377\2,\4\20" \ + "\377\257\20>\377\247\274\21B\377\3\264\20\77\377q\12(\377\30\2\11\377" \ + "\327\0\0\0\377\2\34\3\12\377\272\21A\377\377\274\21B\377\225\274\21B" \ + "\377\1-\4\20\377\302\0\0\0\377\2\1\0\1\377e\11#\377\275\274\21B\377\1" \ + ",\4\20\377\254\0\0\0\377\2\0\0\0\307\0\0\0\10\301\0\0\0\0\1\0\0\0|\255" \ + "\0\0\0\377\2)\4\16\377\262\20\77\377\252\274\21B\377\3\270\21A\377s\12" \ + "(\377\30\2\11\377\325\0\0\0\377\1m\12&\377\377\274\21B\377\226\274\21" \ + "B\377\1\201\14-\377\301\0\0\0\377\2\17\1\5\377\216\15""2\377\276\274" \ + "\21B\377\1{\13+\377\254\0\0\0\377\1\0\0\0C\302\0\0\0\0\1\0\0\0E\254\0" \ + "\0\0\377\2\33\2\12\377\257\20=\377\255\274\21B\377\3\273\21A\377}\13" \ + ",\377\35\3\12\377\322\0\0\0\377\2\16\1\5\377\265\20\77\377\377\274\21" \ + "B\377\226\274\21B\377\2\273\21A\377\32\2\11\377\277\0\0\0\377\2\40\3" \ + "\13\377\242\17""9\377\277\274\21B\377\2\266\20@\377\14\1\4\377\252\0" \ + "\0\0\377\2\0\0\0\375\0\0\0\15\302\0\0\0\0\2\0\0\0\21\0\0\0\376\252\0" \ + "\0\0\377\2\5\0\2\377\231\16""6\377\260\274\21B\377\3\270\21A\377k\12" \ + "&\377\14\1\4\377\320\0\0\0\377\1V\10\36\377\377\274\21B\377\230\274\21" \ + "B\377\1i\11%\377\276\0\0\0\377\2:\5\24\377\262\20\77\377\301\274\21B" \ + "\377\1I\7\32\377\252\0\0\0\377\1\0\0\0\326\304\0\0\0\0\1\0\0\0\333\252" \ + "\0\0\0\377\1h\11$\377\263\274\21B\377\3\254\20<\377H\6\31\377\1\0\0\377" \ + "\315\0\0\0\377\2\1\0\0\377\242\17""9\377\377\274\21B\377\230\274\21B" \ + "\377\2\257\20=\377\7\1\2\377\274\0\0\0\377\2L\7\33\377\271\21A\377\302" \ + "\274\21B\377\1\213\15""1\377\252\0\0\0\377\1\0\0\0\241\304\0\0\0\0\1" \ + "\0\0\0\246\251\0\0\0\377\2&\3\15\377\273\21A\377\265\274\21B\377\2\231" \ + "\16""6\377,\4\20\377\314\0\0\0\377\1""1\4\21\377\377\274\21B\377\232" \ + "\274\21B\377\1C\6\30\377\272\0\0\0\377\2\1\0\1\377k\12&\377\304\274\21" \ + "B\377\2\273\21B\377\30\2\11\377\251\0\0\0\377\1\0\0\0l\304\0\0\0\0\1" \ + "\0\0\0r\251\0\0\0\377\1\213\15""1\377\267\274\21B\377\3\273\21A\377o" \ + "\12'\377\13\1\4\377\312\0\0\0\377\1u\13)\377\377\274\21B\377\232\274" \ + "\21B\377\1\210\14""0\377\271\0\0\0\377\2\2\0\1\377q\12(\377\306\274\21" \ + "B\377\1T\10\36\377\251\0\0\0\377\1\0\0\0""6\304\0\0\0\0\1\0\0\0=\250" \ + "\0\0\0\377\1=\6\25\377\272\274\21B\377\2\253\17<\377<\5\25\377\310\0" \ + "\0\0\377\2\11\1\3\377\264\20\77\377\377\274\21B\377\232\274\21B\377\2" \ + "\273\21A\377\25\2\10\377\267\0\0\0\377\2\12\1\3\377\212\14""0\377\307" \ + "\274\21B\377\1\213\15""1\377\250\0\0\0\377\2\0\0\0\370\0\0\0\7\304\0" \ + "\0\0\0\2\0\0\0\14\0\0\0\372\246\0\0\0\377\2\1\0\1\377\237\16""8\377\273" \ + "\274\21B\377\3\273\21B\377s\12(\377\13\1\4\377\306\0\0\0\377\1<\5\25" \ + "\377\377\274\21B\377\234\274\21B\377\1P\7\34\377\266\0\0\0\377\2\20\1" \ + "\6\377\225\15""4\377\310\274\21B\377\2\270\21@\377\11\1\3\377\247\0\0" \ + "\0\377\1\0\0\0\313\306\0\0\0\0\1\0\0\0\305\246\0\0\0\377\1""7\5\23\377" \ + "\276\274\21B\377\2\253\17<\377<\5\25\377\305\0\0\0\377\1y\13*\377\377" \ + "\274\21B\377\234\274\21B\377\1\214\15""1\377\265\0\0\0\377\2\21\2\6\377" \ + "\233\16""6\377\312\274\21B\377\1""5\5\23\377\247\0\0\0\377\1\0\0\0\211" \ + "\306\0\0\0\0\1\0\0\0\206\246\0\0\0\377\1\201\14-\377\277\274\21B\377" \ + "\3\273\21B\377o\12'\377\6\1\2\377\302\0\0\0\377\2\4\0\2\377\261\20>\377" \ + "\377\274\21B\377\234\274\21B\377\2\272\21A\377\16\1\5\377\263\0\0\0\377" \ + "\2\30\2\11\377\244\17:\377\313\274\21B\377\1k\12&\377\247\0\0\0\377\1" \ + "\0\0\0J\306\0\0\0\0\1\0\0\0G\245\0\0\0\377\2\30\2\10\377\273\21A\377" \ + "\301\274\21B\377\2\237\16""8\377\40\3\13\377\301\0\0\0\377\1/\4\21\377" \ + "\377\274\21B\377\236\274\21B\377\1B\6\27\377\262\0\0\0\377\2\32\2\11" \ + "\377\246\17:\377\314\274\21B\377\1\237\16""8\377\246\0\0\0\377\2\0\0" \ + "\0\374\0\0\0\16\306\0\0\0\0\2\0\0\0\14\0\0\0\372\244\0\0\0\377\1^\10" \ + "!\377\303\274\21B\377\2\261\20>\377>\6\26\377\300\0\0\0\377\1a\11\"\377" \ + "\377\274\21B\377\236\274\21B\377\1s\12(\377\261\0\0\0\377\2\27\2\10\377" \ + "\243\17""9\377\316\274\21B\377\1\22\2\6\377\245\0\0\0\377\1\0\0\0\313" \ + "\310\0\0\0\0\1\0\0\0\307\244\0\0\0\377\1\231\16""6\377\305\274\21B\377" \ + "\2w\13*\377\7\1\3\377\276\0\0\0\377\1\220\15""2\377\377\274\21B\377\236" \ + "\274\21B\377\1\242\17""9\377\260\0\0\0\377\2\40\3\13\377\252\17<\377" \ + "\317\274\21B\377\1:\5\24\377\245\0\0\0\377\1\0\0\0\214\310\0\0\0\0\1" \ + "\0\0\0\212\243\0\0\0\377\2\23\2\7\377\273\21B\377\306\274\21B\377\2\225" \ + "\15""4\377\25\2\7\377\274\0\0\0\377\2\7\1\3\377\270\21@\377\377\274\21" \ + "B\377\237\274\21B\377\1\26\2\10\377\256\0\0\0\377\2\33\2\11\377\247\17" \ + ";\377\320\274\21B\377\1_\11!\377\245\0\0\0\377\1\0\0\0O\310\0\0\0\0\1" \ + "\0\0\0C\243\0\0\0\377\1J\7\32\377\310\274\21B\377\2\256\20=\377.\4\20" \ + "\377\273\0\0\0\377\1,\4\20\377\377\274\21B\377\240\274\21B\377\1\77\6" \ + "\26\377\255\0\0\0\377\2\35\3\12\377\253\17<\377\321\274\21B\377\1\207" \ + "\14/\377\244\0\0\0\377\2\0\0\0\371\0\0\0\15\310\0\0\0\0\2\0\0\0\6\0\0" \ + "\0\362\242\0\0\0\377\1\201\14-\377\311\274\21B\377\2\267\21@\377F\6\31" \ + "\377\272\0\0\0\377\1S\10\35\377\377\274\21B\377\240\274\21B\377\1e\11" \ + "#\377\254\0\0\0\377\2\30\2\11\377\247\17:\377\322\274\21B\377\1\255\20" \ + "=\377\244\0\0\0\377\1\0\0\0\275\312\0\0\0\0\1\0\0\0\256\241\0\0\0\377" \ + "\2\1\0\0\377\257\20>\377\312\274\21B\377\3\273\21B\377]\10!\377\1\0\0" \ + "\377\270\0\0\0\377\1w\13*\377\377\274\21B\377\240\274\21B\377\1\212\14" \ + "0\377\253\0\0\0\377\2\23\2\7\377\242\17""9\377\324\274\21B\377\1\30\2" \ + "\11\377\243\0\0\0\377\1\0\0\0t\312\0\0\0\0\1\0\0\0e\241\0\0\0\377\1\32" \ + "\2\11\377\315\274\21B\377\2\200\14-\377\10\1\3\377\267\0\0\0\377\1\233" \ + "\16""6\377\377\274\21B\377\240\274\21B\377\1\255\20=\377\252\0\0\0\377" \ + "\2\15\1\5\377\232\16""6\377\325\274\21B\377\1=\6\25\377\243\0\0\0\377" \ + "\1\0\0\0*\312\0\0\0\0\2\0\0\0\34\0\0\0\376\240\0\0\0\377\1<\5\25\377" \ + "\316\274\21B\377\2\220\15""2\377\14\1\4\377\265\0\0\0\377\2\2\0\1\377" \ + "\270\21A\377\377\274\21B\377\241\274\21B\377\1\20\1\6\377\250\0\0\0\377" \ + "\2\16\1\5\377\233\16""6\377\326\274\21B\377\1[\10\40\377\242\0\0\0\377" \ + "\1\0\0\0\337\314\0\0\0\0\1\0\0\0\321\240\0\0\0\377\1a\11\"\377\317\274" \ + "\21B\377\2\236\16""7\377\25\2\10\377\264\0\0\0\377\1\30\2\10\377\377" \ + "\274\21B\377\242\274\21B\377\1*\4\17\377\247\0\0\0\377\2\7\1\2\377\220" \ + "\15""2\377\327\274\21B\377\1t\12)\377\242\0\0\0\377\1\0\0\0\225\314\0" \ + "\0\0\0\1\0\0\0\210\240\0\0\0\377\1\205\14/\377\320\274\21B\377\2\245" \ + "\17:\377\34\3\12\377\263\0\0\0\377\1""1\4\21\377\377\274\21B\377\242" \ + "\274\21B\377\1D\6\30\377\246\0\0\0\377\2\4\0\2\377\213\15""1\377\330" \ + "\274\21B\377\1\216\15""2\377\242\0\0\0\377\1\0\0\0M\314\0\0\0\0\1\0\0" \ + "\0""5\240\0\0\0\377\1\244\17:\377\321\274\21B\377\2\250\17;\377\37\3" \ + "\13\377\262\0\0\0\377\1J\7\32\377\377\274\21B\377\242\274\21B\377\1]" \ + "\10!\377\245\0\0\0\377\2\1\0\1\377z\13+\377\331\274\21B\377\1\250\17" \ + ";\377\241\0\0\0\377\2\0\0\0\361\0\0\0\7\314\0\0\0\0\2\0\0\0\1\0\0\0\341" \ + "\236\0\0\0\377\2\2\0\1\377\271\21A\377\322\274\21B\377\2\260\20>\377" \ + ",\4\20\377\261\0\0\0\377\1\\\10\40\377\377\274\21B\377\242\274\21B\377" \ + "\1o\12'\377\245\0\0\0\377\1f\11$\377\332\274\21B\377\2\273\21B\377\7" \ + "\1\2\377\240\0\0\0\377\1\0\0\0\250\316\0\0\0\0\1\0\0\0\221\236\0\0\0" \ + "\377\1\22\2\6\377\324\274\21B\377\2\262\20\77\377+\4\17\377\260\0\0\0" \ + "\377\1l\12&\377\377\274\21B\377\242\274\21B\377\1\177\13-\377\244\0\0" \ + "\0\377\1U\10\36\377\334\274\21B\377\1\37\3\13\377\240\0\0\0\377\1\0\0" \ + "\0W\316\0\0\0\0\1\0\0\0@\236\0\0\0\377\1&\3\15\377\325\274\21B\377\2" \ + "\265\20\77\377/\4\21\377\257\0\0\0\377\1{\13+\377\377\274\21B\377\242" \ + "\274\21B\377\1\216\15""2\377\243\0\0\0\377\2>\6\26\377\273\21A\377\334" \ + "\274\21B\377\1""7\5\23\377\237\0\0\0\377\2\0\0\0\367\0\0\0\14\316\0\0" \ + "\0\0\2\0\0\0\3\0\0\0\352\235\0\0\0\377\1:\5\24\377\326\274\21B\377\2" \ + "\264\20\77\377.\4\20\377\256\0\0\0\377\1\210\14""0\377\377\274\21B\377" \ + "\242\274\21B\377\1\234\16""7\377\242\0\0\0\377\2)\4\16\377\267\21@\377" \ + "\335\274\21B\377\1G\6\31\377\237\0\0\0\377\1\0\0\0\264\320\0\0\0\0\1" \ + "\0\0\0\236\235\0\0\0\377\1M\7\33\377\327\274\21B\377\2\257\20>\377%\3" \ + "\15\377\255\0\0\0\377\1\217\15""2\377\377\274\21B\377\242\274\21B\377" \ + "\1\242\17""9\377\241\0\0\0\377\2\25\2\7\377\253\17<\377\336\274\21B\377" \ + "\1V\10\36\377\237\0\0\0\377\1\0\0\0d\320\0\0\0\0\1\0\0\0B\235\0\0\0\377" \ + "\1V\10\36\377\330\274\21B\377\2\261\20>\377)\4\16\377\254\0\0\0\377\1" \ + "\224\15""4\377\377\274\21B\377\242\274\21B\377\1\250\17;\377\240\0\0" \ + "\0\377\2\5\0\2\377\223\15""4\377\337\274\21B\377\1c\11#\377\236\0\0\0" \ + "\377\2\0\0\0\366\0\0\0\16\320\0\0\0\0\2\0\0\0\2\0\0\0\344\234\0\0\0\377" \ + "\1[\10\40\377\331\274\21B\377\2\255\20=\377\37\3\13\377\253\0\0\0\377" \ + "\1\231\16""6\377\377\274\21B\377\242\274\21B\377\1\255\20=\377\240\0" \ + "\0\0\377\1o\12'\377\340\274\21B\377\1q\12(\377\236\0\0\0\377\1\0\0\0" \ + "\255\322\0\0\0\0\1\0\0\0\215\234\0\0\0\377\1a\11\"\377\332\274\21B\377" \ + "\2\252\17<\377\30\2\10\377\252\0\0\0\377\1\234\16""7\377\377\274\21B" \ + "\377\242\274\21B\377\1\260\20>\377\237\0\0\0\377\1J\7\32\377\341\274" \ + "\21B\377\1~\13,\377\236\0\0\0\377\1\0\0\0T\322\0\0\0\0\1\0\0\0""3\234" \ + "\0\0\0\377\1f\11$\377\333\274\21B\377\2\241\17""9\377\21\2\6\377\251" \ + "\0\0\0\377\1\227\16""5\377\377\274\21B\377\242\274\21B\377\1\253\17<" \ + "\377\236\0\0\0\377\2'\4\16\377\267\21@\377\341\274\21B\377\1\214\15""1" \ + "\377\235\0\0\0\377\2\0\0\0\357\0\0\0\10\323\0\0\0\0\1\0\0\0\330\233\0" \ + "\0\0\377\1l\12&\377\334\274\21B\377\2\225\15""4\377\11\1\3\377\250\0" \ + "\0\0\377\1\222\15""3\377\377\274\21B\377\242\274\21B\377\1\246\17:\377" \ + "\235\0\0\0\377\2\7\1\3\377\240\16""8\377\342\274\21B\377\1\231\16""6" \ + "\377\235\0\0\0\377\1\0\0\0\236\324\0\0\0\0\1\0\0\0\177\233\0\0\0\377" \ + "\1p\12'\377\335\274\21B\377\2\201\14-\377\2\0\1\377\247\0\0\0\377\1\216" \ + "\15""2\377\377\274\21B\377\242\274\21B\377\1\241\17""8\377\235\0\0\0" \ + "\377\1q\12(\377\343\274\21B\377\1\236\16""7\377\235\0\0\0\377\1\0\0\0" \ + "E\324\0\0\0\0\2\0\0\0#\0\0\0\376\232\0\0\0\377\1j\12%\377\336\274\21" \ + "B\377\2y\13*\377\1\0\0\377\246\0\0\0\377\1\205\14/\377\377\274\21B\377" \ + "\242\274\21B\377\1\231\16""6\377\234\0\0\0\377\1""7\5\23\377\344\274" \ + "\21B\377\1\237\16""8\377\234\0\0\0\377\2\0\0\0\347\0\0\0\3\325\0\0\0" \ + "\0\1\0\0\0\312\232\0\0\0\377\1c\11#\377\337\274\21B\377\1T\10\36\377" \ + "\246\0\0\0\377\1v\13)\377\377\274\21B\377\242\274\21B\377\1\211\14""0" \ + "\377\233\0\0\0\377\2\16\1\5\377\252\17<\377\344\274\21B\377\1\240\16" \ + "8\377\234\0\0\0\377\1\0\0\0\220\326\0\0\0\0\1\0\0\0p\232\0\0\0\377\1" \ + "[\10\40\377\337\274\21B\377\2\273\21A\3773\5\22\377\245\0\0\0\377\1f" \ + "\11$\377\377\274\21B\377\242\274\21B\377\1z\13+\377\233\0\0\0\377\1{" \ + "\13+\377\345\274\21B\377\1\241\17""8\377\234\0\0\0\377\1\0\0\0""6\326" \ + "\0\0\0\0\2\0\0\0\30\0\0\0\374\231\0\0\0\377\1S\7\35\377\340\274\21B\377" \ + "\2\254\20<\377\24\2\7\377\244\0\0\0\377\1W\10\37\377\377\274\21B\377" \ + "\242\274\21B\377\1j\12%\377\232\0\0\0\377\1@\6\27\377\346\274\21B\377" \ + "\1\241\17""9\377\233\0\0\0\377\1\0\0\0\331\330\0\0\0\0\1\0\0\0\273\231" \ + "\0\0\0\377\1K\7\32\377\341\274\21B\377\2\222\15""3\377\4\0\2\377\243" \ + "\0\0\0\377\1C\6\30\377\377\274\21B\377\242\274\21B\377\1V\10\36\377\231" \ + "\0\0\0\377\2\15\1\4\377\254\20<\377\346\274\21B\377\1\242\17""9\377\233" \ + "\0\0\0\377\1\0\0\0\201\330\0\0\0\0\1\0\0\0c\231\0\0\0\377\1B\6\27\377" \ + "\342\274\21B\377\1c\11#\377\243\0\0\0\377\1(\4\16\377\377\274\21B\377" \ + "\242\274\21B\377\1;\5\25\377\231\0\0\0\377\1q\12(\377\347\274\21B\377" \ + "\1\244\17""9\377\233\0\0\0\377\1\0\0\0*\330\0\0\0\0\2\0\0\0\15\0\0\0" \ + "\365\230\0\0\0\377\1""1\4\21\377\342\274\21B\377\2\273\21B\3777\5\23" \ + "\377\242\0\0\0\377\1\16\1\5\377\377\274\21B\377\242\274\21B\377\1\40" \ + "\3\13\377\230\0\0\0\377\2#\3\14\377\272\21A\377\347\274\21B\377\1\240" \ + "\16""8\377\232\0\0\0\377\1\0\0\0\311\332\0\0\0\0\1\0\0\0\247\230\0\0" \ + "\0\377\1\33\2\12\377\343\274\21B\377\2\255\20=\377\17\1\5\377\242\0\0" \ + "\0\377\1\261\20>\377\377\274\21B\377\240\274\21B\377\2\273\21B\377\10" \ + "\1\3\377\227\0\0\0\377\2\1\0\1\377\226\16""5\377\350\274\21B\377\1\224" \ + "\15""4\377\232\0\0\0\377\1\0\0\0n\332\0\0\0\0\1\0\0\0L\230\0\0\0\377" \ + "\1\7\1\2\377\344\274\21B\377\1w\13*\377\242\0\0\0\377\1\216\15""2\377" \ + "\377\274\21B\377\240\274\21B\377\1\241\17""8\377\230\0\0\0\377\1I\7\32" \ + "\377\351\274\21B\377\1\211\14""0\377\231\0\0\0\377\2\0\0\0\372\0\0\0" \ + "\25\332\0\0\0\0\2\0\0\0\4\0\0\0\350\230\0\0\0\377\1\256\20=\377\344\274" \ + "\21B\377\1:\5\24\377\241\0\0\0\377\1j\12%\377\377\274\21B\377\240\274" \ + "\21B\377\1}\13,\377\227\0\0\0\377\2\16\1\5\377\256\20=\377\351\274\21" \ + "B\377\1}\13,\377\231\0\0\0\377\1\0\0\0\265\334\0\0\0\0\1\0\0\0\222\230" \ + "\0\0\0\377\1\231\16""6\377\344\274\21B\377\2\251\17;\377\14\1\4\377\240" \ + "\0\0\0\377\1F\6\31\377\377\274\21B\377\240\274\21B\377\1X\10\37\377\227" \ + "\0\0\0\377\1i\12%\377\352\274\21B\377\1r\12(\377\231\0\0\0\377\1\0\0" \ + "\0Z\334\0\0\0\0\1\0\0\0""7\230\0\0\0\377\1\205\14/\377\345\274\21B\377" \ + "\1q\12(\377\240\0\0\0\377\1!\3\14\377\377\274\21B\377\240\274\21B\377" \ + "\1""4\5\22\377\226\0\0\0\377\2\35\3\12\377\272\21A\377\352\274\21B\377" \ + "\1f\11$\377\230\0\0\0\377\2\0\0\0\362\0\0\0\12\335\0\0\0\0\1\0\0\0\330" \ + "\227\0\0\0\377\1k\12&\377\345\274\21B\377\2\273\21A\377+\4\17\377\237" \ + "\0\0\0\377\2\1\0\0\377\255\20=\377\377\274\21B\377\236\274\21B\377\2" \ + "\270\21A\377\11\1\3\377\226\0\0\0\377\1z\13+\377\353\274\21B\377\1[\10" \ + "\40\377\230\0\0\0\377\1\0\0\0\240\336\0\0\0\0\1\0\0\0~\227\0\0\0\377" \ + "\1I\7\32\377\346\274\21B\377\2\231\16""6\377\1\0\1\377\237\0\0\0\377" \ + "\1\177\13-\377\377\274\21B\377\236\274\21B\377\1\221\15""3\377\226\0" \ + "\0\0\377\2\35\3\12\377\272\21A\377\353\274\21B\377\1O\7\34\377\230\0" \ + "\0\0\377\1\0\0\0E\336\0\0\0\0\2\0\0\0#\0\0\0\376\226\0\0\0\377\1(\4\16" \ + "\377\347\274\21B\377\1H\6\31\377\237\0\0\0\377\1P\7\34\377\377\274\21" \ + "B\377\236\274\21B\377\1a\11\"\377\226\0\0\0\377\1\200\14-\377\354\274" \ + "\21B\377\1""7\5\23\377\227\0\0\0\377\2\0\0\0\344\0\0\0\2\337\0\0\0\0" \ + "\1\0\0\0\305\226\0\0\0\377\2\10\1\3\377\273\21A\377\346\274\21B\377\2" \ + "\253\17<\377\12\1\4\377\236\0\0\0\377\1\35\3\12\377\377\274\21B\377\236" \ + "\274\21B\377\1/\4\21\377\225\0\0\0\377\2(\4\16\377\273\21B\377\354\274" \ + "\21B\377\1\36\3\13\377\227\0\0\0\377\1\0\0\0\214\340\0\0\0\0\1\0\0\0" \ + "p\227\0\0\0\377\1\243\17""9\377\347\274\21B\377\1a\11\"\377\237\0\0\0" \ + "\377\1\236\16""7\377\377\274\21B\377\234\274\21B\377\2\255\20=\377\2" \ + "\0\1\377\225\0\0\0\377\1\205\14/\377\354\274\21B\377\2\273\21A\377\6" \ + "\1\2\377\227\0\0\0\377\1\0\0\0""7\340\0\0\0\0\1\0\0\0=\227\0\0\0\377" \ + "\1\202\14.\377\347\274\21B\377\2\265\20@\377\27\2\10\377\236\0\0\0\377" \ + "\1d\11#\377\377\274\21B\377\234\274\21B\377\1w\13*\377\225\0\0\0\377" \ + "\2(\4\16\377\273\21B\377\354\274\21B\377\1\251\17;\377\227\0\0\0\377" \ + "\2\0\0\0\374\0\0\0\7\340\0\0\0\0\1\0\0\0\27\227\0\0\0\377\1a\11\"\377" \ + "\350\274\21B\377\1u\13)\377\236\0\0\0\377\1,\4\20\377\377\274\21B\377" \ + "\234\274\21B\377\1\77\6\26\377\225\0\0\0\377\1\205\14/\377\355\274\21" \ + "B\377\1\216\15""2\377\227\0\0\0\377\1\0\0\0\334\342\0\0\0\0\1\0\0\0\357" \ + "\226\0\0\0\377\1""6\5\23\377\350\274\21B\377\2\273\21A\377\40\3\13\377" \ + "\235\0\0\0\377\2\1\0\0\377\242\17""9\377\377\274\21B\377\232\274\21B" \ + "\377\2\260\20>\377\6\1\2\377\224\0\0\0\377\2\40\3\13\377\273\21B\377" \ + "\355\274\21B\377\1u\13)\377\227\0\0\0\377\1\0\0\0\265\342\0\0\0\0\1\0" \ + "\0\0\311\226\0\0\0\377\2\12\1\4\377\272\21A\377\350\274\21B\377\1y\13" \ + "*\377\236\0\0\0\377\1^\11!\377\377\274\21B\377\232\274\21B\377\1q\12" \ + "(\377\225\0\0\0\377\1s\12(\377\356\274\21B\377\1\\\10\40\377\227\0\0" \ + "\0\377\1\0\0\0\216\342\0\0\0\0\1\0\0\0\242\227\0\0\0\377\1\226\16""5" \ + "\377\350\274\21B\377\2\272\21A\377\35\3\12\377\235\0\0\0\377\2\30\2\10" \ + "\377\273\21B\377\377\274\21B\377\231\274\21B\377\1+\4\17\377\224\0\0" \ + "\0\377\2\20\1\6\377\266\20@\377\356\274\21B\377\1\77\6\26\377\227\0\0" \ + "\0\377\1\0\0\0g\342\0\0\0\0\1\0\0\0{\227\0\0\0\377\1i\11%\377\351\274" \ + "\21B\377\1u\13)\377\236\0\0\0\377\1\216\15""2\377\377\274\21B\377\230" \ + "\274\21B\377\2\240\16""8\377\1\0\0\377\224\0\0\0\377\1b\11\"\377\357" \ + "\274\21B\377\1\33\2\11\377\227\0\0\0\377\1\0\0\0@\342\0\0\0\0\1\0\0\0" \ + "H\227\0\0\0\377\1<\5\25\377\351\274\21B\377\2\270\21A\377\31\2\11\377" \ + "\235\0\0\0\377\1;\5\25\377\377\274\21B\377\230\274\21B\377\1N\7\33\377" \ + "\224\0\0\0\377\2\11\1\3\377\257\20>\377\356\274\21B\377\2\260\20>\377" \ + "\1\0\0\377\226\0\0\0\377\2\0\0\0\375\0\0\0\15\342\0\0\0\0\1\0\0\0\24" \ + "\227\0\0\0\377\2\17\1\5\377\273\21B\377\351\274\21B\377\1r\12(\377\235" \ + "\0\0\0\377\2\1\0\1\377\243\17""9\377\377\274\21B\377\226\274\21B\377" \ + "\2\261\20>\377\11\1\3\377\224\0\0\0\377\1M\7\33\377\357\274\21B\377\1" \ + "\217\15""2\377\227\0\0\0\377\1\0\0\0\327\344\0\0\0\0\1\0\0\0\336\227" \ + "\0\0\0\377\1\235\16""7\377\351\274\21B\377\2\267\21@\377\20\1\6\377\235" \ + "\0\0\0\377\1W\10\37\377\377\274\21B\377\226\274\21B\377\1k\12&\377\225" \ + "\0\0\0\377\1\235\16""7\377\357\274\21B\377\1f\11$\377\227\0\0\0\377\1" \ + "\0\0\0\243\344\0\0\0\0\1\0\0\0\252\227\0\0\0\377\1c\11#\377\352\274\21" \ + "B\377\1[\10\40\377\235\0\0\0\377\2\10\1\3\377\255\20=\377\377\274\21" \ + "B\377\224\274\21B\377\2\265\20@\377\22\2\6\377\224\0\0\0\377\1,\4\20" \ + "\377\360\274\21B\377\1""9\5\24\377\227\0\0\0\377\1\0\0\0p\344\0\0\0\0" \ + "\1\0\0\0w\227\0\0\0\377\1*\4\17\377\352\274\21B\377\2\247\17:\377\3\0" \ + "\1\377\235\0\0\0\377\1[\10\40\377\377\274\21B\377\224\274\21B\377\1l" \ + "\12&\377\225\0\0\0\377\1t\12)\377\357\274\21B\377\2\273\21B\377\16\1" \ + "\5\377\227\0\0\0\377\1\0\0\0<\344\0\0\0\0\1\0\0\0\77\227\0\0\0\377\2" \ + "\1\0\1\377\252\17<\377\352\274\21B\377\1;\5\25\377\235\0\0\0\377\2\15" \ + "\1\4\377\262\20>\377\377\274\21B\377\222\274\21B\377\2\270\21A\377\30" \ + "\2\10\377\224\0\0\0\377\2\10\1\3\377\262\20>\377\357\274\21B\377\1\237" \ + "\16""8\377\227\0\0\0\377\2\0\0\0\371\0\0\0\12\344\0\0\0\0\2\0\0\0\6\0" \ + "\0\0\364\227\0\0\0\377\1s\12(\377\352\274\21B\377\1\211\14""0\377\236" \ + "\0\0\0\377\1V\10\36\377\377\274\21B\377\222\274\21B\377\1h\11$\377\225" \ + "\0\0\0\377\1H\7\31\377\360\274\21B\377\1i\12%\377\227\0\0\0\377\1\0\0" \ + "\0\300\346\0\0\0\0\1\0\0\0\273\227\0\0\0\377\1:\5\24\377\352\274\21B" \ + "\377\2\273\21B\377\35\3\12\377\235\0\0\0\377\2\4\0\2\377\241\17""9\377" \ + "\377\274\21B\377\220\274\21B\377\2\256\20=\377\14\1\4\377\225\0\0\0\377" \ + "\1\220\15""2\377\360\274\21B\377\1""4\5\22\377\227\0\0\0\377\1\0\0\0" \ + "\177\346\0\0\0\0\1\0\0\0{\227\0\0\0\377\2\10\1\3\377\266\20@\377\352" \ + "\274\21B\377\1f\11$\377\236\0\0\0\377\1\77\6\26\377\377\274\21B\377\220" \ + "\274\21B\377\1R\7\35\377\225\0\0\0\377\1\35\3\12\377\360\274\21B\377" \ + "\2\265\20\77\377\6\1\2\377\227\0\0\0\377\1\0\0\0>\346\0\0\0\0\1\0\0\0" \ + ":\230\0\0\0\377\1\204\14.\377\352\274\21B\377\2\252\17<\377\2\0\1\377" \ + "\235\0\0\0\377\2\1\0\0\377\220\15""2\377\377\274\21B\377\216\274\21B" \ + "\377\2\236\16""7\377\4\0\2\377\225\0\0\0\377\1`\11\"\377\360\274\21B" \ + "\377\1\206\14/\377\227\0\0\0\377\2\0\0\0\365\0\0\0\6\346\0\0\0\0\2\0" \ + "\0\0\6\0\0\0\363\227\0\0\0\377\1<\5\25\377\353\274\21B\377\1""4\5\22" \ + "\377\236\0\0\0\377\2\33\2\12\377\266\20@\377\377\274\21B\377\214\274" \ + "\21B\377\2\273\21A\377(\4\16\377\226\0\0\0\377\1\241\17""8\377\360\274" \ + "\21B\377\1H\6\31\377\227\0\0\0\377\1\0\0\0\274\350\0\0\0\0\1\0\0\0\253" \ + "\227\0\0\0\377\2\4\0\2\377\255\20=\377\352\274\21B\377\1v\13)\377\237" \ + "\0\0\0\377\1^\10!\377\377\274\21B\377\214\274\21B\377\1o\12'\377\226" \ + "\0\0\0\377\1\40\3\13\377\360\274\21B\377\2\270\21@\377\14\1\4\377\227" \ + "\0\0\0\377\1\0\0\0n\350\0\0\0\0\1\0\0\0^\230\0\0\0\377\1k\12&\377\352" \ + "\274\21B\377\2\262\20\77\377\7\1\2\377\236\0\0\0\377\2\7\1\2\377\236" \ + "\16""7\377\377\274\21B\377\212\274\21B\377\2\251\17;\377\15\1\5\377\226" \ + "\0\0\0\377\1[\10\40\377\360\274\21B\377\1\213\15""1\377\230\0\0\0\377" \ + "\1\0\0\0!\350\0\0\0\0\2\0\0\0\22\0\0\0\373\227\0\0\0\377\1%\3\15\377" \ + "\353\274\21B\377\1=\6\25\377\237\0\0\0\377\2#\3\14\377\270\21@\377\377" \ + "\274\21B\377\210\274\21B\377\2\273\21B\3771\4\21\377\227\0\0\0\377\1" \ + "\231\16""6\377\360\274\21B\377\1E\6\30\377\227\0\0\0\377\1\0\0\0\324" \ + "\352\0\0\0\0\1\0\0\0\302\230\0\0\0\377\1\231\16""6\377\352\274\21B\377" \ + "\1\177\13-\377\240\0\0\0\377\1X\10\37\377\377\274\21B\377\210\274\21" \ + "B\377\1k\12&\377\227\0\0\0\377\1\32\2\11\377\360\274\21B\377\2\260\20" \ + ">\377\7\1\2\377\227\0\0\0\377\1\0\0\0\207\352\0\0\0\0\1\0\0\0w\230\0" \ + "\0\0\377\1V\10\36\377\352\274\21B\377\2\265\20@\377\11\1\3\377\237\0" \ + "\0\0\377\2\3\0\1\377\220\15""2\377\377\274\21B\377\206\274\21B\377\2" \ + "\236\16""7\377\10\1\3\377\227\0\0\0\377\1V\10\36\377\360\274\21B\377" \ + "\1p\12'\377\230\0\0\0\377\1\0\0\0<\352\0\0\0\0\2\0\0\0\36\0\0\0\376\227" \ + "\0\0\0\377\2\22\2\6\377\270\21A\377\352\274\21B\377\1""9\5\24\377\240" \ + "\0\0\0\377\2\20\1\6\377\250\17;\377\377\274\21B\377\204\274\21B\377\2" \ + "\260\20>\377\33\2\11\377\230\0\0\0\377\1\221\15""3\377\360\274\21B\377" \ + "\1)\4\16\377\227\0\0\0\377\2\0\0\0\337\0\0\0\1\353\0\0\0\0\1\0\0\0\303" \ + "\230\0\0\0\377\1u\13)\377\352\274\21B\377\1o\12'\377\241\0\0\0\377\2" \ + ")\4\16\377\270\21@\377\377\274\21B\377\202\274\21B\377\2\273\21B\377" \ + "9\5\24\377\230\0\0\0\377\2\15\1\4\377\272\21A\377\357\274\21B\377\1\222" \ + "\15""3\377\230\0\0\0\377\1\0\0\0\210\354\0\0\0\0\1\0\0\0i\230\0\0\0\377" \ + "\2\40\3\13\377\273\21B\377\351\274\21B\377\1\244\17:\377\242\0\0\0\377" \ + "\1T\10\36\377\377\274\21B\377\202\274\21B\377\1e\11#\377\231\0\0\0\377" \ + "\1:\5\24\377\360\274\21B\377\1A\6\27\377\230\0\0\0\377\1\0\0\0-\354\0" \ + "\0\0\0\2\0\0\0\24\0\0\0\372\230\0\0\0\377\1\212\14""0\377\352\274\21" \ + "B\377\1\33\2\12\377\242\0\0\0\377\1l\12&\377\377\274\21B\377\2z\13+\377" \ + "\1\0\0\377\231\0\0\0\377\1j\12%\377\357\274\21B\377\2\247\17;\377\3\0" \ + "\1\377\227\0\0\0\377\1\0\0\0\322\356\0\0\0\0\1\0\0\0\267\230\0\0\0\377" \ + "\1""6\5\23\377\352\274\21B\377\1P\7\34\377\242\0\0\0\377\2\2\0\1\377" \ + "\204\14.\377\375\274\21B\377\2\223\15""4\377\6\1\2\377\232\0\0\0\377" \ + "\1\231\16""6\377\357\274\21B\377\1W\10\37\377\230\0\0\0\377\1\0\0\0z" \ + "\356\0\0\0\0\1\0\0\0Q\230\0\0\0\377\2\1\0\0\377\235\16""7\377\351\274" \ + "\21B\377\1\205\14/\377\243\0\0\0\377\2\15\1\4\377\231\16""6\377\373\274" \ + "\21B\377\2\244\17""9\377\24\2\7\377\232\0\0\0\377\2\21\2\6\377\273\21" \ + "B\377\356\274\21B\377\2\251\17;\377\6\1\2\377\227\0\0\0\377\2\0\0\0\372" \ + "\0\0\0\30\356\0\0\0\0\2\0\0\0\4\0\0\0\344\230\0\0\0\377\1M\7\33\377\351" \ + "\274\21B\377\2\262\20\77\377\2\0\1\377\243\0\0\0\377\2\17\1\5\377\235" \ + "\16""7\377\371\274\21B\377\2\245\17:\377\25\2\7\377\233\0\0\0\377\1\77" \ + "\6\26\377\357\274\21B\377\1S\7\35\377\230\0\0\0\377\1\0\0\0\253\360\0" \ + "\0\0\0\1\0\0\0\200\230\0\0\0\377\2\7\1\3\377\255\20=\377\351\274\21B" \ + "\377\1#\3\14\377\244\0\0\0\377\2\27\2\10\377\247\17:\377\367\274\21B" \ + "\377\2\257\20=\377!\3\14\377\234\0\0\0\377\1n\12'\377\356\274\21B\377" \ + "\2\252\17<\377\10\1\3\377\230\0\0\0\377\1\0\0\0D\360\0\0\0\0\2\0\0\0" \ + "\34\0\0\0\373\230\0\0\0\377\1S\7\35\377\351\274\21B\377\1L\7\33\377\245" \ + "\0\0\0\377\2\25\2\10\377\241\17""8\377\365\274\21B\377\2\251\17;\377" \ + "\35\3\12\377\235\0\0\0\377\1\231\16""6\377\356\274\21B\377\1H\6\31\377" \ + "\230\0\0\0\377\2\0\0\0\331\0\0\0\1\361\0\0\0\0\1\0\0\0\263\230\0\0\0" \ + "\377\2\6\1\2\377\247\17:\377\350\274\21B\377\1t\13)\377\246\0\0\0\377" \ + "\2\21\2\6\377\233\16""6\377\363\274\21B\377\2\247\17:\377\34\3\12\377" \ + "\235\0\0\0\377\2\7\1\2\377\271\21A\377\355\274\21B\377\2\224\15""4\377" \ + "\1\0\0\377\230\0\0\0\377\1\0\0\0v\362\0\0\0\0\1\0\0\0=\231\0\0\0\377" \ + "\1K\7\32\377\350\274\21B\377\1\234\16""7\377\247\0\0\0\377\2\22\2\6\377" \ + "\231\16""6\377\361\274\21B\377\2\244\17""9\377\34\3\12\377\236\0\0\0" \ + "\377\1&\3\15\377\355\274\21B\377\2\273\21B\377.\4\20\377\230\0\0\0\377" \ + "\2\0\0\0\357\0\0\0\16\363\0\0\0\0\1\0\0\0\305\230\0\0\0\377\2\4\0\1\377" \ + "\242\17""9\377\347\274\21B\377\2\273\21A\377\12\1\4\377\247\0\0\0\377" \ + "\2\10\1\3\377\202\14.\377\357\274\21B\377\2\216\15""2\377\15\1\5\377" \ + "\237\0\0\0\377\1L\7\33\377\355\274\21B\377\1p\12'\377\231\0\0\0\377\1" \ + "\0\0\0\212\364\0\0\0\0\1\0\0\0Q\231\0\0\0\377\1E\6\30\377\350\274\21" \ + "B\377\1""1\4\21\377\250\0\0\0\377\2\4\0\1\377t\12)\377\355\274\21B\377" \ + "\2\202\14.\377\7\1\3\377\240\0\0\0\377\1p\12'\377\354\274\21B\377\2\247" \ + "\17:\377\12\1\4\377\230\0\0\0\377\2\0\0\0\371\0\0\0\33\364\0\0\0\0\2" \ + "\0\0\0\2\0\0\0\326\230\0\0\0\377\2\3\0\1\377\237\16""8\377\347\274\21" \ + "B\377\1R\7\35\377\252\0\0\0\377\2K\7\32\377\270\21@\377\351\274\21B\377" \ + "\3\273\21A\377X\10\37\377\1\0\0\377\241\0\0\0\377\1\223\15""4\377\354" \ + "\274\21B\377\1<\5\25\377\231\0\0\0\377\1\0\0\0\236\366\0\0\0\0\1\0\0" \ + "\0f\231\0\0\0\377\1@\6\27\377\347\274\21B\377\1l\12&\377\253\0\0\0\377" \ + "\2,\4\20\377\253\17<\377\347\274\21B\377\2\261\20>\3777\5\23\377\242" \ + "\0\0\0\377\2\4\0\1\377\266\20@\377\353\274\21B\377\1r\12(\377\231\0\0" \ + "\0\377\2\0\0\0\375\0\0\0,\366\0\0\0\0\2\0\0\0\3\0\0\0\330\231\0\0\0\377" \ + "\1{\13+\377\346\274\21B\377\1\210\14""0\377\254\0\0\0\377\2\33\2\11\377" \ + "\226\16""5\377\345\274\21B\377\2\237\16""8\377#\3\14\377\243\0\0\0\377" \ + "\1\34\3\12\377\353\274\21B\377\2\241\17""8\377\11\1\3\377\231\0\0\0\377" \ + "\1\0\0\0\242\370\0\0\0\0\1\0\0\0[\231\0\0\0\377\2\14\1\4\377\244\17:" \ + "\377\345\274\21B\377\1\242\17""9\377\255\0\0\0\377\3\2\0\1\377X\10\37" \ + "\377\270\21A\377\341\274\21B\377\3\273\21A\377d\11#\377\5\0\2\377\244" \ + "\0\0\0\377\1""4\5\22\377\352\274\21B\377\2\265\20@\377\40\3\13\377\231" \ + "\0\0\0\377\2\0\0\0\372\0\0\0#\370\0\0\0\0\2\0\0\0\2\0\0\0\320\231\0\0" \ + "\0\377\2,\4\20\377\271\21A\377\344\274\21B\377\2\271\21A\377\4\0\1\377" \ + "\256\0\0\0\377\2""1\4\21\377\244\17:\377\337\274\21B\377\2\253\17<\377" \ + ";\5\25\377\246\0\0\0\377\1J\7\32\377\352\274\21B\377\1T\10\36\377\232" \ + "\0\0\0\377\1\0\0\0\232\372\0\0\0\0\1\0\0\0V\232\0\0\0\377\1]\10!\377" \ + "\345\274\21B\377\1\33\2\11\377\257\0\0\0\377\3\6\1\2\377^\11!\377\270" \ + "\21A\377\333\274\21B\377\3\273\21A\377k\12&\377\12\1\4\377\247\0\0\0" \ + "\377\1a\11\"\377\351\274\21B\377\1z\13+\377\232\0\0\0\377\2\0\0\0\371" \ + "\0\0\0!\373\0\0\0\0\1\0\0\0\301\231\0\0\0\377\2\3\0\1\377\215\15""1\377" \ + "\344\274\21B\377\1""3\5\22\377\261\0\0\0\377\2+\4\17\377\234\16""7\377" \ + "\331\274\21B\377\2\243\17""9\3774\5\22\377\251\0\0\0\377\1w\13*\377\350" \ + "\274\21B\377\2\237\16""8\377\12\1\3\377\232\0\0\0\377\1\0\0\0\210\374" \ + "\0\0\0\0\2\0\0\0""1\0\0\0\375\231\0\0\0\377\2\15\1\5\377\244\17""9\377" \ + "\343\274\21B\377\1B\6\27\377\262\0\0\0\377\3\1\0\1\377E\6\30\377\256" \ + "\20=\377\325\274\21B\377\3\262\20\77\377R\7\35\377\4\0\1\377\252\0\0" \ + "\0\377\1\216\15""2\377\347\274\21B\377\2\265\20@\377\"\3\14\377\232\0" \ + "\0\0\377\2\0\0\0\346\0\0\0\15\375\0\0\0\0\1\0\0\0\237\232\0\0\0\377\2" \ + "#\3\14\377\265\20@\377\342\274\21B\377\1N\7\33\377\264\0\0\0\377\3\24" \ + "\2\7\377z\13+\377\273\21A\377\322\274\21B\377\2\202\14.\377\33\2\11\377" \ + "\254\0\0\0\377\1\243\17""9\377\347\274\21B\377\1R\7\35\377\233\0\0\0" \ + "\377\1\0\0\0b\376\0\0\0\0\2\0\0\0\27\0\0\0\361\232\0\0\0\377\1N\7\33" \ + "\377\342\274\21B\377\1Z\10\40\377\266\0\0\0\377\3\35\3\12\377}\13,\377" \ + "\273\21B\377\316\274\21B\377\2}\13,\377\40\3\13\377\256\0\0\0\377\1\265" \ + "\20\77\377\346\274\21B\377\1v\13)\377\233\0\0\0\377\2\0\0\0\312\0\0\0" \ + "\2\377\0\0\0\0\1\0\0\0z\233\0\0\0\377\1j\12%\377\341\274\21B\377\1f\11" \ + "$\377\270\0\0\0\377\2,\4\20\377\210\14""0\377\313\274\21B\377\2\221\15" \ + "3\3775\5\23\377\257\0\0\0\377\2\1\0\0\377\273\21B\377\345\274\21B\377" \ + "\2\216\15""2\377\4\0\1\377\232\0\0\0\377\2\0\0\0\376\0\0\0>\377\0\0\0" \ + "\0\3\0\0\0\0\0\0\0\4\0\0\0\317\232\0\0\0\377\2\1\0\1\377\202\14.\377" \ + "\340\274\21B\377\1r\12(\377\272\0\0\0\377\3\40\3\13\377w\13*\377\271" \ + "\21A\377\305\274\21B\377\3\272\21A\377w\13*\377#\3\14\377\261\0\0\0\377" \ + "\1\7\1\3\377\345\274\21B\377\2\244\17""9\377\16\1\5\377\233\0\0\0\377" \ + "\1\0\0\0\230\377\0\0\0\0\203\0\0\0\0\2\0\0\0""6\0\0\0\375\232\0\0\0\377" \ + "\2\12\1\4\377\234\16""7\377\337\274\21B\377\1}\13,\377\274\0\0\0\377" \ + "\3\32\2\11\377e\11#\377\255\20=\377\301\274\21B\377\3\261\20>\377l\12" \ + "&\377\40\3\13\377\263\0\0\0\377\1\17\1\5\377\344\274\21B\377\2\265\20" \ + "@\377)\4\16\377\233\0\0\0\377\2\0\0\0\345\0\0\0\17\377\0\0\0\0\204\0" \ + "\0\0\0\1\0\0\0\227\233\0\0\0\377\2\27\2\10\377\252\17<\377\336\274\21" \ + "B\377\1\200\14-\377\276\0\0\0\377\4\5\0\2\377B\6\27\377\210\14""0\377" \ + "\272\21A\377\273\274\21B\377\4\273\21B\377\220\15""2\377I\7\32\377\10" \ + "\1\3\377\265\0\0\0\377\1\27\2\10\377\343\274\21B\377\2\271\21A\3777\5" \ + "\23\377\234\0\0\0\377\1\0\0\0Z\377\0\0\0\0\205\0\0\0\0\2\0\0\0\22\0\0" \ + "\0\346\233\0\0\0\377\2\33\2\12\377\253\17<\377\335\274\21B\377\1z\13" \ + "+\377\301\0\0\0\377\3\23\2\7\377T\10\36\377\230\16""5\377\267\274\21" \ + "B\377\3\236\16""7\377[\10\40\377\30\2\10\377\270\0\0\0\377\1\36\3\13" \ + "\377\343\274\21B\377\1I\7\32\377\234\0\0\0\377\2\0\0\0\273\0\0\0\1\377" \ + "\0\0\0\0\206\0\0\0\0\2\0\0\0D\0\0\0\376\233\0\0\0\377\2'\4\16\377\262" \ + "\20\77\377\334\274\21B\377\1u\13)\377\304\0\0\0\377\4\17\1\5\377E\6\30" \ + "\377\204\14.\377\270\21@\377\257\274\21B\377\4\271\21A\377\212\14""0" \ + "\377R\7\35\377\27\2\10\377\273\0\0\0\377\1%\3\15\377\342\274\21B\377" \ + "\1e\11#\377\234\0\0\0\377\2\0\0\0\355\0\0\0\32\377\0\0\0\0\210\0\0\0" \ + "\0\1\0\0\0\227\234\0\0\0\377\2""0\4\21\377\266\20@\377\333\274\21B\377" \ + "\1p\12'\377\307\0\0\0\377\4\17\1\5\377\77\6\26\377o\12'\377\240\16""8" \ + "\377\251\274\21B\377\4\244\17:\377t\12)\377C\6\30\377\22\2\6\377\276" \ + "\0\0\0\377\1#\3\14\377\341\274\21B\377\2w\13*\377\1\0\0\377\234\0\0\0" \ + "\377\1\0\0\0Z\377\0\0\0\0\211\0\0\0\0\2\0\0\0\13\0\0\0\332\234\0\0\0" \ + "\377\2\77\6\26\377\271\21A\377\332\274\21B\377\1l\12&\377\313\0\0\0\377" \ + "\5\22\2\6\377<\5\25\377f\11$\377\217\15""2\377\263\20\77\377\237\274" \ + "\21B\377\5\266\20@\377\222\15""3\377i\12%\377@\6\27\377\26\2\10\377\302" \ + "\0\0\0\377\1\35\3\12\377\340\274\21B\377\2x\13*\377\1\0\1\377\234\0\0" \ + "\0\377\1\0\0\0\252\377\0\0\0\0\213\0\0\0\0\2\0\0\0>\0\0\0\374\234\0\0" \ + "\0\377\2A\6\27\377\272\21A\377\331\274\21B\377\1f\11$\377\317\0\0\0\377" \ + "\10\1\0\0\377\30\2\10\3777\5\23\377V\10\36\377r\12(\377\207\14/\377\235" \ + "\16""7\377\263\20\77\377\221\274\21B\377\10\265\20@\377\237\16""8\377" \ + "\212\14""0\377t\13)\377Y\10\37\377:\5\24\377\33\2\11\377\2\0\1\377\306" \ + "\0\0\0\377\1\30\2\10\377\337\274\21B\377\2\204\14.\377\4\0\2\377\234" \ + "\0\0\0\377\2\0\0\0\347\0\0\0\27\377\0\0\0\0\214\0\0\0\0\1\0\0\0v\235" \ + "\0\0\0\377\2<\5\25\377\270\21A\377\330\274\21B\377\1X\10\37\377\327\0" \ + "\0\0\377\7\12\1\3\377\26\2\10\377\"\3\14\377.\4\20\377:\5\24\377\77\6" \ + "\26\377E\6\30\377\203K\7\32\377\7G\6\31\377\77\6\26\377<\5\25\377/\4" \ + "\21\377#\3\14\377\27\2\10\377\13\1\4\377\316\0\0\0\377\1\14\1\4\377\336" \ + "\274\21B\377\2\203\14.\377\4\0\1\377\234\0\0\0\377\2\0\0\0\373\0\0\0" \ + "=\377\0\0\0\0\215\0\0\0\0\2\0\0\0\1\0\0\0\261\235\0\0\0\377\2B\6\27\377" \ + "\270\21A\377\327\274\21B\377\1E\6\30\377\377\0\0\0\377\267\0\0\0\377" \ + "\2\1\0\0\377\270\21A\377\334\274\21B\377\2\210\14""0\377\7\1\3\377\235" \ + "\0\0\0\377\1\0\0\0|\377\0\0\0\0\217\0\0\0\0\2\0\0\0\27\0\0\0\347\235" \ + "\0\0\0\377\2""5\5\23\377\264\20\77\377\326\274\21B\377\1""1\4\21\377" \ + "\377\0\0\0\377\270\0\0\0\377\1\251\17;\377\333\274\21B\377\2\200\14-" \ + "\377\5\0\2\377\235\0\0\0\377\2\0\0\0\300\0\0\0\3\377\0\0\0\0\220\0\0" \ + "\0\0\2\0\0\0""8\0\0\0\370\235\0\0\0\377\2%\3\15\377\254\20<\377\325\274" \ + "\21B\377\1\25\2\7\377\377\0\0\0\377\270\0\0\0\377\1\223\15""4\377\332" \ + "\274\21B\377\2r\12(\377\1\0\1\377\235\0\0\0\377\2\0\0\0\336\0\0\0\23" \ + "\377\0\0\0\0\222\0\0\0\0\1\0\0\0h\236\0\0\0\377\2\36\3\13\377\244\17" \ + "9\377\323\274\21B\377\2\263\20\77\377\1\0\0\377\377\0\0\0\377\270\0\0" \ + "\0\377\1z\13+\377\331\274\21B\377\2l\12&\377\1\0\1\377\235\0\0\0\377" \ + "\2\0\0\0\366\0\0\0""0\377\0\0\0\0\224\0\0\0\0\1\0\0\0\234\236\0\0\0\377" \ + "\2\20\1\6\377\221\15""3\377\322\274\21B\377\1\223\15""4\377\377\0\0\0" \ + "\377\271\0\0\0\377\1a\11\"\377\327\274\21B\377\2\273\21B\377W\10\37\377" \ + "\237\0\0\0\377\1\0\0\0]\377\0\0\0\0\225\0\0\0\0\2\0\0\0\12\0\0\0\315" \ + "\236\0\0\0\377\2\3\0\1\377n\12'\377\321\274\21B\377\1h\11$\377\377\0" \ + "\0\0\377\271\0\0\0\377\1=\6\25\377\326\274\21B\377\2\265\20@\377;\5\25" \ + "\377\237\0\0\0\377\1\0\0\0\232\377\0\0\0\0\227\0\0\0\0\2\0\0\0\24\0\0" \ + "\0\332\236\0\0\0\377\3\1\0\0\377X\10\37\377\272\21A\377\317\274\21B\377" \ + "\1\77\6\26\377\377\0\0\0\377\271\0\0\0\377\1\27\2\10\377\325\274\21B" \ + "\377\2\257\20>\3771\4\21\377\237\0\0\0\377\2\0\0\0\257\0\0\0\3\377\0" \ + "\0\0\0\230\0\0\0\0\2\0\0\0#\0\0\0\351\237\0\0\0\377\2""0\4\21\377\254" \ + "\20<\377\315\274\21B\377\2\272\21A\377\17\1\5\377\377\0\0\0\377\272\0" \ + "\0\0\377\1\252\17<\377\323\274\21B\377\2\236\16""7\377\33\2\12\377\237" \ + "\0\0\0\377\2\0\0\0\307\0\0\0\11\377\0\0\0\0\232\0\0\0\0\2\0\0\0@\0\0" \ + "\0\370\237\0\0\0\377\2\24\2\7\377\221\15""3\377\314\274\21B\377\1\221" \ + "\15""3\377\377\0\0\0\377\273\0\0\0\377\1w\13*\377\322\274\21B\377\2\177" \ + "\13-\377\10\1\3\377\237\0\0\0\377\2\0\0\0\342\0\0\0\33\377\0\0\0\0\234" \ + "\0\0\0\0\2\0\0\0M\0\0\0\373\237\0\0\0\377\3\3\0\1\377a\11\"\377\272\21" \ + "A\377\312\274\21B\377\1V\10\36\377\377\0\0\0\377\273\0\0\0\377\1E\6\30" \ + "\377\320\274\21B\377\3\273\21A\377c\11#\377\2\0\1\377\237\0\0\0\377\2" \ + "\0\0\0\350\0\0\0#\377\0\0\0\0\236\0\0\0\0\1\0\0\0e\241\0\0\0\377\2'\4" \ + "\16\377\241\17""8\377\310\274\21B\377\2\267\21@\377\16\1\5\377\377\0" \ + "\0\0\377\273\0\0\0\377\2\20\1\6\377\271\21A\377\316\274\21B\377\2\252" \ + "\17<\3772\5\22\377\240\0\0\0\377\2\0\0\0\362\0\0\0""4\377\0\0\0\0\240" \ + "\0\0\0\0\1\0\0\0}\241\0\0\0\377\3\14\1\4\377t\12)\377\273\21B\377\306" \ + "\274\21B\377\1}\13,\377\377\0\0\0\377\275\0\0\0\377\1\202\14.\377\315" \ + "\274\21B\377\2{\13+\377\13\1\4\377\240\0\0\0\377\2\0\0\0\370\0\0\0B\377" \ + "\0\0\0\0\241\0\0\0\0\2\0\0\0\1\0\0\0\222\242\0\0\0\377\2+\4\17\377\237" \ + "\16""8\377\304\274\21B\377\2\273\21B\377#\3\14\377\377\0\0\0\377\275" \ + "\0\0\0\377\1\77\6\26\377\313\274\21B\377\3\264\20\77\377N\7\33\377\1" \ + "\0\0\377\240\0\0\0\377\2\0\0\0\374\0\0\0Y\377\0\0\0\0\244\0\0\0\0\1\0" \ + "\0\0\204\242\0\0\0\377\3\11\1\3\377h\11$\377\270\21A\377\302\274\21B" \ + "\377\1\211\14""0\377\377\0\0\0\377\276\0\0\0\377\2\2\0\1\377\241\17""8" \ + "\377\311\274\21B\377\2\213\15""1\377\26\2\10\377\241\0\0\0\377\2\0\0" \ + "\0\372\0\0\0R\377\0\0\0\0\246\0\0\0\0\1\0\0\0\204\243\0\0\0\377\2\32" \ + "\2\11\377\204\14.\377\300\274\21B\377\2\270\21A\377\40\3\13\377\377\0" \ + "\0\0\377\277\0\0\0\377\1M\7\33\377\307\274\21B\377\3\265\20\77\377W\10" \ + "\37\377\2\0\1\377\241\0\0\0\377\2\0\0\0\372\0\0\0R\377\0\0\0\0\247\0" \ + "\0\0\0\2\0\0\0\1\0\0\0\210\244\0\0\0\377\2>\6\26\377\241\17""8\377\276" \ + "\274\21B\377\1j\12%\377\377\0\0\0\377\300\0\0\0\377\2\5\0\2\377\241\17" \ + "8\377\305\274\21B\377\2\204\14.\377\30\2\11\377\242\0\0\0\377\2\0\0\0" \ + "\370\0\0\0U\377\0\0\0\0\252\0\0\0\0\2\0\0\0i\0\0\0\375\243\0\0\0\377" \ + "\3\1\0\1\377\77\6\26\377\242\17""9\377\273\274\21B\377\2\231\16""6\377" \ + "\6\1\2\377\377\0\0\0\377\301\0\0\0\377\1""6\5\23\377\303\274\21B\377" \ + "\2\244\17:\377:\5\24\377\243\0\0\0\377\2\0\0\0\360\0\0\0>\377\0\0\0\0" \ + "\254\0\0\0\0\2\0\0\0Q\0\0\0\367\244\0\0\0\377\3\7\1\3\377U\10\36\377" \ + "\253\17<\377\270\274\21B\377\2\265\20\77\377\40\3\13\377\377\0\0\0\377" \ + "\303\0\0\0\377\1y\13*\377\300\274\21B\377\3\260\20>\377W\10\37\377\6" \ + "\1\2\377\243\0\0\0\377\2\0\0\0\344\0\0\0+\377\0\0\0\0\256\0\0\0\0\2\0" \ + "\0\0B\0\0\0\362\245\0\0\0\377\3\7\1\3\377S\10\35\377\252\17<\377\265" \ + "\274\21B\377\2\270\21@\3776\5\23\377\377\0\0\0\377\304\0\0\0\377\2\11" \ + "\1\3\377\240\16""8\377\275\274\21B\377\3\267\21@\377l\12&\377\17\1\5" \ + "\377\244\0\0\0\377\2\0\0\0\332\0\0\0!\377\0\0\0\0\260\0\0\0\0\2\0\0\0" \ + "5\0\0\0\353\246\0\0\0\377\3\4\0\2\377E\6\30\377\227\16""5\377\262\274" \ + "\21B\377\2\267\21@\377=\6\25\377\377\0\0\0\377\306\0\0\0\377\2\35\3\12" \ + "\377\255\20=\377\272\274\21B\377\3\265\20\77\377j\12%\377\24\2\7\377" \ + "\245\0\0\0\377\2\0\0\0\317\0\0\0\27\377\0\0\0\0\262\0\0\0\0\2\0\0\0/" \ + "\0\0\0\345\250\0\0\0\377\3-\4\20\377w\13*\377\265\20\77\377\256\274\21" \ + "B\377\2\255\20=\377+\4\17\377\377\0\0\0\377\310\0\0\0\377\2$\3\15\377" \ + "\257\20>\377\267\274\21B\377\3\257\20>\377c\11#\377\20\1\6\377\246\0" \ + "\0\0\377\2\0\0\0\306\0\0\0\23\377\0\0\0\0\264\0\0\0\0\2\0\0\0\23\0\0" \ + "\0\275\251\0\0\0\377\4\12\1\4\377J\7\32\377\214\15""1\377\272\21A\377" \ + "\251\274\21B\377\3\264\20\77\377d\11#\377\16\1\5\377\377\0\0\0\377\312" \ + "\0\0\0\377\2\21\2\6\377\203\14.\377\264\274\21B\377\3\234\16""7\377E" \ + "\6\30\377\4\0\2\377\247\0\0\0\377\2\0\0\0\210\0\0\0\4\377\0\0\0\0\266" \ + "\0\0\0\0\2\0\0\0\4\0\0\0\221\253\0\0\0\377\4\17\1\5\377J\7\32\377\204" \ + "\14.\377\263\20\77\377\244\274\21B\377\3\257\20=\377a\11\"\377\17\1\5" \ + "\377\377\0\0\0\377\315\0\0\0\377\3\1\0\1\377I\7\32\377\255\20=\377\257" \ + "\274\21B\377\4\266\20@\377}\13,\3776\5\23\377\1\0\1\377\247\0\0\0\377" \ + "\2\0\0\0\371\0\0\0f\377\0\0\0\0\272\0\0\0\0\2\0\0\0f\0\0\0\371\254\0" \ + "\0\0\377\5\1\0\1\377&\3\15\377X\10\37\377\212\14""0\377\267\21@\377\235" \ + "\274\21B\377\4\253\17<\377k\12&\377,\4\20\377\1\0\1\377\333\0\0\0\377" \ + "\15\3\0\1\377\22\2\6\377#\3\14\3775\5\23\377E\6\30\377T\10\36\377d\11" \ + "#\377o\12'\377z\13+\377\205\14/\377\221\15""3\377\234\16""7\377\247\17" \ + ";\377\217\257\20>\377\1\247\17;\377\202\243\17""9\377\12\236\16""7\377" \ + "\221\15""3\377\203\14.\377u\13)\377h\11$\377[\10\40\377M\7\33\377<\5" \ + "\25\377%\3\15\377\16\1\5\377\314\0\0\0\377\3\15\1\4\377c\11#\377\264" \ + "\20\77\377\252\274\21B\377\4\273\21A\377\217\15""2\377M\7\33\377\15\1" \ + "\4\377\251\0\0\0\377\2\0\0\0\347\0\0\0;\377\0\0\0\0\274\0\0\0\0\2\0\0" \ + "\0;\0\0\0\350\257\0\0\0\377\5\14\1\4\377;\5\25\377a\11\"\377\203\14." \ + "\377\245\17:\377\225\274\21B\377\5\265\20\77\377\216\15""2\377d\11#\377" \ + "8\5\24\377\6\1\2\377\327\0\0\0\377\7\15\1\4\377(\4\16\377C\6\30\377^" \ + "\11!\377z\13+\377\225\15""4\377\255\20=\377\251\274\21B\377\10\263\20" \ + "\77\377\234\16""7\377\205\14/\377n\12'\377S\7\35\3775\5\23\377\30\2\11" \ + "\377\1\0\1\377\306\0\0\0\377\3\20\1\6\377[\10\40\377\244\17""9\377\245" \ + "\274\21B\377\4\271\21A\377\217\15""2\377S\10\35\377\25\2\7\377\253\0" \ + "\0\0\377\2\0\0\0\312\0\0\0\33\377\0\0\0\0\276\0\0\0\0\2\0\0\0#\0\0\0" \ + "\317\263\0\0\0\377\10\14\1\4\377.\4\20\377P\7\34\377g\11$\377v\13)\377" \ + "\204\14.\377\223\15""4\377\241\17""8\377\206\257\20>\377\10\252\17<\377" \ + "\226\16""5\377\203\14.\377o\12'\377]\10!\377I\7\32\377%\3\15\377\3\0" \ + "\1\377\325\0\0\0\377\6\14\1\4\377,\4\20\377L\7\33\377n\12'\377\216\15" \ + "2\377\256\20=\377\267\274\21B\377\6\266\20@\377\232\16""6\377}\13,\377" \ + "^\11!\377;\5\25\377\30\2\10\377\303\0\0\0\377\4\1\0\1\377.\4\20\377o" \ + "\12'\377\254\20<\377\237\274\21B\377\4\242\17""9\377u\13)\377@\6\27\377" \ + "\15\1\4\377\255\0\0\0\377\2\0\0\0\253\0\0\0\15\377\0\0\0\0\300\0\0\0" \ + "\0\3\0\0\0\4\0\0\0\200\0\0\0\375\377\0\0\0\377\230\0\0\0\377\5\12\1\3" \ + "\3772\5\22\377]\10!\377\205\14/\377\247\17:\377\303\274\21B\377\5\257" \ + "\20>\377\214\15""1\377i\11%\377D\6\30\377\30\2\10\377\301\0\0\0\377\6" \ + "\1\0\1\377$\3\15\377V\10\36\377\200\14-\377\243\17""9\377\273\21B\377" \ + "\225\274\21B\377\5\261\20>\377\214\15""1\377f\11$\377\77\6\26\377\22" \ + "\2\6\377\257\0\0\0\377\2\0\0\0\357\0\0\0U\377\0\0\0\0\304\0\0\0\0\2\0" \ + "\0\0A\0\0\0\344\377\0\0\0\377\223\0\0\0\377\5\32\2\11\377E\6\30\377o" \ + "\12'\377\232\16""6\377\272\21A\377\314\274\21B\377\5\247\17;\377z\13" \ + "+\377M\7\33\377\40\3\13\377\1\0\0\377\301\0\0\0\377\11\13\1\4\377-\4" \ + "\20\377P\7\34\377n\12'\377~\13,\377\216\15""2\377\234\16""7\377\253\17" \ + "<\377\271\21A\377\204\274\21B\377\12\270\21@\377\257\20>\377\244\17""9" \ + "\377\220\15""2\377}\13,\377h\11$\377M\7\33\3773\5\22\377\30\2\11\377" \ + "\1\0\0\377\262\0\0\0\377\2\0\0\0\305\0\0\0\40\377\0\0\0\0\306\0\0\0\0" \ + "\2\0\0\0\24\0\0\0\262\377\0\0\0\377\216\0\0\0\377\4\22\2\6\377C\6\30" \ + "\377t\12)\377\245\17:\377\325\274\21B\377\4\255\20=\377y\13*\377@\6\27" \ + "\377\14\1\4\377\377\0\0\0\377\206\0\0\0\377\3\0\0\0\375\0\0\0\200\0\0" \ + "\0\4\377\0\0\0\0\310\0\0\0\0\3\0\0\0\2\0\0\0w\0\0\0\370\377\0\0\0\377" \ + "\210\0\0\0\377\4\4\0\2\3775\5\23\377k\12&\377\234\16""7\377\334\274\21" \ + "B\377\4\271\21A\377\215\15""1\377V\10\36\377\34\3\12\377\377\0\0\0\377" \ + "\202\0\0\0\377\2\0\0\0\350\0\0\0L\377\0\0\0\0\314\0\0\0\0\2\0\0\0\"\0" \ + "\0\0\272\377\0\0\0\377\204\0\0\0\377\4\21\2\6\377K\7\32\377\204\14.\377" \ + "\266\20@\377\343\274\21B\377\3\244\17:\377d\11#\377\36\3\13\377\374\0" \ + "\0\0\377\3\0\0\0\375\0\0\0\221\0\0\0\16\377\0\0\0\0\317\0\0\0\0\2\0\0" \ + "\0U\0\0\0\354\376\0\0\0\377\4\13\1\4\377H\6\31\377\205\14/\377\267\21" \ + "@\377\350\274\21B\377\4\273\21B\377\223\15""4\377S\7\35\377\17\1\5\377" \ + "\370\0\0\0\377\2\0\0\0\326\0\0\0;\377\0\0\0\0\322\0\0\0\0\2\0\0\0\27" \ + "\0\0\0\242\372\0\0\0\377\4\11\1\3\377E\6\30\377\212\14""0\377\272\21" \ + "A\377\356\274\21B\377\3\270\21A\377}\13,\3772\5\22\377\364\0\0\0\377" \ + "\3\0\0\0\371\0\0\0\200\0\0\0\10\377\0\0\0\0\325\0\0\0\0\2\0\0\0T\0\0" \ + "\0\336\366\0\0\0\377\3)\4\16\377p\12'\377\257\20=\377\364\274\21B\377" \ + "\3\217\15""2\377\77\6\26\377\2\0\1\377\360\0\0\0\377\2\0\0\0\303\0\0" \ + "\0""4\377\0\0\0\0\330\0\0\0\0\3\0\0\0\5\0\0\0f\0\0\0\352\361\0\0\0\377" \ + "\3\7\1\2\377K\7\32\377\231\16""6\377\371\274\21B\377\3\246\17:\377R\7" \ + "\35\377\6\1\2\377\354\0\0\0\377\2\0\0\0\323\0\0\0D\377\0\0\0\0\334\0" \ + "\0\0\0\3\0\0\0\21\0\0\0\210\0\0\0\370\355\0\0\0\377\3\24\2\7\377d\11" \ + "#\377\254\20<\377\375\274\21B\377\3\247\17:\377R\7\35\377\6\1\2\377\350" \ + "\0\0\0\377\3\0\0\0\351\0\0\0f\0\0\0\4\377\0\0\0\0\337\0\0\0\0\3\0\0\0" \ + ")\0\0\0\243\0\0\0\373\351\0\0\0\377\3\14\1\4\377b\11\"\377\264\20\77" \ + "\377\377\274\21B\377\202\274\21B\377\2\234\16""7\377)\4\16\377\345\0" \ + "\0\0\377\3\0\0\0\361\0\0\0\206\0\0\0\24\377\0\0\0\0\343\0\0\0\0\3\0\0" \ + "\0\35\0\0\0\221\0\0\0\366\345\0\0\0\377\3\12\1\4\377d\11#\377\263\20" \ + "\77\377\377\274\21B\377\205\274\21B\377\3\273\21B\377w\13*\377\15\1\5" \ + "\377\341\0\0\0\377\3\0\0\0\345\0\0\0o\0\0\0\14\377\0\0\0\0\347\0\0\0" \ + "\0\3\0\0\0\36\0\0\0\212\0\0\0\354\341\0\0\0\377\3\1\0\0\377H\7\31\377" \ + "\247\17;\377\377\274\21B\377\211\274\21B\377\2\244\17:\377,\4\20\377" \ + "\336\0\0\0\377\3\0\0\0\332\0\0\0q\0\0\0\15\377\0\0\0\0\353\0\0\0\0\3" \ + "\0\0\0\10\0\0\0_\0\0\0\307\336\0\0\0\377\2$\3\15\377\230\16""5\377\377" \ + "\274\21B\377\214\274\21B\377\2\272\21A\377X\10\37\377\332\0\0\0\377\4" \ + "\0\0\0\373\0\0\0\260\0\0\0F\0\0\0\1\377\0\0\0\0\360\0\0\0\0\3\0\0\0\37" \ + "\0\0\0l\0\0\0\273\331\0\0\0\377\3\4\0\2\377d\11#\377\270\21A\377\377" \ + "\274\21B\377\217\274\21B\377\2y\13*\377\7\1\2\377\325\0\0\0\377\4\0\0" \ + "\0\367\0\0\0\251\0\0\0[\0\0\0\21\377\0\0\0\0\366\0\0\0\0\2\0\0\0D\0\0" \ + "\0\350\326\0\0\0\377\2\30\2\11\377\225\15""4\377\377\274\21B\377\222" \ + "\274\21B\377\2\200\14-\377\3\0\1\377\323\0\0\0\377\2\0\0\0\321\0\0\0" \ + "(\377\0\0\0\0\372\0\0\0\0\2\0\0\0\34\0\0\0\303\324\0\0\0\377\2""1\4\21" \ + "\377\256\20=\377\377\274\21B\377\224\274\21B\377\1r\12(\377\322\0\0\0" \ + "\377\2\0\0\0\221\0\0\0\10\377\0\0\0\0\374\0\0\0\0\3\0\0\0\4\0\0\0\200" \ + "\0\0\0\375\321\0\0\0\377\2C\6\30\377\270\21A\377\377\274\21B\377\226" \ + "\274\21B\377\1G\6\31\377\317\0\0\0\377\2\0\0\0\363\0\0\0\\\377\0\0\0" \ + "\0\377\0\0\0\0\3\0\0\0\0\0\0\0C\0\0\0\347\317\0\0\0\377\2J\7\32\377\273" \ + "\21A\377\377\274\21B\377\227\274\21B\377\2\260\20>\377\20\1\6\377\315" \ + "\0\0\0\377\2\0\0\0\320\0\0\0'\377\0\0\0\0\377\0\0\0\0\203\0\0\0\0\2\0" \ + "\0\0\27\0\0\0\273\315\0\0\0\377\2<\5\25\377\272\21A\377\377\274\21B\377" \ + "\231\274\21B\377\1k\12&\377\314\0\0\0\377\2\0\0\0\221\0\0\0\10\377\0" \ + "\0\0\0\377\0\0\0\0\205\0\0\0\0\3\0\0\0\5\0\0\0\215\0\0\0\376\312\0\0" \ + "\0\377\2\36\3\13\377\264\20\77\377\377\274\21B\377\232\274\21B\377\2" \ + "\263\20\77\377\11\1\3\377\311\0\0\0\377\2\0\0\0\364\0\0\0a\377\0\0\0" \ + "\0\377\0\0\0\0\211\0\0\0\0\2\0\0\0@\0\0\0\343\310\0\0\0\377\2\4\0\1\377" \ + "\232\16""6\377\377\274\21B\377\234\274\21B\377\1""6\5\23\377\310\0\0" \ + "\0\377\2\0\0\0\303\0\0\0\37\377\0\0\0\0\377\0\0\0\0\213\0\0\0\0\2\0\0" \ + "\0\17\0\0\0\247\307\0\0\0\377\1S\7\35\377\377\274\21B\377\235\274\21" \ + "B\377\1X\10\37\377\306\0\0\0\377\3\0\0\0\374\0\0\0\200\0\0\0\4\377\0" \ + "\0\0\0\377\0\0\0\0\216\0\0\0\0\2\0\0\0^\0\0\0\364\304\0\0\0\377\2\4\0" \ + "\1\377\252\17<\377\377\274\21B\377\235\274\21B\377\1f\11$\377\305\0\0" \ + "\0\377\2\0\0\0\336\0\0\0""8\377\0\0\0\0\377\0\0\0\0\221\0\0\0\0\2\0\0" \ + "\0(\0\0\0\316\303\0\0\0\377\1:\5\24\377\377\274\21B\377\236\274\21B\377" \ + "\1a\11\"\377\304\0\0\0\377\2\0\0\0\246\0\0\0\17\377\0\0\0\0\377\0\0\0" \ + "\0\223\0\0\0\0\3\0\0\0\5\0\0\0\200\0\0\0\375\301\0\0\0\377\1k\12&\377" \ + "\377\274\21B\377\236\274\21B\377\1L\7\33\377\302\0\0\0\377\2\0\0\0\363" \ + "\0\0\0^\377\0\0\0\0\377\0\0\0\0\227\0\0\0\0\2\0\0\0O\0\0\0\350\300\0" \ + "\0\0\377\1\213\15""1\377\377\274\21B\377\236\274\21B\377\1'\4\16\377" \ + "\301\0\0\0\377\2\0\0\0\317\0\0\0-\377\0\0\0\0\377\0\0\0\0\231\0\0\0\0" \ + "\2\0\0\0\17\0\0\0\231\277\0\0\0\377\1\225\15""4\377\377\274\21B\377\235" \ + "\274\21B\377\2\253\17<\377\1\0\1\377\277\0\0\0\377\3\0\0\0\370\0\0\0" \ + "w\0\0\0\3\377\0\0\0\0\377\0\0\0\0\234\0\0\0\0\2\0\0\0H\0\0\0\343\275" \ + "\0\0\0\377\1\222\15""3\377\377\274\21B\377\235\274\21B\377\1m\12&\377" \ + "\277\0\0\0\377\2\0\0\0\312\0\0\0*\377\0\0\0\0\377\0\0\0\0\237\0\0\0\0" \ + "\2\0\0\0\17\0\0\0\231\274\0\0\0\377\1z\13+\377\377\274\21B\377\235\274" \ + "\21B\377\1!\3\14\377\275\0\0\0\377\3\0\0\0\370\0\0\0w\0\0\0\4\377\0\0" \ + "\0\0\377\0\0\0\0\242\0\0\0\0\2\0\0\0J\0\0\0\344\272\0\0\0\377\1J\7\32" \ + "\377\377\274\21B\377\234\274\21B\377\1\204\14.\377\275\0\0\0\377\2\0" \ + "\0\0\313\0\0\0+\377\0\0\0\0\377\0\0\0\0\245\0\0\0\0\2\0\0\0\30\0\0\0" \ + "\257\271\0\0\0\377\2\15\1\4\377\266\20@\377\377\274\21B\377\232\274\21" \ + "B\377\2\270\21A\377\35\3\12\377\273\0\0\0\377\3\0\0\0\374\0\0\0\210\0" \ + "\0\0\7\377\0\0\0\0\377\0\0\0\0\250\0\0\0\0\2\0\0\0J\0\0\0\336\270\0\0" \ + "\0\377\1l\12&\377\377\274\21B\377\232\274\21B\377\1i\11%\377\273\0\0" \ + "\0\377\2\0\0\0\274\0\0\0&\377\0\0\0\0\377\0\0\0\0\253\0\0\0\0\3\0\0\0" \ + "\11\0\0\0\200\0\0\0\371\266\0\0\0\377\2\26\2\10\377\264\20\77\377\377" \ + "\274\21B\377\230\274\21B\377\2\257\20>\377\17\1\5\377\271\0\0\0\377\3" \ + "\0\0\0\352\0\0\0^\0\0\0\1\377\0\0\0\0\377\0\0\0\0\256\0\0\0\0\2\0\0\0" \ + "&\0\0\0\275\266\0\0\0\377\1S\7\35\377\377\274\21B\377\230\274\21B\377" \ + "\1<\5\25\377\270\0\0\0\377\3\0\0\0\376\0\0\0\231\0\0\0\22\377\0\0\0\0" \ + "\377\0\0\0\0\261\0\0\0\0\3\0\0\0\1\0\0\0^\0\0\0\353\264\0\0\0\377\2\2" \ + "\0\1\377\227\16""5\377\377\274\21B\377\226\274\21B\377\1r\12(\377\270" \ + "\0\0\0\377\2\0\0\0\325\0\0\0>\377\0\0\0\0\377\0\0\0\0\265\0\0\0\0\3\0" \ + "\0\0\22\0\0\0\231\0\0\0\376\263\0\0\0\377\2)\4\16\377\271\21A\377\377" \ + "\274\21B\377\224\274\21B\377\2\242\17""9\377\12\1\3\377\266\0\0\0\377" \ + "\3\0\0\0\367\0\0\0w\0\0\0\5\377\0\0\0\0\377\0\0\0\0\270\0\0\0\0\2\0\0" \ + "\0G\0\0\0\324\263\0\0\0\377\1U\10\36\377\377\274\21B\377\223\274\21B" \ + "\377\2\270\21A\377)\4\16\377\266\0\0\0\377\2\0\0\0\267\0\0\0*\377\0\0" \ + "\0\0\377\0\0\0\0\273\0\0\0\0\3\0\0\0\1\0\0\0U\0\0\0\340\262\0\0\0\377" \ + "\1t\13)\377\377\274\21B\377\221\274\21B\377\2\273\21B\377@\6\27\377\265" \ + "\0\0\0\377\2\0\0\0\306\0\0\0""8\377\0\0\0\0\377\0\0\0\0\277\0\0\0\0\3" \ + "\0\0\0\12\0\0\0w\0\0\0\362\260\0\0\0\377\2\6\1\2\377\226\16""5\377\377" \ + "\274\21B\377\220\274\21B\377\1[\10\40\377\264\0\0\0\377\3\0\0\0\337\0" \ + "\0\0U\0\0\0\1\377\0\0\0\0\377\0\0\0\0\302\0\0\0\0\3\0\0\0\32\0\0\0\231" \ + "\0\0\0\374\257\0\0\0\377\2\31\2\11\377\252\17<\377\377\274\21B\377\216" \ + "\274\21B\377\2y\13*\377\1\0\0\377\262\0\0\0\377\3\0\0\0\361\0\0\0w\0" \ + "\0\0\12\377\0\0\0\0\377\0\0\0\0\306\0\0\0\0\2\0\0\0*\0\0\0\266\257\0" \ + "\0\0\377\2!\3\14\377\257\20=\377\377\274\21B\377\214\274\21B\377\2\216" \ + "\15""2\377\5\0\2\377\261\0\0\0\377\3\0\0\0\374\0\0\0\231\0\0\0\31\377" \ + "\0\0\0\0\377\0\0\0\0\311\0\0\0\0\3\0\0\0\1\0\0\0T\0\0\0\324\256\0\0\0" \ + "\377\2#\3\14\377\257\20>\377\377\274\21B\377\212\274\21B\377\2\213\15" \ + "1\377\7\1\3\377\261\0\0\0\377\2\0\0\0\270\0\0\0""6\377\0\0\0\0\377\0" \ + "\0\0\0\316\0\0\0\0\2\0\0\0D\0\0\0\313\255\0\0\0\377\2*\4\17\377\264\20" \ + "\77\377\377\274\21B\377\210\274\21B\377\2\211\14""0\377\7\1\3\377\257" \ + "\0\0\0\377\3\0\0\0\376\0\0\0\252\0\0\0-\377\0\0\0\0\377\0\0\0\0\321\0" \ + "\0\0\0\3\0\0\0\1\0\0\0M\0\0\0\315\254\0\0\0\377\2""4\5\22\377\264\20" \ + "\77\377\377\274\21B\377\206\274\21B\377\2\213\15""1\377\10\1\3\377\256" \ + "\0\0\0\377\3\0\0\0\376\0\0\0\252\0\0\0.\377\0\0\0\0\377\0\0\0\0\325\0" \ + "\0\0\0\3\0\0\0\1\0\0\0M\0\0\0\315\253\0\0\0\377\2\40\3\13\377\251\17" \ + ";\377\377\274\21B\377\204\274\21B\377\2\201\14-\377\4\0\2\377\256\0\0" \ + "\0\377\2\0\0\0\252\0\0\0/\377\0\0\0\0\377\0\0\0\0\331\0\0\0\0\3\0\0\0" \ + "\1\0\0\0M\0\0\0\316\252\0\0\0\377\2\37\3\13\377\247\17;\377\377\274\21" \ + "B\377\202\274\21B\377\2|\13+\377\5\0\2\377\255\0\0\0\377\2\0\0\0\263" \ + "\0\0\0""8\377\0\0\0\0\377\0\0\0\0\335\0\0\0\0\3\0\0\0\4\0\0\0X\0\0\0" \ + "\311\251\0\0\0\377\2\27\2\10\377\237\16""8\377\377\274\21B\377\2e\11" \ + "#\377\1\0\0\377\253\0\0\0\377\3\0\0\0\375\0\0\0\257\0\0\0>\377\0\0\0" \ + "\0\377\0\0\0\0\342\0\0\0\0\3\0\0\0""0\0\0\0\231\0\0\0\367\247\0\0\0\377" \ + "\2\12\1\3\377\202\14.\377\374\274\21B\377\2\270\21@\377F\6\31\377\253" \ + "\0\0\0\377\3\0\0\0\355\0\0\0\200\0\0\0\30\377\0\0\0\0\377\0\0\0\0\346" \ + "\0\0\0\0\3\0\0\0\27\0\0\0\200\0\0\0\354\246\0\0\0\377\3\1\0\0\377^\11" \ + "!\377\273\21B\377\371\274\21B\377\2\261\20>\3771\4\21\377\252\0\0\0\377" \ + "\3\0\0\0\326\0\0\0f\0\0\0\14\377\0\0\0\0\377\0\0\0\0\352\0\0\0\0\3\0" \ + "\0\0\7\0\0\0^\0\0\0\325\246\0\0\0\377\2I\7\32\377\270\21@\377\367\274" \ + "\21B\377\2\242\17""9\377$\3\15\377\250\0\0\0\377\4\0\0\0\376\0\0\0\263" \ + "\0\0\0D\0\0\0\2\377\0\0\0\0\377\0\0\0\0\356\0\0\0\0\3\0\0\0\3\0\0\0T" \ + "\0\0\0\300\245\0\0\0\377\2+\4\17\377\252\17<\377\365\274\21B\377\2~\13" \ + ",\377\13\1\4\377\247\0\0\0\377\3\0\0\0\371\0\0\0\250\0\0\0:\377\0\0\0" \ + "\0\377\0\0\0\0\364\0\0\0\0\3\0\0\0\34\0\0\0w\0\0\0\343\243\0\0\0\377" \ + "\2\13\1\4\377z\13+\377\362\274\21B\377\2\264\20\77\377E\6\30\377\247" \ + "\0\0\0\377\3\0\0\0\321\0\0\0f\0\0\0\17\377\0\0\0\0\377\0\0\0\0\370\0" \ + "\0\0\0\4\0\0\0\11\0\0\0^\0\0\0\303\0\0\0\376\242\0\0\0\377\2E\6\30\377" \ + "\263\20\77\377\357\274\21B\377\2\234\16""7\377\35\3\12\377\245\0\0\0" \ + "\377\4\0\0\0\371\0\0\0\254\0\0\0F\0\0\0\2\377\0\0\0\0\377\0\0\0\0\375" \ + "\0\0\0\0\3\0\0\0\32\0\0\0o\0\0\0\316\241\0\0\0\377\2\40\3\13\377\231" \ + "\16""6\377\355\274\21B\377\2v\13)\377\12\1\4\377\243\0\0\0\377\4\0\0" \ + "\0\374\0\0\0\263\0\0\0U\0\0\0\11\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0" \ + "\203\0\0\0\0\4\0\0\0\1\0\0\0;\0\0\0\234\0\0\0\376\237\0\0\0\377\3\5\0" \ + "\2\377g\11$\377\272\21A\377\351\274\21B\377\2\250\17;\3777\5\23\377\243" \ + "\0\0\0\377\3\0\0\0\363\0\0\0\203\0\0\0&\377\0\0\0\0\377\0\0\0\0\377\0" \ + "\0\0\0\211\0\0\0\0\2\0\0\0b\0\0\0\375\240\0\0\0\377\2!\3\14\377\223\15" \ + "4\377\346\274\21B\377\3\273\21A\377d\11#\377\7\1\3\377\243\0\0\0\377" \ + "\2\0\0\0\355\0\0\0""3\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\214\0\0\0\0" \ + "\2\0\0\0Y\0\0\0\374\240\0\0\0\377\3\1\0\0\377K\7\32\377\262\20>\377\343" \ + "\274\21B\377\2\241\17""8\377,\4\20\377\244\0\0\0\377\2\0\0\0\355\0\0" \ + "\0""2\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\216\0\0\0\0\2\0\0\0X\0\0\0" \ + "\373\241\0\0\0\377\2\30\2\11\377\207\14/\377\340\274\21B\377\3\270\21" \ + "@\377h\11$\377\13\1\4\377\244\0\0\0\377\2\0\0\0\354\0\0\0""1\377\0\0" \ + "\0\0\377\0\0\0\0\377\0\0\0\0\220\0\0\0\0\2\0\0\0W\0\0\0\373\242\0\0\0" \ + "\377\2\77\6\26\377\243\17""9\377\335\274\21B\377\2\202\14.\377\33\2\12" \ + "\377\245\0\0\0\377\2\0\0\0\353\0\0\0""0\377\0\0\0\0\377\0\0\0\0\377\0" \ + "\0\0\0\222\0\0\0\0\2\0\0\0b\0\0\0\375\242\0\0\0\377\3\1\0\1\377E\6\30" \ + "\377\251\17;\377\331\274\21B\377\2\221\15""3\377'\4\16\377\246\0\0\0" \ + "\377\2\0\0\0\357\0\0\0""5\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\224\0\0" \ + "\0\0\2\0\0\0F\0\0\0\362\243\0\0\0\377\3\13\1\4\377c\11#\377\265\20\77" \ + "\377\325\274\21B\377\3\252\17<\377J\7\32\377\2\0\1\377\246\0\0\0\377" \ + "\2\0\0\0\333\0\0\0#\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\226\0\0\0\0\2" \ + "\0\0\0""5\0\0\0\351\244\0\0\0\377\3\24\2\7\377r\12(\377\270\21A\377\321" \ + "\274\21B\377\3\251\17;\377Q\7\34\377\6\1\2\377\247\0\0\0\377\2\0\0\0" \ + "\315\0\0\0\30\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\230\0\0\0\0\2\0\0\0" \ + "\"\0\0\0\332\245\0\0\0\377\3\17\1\5\377^\11!\377\257\20=\377\315\274" \ + "\21B\377\3\241\17""9\377E\6\30\377\4\0\1\377\250\0\0\0\377\2\0\0\0\267" \ + "\0\0\0\14\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\232\0\0\0\0\2\0\0\0\30" \ + "\0\0\0\314\246\0\0\0\377\3\15\1\4\377[\10\40\377\254\20<\377\311\274" \ + "\21B\377\3\250\17;\377P\7\34\377\6\1\2\377\251\0\0\0\377\2\0\0\0\244" \ + "\0\0\0\6\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\234\0\0\0\0\2\0\0\0\20\0" \ + "\0\0\276\247\0\0\0\377\3\7\1\2\377M\7\33\377\241\17""8\377\305\274\21" \ + "B\377\3\216\15""2\377@\6\27\377\4\0\2\377\252\0\0\0\377\2\0\0\0\221\0" \ + "\0\0\2\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\236\0\0\0\0\2\0\0\0\3\0\0" \ + "\0\210\251\0\0\0\377\3&\3\15\377k\12&\377\257\20=\377\277\274\21B\377" \ + "\3\255\20=\377d\11#\377\32\2\11\377\253\0\0\0\377\2\0\0\0\366\0\0\0Y" \ + "\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\242\0\0\0\0\2\0\0\0Z\0\0\0\367\251" \ + "\0\0\0\377\3\12\1\4\377L\7\33\377\224\15""4\377\273\274\21B\377\3\224" \ + "\15""4\377J\7\32\377\10\1\3\377\254\0\0\0\377\2\0\0\0\346\0\0\0""8\377" \ + "\0\0\0\0\377\0\0\0\0\377\0\0\0\0\244\0\0\0\0\2\0\0\0""9\0\0\0\347\253" \ + "\0\0\0\377\3\40\3\13\377e\11#\377\241\17""9\377\264\274\21B\377\4\273" \ + "\21A\377\217\15""2\377S\7\35\377\27\2\10\377\256\0\0\0\377\2\0\0\0\311" \ + "\0\0\0\32\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\246\0\0\0\0\2\0\0\0\33" \ + "\0\0\0\313\255\0\0\0\377\4!\3\14\377]\10!\377\223\15""4\377\272\21A\377" \ + "\255\274\21B\377\4\270\21A\377\210\14""0\377L\7\33\377\22\2\6\377\260" \ + "\0\0\0\377\2\0\0\0\241\0\0\0\10\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\250" \ + "\0\0\0\0\2\0\0\0\14\0\0\0\243\257\0\0\0\377\4\15\1\5\377\77\6\26\377" \ + "r\12(\377\237\16""8\377\246\274\21B\377\5\273\21B\377\234\16""7\377j" \ + "\12%\377:\5\24\377\13\1\4\377\261\0\0\0\377\3\0\0\0\372\0\0\0v\0\0\0" \ + "\1\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\253\0\0\0\0\2\0\0\0R\0\0\0\357" \ + "\261\0\0\0\377\5\17\1\5\377;\5\25\377d\11#\377\205\14/\377\247\17:\377" \ + "\235\274\21B\377\5\253\17<\377\211\14""0\377`\11\"\3777\5\23\377\15\1" \ + "\5\377\264\0\0\0\377\2\0\0\0\332\0\0\0""2\377\0\0\0\0\377\0\0\0\0\377" \ + "\0\0\0\0\256\0\0\0\0\2\0\0\0\37\0\0\0\307\265\0\0\0\377\11\15\1\4\377" \ + ")\4\16\377C\6\30\377^\11!\377x\13*\377\211\14""0\377\233\16""6\377\252" \ + "\17<\377\272\21A\377\213\274\21B\377\11\263\20\77\377\246\17:\377\230" \ + "\16""5\377\206\14/\377s\12(\377^\10!\377I\7\32\377,\4\20\377\15\1\5\377" \ + "\270\0\0\0\377\2\0\0\0\245\0\0\0\15\377\0\0\0\0\377\0\0\0\0\377\0\0\0" \ + "\0\260\0\0\0\0\3\0\0\0\5\0\0\0\210\0\0\0\376\275\0\0\0\377\1\14\1\4\377" \ + "\204\15\1\4\377\1\12\1\3\377\303\0\0\0\377\2\0\0\0\364\0\0\0^\377\0\0" \ + "\0\0\377\0\0\0\0\377\0\0\0\0\264\0\0\0\0\2\0\0\0O\0\0\0\346\377\0\0\0" \ + "\377\205\0\0\0\377\2\0\0\0\314\0\0\0.\377\0\0\0\0\377\0\0\0\0\377\0\0" \ + "\0\0\266\0\0\0\0\3\0\0\0\16\0\0\0\221\0\0\0\375\377\0\0\0\377\4\0\0\0" \ + "\377\0\0\0\364\0\0\0f\0\0\0\1\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\271" \ + "\0\0\0\0\2\0\0\0=\0\0\0\332\376\0\0\0\377\2\0\0\0\276\0\0\0\"\377\0\0" \ + "\0\0\377\0\0\0\0\377\0\0\0\0\274\0\0\0\0\3\0\0\0\20\0\0\0\234\0\0\0\376" \ + "\372\0\0\0\377\3\0\0\0\365\0\0\0v\0\0\0\3\377\0\0\0\0\377\0\0\0\0\377" \ + "\0\0\0\0\277\0\0\0\0\2\0\0\0""0\0\0\0\304\367\0\0\0\377\3\0\0\0\376\0" \ + "\0\0\242\0\0\0\30\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\302\0\0\0\0\3\0" \ + "\0\0\1\0\0\0^\0\0\0\350\364\0\0\0\377\2\0\0\0\321\0\0\0=\377\0\0\0\0" \ + "\377\0\0\0\0\377\0\0\0\0\306\0\0\0\0\3\0\0\0\23\0\0\0\231\0\0\0\375\360" \ + "\0\0\0\377\3\0\0\0\363\0\0\0v\0\0\0\6\377\0\0\0\0\377\0\0\0\0\377\0\0" \ + "\0\0\311\0\0\0\0\3\0\0\0\40\0\0\0\231\0\0\0\374\354\0\0\0\377\3\0\0\0" \ + "\361\0\0\0w\0\0\0\15\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\315\0\0\0\0" \ + "\3\0\0\0*\0\0\0\252\0\0\0\376\350\0\0\0\377\3\0\0\0\366\0\0\0\210\0\0" \ + "\0\24\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\321\0\0\0\0\2\0\0\0=\0\0\0" \ + "\300\345\0\0\0\377\3\0\0\0\373\0\0\0\242\0\0\0#\377\0\0\0\0\377\0\0\0" \ + "\0\377\0\0\0\0\325\0\0\0\0\3\0\0\0.\0\0\0\242\0\0\0\372\340\0\0\0\377" \ + "\3\0\0\0\355\0\0\0\200\0\0\0\27\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\331" \ + "\0\0\0\0\3\0\0\0\30\0\0\0\200\0\0\0\357\334\0\0\0\377\3\0\0\0\341\0\0" \ + "\0o\0\0\0\14\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\335\0\0\0\0\3\0\0\0" \ + "\25\0\0\0y\0\0\0\334\330\0\0\0\377\3\0\0\0\306\0\0\0a\0\0\0\10\377\0" \ + "\0\0\0\377\0\0\0\0\377\0\0\0\0\342\0\0\0\0\3\0\0\0""3\0\0\0\231\0\0\0" \ + "\364\322\0\0\0\377\3\0\0\0\342\0\0\0\200\0\0\0$\377\0\0\0\0\377\0\0\0" \ + "\0\377\0\0\0\0\347\0\0\0\0\4\0\0\0\24\0\0\0q\0\0\0\311\0\0\0\376\314" \ + "\0\0\0\377\4\0\0\0\371\0\0\0\265\0\0\0[\0\0\0\10\377\0\0\0\0\377\0\0" \ + "\0\0\377\0\0\0\0\354\0\0\0\0\4\0\0\0\24\0\0\0^\0\0\0\263\0\0\0\373\306" \ + "\0\0\0\377\4\0\0\0\363\0\0\0\242\0\0\0M\0\0\0\11\377\0\0\0\0\377\0\0" \ + "\0\0\377\0\0\0\0\362\0\0\0\0\4\0\0\0\40\0\0\0q\0\0\0\272\0\0\0\367\300" \ + "\0\0\0\377\4\0\0\0\356\0\0\0\251\0\0\0_\0\0\0\21\377\0\0\0\0\377\0\0" \ + "\0\0\377\0\0\0\0\370\0\0\0\0\4\0\0\0\12\0\0\0L\0\0\0\224\0\0\0\335\271" \ + "\0\0\0\377\5\0\0\0\375\0\0\0\314\0\0\0\203\0\0\0;\0\0\0\3\377\0\0\0\0" \ + "\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\5\0\0\0\16\0\0\0D\0\0\0\200\0\0" \ + "\0\263\0\0\0\357\260\0\0\0\377\5\0\0\0\351\0\0\0\252\0\0\0o\0\0\0<\0" \ + "\0\0\12\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\210\0\0\0\0\6" \ + "\0\0\0\10\0\0\0:\0\0\0f\0\0\0\217\0\0\0\272\0\0\0\343\245\0\0\0\377\7" \ + "\0\0\0\374\0\0\0\332\0\0\0\257\0\0\0\206\0\0\0[\0\0\0.\0\0\0\3\377\0" \ + "\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\222\0\0\0\0\11\0\0\0\17\0" \ + "\0\0""5\0\0\0R\0\0\0p\0\0\0\217\0\0\0\255\0\0\0\312\0\0\0\341\0\0\0\363" \ + "\224\0\0\0\377\11\0\0\0\356\0\0\0\334\0\0\0\304\0\0\0\245\0\0\0\207\0" \ + "\0\0j\0\0\0L\0\0\0-\0\0\0\7\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0" \ + "\0\0\0\241\0\0\0\0\4\0\0\0\5\0\0\0\27\0\0\0)\0\0\0;\202\0\0\0D\1\0\0" \ + "\0O\206\0\0\0U\1\0\0\0K\202\0\0\0D\4\0\0\0""7\0\0\0%\0\0\0\23\0\0\0\2" \ + "\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0" \ + "\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\220" \ + "\0\0\0\0") + + diff --git a/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend b/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..41622aa50690a18c3aab7d7015c7aec740bcc3c1 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SPLASH_IMAGES_rpi = "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb new file mode 100644 index 0000000000000000000000000000000000000000..42cfcdd4d5a07565608bbd53fa79aa0fc5eec66d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "udev rules for Raspberry Pi Boards" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = " \ + file://99-com.rules \ + file://can.rules \ + " + +S = "${WORKDIR}" + +INHIBIT_DEFAULT_DEPS = "1" + +do_install () { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/can.rules ${D}${sysconfdir}/udev/rules.d/ +} diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules new file mode 100644 index 0000000000000000000000000000000000000000..ddd1e1743e57b2d8e3cd1ee31490d404aa643206 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules @@ -0,0 +1,21 @@ +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ + ALIASES=/proc/device-tree/aliases; \ + if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \ + echo 0;\ + elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \ + echo 1; \ + else \ + exit 1; \ + fi\ +'", SYMLINK+="serial%c" + +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ + ALIASES=/proc/device-tree/aliases; \ + if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \ + echo 0; \ + elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \ + echo 1; \ + else \ + exit 1; \ + fi \ +'", SYMLINK+="serial%c" diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules new file mode 100644 index 0000000000000000000000000000000000000000..a47d57de8be8b7d3ce5612cea3d3712f050d726d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules @@ -0,0 +1 @@ +SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.0/net/can0", RUN+="/sbin/ip link set can0 up type can bitrate 500000" diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules new file mode 100644 index 0000000000000000000000000000000000000000..3eff66dbc3106ba35e12a700709b029a84b06af5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules @@ -0,0 +1,10 @@ +############################################################################################################## + +# Partitions which desktops should not display +# + +# boot partition +ENV{ID_FS_TYPE}=="vfat", ENV{ID_FS_LABEL}=="raspberrypi", \ + ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1" + +############################################################################################################## diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..ae35521d4399c12c30b7cf3016ca5973f8cbf8e4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "add udisk/udev rule to hide boot partition from udev" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +SRC_URI = "file://80-udisks-rpi.rules" + +INHIBIT_DEFAULT_DEPS = "1" + +do_install () { + install -d ${D}${base_libdir}/udev/rules.d + install -m 644 ${WORKDIR}/80-udisks-rpi.rules ${D}${base_libdir}/udev/rules.d +} + +FILES_${PN} = "${base_libdir}/udev/rules.d" diff --git a/bsp/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb b/bsp/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb new file mode 100644 index 0000000000000000000000000000000000000000..eef6afd1c31777e279d2cda12101dd391fe1af59 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "Package that provides access to GPIO and other IO\ +functions on the Broadcom BCM 2835 chip, allowing access to the\ +GPIO pins on the 26 pin IDE plug on the RPi board" +SECTION = "base" +HOMEPAGE = "http://www.open.com.au/mikem/bcm2835" +AUTHOR = "Mike McCauley (mikem@open.com.au)" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +COMPATIBLE_MACHINE = "^rpi$" + +SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz" + +SRC_URI[md5sum] = "b5dc426b4ff258bb1397442f98e40236" +SRC_URI[sha256sum] = "b9fd10f7a80aadaed28a77168709b7c519568a63b6e98d0a50e9c5fe31bea6bb" + +inherit autotools + +do_compile_append() { + # Now compiling the examples provided by the package + mkdir -p ${B}/examples + for file in `ls ${S}/examples`; do + ${CC} ${LDFLAGS} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src + done +} + +do_install_append() { + install -d ${D}/${libdir}/${BPN} + for file in ${B}/examples/* + do + install -m 0755 ${file} ${D}/${libdir}/${BPN} + done +} + +PACKAGES += "${PN}-tests" + +RDEPENDS_${PN}-dev = "" + +FILES_${PN} = "" +FILES_${PN}-tests = "${libdir}/${BPN}" +FILES_${PN}-dbg += "${libdir}/${BPN}/.debug" diff --git a/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch new file mode 100644 index 0000000000000000000000000000000000000000..c8afe60ee87cbca4cdee65098b46afea56c78287 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/remove-initscript-lsb-dependency.patch @@ -0,0 +1,96 @@ +From 1338f98a279616f4e5e9ea30a25d1dfa0c7df5d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= +Date: Sun, 4 Jun 2017 12:22:40 +0200 +Subject: [PATCH] Remove dependencies on LSB functions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See this as a rebase of the previous 'Remove dependencies on LSB +functions patch' with only minor modifications from the original version, +based on the work done by Alex Lennon in +'25fd817 pi-blaster: Added recipe'. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Petter Mabäcker +--- + debian/pi-blaster.init | 38 +++++++------------------------------- + 1 file changed, 7 insertions(+), 31 deletions(-) + +diff --git a/debian/pi-blaster.init b/debian/pi-blaster.init +index b142d70..01a686c 100644 +--- a/debian/pi-blaster.init ++++ b/debian/pi-blaster.init +@@ -28,12 +28,12 @@ SCRIPTNAME=/etc/init.d/$NAME + [ -r /etc/default/$NAME ] && . /etc/default/$NAME + + # Load the VERBOSE setting and other rcS variables +-. /lib/init/vars.sh ++#. /lib/init/vars.sh + + # Define LSB log_* functions. + # Depend on lsb-base (>= 3.2-14) to ensure that this file is present + # and status_of_proc is working. +-. /lib/lsb/init-functions ++#. /lib/lsb/init-functions + + # + # Function that starts the daemon/service +@@ -77,48 +77,24 @@ do_stop() + + case "$1" in + start) +- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" ++ [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" + do_start +- case "$?" in +- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; +- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; +- esac + ;; + stop) +- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" ++ [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" + do_stop +- case "$?" in +- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; +- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; +- esac +- ;; +- status) +- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # +- log_daemon_msg "Restarting $DESC" "$NAME" ++ echo "Restarting $DESC" "$NAME" + do_stop +- case "$?" in +- 0|1) +- do_start +- case "$?" in +- 0) log_end_msg 0 ;; +- 1) log_end_msg 1 ;; # Old process is still running +- *) log_end_msg 1 ;; # Failed to start +- esac +- ;; +- *) +- # Failed to stop +- log_end_msg 1 +- ;; +- esac ++ do_start + ;; + *) +- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 ++ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; + esac +-- +1.9.1 + diff --git a/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..4b2d1ba20023c095bd3bd8e6632d68f0eb2521d5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspberry Pi." +HOMEPAGE = "https://github.com/sarfata/pi-blaster/" +SECTION = "devel/libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://README.md;beginline=268;endline=292;md5=86d10e4bcf4b4014d306dde7c1d2a80d" + +SRC_URI = "git://github.com/sarfata/pi-blaster;branch=master;protocol=https \ + file://remove-initscript-lsb-dependency.patch \ + " + +S = "${WORKDIR}/git" + +SRCREV = "befd8ef36e5066e4d444ef47fe4020787e541248" + +inherit update-rc.d autotools + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "${PN}.boot.sh" +INITSCRIPT_PARAMS_${PN} = "defaults 15 85" + +COMPATIBLE_MACHINE = "^rpi$" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..ac7a549ef8401bbfc209134c63fa5e5b144929d6 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb @@ -0,0 +1,30 @@ +SUMMARY = "CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython." +HOMEPAGE = "https://github.com/adafruit/Adafruit_Blinka" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=660e614bc7efb0697cc793d8a22a55c2" + +SRC_URI = "git://github.com/adafruit/Adafruit_Blinka.git;branch=main;protocol=https" +SRCREV = "dc688f354fe779c9267c208b99f310af87e79272" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +do_install_append() { +# it ships ./bcm283x/pulseio/libgpiod_pulsein which is a prebuilt +# 32bit binary therefore we should make this specific to 32bit rpi machines (based on bcm283x) only + if [ ${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '1', '0', d)} = "0" ]; then + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/adafruit_blinka/microcontroller/bcm283x + fi +} + +RDEPENDS_${PN} += " \ + libgpiod \ + python3-adafruit-platformdetect \ + python3-adafruit-pureio \ + python3-core \ +" + +RDEPENDS_${PN}_append_rpi = " rpi-gpio" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb new file mode 100644 index 0000000000000000000000000000000000000000..bb33bccbf6880cd1d488b07c73245a0dc30f3686 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb @@ -0,0 +1,18 @@ +SUMMARY = "CircuitPython bus device classes to manage bus sharing." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_BusDevice" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec69d6e9e6c85adfb7799d7f8cf044e" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git;branch=main;protocol=https" +SRCREV = "1bfe8005293205e2f7b2cc498ab5a946f1133b40" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-core \ +" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb new file mode 100644 index 0000000000000000000000000000000000000000..25207fe521f0cb77197a22b78a9543609a64ceb3 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb @@ -0,0 +1,18 @@ +SUMMARY = "CircuitPython helper library provides higher level objects to control motors and servos." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_Motor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b72678307cc7c10910b5ef460216af07" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_Motor.git;branch=main;protocol=https" +SRCREV = "2251bfc0501d0acfb96c0a43f4f2b4c6a10ca14e" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-core \ +" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..baf9c85b35e2eb60d3a1d48d2c5fbad44bbe70bf --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "CircuitPython helper library for DC & Stepper Motor FeatherWing, Shield, and Pi Hat kits." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_MotorKit" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ad4a8854b39ad474755ef1aea813bac" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_MotorKit.git;branch=main;protocol=https" +SRCREV = "8c1462b4129b21f6db156d1517abb017bb74b982" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-adafruit-circuitpython-busdevice \ + python3-adafruit-circuitpython-motor \ + python3-adafruit-circuitpython-pca9685 \ + python3-adafruit-circuitpython-register \ + python3-core \ +" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..f287b5e31ddaa1eec5e18a6348a17745f4b289d3 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb @@ -0,0 +1,20 @@ +SUMMARY = "CircuitPython driver for motor, stepper, and servo based on PCA9685." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_PCA9685" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e7eb6b599fb0cfb06485c64cd4242f62" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_PCA9685.git;branch=main;protocol=https" +SRCREV = "2780c4102f4c23fbab252aa1198b61ba7e2d1b2c" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-adafruit-circuitpython-busdevice \ + python3-adafruit-circuitpython-register \ + python3-core \ +" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..c1a70aa38c209fc0750b78830a9b026febe76c92 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb @@ -0,0 +1,15 @@ +SUMMARY = "CircuitPython data descriptor classes to represent hardware registers on I2C and SPI devices." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_Register" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec69d6e9e6c85adfb7799d7f8cf044e" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_Register.git;branch=main;protocol=https" + +S = "${WORKDIR}/git" +SRCREV = "5fee6e0c3878110844bc51e16063eeae7d94c457" + +DEPENDS += "python3-setuptools-scm-native" + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-core" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..5ab08bb402000f16e43153d0160d91ad7a26d8bf --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "Platform detection for use by libraries like Adafruit-Blinka." +HOMEPAGE = "https://github.com/adafruit/Adafruit_Python_PlatformDetect" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fccd531dce4b989c05173925f0bbb76c" + +SRC_URI = "git://github.com/adafruit/Adafruit_Python_PlatformDetect.git;branch=main;protocol=https" +SRCREV = "e0fe1b012898fa824944d6805ca74be0fa027968" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += "python3-core" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb new file mode 100644 index 0000000000000000000000000000000000000000..3201dd26758fea87b47df99dcb9f7f9568303cb5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb @@ -0,0 +1,19 @@ +SUMMARY = "Pure python (i.e. no native extensions) access to Linux IO including I2C and SPI. Drop in replacement for smbus and spidev modules." +HOMEPAGE = "https://github.com/adafruit/Adafruit_Python_PureIO" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2a21fcca821a506d4c36f7bbecc0d009" + +SRC_URI = "git://github.com/adafruit/Adafruit_Python_PureIO.git;branch=main;protocol=https" +SRCREV = "f4d0973da05b8b21905ff6bab69cdb652128f342" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-core \ + python3-ctypes \ + python3-fcntl \ +" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch new file mode 100644 index 0000000000000000000000000000000000000000..4a93a1ce93c07db7d87089c7844d28cbdfbb57c8 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch @@ -0,0 +1,33 @@ +From c3aa4af56652b403e304ea5f321acfe289e42922 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Jan 2016 16:07:14 -0800 +Subject: [PATCH] include asm/ioctl.h for ioctl() define + +also fixes errors e.g. + +../../RTIMULib/RTIMUHal.cpp:208:29: error: '_IOC_SIZEBITS' was not +declared in this scope + return ioctl(m_SPI, SPI_IOC_MESSAGE(1), &wrIOC); + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + RTIMULib/RTIMUHal.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/RTIMULib/RTIMUHal.cpp b/RTIMULib/RTIMUHal.cpp +index f9c3d15..d968326 100644 +--- a/RTIMULib/RTIMUHal.cpp ++++ b/RTIMULib/RTIMUHal.cpp +@@ -29,6 +29,7 @@ + #if !defined(WIN32) && !defined(__APPLE__) + + #include ++#include + + RTIMUHal::RTIMUHal() + { +-- +2.7.0 + diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..fb8d0ae7ba077ba19cd9c20354b8955e7484e356 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "RTIMULib is a C++ and Python library that makes it easy to use 9-dof and \ +10-dof IMUs with embedded Linux systems" +HOMEPAGE = "https://github.com/RPi-Distro/RTIMULib/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://../../LICENSE;md5=96cdecb41125f498958e09b72faf318e" + +SRC_URI = "git://github.com/RPi-Distro/RTIMULib.git;branch=master;protocol=https \ + file://0001-include-asm-ioctl.h-for-ioctl-define.patch;patchdir=../.. \ + " +SRCREV = "b949681af69b45f0f7f4bb53b6770037b5b02178" + +S = "${WORKDIR}/git/Linux/python" + +inherit setuptools3 diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch new file mode 100644 index 0000000000000000000000000000000000000000..5c94bc24f7799902852e0f8d177790c0d0d2798b --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch @@ -0,0 +1,265 @@ +From 23d7ab77865f8b17042f5cd4c6720cca475e0eb5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 13 Jan 2016 14:27:10 -0800 +Subject: [PATCH] Remove nested functions + +nested functions are not supported on llvm/clang compiler, replacing +them helps make code portable and be compilable with non-gcc compilers +additionally fix the diagnostic messages clang reported + +source/c_gpio.c:130:18: warning: comparison of distinct pointer types +('volatile uint32_t *' (aka 'volatile unsigned int *') an +d 'void *') [-Wcompare-distinct-pointer-types] + if (gpio_map < MAP_FAILED) + ~~~~~~~~ ^ ~~~~~~~~~~ + + source/c_gpio.c:89:13: warning: variable 'peri_base' is used +uninitialized whenever 'if' condition is false [-Wsometimes-uninit +ialized] + if (fread(buf, 1, sizeof buf, fp) == sizeof buf) { + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +source/c_gpio.c:116:17: note: uninitialized use occurs here + gpio_base = peri_base + GPIO_BASE_OFFSET; + ^~~~~~~~~ +source/c_gpio.c:89:9: note: remove the 'if' if its condition is always +true + if (fread(buf, 1, sizeof buf, fp) == sizeof buf) { + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +source/c_gpio.c:64:23: note: initialize the variable 'peri_base' to +silence this warning + uint32_t peri_base; + +Signed-off-by: Khem Raj +[Pierre-Jean: update for version 0.7.0] +Signed-off-by: Pierre-Jean Texier +--- +Upstream-Status: Submitted + + source/c_gpio.c | 6 +-- + source/py_gpio.c | 135 ++++++++++++++++++++++++++++--------------------------- + 2 files changed, 71 insertions(+), 70 deletions(-) + +diff --git a/source/py_gpio.c b/source/py_gpio.c +index d54cc7f..007bad5 100644 +--- a/source/py_gpio.c ++++ b/source/py_gpio.c +@@ -69,6 +69,20 @@ static int mmap_gpio_mem(void) + return 0; + } + } ++static inline int cleanup_one(unsigned int gpio) ++{ ++ // clean up any /sys/class exports ++ event_cleanup(gpio); ++ ++ // set everything back to input ++ if (gpio_direction[gpio] != -1) { ++ setup_gpio(gpio, INPUT, PUD_OFF); ++ gpio_direction[gpio] = -1; ++ return 1; ++ } ++ return 0; ++} ++ + + // python function cleanup(channel=None) + static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs) +@@ -83,19 +97,6 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs) + PyObject *tempobj; + static char *kwlist[] = {"channel", NULL}; + +- void cleanup_one(void) +- { +- // clean up any /sys/class exports +- event_cleanup(gpio); +- +- // set everything back to input +- if (gpio_direction[gpio] != -1) { +- setup_gpio(gpio, INPUT, PUD_OFF); +- gpio_direction[gpio] = -1; +- found = 1; +- } +- } +- + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", kwlist, &chanlist)) + return NULL; + +@@ -140,7 +141,7 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs) + } else if (channel != -666) { // channel was an int indicating single channel + if (get_gpio_number(channel, &gpio)) + return NULL; +- cleanup_one(); ++ found = cleanup_one(gpio); + } else { // channel was a list/tuple + for (i=0; i +Date: Sat, 30 Jan 2016 17:12:37 -0800 +Subject: [PATCH] include sys/types.h explicitly for getting caddr_t definition + +Helps fixing build on musl where sys/types.h is not included indirectly +as happening on glibc + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + source/c_gpio/c_gpio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/source/c_gpio/c_gpio.c b/source/c_gpio/c_gpio.c +index 25a04ca..70df632 100644 +--- a/source/c_gpio/c_gpio.c ++++ b/source/c_gpio/c_gpio.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include "c_gpio.h" + +-- +2.7.0 + diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb b/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..d5653cb0dbd44745496b61b0d886d5e0fe278323 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \ +GPIO interrups, TCP socket interrupts, command line tools and more" +HOMEPAGE = "https://github.com/metachris/RPIO" +SECTION = "devel/python" +LICENSE = "LGPLv3+" +LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d98c999675c23196b25a" + +PYPI_PACKAGE = "RPIO" +inherit pypi + +SRC_URI += "file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch" + +inherit setuptools3 + +COMPATIBLE_MACHINE = "^rpi$" + +RDEPENDS_${PN} = "\ + python3-logging \ + python3-threading \ +" + +SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4" +SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e" diff --git a/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb b/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..02a3f5585b098c0a11da03385b4780ff371aa58d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Tool to help debug / hack at the BCM283x GPIO" +HOMEPAGE = "https://github.com/RPi-Distro/raspi-gpio" +SECTION = "devel/libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a14affa234debc057b47cdca615b2192" + +COMPATIBLE_MACHINE = "^rpi$" + +inherit autotools + +SRCREV = "4edfde183ff3ac9ed66cdc015ae25e45f3a5502d" +SRC_URI = "git://github.com/RPi-Distro/raspi-gpio.git;protocol=https;branch=master \ + " + +S = "${WORKDIR}/git" + diff --git a/bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..7ba13e2099ee594cf1bc1e87a46746e3f7551cc5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend @@ -0,0 +1,3 @@ +PACKAGECONFIG_GLESV2 = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'glesv2', d)}" + +PACKAGECONFIG_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' egl ${PACKAGECONFIG_GLESV2}', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/kmscube/kmscube_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/kmscube/kmscube_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..9343fb00ffc722c0ad70a23e950ba56a8eefebfa --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/kmscube/kmscube_%.bbappend @@ -0,0 +1,2 @@ +# userland driver EGL implementation does not have all needed bits for it so remove it from build +COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '(.*)', 'null', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/libsdl2/libsdl2_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/libsdl2/libsdl2_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..cb9c24e4d41205285768c30d4e4614ef0b55d9b5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/libsdl2/libsdl2_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# when using userland graphic KHR/khrplatform.h is provided by userland but virtual/libgl is provided by mesa-gl where +# we explicitly delete KHR/khrplatform.h since its already coming from userland package +DEPENDS_append_rpi = " ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'userland', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/libva/libva_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/libva/libva_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..56ff4213aa1829cf607b1d3807cc8ccc45789815 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/libva/libva_%.bbappend @@ -0,0 +1,3 @@ +# when using userland graphic KHR/khrplatform.h is provided by userland but virtual/libgl is provided by mesa-gl where +# we explicitly delete KHR/khrplatform.h since its already coming from userland package +DEPENDS_append_rpi = " ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'userland', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..56ff4213aa1829cf607b1d3807cc8ccc45789815 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_%.bbappend @@ -0,0 +1,3 @@ +# when using userland graphic KHR/khrplatform.h is provided by userland but virtual/libgl is provided by mesa-gl where +# we explicitly delete KHR/khrplatform.h since its already coming from userland package +DEPENDS_append_rpi = " ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'userland', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..c187ab9c103ffd8b8f4b7027c7da90aa156bbb55 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_%.bbappend @@ -0,0 +1,2 @@ +# mesa-demos need libgles1 and userland driver does not have it +COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '(.*)', 'null', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e561a1b02f827e941783ade5a37c9246d1f65b59 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -0,0 +1,8 @@ +PACKAGECONFIG_append_rpi = " gbm" +PROVIDES_append_rpi = " virtual/libgbm" + +GALLIUMDRIVERS_append_rpi = ",swrast" + +do_install_append_rpi() { + rm -rf ${D}${includedir}/KHR/khrplatform.h +} diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..eaa46f27b68d083a8d89761951b3a30d43199889 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,6 @@ +# DRI3 note: +# With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set +# as default. To state out clearly that Raspi needs dri3 and to avoid surprises +# in case oe-core changes this default, we set dri3 explicitly. +PACKAGECONFIG_append_rpi = " gallium vc4 v3d kmsro ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}" +DRIDRIVERS_class-target_rpi = "" diff --git a/bsp/meta-raspberrypi/recipes-graphics/piglit/piglit_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/piglit/piglit_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..0503fd0c34666a3960e3b3ab10efb30042be98f6 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/piglit/piglit_%.bbappend @@ -0,0 +1,5 @@ +# mesa-demos need libgles1 and userland driver does not have it so remove it from piglit rdeps +RDEPENDS_${PN}_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mesa-demos', d)}" +# it needs EGL >= 11 but userland says it provided version 10, remove it from build +# | -- Requested 'egl >= 11.0' but version of EGL is 10 +COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '(.*)', 'null', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch new file mode 100644 index 0000000000000000000000000000000000000000..de9d5c31b2d847a85faafeb2d9a3da89cea3376e --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch @@ -0,0 +1,24 @@ +From 070b114fd54b6ad38b4eff04279fe89ccaaef61b Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 01:39:30 -0500 +Subject: [PATCH] gitignore: add archives from lib directory + +The build creates two *.a files in the lib directory, add these to .gitignore. + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + .gitignore | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/.gitignore b/.gitignore +index 633f325..4a1ca0c 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -21,5 +21,6 @@ test_pattern/test_pattern + worms/worms + + # other directories ++lib/*.a + + *_/ diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch new file mode 100644 index 0000000000000000000000000000000000000000..c02a7674220216a070558272e99a4236f8f63beb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch @@ -0,0 +1,214 @@ +From 3b60fa1598385fb36fef1c47f59cb08d3a6fba35 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 01:54:37 -0500 +Subject: [PATCH] add "install" targets to Makefiles + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + Makefile | 3 +++ + game/Makefile | 4 ++++ + lib/Makefile | 1 + + life/Makefile | 4 ++++ + mandelbrot/Makefile | 4 ++++ + offscreen/Makefile | 4 ++++ + pngview/Makefile | 4 ++++ + radar_sweep/Makefile | 4 ++++ + radar_sweep_alpha/Makefile | 4 ++++ + rgb_triangle/Makefile | 4 ++++ + spriteview/Makefile | 4 ++++ + test_pattern/Makefile | 4 ++++ + worms/Makefile | 4 ++++ + 13 files changed, 48 insertions(+) + +diff --git a/Makefile b/Makefile +index 4e14e18..4a06de9 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,6 +16,9 @@ default :all + all: + for target in $(TARGETS); do ($(MAKE) -C $$target); done + ++install: ++ for target in $(TARGETS); do ($(MAKE) -C $$target install); done ++ + clean: + for target in $(TARGETS); do ($(MAKE) -C $$target clean); done + +diff --git a/game/Makefile b/game/Makefile +index ced9cce..6da6a6d 100644 +--- a/game/Makefile ++++ b/game/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/lib/Makefile b/lib/Makefile +index 15d7c37..2765c91 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -29,6 +29,7 @@ $(LIB): $(OBJS) + $(LIBPNG): $(OBJSPNG) + $(AR) rcs lib$(LIBPNG).a $(OBJSPNG) + ++install: + + clean: + @rm -f $(OBJS) +diff --git a/life/Makefile b/life/Makefile +index 2fcb034..44f1edb 100644 +--- a/life/Makefile ++++ b/life/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -pthread -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile +index e61beb3..a6e6735 100644 +--- a/mandelbrot/Makefile ++++ b/mandelbrot/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -pthread -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/offscreen/Makefile b/offscreen/Makefile +index 2bc81b9..8d23354 100644 +--- a/offscreen/Makefile ++++ b/offscreen/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/pngview/Makefile b/pngview/Makefile +index f947320..8c037ec 100644 +--- a/pngview/Makefile ++++ b/pngview/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/radar_sweep/Makefile b/radar_sweep/Makefile +index 3a46150..5f814b7 100644 +--- a/radar_sweep/Makefile ++++ b/radar_sweep/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/radar_sweep_alpha/Makefile b/radar_sweep_alpha/Makefile +index 5680b9b..f66c338 100644 +--- a/radar_sweep_alpha/Makefile ++++ b/radar_sweep_alpha/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/rgb_triangle/Makefile b/rgb_triangle/Makefile +index 2017956..2ce779d 100644 +--- a/rgb_triangle/Makefile ++++ b/rgb_triangle/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/spriteview/Makefile b/spriteview/Makefile +index 2713936..ada9277 100644 +--- a/spriteview/Makefile ++++ b/spriteview/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/test_pattern/Makefile b/test_pattern/Makefile +index be434d9..1e02b0a 100644 +--- a/test_pattern/Makefile ++++ b/test_pattern/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) +diff --git a/worms/Makefile b/worms/Makefile +index 2a21a4b..c249c8c 100644 +--- a/worms/Makefile ++++ b/worms/Makefile +@@ -15,6 +15,10 @@ all: $(BIN) + $(BIN): $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + ++install: $(BIN) ++ install -d $(DESTDIR)/usr/bin ++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ + clean: + @rm -f $(OBJS) + @rm -f $(BIN) diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch new file mode 100644 index 0000000000000000000000000000000000000000..7adb12bb3b4ca5a61be72dc40332ac9bba356c8c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch @@ -0,0 +1,114 @@ +From 314fbde187e9187b1b3e18e50dd937c070e93633 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 01:58:59 -0500 +Subject: [PATCH] switch to "pkg-config" + +I get a build error saying: + + ERROR: /usr/bin/libpng16-config should not be used, use an alternative such as pkg-config + +Therefore switch to the more common and more generic "pkg-config" instead of +using a libpng-specific tool for flags and libraries. + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + game/Makefile | 4 ++-- + lib/Makefile | 4 ++-- + mandelbrot/Makefile | 4 ++-- + offscreen/Makefile | 4 ++-- + pngview/Makefile | 4 ++-- + spriteview/Makefile | 4 ++-- + 6 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/game/Makefile b/game/Makefile +index 6da6a6d..0a90a38 100644 +--- a/game/Makefile ++++ b/game/Makefile +@@ -1,8 +1,8 @@ + OBJS=main.o + BIN=game + +-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng ++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) ++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/lib/Makefile b/lib/Makefile +index 2765c91..1e8c759 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -11,9 +11,9 @@ OBJS=../common/backgroundLayer.o ../common/imageGraphics.o ../common/key.o \ + + OBJSPNG=../common/spriteLayer.o ../common/loadpng.o ../common/savepng.o ../common/scrollingLayer.o + +-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) ++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) + LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm +-LDFLAGSPNG=${LDFLAGS} $(shell libpng-config --ldflags) ++LDFLAGSPNG=${LDFLAGS} $(shell pkg-config --libs libpng) + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile +index a6e6735..82910bb 100644 +--- a/mandelbrot/Makefile ++++ b/mandelbrot/Makefile +@@ -1,8 +1,8 @@ + OBJS=main.o mandelbrot.o info.o + BIN=mandelbrot + +-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng ++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) ++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/offscreen/Makefile b/offscreen/Makefile +index 8d23354..0120796 100644 +--- a/offscreen/Makefile ++++ b/offscreen/Makefile +@@ -1,8 +1,8 @@ + OBJS=pngresize.o resizeDispmanX.o + BIN=pngresize + +-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng ++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) ++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/pngview/Makefile b/pngview/Makefile +index 8c037ec..71a5d76 100644 +--- a/pngview/Makefile ++++ b/pngview/Makefile +@@ -1,8 +1,8 @@ + OBJS=pngview.o + BIN=pngview + +-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng ++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) ++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/spriteview/Makefile b/spriteview/Makefile +index ada9277..904c1e8 100644 +--- a/spriteview/Makefile ++++ b/spriteview/Makefile +@@ -1,8 +1,8 @@ + OBJS=spriteview.o + BIN=spriteview + +-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng ++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) ++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch new file mode 100644 index 0000000000000000000000000000000000000000..908be62cffa7b3e04c1477a93f520a9429544c72 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch @@ -0,0 +1,170 @@ +From bde71fc22bde61ef8fe319c60f478ec370f5bc5d Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 02:13:39 -0500 +Subject: [PATCH] add libvchostif to link + +I end up with link errors of the type: + + libvchostif.so: error adding symbols: DSO missing from command line + +Which is caused by not having -lvchostif in the link. + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + game/Makefile | 2 +- + life/Makefile | 2 +- + mandelbrot/Makefile | 2 +- + offscreen/Makefile | 2 +- + pngview/Makefile | 2 +- + radar_sweep/Makefile | 2 +- + radar_sweep_alpha/Makefile | 2 +- + rgb_triangle/Makefile | 2 +- + spriteview/Makefile | 2 +- + test_pattern/Makefile | 2 +- + worms/Makefile | 2 +- + 11 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/game/Makefile b/game/Makefile +index 0a90a38..b756fa2 100644 +--- a/game/Makefile ++++ b/game/Makefile +@@ -2,7 +2,7 @@ OBJS=main.o + BIN=game + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/life/Makefile b/life/Makefile +index 44f1edb..2addf69 100644 +--- a/life/Makefile ++++ b/life/Makefile +@@ -2,7 +2,7 @@ OBJS=main.o life.o info.o + BIN=life + + CFLAGS+=-Wall -g -O3 -I../common +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -L../lib -lraspidmx ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -L../lib -lraspidmx + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile +index 82910bb..31097f2 100644 +--- a/mandelbrot/Makefile ++++ b/mandelbrot/Makefile +@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o + BIN=mandelbrot + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/offscreen/Makefile b/offscreen/Makefile +index 0120796..4f13fd0 100644 +--- a/offscreen/Makefile ++++ b/offscreen/Makefile +@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o + BIN=pngresize + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/pngview/Makefile b/pngview/Makefile +index 71a5d76..cce8d63 100644 +--- a/pngview/Makefile ++++ b/pngview/Makefile +@@ -2,7 +2,7 @@ OBJS=pngview.o + BIN=pngview + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/radar_sweep/Makefile b/radar_sweep/Makefile +index 5f814b7..aa1d32c 100644 +--- a/radar_sweep/Makefile ++++ b/radar_sweep/Makefile +@@ -2,7 +2,7 @@ OBJS=radar_sweep.o + BIN=radar_sweep + + CFLAGS+=-Wall -O3 -g -I../common +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/radar_sweep_alpha/Makefile b/radar_sweep_alpha/Makefile +index f66c338..571d47b 100644 +--- a/radar_sweep_alpha/Makefile ++++ b/radar_sweep_alpha/Makefile +@@ -2,7 +2,7 @@ OBJS=radar_sweep_alpha.o + BIN=radar_sweep_alpha + + CFLAGS+=-Wall -O3 -g -I../common +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/rgb_triangle/Makefile b/rgb_triangle/Makefile +index 2ce779d..0266715 100644 +--- a/rgb_triangle/Makefile ++++ b/rgb_triangle/Makefile +@@ -2,7 +2,7 @@ OBJS=rgb_triangle.o + BIN=rgb_triangle + + CFLAGS+=-Wall -O3 -g -I../common +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/spriteview/Makefile b/spriteview/Makefile +index 904c1e8..d2fb3c8 100644 +--- a/spriteview/Makefile ++++ b/spriteview/Makefile +@@ -2,7 +2,7 @@ OBJS=spriteview.o + BIN=spriteview + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/test_pattern/Makefile b/test_pattern/Makefile +index 1e02b0a..c231fb6 100644 +--- a/test_pattern/Makefile ++++ b/test_pattern/Makefile +@@ -2,7 +2,7 @@ OBJS=test_pattern.o + BIN=test_pattern + + CFLAGS+=-Wall -g -O3 -I../common +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/worms/Makefile b/worms/Makefile +index c249c8c..3b6c830 100644 +--- a/worms/Makefile ++++ b/worms/Makefile +@@ -2,7 +2,7 @@ OBJS=main.o worms.o + BIN=worms + + CFLAGS+=-Wall -g -O3 -I../common +-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch new file mode 100644 index 0000000000000000000000000000000000000000..ceefd035f861881e9e94953e5dd89157846cd575 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch @@ -0,0 +1,87 @@ +From 07e7b727b7df7fc5bf0e1f296ba136e0653202ea Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 03:25:08 -0500 +Subject: [PATCH] change library linking order + +Since -lraspidmxPng requires the png library (libpng), re-arrange the order of +linking so that it succeeds. Otherwise I get errors like the following: + + undefined reference to `png_create_write_struct' + +...as well as undefined references to various other libpng objects. + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + game/Makefile | 2 +- + mandelbrot/Makefile | 2 +- + offscreen/Makefile | 2 +- + pngview/Makefile | 2 +- + spriteview/Makefile | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/game/Makefile b/game/Makefile +index b756fa2..f33916d 100644 +--- a/game/Makefile ++++ b/game/Makefile +@@ -2,7 +2,7 @@ OBJS=main.o + BIN=game + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile +index 31097f2..08d1113 100644 +--- a/mandelbrot/Makefile ++++ b/mandelbrot/Makefile +@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o + BIN=mandelbrot + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/offscreen/Makefile b/offscreen/Makefile +index 4f13fd0..49fc744 100644 +--- a/offscreen/Makefile ++++ b/offscreen/Makefile +@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o + BIN=pngresize + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/pngview/Makefile b/pngview/Makefile +index cce8d63..bd6c154 100644 +--- a/pngview/Makefile ++++ b/pngview/Makefile +@@ -2,7 +2,7 @@ OBJS=pngview.o + BIN=pngview + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + +diff --git a/spriteview/Makefile b/spriteview/Makefile +index d2fb3c8..89d9e01 100644 +--- a/spriteview/Makefile ++++ b/spriteview/Makefile +@@ -2,7 +2,7 @@ OBJS=spriteview.o + BIN=spriteview + + CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) +-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng ++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) + + INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux + diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch new file mode 100644 index 0000000000000000000000000000000000000000..dae847dad660d9805dfc963d6652045affba43f4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch @@ -0,0 +1,24 @@ +From 1868a111450be0053ab124df501cfcb7542f5e77 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 03:47:17 -0500 +Subject: [PATCH] game/Makefile: install sample png files + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + game/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/game/Makefile b/game/Makefile +index f33916d..d007972 100644 +--- a/game/Makefile ++++ b/game/Makefile +@@ -18,6 +18,8 @@ $(BIN): $(OBJS) + install: $(BIN) + install -d $(DESTDIR)/usr/bin + install -m 0755 $(BIN) $(DESTDIR)/usr/bin ++ install -d $(DESTDIR)/usr/share/raspidmx ++ install -m 444 spotlight.png sprite.png texture.png $(DESTDIR)/usr/share/raspidmx + + clean: + @rm -f $(OBJS) diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch new file mode 100644 index 0000000000000000000000000000000000000000..b5c743e549c4eec46ab850a1ed209271dac2a348 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch @@ -0,0 +1,57 @@ +From f195ffffb133c9cda88d5eac41c0f584fd4540c9 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 4 Dec 2020 03:48:36 -0500 +Subject: [PATCH] Makefile: reorganize + +Reorganize the main Makefile in order to: +1. be able to build in parallel +2. have build failures in subdirectories stop the build + +Now the "-j <#threads>" option can be used with 'make'. + +Also, if a build failure occurs in a subdirectory, this new arrangement will +cause the build to stop and fail instead of silently ignoring it. + +To build simply invoke 'make' with or without a -j option. +To install simply invoke: make TARGET=install +To clean simply invoke: make TARGET=clean + +Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] +Signed-off-by: Trevor Woerner +--- + Makefile | 19 +++++++------------ + 1 file changed, 7 insertions(+), 12 deletions(-) + +diff --git a/Makefile b/Makefile +index 4a06de9..1f9f7c4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,4 @@ +-TARGETS=lib \ +- life \ ++TARGETS=life \ + mandelbrot \ + offscreen \ + pngview \ +@@ -10,15 +9,11 @@ TARGETS=lib \ + spriteview \ + test_pattern \ + worms ++.PHONY: all lib install clean $(TARGETS) + +-default :all +- +-all: +- for target in $(TARGETS); do ($(MAKE) -C $$target); done +- +-install: +- for target in $(TARGETS); do ($(MAKE) -C $$target install); done +- +-clean: +- for target in $(TARGETS); do ($(MAKE) -C $$target clean); done ++all: $(TARGETS) + ++$(TARGETS): lib ++ $(MAKE) -C $@ $(TARGET) ++lib: ++ $(MAKE) -C $@ $(TARGET) diff --git a/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx_git.bb b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..1a1ecfa595a1bc9e6bd9e2b1337fe04adb3e31ed --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/raspidmx/raspidmx_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "Some examples using the DispmanX API on the Raspberry Pi" +HOMEPAGE = "https://github.com/AndrewFromMelbourne/raspidmx" +SECTION = "graphics" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=52962875ab02c36df6cde47b1f463024" + +COMPATIBLE_HOST = "null" +COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}" + +SRC_URI = "git://github.com/AndrewFromMelbourne/raspidmx;protocol=https;branch=master \ + file://0001-gitignore-add-archives-from-lib-directory.patch \ + file://0002-add-install-targets-to-Makefiles.patch \ + file://0003-switch-to-pkg-config.patch \ + file://0004-add-libvchostif-to-link.patch \ + file://0005-change-library-linking-order.patch \ + file://0006-game-Makefile-install-sample-png-files.patch \ + file://0007-Makefile-reorganize.patch \ + " + +PV = "0.0+git${SRCPV}" +SRCREV = "e2ee6faa0d01a5ece06bcc74a47f37d7e6837310" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +DEPENDS += "libpng userland" + +do_install () { + oe_runmake 'DESTDIR=${D}' 'TARGET=install' +} diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch new file mode 100644 index 0000000000000000000000000000000000000000..295309c4d3224f485c6a0a91c713079269c9ea15 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch @@ -0,0 +1,205 @@ +From 8a734f44beea9b10548ba696eaea1f5a76148fd5 Mon Sep 17 00:00:00 2001 +From: Dom Cobley +Date: Tue, 9 Jul 2013 09:26:26 -0400 +Subject: [PATCH] Allow applications to set next resource handle + +This patch adds provisions in userland to +let apps callers set the next rendereing dispmanx resource. +It's useful for implementing, say, a buffer carousel. +--- + interface/khronos/common/khrn_client_rpc.h | 2 ++ + interface/khronos/common/khrn_int_ids.h | 2 ++ + interface/khronos/egl/egl_client.c | 30 +++++++++++++++++++--- + interface/khronos/egl/egl_client_surface.c | 24 ++++++++++++++++- + interface/khronos/egl/egl_client_surface.h | 3 ++- + interface/khronos/egl/egl_int_impl.h | 5 ++-- + 6 files changed, 59 insertions(+), 7 deletions(-) + +diff --git a/interface/khronos/common/khrn_client_rpc.h b/interface/khronos/common/khrn_client_rpc.h +index dc4351d..10ea060 100644 +--- a/interface/khronos/common/khrn_client_rpc.h ++++ b/interface/khronos/common/khrn_client_rpc.h +@@ -685,6 +685,7 @@ static INLINE void rpc_call12_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id + static INLINE void rpc_call13_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); } + static INLINE void rpc_call14_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); } + static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); } ++static INLINE void rpc_call16_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, uint32_t p14, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); } + #endif + + #define RPC_CALL1_OUT_CTRL(fn, thread, id, out) rpc_call1_out_ctrl(thread, id, out) +@@ -702,6 +703,7 @@ static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id + #define RPC_CALL13_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out) rpc_call13_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out) + #define RPC_CALL14_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out) rpc_call14_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out) + #define RPC_CALL15_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out) rpc_call15_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out) ++#define RPC_CALL16_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out) rpc_call16_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out) + + # if !defined(__SYMBIAN32__) //use functions defined in khrpc.cpp + static INLINE uint32_t rpc_call1_out_ctrl_res(CLIENT_THREAD_STATE_T *thread,uint32_t id, void *out) { uint32_t res; rpc_begin(thread); RPC_CALL(thread, id); res = rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_RES | RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); return res; } +diff --git a/interface/khronos/common/khrn_int_ids.h b/interface/khronos/common/khrn_int_ids.h +index 8378f4a..ec961e0 100644 +--- a/interface/khronos/common/khrn_int_ids.h ++++ b/interface/khronos/common/khrn_int_ids.h +@@ -367,6 +367,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + #define EGLINTCREATESURFACE_ID 0x4000 ++#define EGLINTCREATESURFACE_ID_V2 0x4100 + #define EGLINTCREATEGLES11_ID 0x4001 + #define EGLINTCREATEGLES20_ID 0x4002 + #define EGLINTCREATEVG_ID 0x4003 +@@ -377,6 +378,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define EGLINTMAKECURRENT_ID 0x4008 + #define EGLINTFLUSHANDWAIT_ID 0x4009 + #define EGLINTSWAPBUFFERS_ID 0x400a ++#define EGLINTSWAPBUFFERS_ID_V2 0x410a + #define EGLINTSELECTMIPMAP_ID 0x400b + #define EGLINTFLUSH_ID 0x400c + #define EGLINTGETCOLORDATA_ID 0x400d +diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c +index 9d617c8..b8bb374 100644 +--- a/interface/khronos/egl/egl_client.c ++++ b/interface/khronos/egl/egl_client.c +@@ -162,6 +162,17 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T * + void egl_gl_flush_callback(bool wait); + void egl_vg_flush_callback(bool wait); + ++#include "interface/vmcs_host/vc_dispmanx_types.h" ++/**HACKHACK - give us the ability to inject a DispmanX ++ * resource handle into the CreateWindowSurface and ++ * SwapBuffers calls */ ++static DISPMANX_RESOURCE_HANDLE_T next_resource_handle; ++ ++EGLAPI EGLBoolean EGLAPIENTRY eglSetNextResourceHandle(DISPMANX_RESOURCE_HANDLE_T handle) ++{ ++ next_resource_handle = handle; ++} ++ + /* + TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate) + Also affects global image (and possibly others?) +@@ -644,7 +655,8 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c + false, + EGL_NO_TEXTURE, + EGL_NO_TEXTURE, +- 0, 0); ++ 0, 0, ++ next_resource_handle); + + if (surface) { + if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { +@@ -889,7 +901,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig + mipmap_texture, + texture_format, + texture_target, +- 0, 0); ++ 0, 0, 0); + + if (surface) { + if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { +@@ -1031,7 +1043,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c + false, + EGL_NO_TEXTURE, + EGL_NO_TEXTURE, +- pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle); ++ pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle, 0); + + if (surface) { + if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { +@@ -2303,6 +2315,18 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + + vcos_log_trace("eglSwapBuffers server call"); + ++ if (next_resource_handle) ++ RPC_CALL7(eglIntSwapBuffers_impl, ++ thread, ++ EGLINTSWAPBUFFERS_ID_V2, ++ RPC_UINT(surface->serverbuffer), ++ RPC_UINT(surface->width), ++ RPC_UINT(surface->height), ++ RPC_UINT(surface->internal_handle), ++ RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0), ++ RPC_UINT(khrn_platform_get_window_position(surface->win)), ++ RPC_INT(next_resource_handle)); ++ else + RPC_CALL6(eglIntSwapBuffers_impl, + thread, + EGLINTSWAPBUFFERS_ID, +diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c +index 6846dfa..128325e 100644 +--- a/interface/khronos/egl/egl_client_surface.c ++++ b/interface/khronos/egl/egl_client_surface.c +@@ -314,7 +314,8 @@ EGL_SURFACE_T *egl_surface_create( + EGLenum texture_format, + EGLenum texture_target, + EGLNativePixmapType pixmap, +- const uint32_t *pixmap_server_handle) ++ const uint32_t *pixmap_server_handle, ++ DISPMANX_RESOURCE_HANDLE_T next_resource_handle) + { + KHRN_IMAGE_FORMAT_T color; + KHRN_IMAGE_FORMAT_T depth; +@@ -473,6 +474,27 @@ EGL_SURFACE_T *egl_surface_create( + #endif + uint32_t results[3]; + ++ if (next_resource_handle) ++ RPC_CALL16_OUT_CTRL(eglIntCreateSurface_impl, ++ thread, ++ EGLINTCREATESURFACE_ID_V2, ++ RPC_UINT(serverwin), ++ RPC_UINT(buffers), ++ RPC_UINT(width), ++ RPC_UINT(height), ++ RPC_UINT(color), ++ RPC_UINT(depth), ++ RPC_UINT(mask), ++ RPC_UINT(multi), ++ RPC_UINT(largest_pbuffer), ++ RPC_UINT(mipmap_texture), ++ RPC_UINT(config_depth_bits), ++ RPC_UINT(config_stencil_bits), ++ RPC_UINT(sem_name), ++ RPC_UINT(type), ++ RPC_INT(next_resource_handle), ++ results); ++ else + RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl, + thread, + EGLINTCREATESURFACE_ID, +diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h +index c99d44c..b5bf70a 100644 +--- a/interface/khronos/egl/egl_client_surface.h ++++ b/interface/khronos/egl/egl_client_surface.h +@@ -322,7 +322,8 @@ extern EGL_SURFACE_T *egl_surface_create( + EGLenum texture_format, + EGLenum texture_target, + EGLNativePixmapType pixmap, +- const uint32_t *pixmap_server_handle); ++ const uint32_t *pixmap_server_handle, ++ DISPMANX_RESOURCE_HANDLE_T next_resource_handle); + extern EGL_SURFACE_T *egl_surface_from_vg_image( + VGImage vg_handle, + EGLSurface name, +diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h +index 8a5734c..51b3580 100644 +--- a/interface/khronos/egl/egl_int_impl.h ++++ b/interface/khronos/egl/egl_int_impl.h +@@ -56,7 +56,8 @@ FN(int, eglIntCreateSurface_impl, ( + uint32_t config_stencil_bits, + uint32_t sem, + uint32_t type, +- uint32_t *results)) ++ uint32_t *results, ++ DISPMANX_RESOURCE_HANDLE_T next_resource_handle)) + + FN(int, eglIntCreatePbufferFromVGImage_impl, ( + VGImage vg_handle, +@@ -110,7 +111,7 @@ FN(void, eglIntMakeCurrent_impl, (uint32_t pid_0, uint32_t pid_1, uint32_t glver + FN(int, eglIntFlushAndWait_impl, (uint32_t flushgl, uint32_t flushvg)) + FN(void, eglIntFlush_impl, (uint32_t flushgl, uint32_t flushvg)) + +-FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position)) ++FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position, DISPMANX_RESOURCE_HANDLE_T new_back_buffer)) + FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level)) + + FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data)) diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch new file mode 100644 index 0000000000000000000000000000000000000000..7945bfff9414d44230b0bf69dc4f4a97b14ff4fb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch @@ -0,0 +1,1891 @@ +From 3c1566e9c3b356cfcd8327fed0e537ed978c8e78 Mon Sep 17 00:00:00 2001 +From: Tomeu Vizoso +Date: Tue, 1 Oct 2013 13:19:20 +0200 +Subject: [PATCH] wayland: Add support for the Wayland winsys + +* Adds EGL_WL_bind_wayland_display extension +* Adds wayland-egl library +* Adds wl_dispmanx_buffer protocol extension + +TODO: Check that platform_get_dimensions() returning swapchain_count == 1 is correct + +TODO: Remove the requirement of passing a valid DispmanX element handle to +the SwapBuffers and CreateSurface RPC calls. This will remove the need to open +a DispmanX display from the clients. + +TODO: wl_dispmanx_server_buffer should probably be defined in a +private header that can be included from EGL and vc_* instead of in +vc_vchi_dispmanx.h + +Signed-off-by: Khem Raj +--- + .gitignore | 1 + + CMakeLists.txt | 11 + + README.md | 4 + + buildme | 10 +- + .../linux/apps/raspicam/CMakeLists.txt | 2 +- + interface/khronos/CMakeLists.txt | 54 +++- + interface/khronos/common/khrn_client.c | 15 ++ + interface/khronos/common/khrn_client.h | 10 + + interface/khronos/common/khrn_client_mangle.h | 3 + + .../khronos/common/khrn_client_platform.h | 8 + + .../khronos/common/khrn_client_unmangle.h | 3 + + .../common/linux/khrn_client_platform_linux.c | 115 +++++++- + interface/khronos/common/linux/khrn_wayland.c | 215 +++++++++++++++ + .../common/linux/khrn_wayland.h} | 46 +--- + interface/khronos/egl/egl_client.c | 92 +++++-- + interface/khronos/egl/egl_client_get_proc.c | 11 + + interface/khronos/egl/egl_client_surface.c | 42 ++- + interface/khronos/egl/egl_client_surface.h | 38 ++- + interface/khronos/egl/egl_int_impl.h | 2 +- + interface/khronos/ext/egl_wayland.c | 246 ++++++++++++++++++ + interface/khronos/include/EGL/eglext.h | 23 ++ + .../khronos/wayland-egl/wayland-egl-priv.h | 53 ++++ + interface/khronos/wayland-egl/wayland-egl.c | 59 +++++ + .../khronos/wayland-egl/wayland-egl.pc.in | 10 + + interface/vmcs_host/CMakeLists.txt | 13 +- + interface/vmcs_host/vc_dispmanx.h | 10 + + interface/vmcs_host/vc_vchi_dispmanx.c | 42 +++ + interface/vmcs_host/vc_vchi_dispmanx.h | 15 ++ + interface/wayland/dispmanx.xml | 123 +++++++++ + makefiles/cmake/Wayland.cmake | 72 +++++ + 30 files changed, 1253 insertions(+), 95 deletions(-) + create mode 100644 interface/khronos/common/linux/khrn_wayland.c + copy interface/{vmcs_host/vc_vchi_dispmanx.h => khronos/common/linux/khrn_wayland.h} (56%) + create mode 100644 interface/khronos/ext/egl_wayland.c + create mode 100644 interface/khronos/wayland-egl/wayland-egl-priv.h + create mode 100644 interface/khronos/wayland-egl/wayland-egl.c + create mode 100644 interface/khronos/wayland-egl/wayland-egl.pc.in + create mode 100644 interface/wayland/dispmanx.xml + create mode 100644 makefiles/cmake/Wayland.cmake + +diff --git a/.gitignore b/.gitignore +index 63570f1..1459436 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -30,3 +30,4 @@ build/ + *.pts + *.ppm + *.mkv ++*~ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fe67fc8..80337b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings.cmake) + include(makefiles/cmake/arm-linux.cmake) + include(makefiles/cmake/vmcs.cmake) + ++if (BUILD_WAYLAND) ++ include(makefiles/cmake/Wayland.cmake) ++ ++ # Find Wayland libraries ++ find_package(PkgConfig) ++ pkg_check_modules(WAYLAND_CLIENT wayland-client REQUIRED) ++ pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED) ++ ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_WAYLAND") ++endif() ++ + enable_language(ASM) + + # Global include paths +diff --git a/README.md b/README.md +index 404e4d4..97a6b8f 100644 +--- a/README.md ++++ b/README.md +@@ -8,3 +8,7 @@ https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linu + Whilst 64-bit userspace is not officially supported, some of the libraries will work for it. To cross compile, install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu first. For both native and cross compiles, add the option ```--aarch64``` to the buildme command. + + Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions. ++ ++To build support for the Wayland winsys in EGL, execute the buildme script like this: ++ ++$ BUILD_WAYLAND=1 ./buildme. +diff --git a/buildme b/buildme +index 9e2d405..7b8c0d6 100755 +--- a/buildme ++++ b/buildme +@@ -17,6 +17,10 @@ fi + + BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`; + ++if [ -n "$BUILD_WAYLAND" ]; then ++ WAYLAND_VARS="-DBUILD_WAYLAND=TRUE" ++fi ++ + if [ $ARCH = "armv6l" ] || [ $ARCH = "armv7l" ] || [ $ARCH = "aarch64" ]; then + # Native compile on the Raspberry Pi + mkdir -p build/raspberry/$BUILDSUBDIR +@@ -41,9 +45,13 @@ elif [ "$1" = "--native" ]; then + make -j `nproc` $* + else + # Cross compile on a more capable machine ++ if [ -n "$BUILD_WAYLAND" ]; then ++ # Use wayland-scanner from the build platform ++ WAYLAND_VARS+=" -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=/usr/bin/wayland-scanner" ++ fi + mkdir -p build/arm-linux/$BUILDSUBDIR + pushd build/arm-linux/$BUILDSUBDIR +- cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 ../../.. ++ cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 $WAYLAND_VARS ../../.. + make -j `nproc` + + if [ "$1" != "" ]; then +diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt +index eb1ef7c..5aeeb2e 100644 +--- a/host_applications/linux/apps/raspicam/CMakeLists.txt ++++ b/host_applications/linux/apps/raspicam/CMakeLists.txt +@@ -61,7 +61,7 @@ add_executable(raspivid ${COMMON_SOURCES} RaspiVid.c) + add_executable(raspividyuv ${COMMON_SOURCES} RaspiVidYUV.c) + + set (MMAL_LIBS mmal_core mmal_util mmal_vc_client) +-target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host ${EGL_LIBS} m dl) ++target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host ${EGL_LIBS} m dl ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES}) + target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host m) + target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host m) + target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host m) +diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt +index 9ad615b..95c0e11 100644 +--- a/interface/khronos/CMakeLists.txt ++++ b/interface/khronos/CMakeLists.txt +@@ -6,6 +6,12 @@ + # have quite a few circular dependencies, and so the only way + # to make it work seems to be to have everything static. + ++if (BUILD_WAYLAND) ++include_directories( ++ ${WAYLAND_SERVER_INCLUDE_DIRS} ++) ++endif () ++ + set(EGL_SOURCE + egl/egl_client_config.c + egl/egl_client_context.c +@@ -55,12 +61,55 @@ set(CLIENT_SOURCE + common/khrn_int_hash_asm.s + common/khrn_client_cache.c) + ++set(EGL_LIBS ++ khrn_client ++ vchiq_arm ++ vcos ++ bcm_host) ++ ++if (BUILD_WAYLAND) ++ set(EGL_SOURCE ++ ${EGL_SOURCE} ++ ext/egl_wayland.c ++ common/linux/khrn_wayland.c) ++ ++ set(EGL_LIBS ++ ${EGL_LIBS} ++ wayland-client ++ wayland-server) ++ ++ set(WAYLAND_EGL_SOURCE ++ wayland-egl/wayland-egl.c) ++ ++ wayland_add_protocol_server( ++ EGL_SOURCE ++ ../../interface/wayland/dispmanx.xml ++ dispmanx ++ ) ++ ++ wayland_add_protocol_client( ++ EGL_SOURCE ++ ../../interface/wayland/dispmanx.xml ++ dispmanx ++ ) ++ ++ add_library(wayland-egl ${SHARED} ${WAYLAND_EGL_SOURCE}) ++ install(TARGETS wayland-egl DESTINATION lib) ++ ++ configure_file ("wayland-egl/wayland-egl.pc.in" "wayland-egl/wayland-egl.pc" @ONLY) ++ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/wayland-egl/wayland-egl.pc" ++ DESTINATION lib/pkgconfig) ++endif () ++ + add_library(EGL ${SHARED} ${EGL_SOURCE}) + add_library(GLESv2 ${SHARED} ${GLES_SOURCE}) + add_library(OpenVG ${SHARED} ${VG_SOURCE}) + add_library(WFC ${SHARED} ${WFC_SOURCE}) + add_library(khrn_client ${CLIENT_SOURCE}) + ++set_target_properties(EGL PROPERTIES SOVERSION 1 VERSION 1.0.0) ++set_target_properties(GLESv2 PROPERTIES SOVERSION 2 VERSION 2.0.0) ++ + # TODO do we need EGL_static and GLESv2_static now that khrn_static exists? + add_library(EGL_static STATIC ${EGL_SOURCE}) + add_library(GLESv2_static STATIC ${GLES_SOURCE}) +@@ -72,8 +121,7 @@ include_directories (../../host_applications/linux/libs/sm ) + set(VCSM_LIBS vcsm) + add_definitions(-DKHRONOS_HAVE_VCSM) + endif() +- +-target_link_libraries(EGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm) ++target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS} -lm) + target_link_libraries(GLESv2 EGL khrn_client vcos) + target_link_libraries(WFC EGL) + target_link_libraries(OpenVG EGL) +@@ -87,7 +135,7 @@ add_library(brcmGLESv2 ${SHARED} ${GLES_SOURCE}) + add_library(brcmOpenVG ${SHARED} ${VG_SOURCE}) + add_library(brcmWFC ${SHARED} ${WFC_SOURCE}) + +-target_link_libraries(brcmEGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm) ++target_link_libraries(brcmEGL ${EGL_LIBS} ${VCSM_LIBS} -lm) + target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos) + target_link_libraries(brcmWFC brcmEGL) + target_link_libraries(brcmOpenVG brcmEGL) +diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c +index ef4babd..d7e798e 100644 +--- a/interface/khronos/common/khrn_client.c ++++ b/interface/khronos/common/khrn_client.c +@@ -54,6 +54,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "applications/vmcs/khronos/khronos_server.h" + #endif + ++#ifdef BUILD_WAYLAND ++#include "interface/khronos/common/linux/khrn_wayland.h" ++#endif ++ + VCOS_LOG_CAT_T khrn_client_log = VCOS_LOG_INIT("khrn_client", VCOS_LOG_WARN); + + /* +@@ -142,6 +146,10 @@ void client_try_unload_server(CLIENT_PROCESS_STATE_T *process) + bool client_process_state_init(CLIENT_PROCESS_STATE_T *process) + { + if (!process->inited) { ++#ifdef BUILD_WAYLAND ++ process->wl_global = NULL; ++#endif ++ + if (!khrn_pointer_map_init(&process->contexts, 64)) + return false; + +@@ -194,6 +202,13 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process) + } + #endif + ++#ifdef BUILD_WAYLAND ++ struct wl_display *wl_display = khrn_platform_get_wl_display(); ++ if (wl_display) ++ if (!init_process_wayland(process)) ++ return false; ++#endif ++ + process->inited = true; + } + +diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h +index 804039b..615f7b4 100644 +--- a/interface/khronos/common/khrn_client.h ++++ b/interface/khronos/common/khrn_client.h +@@ -310,6 +310,16 @@ struct CLIENT_PROCESS_STATE { + #ifdef RPC_LIBRARY + KHRONOS_SERVER_CONNECTION_T khrn_connection; + #endif ++ ++#ifdef BUILD_WAYLAND ++ /* Client-side Wayland state */ ++ struct wl_registry *wl_registry; ++ struct wl_dispmanx *wl_dispmanx; ++ struct wl_event_queue *wl_queue; ++ ++ /* Compositor-side Wayland state */ ++ struct wl_global *wl_global; ++#endif + }; + + extern bool client_process_state_init(CLIENT_PROCESS_STATE_T *process); +diff --git a/interface/khronos/common/khrn_client_mangle.h b/interface/khronos/common/khrn_client_mangle.h +index b3c04f4..b7b21c5 100644 +--- a/interface/khronos/common/khrn_client_mangle.h ++++ b/interface/khronos/common/khrn_client_mangle.h +@@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define eglReleaseGlobalImageBRCM mangled_eglReleaseGlobalImageBRCM + #define eglInitGlobalImageBRCM mangled_eglInitGlobalImageBRCM + #define eglTermGlobalImageBRCM mangled_eglTermGlobalImageBRCM ++#define eglBindWaylandDisplayWL mangled_eglBindWaylandDisplayWL ++#define eglUnbindWaylandDisplayWL mangled_eglUnbindWaylandDisplayWL ++#define eglQueryWaylandBufferWL mangled_eglQueryWaylandBufferWL + + /* OpenGL ES 1.1 and 2.0 functions */ + +diff --git a/interface/khronos/common/khrn_client_platform.h b/interface/khronos/common/khrn_client_platform.h +index 1c9da3a..715c67e 100644 +--- a/interface/khronos/common/khrn_client_platform.h ++++ b/interface/khronos/common/khrn_client_platform.h +@@ -48,6 +48,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "interface/khronos/common/vcos/khrn_client_platform_filler_vcos.h" + #endif + ++#ifdef BUILD_WAYLAND ++#include ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -328,4 +332,8 @@ typedef struct + + void *platform_wfc_bounce_thread(void *param); + ++#ifdef BUILD_WAYLAND ++struct wl_display *khrn_platform_get_wl_display(); ++#endif ++ + #endif // KHRN_CLIENT_PLATFORM_H +diff --git a/interface/khronos/common/khrn_client_unmangle.h b/interface/khronos/common/khrn_client_unmangle.h +index 4f3ce49..84f6ec0 100644 +--- a/interface/khronos/common/khrn_client_unmangle.h ++++ b/interface/khronos/common/khrn_client_unmangle.h +@@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #undef eglReleaseGlobalImageBRCM + #undef eglInitGlobalImageBRCM + #undef eglTermGlobalImageBRCM ++#undef eglBindWaylandDisplayWL ++#undef eglUnbindWaylandDisplayWL ++#undef eglQueryWaylandBufferWL + + /* OpenGL ES 1.1 and 2.0 functions */ + +diff --git a/interface/khronos/common/linux/khrn_client_platform_linux.c b/interface/khronos/common/linux/khrn_client_platform_linux.c +index 710d20f..50d60a6 100644 +--- a/interface/khronos/common/linux/khrn_client_platform_linux.c ++++ b/interface/khronos/common/linux/khrn_client_platform_linux.c +@@ -37,6 +37,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "X11/Xlib.h" + #endif + ++#ifdef BUILD_WAYLAND ++#include ++#include "interface/khronos/wayland-egl/wayland-egl-priv.h" ++#endif ++ + extern VCOS_LOG_CAT_T khrn_client_log; + + extern void vc_vchi_khronos_init(); +@@ -464,13 +469,36 @@ EGLDisplay khrn_platform_set_display_id(EGLNativeDisplayType display_id) + return EGL_NO_DISPLAY; + } + #else ++ ++#ifdef BUILD_WAYLAND ++static struct wl_display *hacky_display = NULL; ++#endif ++ + EGLDisplay khrn_platform_set_display_id(EGLNativeDisplayType display_id) + { + if (display_id == EGL_DEFAULT_DISPLAY) + return (EGLDisplay)1; +- else +- return EGL_NO_DISPLAY; ++ else { ++#ifdef BUILD_WAYLAND ++ void *first_pointer = *(void **) display_id; ++ ++ /* wl_display is a wl_proxy, which is a wl_object. ++ * wl_object's first element points to the interfacetype. */ ++ if (first_pointer == &wl_display_interface) { ++ hacky_display = (struct wl_display*)display_id; ++ return (EGLDisplay)1; ++ } else ++#endif ++ return EGL_NO_DISPLAY; ++ } + } ++ ++#ifdef BUILD_WAYLAND ++struct wl_display *khrn_platform_get_wl_display() ++{ ++ return hacky_display; ++} ++#endif + #endif + + #ifdef WANT_X +@@ -805,22 +833,81 @@ static EGL_DISPMANX_WINDOW_T *check_default(EGLNativeWindowType win) + void platform_get_dimensions(EGLDisplay dpy, EGLNativeWindowType win, + uint32_t *width, uint32_t *height, uint32_t *swapchain_count) + { +- EGL_DISPMANX_WINDOW_T *dwin = check_default(win); +- vcos_assert(dwin); +- vcos_assert(dwin->width < 1<<16); // sanity check +- vcos_assert(dwin->height < 1<<16); // sanity check +- *width = dwin->width; +- *height = dwin->height; +- *swapchain_count = 0; ++#ifdef BUILD_WAYLAND ++ if(khrn_platform_get_wl_display()) { ++ struct wl_egl_window *wl_egl_window = (struct wl_egl_window*)win; ++ *width = wl_egl_window->width; ++ *height = wl_egl_window->height; ++ /* This seems to be used for sync'ing with the VC on buffer creation, but ++ we are managing them on the CPU side */ ++ *swapchain_count = 1; ++ } else { ++#endif ++ EGL_DISPMANX_WINDOW_T *dwin = check_default(win); ++ vcos_assert(dwin); ++ vcos_assert(dwin->width < 1<<16); // sanity check ++ vcos_assert(dwin->height < 1<<16); // sanity check ++ *width = dwin->width; ++ *height = dwin->height; ++ *swapchain_count = 0; ++#ifdef BUILD_WAYLAND ++ } ++#endif + } + ++#ifdef BUILD_WAYLAND ++static DISPMANX_ELEMENT_HANDLE_T create_dummy_element() ++{ ++ DISPMANX_DISPLAY_HANDLE_T display = vc_dispmanx_display_open(0); ++ DISPMANX_UPDATE_HANDLE_T update = vc_dispmanx_update_start(0); ++ DISPMANX_ELEMENT_HANDLE_T element; ++ VC_DISPMANX_ALPHA_T alpha = {DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS, 255, 0}; ++ VC_RECT_T src_rect; ++ VC_RECT_T dst_rect; ++ ++ src_rect.x = 0; ++ src_rect.y = 0; ++ src_rect.width = 1 << 16; ++ src_rect.height = 1 << 16; ++ ++ dst_rect.x = 0; ++ dst_rect.y = 0; ++ dst_rect.width = 1; ++ dst_rect.height = 1; ++ ++ element = vc_dispmanx_element_add(update, display, 0/*layer*/, &dst_rect, ++ 0/*src*/, &src_rect, ++ DISPMANX_PROTECTION_NONE, &alpha, ++ 0/*clamp*/, 0/*transform*/); ++ ++ vc_dispmanx_update_submit_sync(update); ++ ++ vc_dispmanx_display_close(display); ++ ++ return element; ++} ++#endif ++ + uint32_t platform_get_handle(EGLDisplay dpy, EGLNativeWindowType win) + { +- EGL_DISPMANX_WINDOW_T *dwin = check_default(win); +- vcos_assert(dwin); +- vcos_assert(dwin->width < 1<<16); // sanity check +- vcos_assert(dwin->height < 1<<16); // sanity check +- return dwin->element; ++#ifdef BUILD_WAYLAND ++ if(khrn_platform_get_wl_display()) { ++ struct wl_egl_window *wl_egl_window = (struct wl_egl_window*)win; ++ ++ if (wl_egl_window->dummy_element == PLATFORM_WIN_NONE) ++ wl_egl_window->dummy_element = create_dummy_element(); ++ ++ return wl_egl_window->dummy_element; ++ } else { ++#endif ++ EGL_DISPMANX_WINDOW_T *dwin = check_default(win); ++ vcos_assert(dwin); ++ vcos_assert(dwin->width < 1<<16); // sanity check ++ vcos_assert(dwin->height < 1<<16); // sanity check ++ return dwin->element; ++#ifdef BUILD_WAYLAND ++ } ++#endif + } + + #endif +diff --git a/interface/khronos/common/linux/khrn_wayland.c b/interface/khronos/common/linux/khrn_wayland.c +new file mode 100644 +index 0000000..0e1b9e7 +--- /dev/null ++++ b/interface/khronos/common/linux/khrn_wayland.c +@@ -0,0 +1,215 @@ ++/* ++Copyright (c) 2013, Raspberry Pi Foundation ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * 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. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++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 HOLDER 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. ++*/ ++ ++#define VCOS_LOG_CATEGORY (&khrn_client_log) ++ ++#include "interface/khronos/common/linux/khrn_wayland.h" ++#include "interface/khronos/wayland-dispmanx-client-protocol.h" ++#include "interface/khronos/wayland-egl/wayland-egl-priv.h" ++ ++extern VCOS_LOG_CAT_T khrn_client_log; ++ ++static void handle_dispmanx_format(void *data, struct wl_dispmanx *dispmanx, ++ uint32_t format) ++{ ++} ++ ++static void handle_dispmanx_allocated(void *data, struct wl_dispmanx *dispmanx, ++ struct wl_buffer *wl_buffer, ++ uint32_t resource_handle) ++{ ++ struct wl_dispmanx_client_buffer *buffer = wl_buffer_get_user_data(wl_buffer); ++ ++ buffer->pending_allocation = 0; ++ buffer->resource = resource_handle; ++} ++ ++static const struct wl_dispmanx_listener dispmanx_listener = { ++ handle_dispmanx_format, ++ handle_dispmanx_allocated, ++}; ++ ++static void ++sync_callback(void *data, struct wl_callback *callback, uint32_t serial) ++{ ++ int *done = data; ++ ++ *done = 1; ++ ++ wl_callback_destroy(callback); ++} ++ ++static const struct wl_callback_listener sync_listener = { ++ sync_callback ++}; ++ ++static int ++roundtrip(CLIENT_PROCESS_STATE_T *process) ++{ ++ struct wl_display *wl_display = khrn_platform_get_wl_display(); ++ struct wl_callback *callback; ++ int done = 0, ret = 0; ++ ++ callback = wl_display_sync(wl_display); ++ wl_callback_add_listener(callback, &sync_listener, &done); ++ wl_proxy_set_queue((struct wl_proxy *) callback, process->wl_queue); ++ while (ret != -1 && !done) ++ ret = wl_display_dispatch_queue(wl_display, process->wl_queue); ++ ++ if (!done) ++ wl_callback_destroy(callback); ++ ++ return ret; ++} ++ ++int do_wl_roundtrip() ++{ ++ CLIENT_PROCESS_STATE_T *process = CLIENT_GET_PROCESS_STATE(); ++ return roundtrip(process); ++} ++ ++static void ++registry_handle_global(void *data, struct wl_registry *registry, ++ uint32_t name, const char *interface, uint32_t version) ++{ ++ struct wl_display *wl_display = khrn_platform_get_wl_display(); ++ CLIENT_PROCESS_STATE_T *process = (CLIENT_PROCESS_STATE_T *)data; ++ ++ if (strcmp(interface, "wl_dispmanx") == 0) { ++ process->wl_dispmanx = wl_registry_bind(registry, name, ++ &wl_dispmanx_interface, 1); ++ ++ wl_proxy_set_queue((struct wl_proxy *) process->wl_dispmanx, ++ process->wl_queue); ++ wl_dispmanx_add_listener(process->wl_dispmanx, &dispmanx_listener, wl_display); ++ roundtrip(process); ++ } ++} ++ ++static void ++registry_handle_global_remove(void *data, struct wl_registry *registry, ++ uint32_t name) ++{ ++} ++ ++static const struct wl_registry_listener registry_listener = { ++ registry_handle_global, ++ registry_handle_global_remove ++}; ++ ++int ++init_process_wayland(CLIENT_PROCESS_STATE_T *process) ++{ ++ struct wl_display *wl_display = khrn_platform_get_wl_display(); ++ ++ process->wl_queue = wl_display_create_queue(wl_display); ++ if (!process->wl_queue) { ++ vcos_log_error("wl_display_create_queue failed\n"); ++ return false; ++ } ++ wl_display_dispatch_pending(wl_display); ++ ++ process->wl_registry = wl_display_get_registry(wl_display); ++ if (!process->wl_registry) { ++ vcos_log_error("wl_display_get_registry failed\n"); ++ return false; ++ } ++ ++ wl_proxy_set_queue((struct wl_proxy *) process->wl_registry, ++ process->wl_queue); ++ ++ wl_registry_add_listener(process->wl_registry, ®istry_listener, process); ++ ++ if (roundtrip(process) < 0 || process->wl_dispmanx == NULL) { ++ vcos_log_error("failed to get wl_dispmanx\n"); ++ return false; ++ } ++ ++ return true; ++} ++ ++#ifndef ALIGN_UP ++#define ALIGN_UP(x,y) ((x + (y)-1) & ~((y)-1)) ++#endif ++ ++static void handle_buffer_release(void *data, struct wl_buffer *buffer_wl) ++{ ++ struct wl_dispmanx_client_buffer *wl_dispmanx_client_buffer = data; ++ wl_dispmanx_client_buffer->in_use = 0; ++} ++ ++static const struct wl_buffer_listener buffer_listener = { ++ handle_buffer_release ++}; ++ ++struct wl_dispmanx_client_buffer * ++allocate_wl_buffer(struct wl_egl_window *window, KHRN_IMAGE_FORMAT_T color) ++{ ++ CLIENT_PROCESS_STATE_T *process = CLIENT_GET_PROCESS_STATE(); ++ struct wl_dispmanx_client_buffer *wl_dispmanx_client_buffer; ++ struct wl_buffer *wl_buffer; ++ uint32_t stride = ALIGN_UP(window->width * 4, 16); ++ uint32_t buffer_height = ALIGN_UP(window->height, 16); ++ enum wl_dispmanx_format color_format; ++ int ret = 0; ++ ++ switch (color) { ++ case ABGR_8888: ++ color_format = WL_DISPMANX_FORMAT_ABGR8888; ++ break; ++ case XBGR_8888: ++ color_format = WL_DISPMANX_FORMAT_XBGR8888; ++ break; ++ case RGB_565: ++ color_format = WL_DISPMANX_FORMAT_RGB565; ++ break; ++ default: ++ vcos_log_error("unknown KHRN_IMAGE_FORMAT_T 0x%x\n", color); ++ return NULL; ++ } ++ ++ wl_buffer = wl_dispmanx_create_buffer(process->wl_dispmanx, window->width, ++ window->height, stride, buffer_height, ++ color_format); ++ if (wl_buffer == NULL) ++ return NULL; ++ ++ wl_dispmanx_client_buffer = calloc(1, sizeof(struct wl_dispmanx_client_buffer)); ++ wl_dispmanx_client_buffer->wl_buffer = wl_buffer; ++ wl_dispmanx_client_buffer->in_use = 0; ++ wl_dispmanx_client_buffer->pending_allocation = 1; ++ wl_dispmanx_client_buffer->width = window->width; ++ wl_dispmanx_client_buffer->height = window->height; ++ ++ wl_proxy_set_queue((struct wl_proxy *) wl_buffer, process->wl_queue); ++ wl_buffer_add_listener(wl_buffer, &buffer_listener, wl_dispmanx_client_buffer); ++ ++ while (ret != -1 && wl_dispmanx_client_buffer->pending_allocation) ++ ret = do_wl_roundtrip(); ++ ++ return wl_dispmanx_client_buffer; ++} +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/khronos/common/linux/khrn_wayland.h +similarity index 56% +copy from interface/vmcs_host/vc_vchi_dispmanx.h +copy to interface/khronos/common/linux/khrn_wayland.h +index b723b76..b9bf08c 100644 +--- a/interface/vmcs_host/vc_vchi_dispmanx.h ++++ b/interface/khronos/common/linux/khrn_wayland.h +@@ -1,5 +1,5 @@ + /* +-Copyright (c) 2012, Broadcom Europe Ltd ++Copyright (c) 2013, Raspberry Pi Foundation + All rights reserved. + + Redistribution and use in source and binary forms, with or without +@@ -25,45 +25,9 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#ifndef VC_VCHI_DISPMANX_H +-#define VC_VCHI_DISPMANX_H ++#include "interface/khronos/common/khrn_client.h" + +-#include "interface/peer/vc_vchi_dispmanx_common.h" ++int init_process_wayland(CLIENT_PROCESS_STATE_T *process); ++int do_wl_roundtrip(); + +-#define VC_NUM_HOST_RESOURCES 64 +-#define DISPMANX_MSGFIFO_SIZE 1024 +-#define DISPMANX_CLIENT_NAME MAKE_FOURCC("DISP") +-#define DISPMANX_NOTIFY_NAME MAKE_FOURCC("UPDH") +- +-//Or with command to indicate we don't need a response +-#define DISPMANX_NO_REPLY_MASK (1<<31) +- +-typedef struct { +- char description[32]; +- uint32_t width; +- uint32_t height; +- uint32_t aspect_pixwidth; +- uint32_t aspect_pixheight; +- uint32_t fieldrate_num; +- uint32_t fieldrate_denom; +- uint32_t fields_per_frame; +- uint32_t transform; +-} GET_MODES_DATA_T; +- +-typedef struct { +- int32_t response; +- uint32_t width; +- uint32_t height; +- uint32_t transform; +- uint32_t input_format; +-} GET_INFO_DATA_T; +- +-//Attributes changes flag mask +-#define ELEMENT_CHANGE_LAYER (1<<0) +-#define ELEMENT_CHANGE_OPACITY (1<<1) +-#define ELEMENT_CHANGE_DEST_RECT (1<<2) +-#define ELEMENT_CHANGE_SRC_RECT (1<<3) +-#define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) +-#define ELEMENT_CHANGE_TRANSFORM (1<<5) +- +-#endif ++struct wl_dispmanx_client_buffer *allocate_wl_buffer(struct wl_egl_window *window, KHRN_IMAGE_FORMAT_T color); +diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c +index b8bb374..03fe67b 100644 +--- a/interface/khronos/egl/egl_client.c ++++ b/interface/khronos/egl/egl_client.c +@@ -153,6 +153,10 @@ by an attribute value" + #include + #include + ++#ifdef BUILD_WAYLAND ++#include "interface/khronos/wayland-egl/wayland-egl-priv.h" ++#include "interface/khronos/common/linux/khrn_wayland.h" ++#endif + + #include "interface/khronos/egl/egl_client_cr.c" + +@@ -162,17 +166,6 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T * + void egl_gl_flush_callback(bool wait); + void egl_vg_flush_callback(bool wait); + +-#include "interface/vmcs_host/vc_dispmanx_types.h" +-/**HACKHACK - give us the ability to inject a DispmanX +- * resource handle into the CreateWindowSurface and +- * SwapBuffers calls */ +-static DISPMANX_RESOURCE_HANDLE_T next_resource_handle; +- +-EGLAPI EGLBoolean EGLAPIENTRY eglSetNextResourceHandle(DISPMANX_RESOURCE_HANDLE_T handle) +-{ +- next_resource_handle = handle; +-} +- + /* + TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate) + Also affects global image (and possibly others?) +@@ -450,6 +443,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name) + #ifdef EGL_KHR_fence_sync + "EGL_KHR_fence_sync " + #endif ++#endif ++#if EGL_WL_bind_wayland_display ++ "EGL_WL_bind_wayland_display " + #endif + ; + break; +@@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c + false, + EGL_NO_TEXTURE, + EGL_NO_TEXTURE, +- 0, 0, +- next_resource_handle); ++ 0, 0); + + if (surface) { + if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { +@@ -901,7 +896,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig + mipmap_texture, + texture_format, + texture_target, +- 0, 0, 0); ++ 0, 0); + + if (surface) { + if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { +@@ -1043,7 +1038,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c + false, + EGL_NO_TEXTURE, + EGL_NO_TEXTURE, +- pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle, 0); ++ pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle); + + if (surface) { + if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { +@@ -2245,6 +2240,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + CLIENT_THREAD_STATE_T *thread; + CLIENT_PROCESS_STATE_T *process; + EGLBoolean result; ++#ifdef BUILD_WAYLAND ++ struct wl_display *wl_display = khrn_platform_get_wl_display(); ++#endif + + vcos_log_trace("eglSwapBuffers start. dpy=%d. surf=%d.", (int)dpy, (int)surf); + +@@ -2315,18 +2313,58 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + + vcos_log_trace("eglSwapBuffers server call"); + +- if (next_resource_handle) +- RPC_CALL7(eglIntSwapBuffers_impl, +- thread, +- EGLINTSWAPBUFFERS_ID_V2, +- RPC_UINT(surface->serverbuffer), +- RPC_UINT(surface->width), +- RPC_UINT(surface->height), +- RPC_UINT(surface->internal_handle), +- RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0), +- RPC_UINT(khrn_platform_get_window_position(surface->win)), +- RPC_INT(next_resource_handle)); +- else ++#ifdef BUILD_WAYLAND ++ if (wl_display) { ++ struct wl_egl_window *wl_egl_window = surface->wl_egl_window; ++ struct wl_dispmanx_client_buffer *buffer_temp; ++ uint32_t configid; ++ KHRN_IMAGE_FORMAT_T color; ++ int ret = 0; ++ ++ buffer_temp = surface->front_wl_buffer; ++ surface->front_wl_buffer = surface->back_wl_buffer; ++ surface->back_wl_buffer = buffer_temp; ++ ++ configid = egl_config_to_id(surface->config); ++ color = egl_config_get_color_format(configid); ++ ++ if (surface->back_wl_buffer == NULL) ++ surface->back_wl_buffer = allocate_wl_buffer(wl_egl_window, color); ++ else if (surface->back_wl_buffer->width != width || ++ surface->back_wl_buffer->height != height) { ++ ++ struct wl_dispmanx_client_buffer *buffer; ++ ++ wl_buffer_destroy(surface->back_wl_buffer->wl_buffer); ++ free(surface->back_wl_buffer); ++ ++ buffer = allocate_wl_buffer(wl_egl_window, color); ++ surface->back_wl_buffer = buffer; ++ } ++ ++ RPC_CALL7(eglIntSwapBuffers_impl, ++ thread, ++ EGLINTSWAPBUFFERS_ID_V2, ++ RPC_UINT(surface->serverbuffer), ++ RPC_UINT(surface->width), ++ RPC_UINT(surface->height), ++ RPC_UINT(surface->internal_handle), ++ RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0), ++ RPC_UINT(khrn_platform_get_window_position(surface->win)), ++ RPC_INT(surface->back_wl_buffer->resource)); ++ ++ surface->front_wl_buffer->in_use = 1; ++ wl_surface_attach(wl_egl_window->wl_surface, ++ surface->front_wl_buffer->wl_buffer, ++ 0, 0); ++ wl_surface_damage(wl_egl_window->wl_surface, 0, 0, ++ surface->width, surface->height); ++ wl_surface_commit(wl_egl_window->wl_surface); ++ ++ while(ret != -1 && surface->back_wl_buffer->in_use) ++ ret = wl_display_dispatch_queue(wl_display, process->wl_queue); ++ } else ++#endif + RPC_CALL6(eglIntSwapBuffers_impl, + thread, + EGLINTSWAPBUFFERS_ID, +diff --git a/interface/khronos/egl/egl_client_get_proc.c b/interface/khronos/egl/egl_client_get_proc.c +index 4cfa9ff..6a715af 100644 +--- a/interface/khronos/egl/egl_client_get_proc.c ++++ b/interface/khronos/egl/egl_client_get_proc.c +@@ -254,6 +254,17 @@ EGLAPI void EGLAPIENTRY (* eglGetProcAddress(const char *procname))(void) + return (void(*)(void))eglQueryGlobalImageBRCM; + #endif + ++#ifdef BUILD_WAYLAND ++#if EGL_WL_bind_wayland_display ++ if (!strcmp(procname, "eglBindWaylandDisplayWL")) ++ return (void(*)(void))eglBindWaylandDisplayWL; ++ if (!strcmp(procname, "eglUnbindWaylandDisplayWL")) ++ return (void(*)(void))eglUnbindWaylandDisplayWL; ++ if (!strcmp(procname, "eglQueryWaylandBufferWL")) ++ return (void(*)(void))eglQueryWaylandBufferWL; ++#endif ++#endif ++ + return (void(*)(void)) NULL; + } + +diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c +index 128325e..42350bf 100644 +--- a/interface/khronos/egl/egl_client_surface.c ++++ b/interface/khronos/egl/egl_client_surface.c +@@ -46,6 +46,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "interface/khronos/egl/egl_int_impl.h" + #endif + ++#ifdef BUILD_WAYLAND ++#include "interface/khronos/wayland-egl/wayland-egl-priv.h" ++#include "interface/khronos/common/linux/khrn_wayland.h" ++#endif ++ + #include + + +@@ -314,8 +319,7 @@ EGL_SURFACE_T *egl_surface_create( + EGLenum texture_format, + EGLenum texture_target, + EGLNativePixmapType pixmap, +- const uint32_t *pixmap_server_handle, +- DISPMANX_RESOURCE_HANDLE_T next_resource_handle) ++ const uint32_t *pixmap_server_handle) + { + KHRN_IMAGE_FORMAT_T color; + KHRN_IMAGE_FORMAT_T depth; +@@ -326,6 +330,10 @@ EGL_SURFACE_T *egl_surface_create( + EGLint config_depth_bits; + EGLint config_stencil_bits; + CLIENT_THREAD_STATE_T *thread = CLIENT_GET_THREAD_STATE(); ++#ifdef BUILD_WAYLAND ++ struct wl_display *wl_display = khrn_platform_get_wl_display(); ++ DISPMANX_RESOURCE_HANDLE_T resource; ++#endif + + EGL_SURFACE_T *surface = egl_surface_pool_alloc(); + +@@ -390,6 +398,18 @@ EGL_SURFACE_T *egl_surface_create( + + vcos_assert(color != IMAGE_FORMAT_INVALID); + ++#ifdef BUILD_WAYLAND ++ if (type == WINDOW && wl_display) { ++ surface->wl_egl_window = (struct wl_egl_window*)win; ++ surface->back_wl_buffer = allocate_wl_buffer( ++ surface->wl_egl_window, color); ++ resource = surface->back_wl_buffer->resource; ++ } else { ++ surface->wl_egl_window = NULL; ++ resource = DISPMANX_NO_HANDLE; ++ } ++#endif ++ + #ifdef KHRONOS_EGL_PLATFORM_OPENWFC + // Create stream for this window + if(type != PBUFFER) +@@ -474,7 +494,8 @@ EGL_SURFACE_T *egl_surface_create( + #endif + uint32_t results[3]; + +- if (next_resource_handle) ++#ifdef BUILD_WAYLAND ++ if (resource != DISPMANX_NO_HANDLE) + RPC_CALL16_OUT_CTRL(eglIntCreateSurface_impl, + thread, + EGLINTCREATESURFACE_ID_V2, +@@ -492,9 +513,10 @@ EGL_SURFACE_T *egl_surface_create( + RPC_UINT(config_stencil_bits), + RPC_UINT(sem_name), + RPC_UINT(type), +- RPC_INT(next_resource_handle), ++ RPC_INT(resource), + results); + else ++#endif + RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl, + thread, + EGLINTCREATESURFACE_ID, +@@ -663,6 +685,18 @@ void egl_surface_free(EGL_SURFACE_T *surface) + if( surface->type == WINDOW ) { + vcos_log_trace("egl_surface_free: calling platform_destroy_winhandle..."); + platform_destroy_winhandle( surface->win, surface->internal_handle ); ++ ++#ifdef BUILD_WAYLAND ++ if (surface->back_wl_buffer) { ++ wl_buffer_destroy(surface->back_wl_buffer->wl_buffer); ++ free(surface->back_wl_buffer); ++ } ++ ++ if (surface->front_wl_buffer) { ++ wl_buffer_destroy(surface->front_wl_buffer->wl_buffer); ++ free(surface->front_wl_buffer); ++ } ++#endif + } + /* return value ignored -- read performed to ensure blocking. we want this to + * block so clients can safely destroy the surface's window as soon as the +diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h +index b5bf70a..e328b77 100644 +--- a/interface/khronos/egl/egl_client_surface.h ++++ b/interface/khronos/egl/egl_client_surface.h +@@ -288,6 +288,41 @@ typedef struct { + type == PIXMAP + */ + bool server_owned; ++ ++#ifdef BUILD_WAYLAND ++ /* ++ wl_egl_window ++ ++ Validity: ++ type == WINDOW ++ ++ Invariant: ++ wayland EGL window ++ */ ++ struct wl_egl_window *wl_egl_window; ++ ++ /* ++ front_wl_buffer ++ ++ Validity: ++ type == WINDOW ++ ++ Invariant: ++ client-side information about the wl_buffer in the front ++ */ ++ struct wl_dispmanx_client_buffer *front_wl_buffer; ++ ++ /* ++ back_wl_buffer ++ ++ Validity: ++ type == WINDOW ++ ++ Invariant: ++ client-side information about the wl_buffer in the back ++ */ ++ struct wl_dispmanx_client_buffer *back_wl_buffer; ++#endif + } EGL_SURFACE_T; + + extern bool egl_surface_check_attribs( +@@ -322,8 +357,7 @@ extern EGL_SURFACE_T *egl_surface_create( + EGLenum texture_format, + EGLenum texture_target, + EGLNativePixmapType pixmap, +- const uint32_t *pixmap_server_handle, +- DISPMANX_RESOURCE_HANDLE_T next_resource_handle); ++ const uint32_t *pixmap_server_handle); + extern EGL_SURFACE_T *egl_surface_from_vg_image( + VGImage vg_handle, + EGLSurface name, +diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h +index 51b3580..6863a3b 100644 +--- a/interface/khronos/egl/egl_int_impl.h ++++ b/interface/khronos/egl/egl_int_impl.h +@@ -57,7 +57,7 @@ FN(int, eglIntCreateSurface_impl, ( + uint32_t sem, + uint32_t type, + uint32_t *results, +- DISPMANX_RESOURCE_HANDLE_T next_resource_handle)) ++ DISPMANX_RESOURCE_HANDLE_T resource_handle)) + + FN(int, eglIntCreatePbufferFromVGImage_impl, ( + VGImage vg_handle, +diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c +new file mode 100644 +index 0000000..5730743 +--- /dev/null ++++ b/interface/khronos/ext/egl_wayland.c +@@ -0,0 +1,246 @@ ++/* ++Copyright (c) 2013, Raspberry Pi Foundation ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * 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. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++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 HOLDER 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. ++*/ ++ ++#include "interface/khronos/common/khrn_client_mangle.h" ++#include "interface/khronos/common/khrn_client_rpc.h" ++ ++#include "interface/khronos/ext/egl_khr_sync_client.h" ++#include "interface/khronos/include/EGL/egl.h" ++#include "interface/khronos/include/EGL/eglext.h" ++ ++#include "interface/vmcs_host/vc_vchi_dispmanx.h" ++ ++#include ++#include "interface/khronos/wayland-dispmanx-server-protocol.h" ++ ++static void ++destroy_buffer(struct wl_resource *resource) ++{ ++ struct wl_dispmanx_server_buffer *buffer = wl_resource_get_user_data(resource); ++ ++ if(!buffer->in_use) ++ vc_dispmanx_resource_delete(buffer->handle); ++ ++ free(buffer); ++} ++ ++static void ++buffer_destroy(struct wl_client *client, struct wl_resource *resource) ++{ ++ wl_resource_destroy(resource); ++} ++ ++static const struct wl_buffer_interface dispmanx_buffer_interface = { ++ buffer_destroy ++}; ++ ++static VC_IMAGE_TYPE_T ++get_vc_format(enum wl_dispmanx_format format) ++{ ++ /* XXX: The app is likely to have been premultiplying in its shaders, ++ * but the VC scanout hardware on the RPi cannot mix premultiplied alpha ++ * channel with the element's alpha. ++ */ ++ switch (format) { ++ case WL_DISPMANX_FORMAT_ABGR8888: ++ return VC_IMAGE_RGBA32; ++ case WL_DISPMANX_FORMAT_XBGR8888: ++ return VC_IMAGE_BGRX8888; ++ case WL_DISPMANX_FORMAT_RGB565: ++ return VC_IMAGE_RGB565; ++ default: ++ /* invalid format */ ++ return VC_IMAGE_MIN; ++ } ++} ++ ++static void ++dispmanx_create_buffer(struct wl_client *client, struct wl_resource *resource, ++ uint32_t id, int32_t width, int32_t height, ++ uint32_t stride, uint32_t buffer_height, uint32_t format) ++{ ++ struct wl_dispmanx_server_buffer *buffer; ++ VC_IMAGE_TYPE_T vc_format = get_vc_format(format); ++ uint32_t dummy; ++ ++ if(vc_format == VC_IMAGE_MIN) { ++ wl_resource_post_error(resource, ++ WL_DISPMANX_ERROR_INVALID_FORMAT, ++ "invalid format"); ++ return; ++ } ++ ++ buffer = calloc(1, sizeof *buffer); ++ if (buffer == NULL) { ++ wl_resource_post_no_memory(resource); ++ return; ++ } ++ ++ buffer->handle = vc_dispmanx_resource_create(vc_format, ++ width | (stride << 16), ++ height | (buffer_height << 16), ++ &dummy); ++ if(buffer->handle == DISPMANX_NO_HANDLE) { ++ wl_resource_post_error(resource, ++ WL_DISPMANX_ERROR_ALLOC_FAILED, ++ "allocation failed"); ++ free(buffer); ++ return; ++ } ++ ++ buffer->width = width; ++ buffer->height = height; ++ buffer->format = format; ++ ++ buffer->resource = wl_resource_create(resource->client, &wl_buffer_interface, ++ 1, id); ++ if (!buffer->resource) { ++ wl_resource_post_no_memory(resource); ++ vc_dispmanx_resource_delete(buffer->handle); ++ free(buffer); ++ return; ++ } ++ ++ wl_resource_set_implementation(buffer->resource, ++ (void (**)(void)) &dispmanx_buffer_interface, ++ buffer, destroy_buffer); ++ ++ wl_dispmanx_send_buffer_allocated(resource, buffer->resource, ++ buffer->handle); ++} ++ ++static const struct wl_dispmanx_interface dispmanx_interface = { ++ dispmanx_create_buffer, ++}; ++ ++static void ++bind_dispmanx(struct wl_client *client, void *data, uint32_t version, uint32_t id) ++{ ++ struct wl_resource *resource; ++ ++ resource = wl_resource_create(client, &wl_dispmanx_interface, 1, id); ++ wl_resource_set_implementation(resource, &dispmanx_interface, NULL, NULL); ++ ++ wl_resource_post_event(resource, WL_DISPMANX_FORMAT, ++ WL_DISPMANX_FORMAT_ARGB8888); ++ ++ wl_resource_post_event(resource, WL_DISPMANX_FORMAT, ++ WL_DISPMANX_FORMAT_XRGB8888); ++ ++ wl_resource_post_event(resource, WL_DISPMANX_FORMAT, ++ WL_DISPMANX_FORMAT_ABGR8888); ++ ++ wl_resource_post_event(resource, WL_DISPMANX_FORMAT, ++ WL_DISPMANX_FORMAT_XBGR8888); ++ ++ wl_resource_post_event(resource, WL_DISPMANX_FORMAT, ++ WL_DISPMANX_FORMAT_RGB565); ++} ++ ++EGLBoolean EGLAPIENTRY ++eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) ++{ ++ CLIENT_THREAD_STATE_T *thread; ++ CLIENT_PROCESS_STATE_T *process; ++ ++ if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process)) ++ return EGL_FALSE; ++ ++ if (process->wl_global != NULL) ++ goto error; ++ ++ process->wl_global = wl_global_create(display, &wl_dispmanx_interface, 1, ++ NULL, bind_dispmanx); ++ if (process->wl_global == NULL) ++ goto error; ++ ++ return EGL_TRUE; ++ ++error: ++ CLIENT_UNLOCK(); ++ return EGL_FALSE; ++} ++ ++EGLBoolean EGLAPIENTRY ++eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) ++{ ++ CLIENT_THREAD_STATE_T *thread; ++ CLIENT_PROCESS_STATE_T *process; ++ ++ if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process)) ++ return EGL_FALSE; ++ ++ wl_global_destroy(process->wl_global); ++ process->wl_global = NULL; ++ ++ CLIENT_UNLOCK(); ++ ++ return EGL_TRUE; ++} ++ ++static int ++get_egl_format(enum wl_dispmanx_format format) ++{ ++ switch (format) { ++ case WL_DISPMANX_FORMAT_ABGR8888: ++ return EGL_TEXTURE_RGBA; ++ case WL_DISPMANX_FORMAT_XBGR8888: ++ return EGL_TEXTURE_RGB; ++ case WL_DISPMANX_FORMAT_RGB565: ++ return EGL_TEXTURE_RGB; ++ default: ++ /* invalid format */ ++ return EGL_NO_TEXTURE; ++ } ++} ++ ++EGLBoolean EGLAPIENTRY ++eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *_buffer, ++ EGLint attribute, EGLint *value) ++{ ++ struct wl_dispmanx_server_buffer *buffer = wl_resource_get_user_data(_buffer); ++ ++ if (wl_resource_instance_of(_buffer, &wl_dispmanx_interface, ++ &dispmanx_buffer_interface)) ++ return EGL_FALSE; ++ ++ switch (attribute) { ++ case EGL_TEXTURE_FORMAT: ++ *value = get_egl_format(buffer->format); ++ if (*value == EGL_NO_TEXTURE) ++ return EGL_FALSE; ++ return EGL_TRUE; ++ case EGL_WIDTH: ++ *value = buffer->width; ++ return EGL_TRUE; ++ case EGL_HEIGHT: ++ *value = buffer->height; ++ return EGL_TRUE; ++ } ++ ++ return EGL_FALSE; ++} +diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h +index 89a3369..d7e5ba7 100755 +--- a/interface/khronos/include/EGL/eglext.h ++++ b/interface/khronos/include/EGL/eglext.h +@@ -191,6 +191,29 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG + #endif + + ++#ifndef EGL_WL_bind_wayland_display ++#define EGL_WL_bind_wayland_display 1 ++ ++#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ ++#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */ ++#define EGL_TEXTURE_Y_U_V_WL 0x31D7 ++#define EGL_TEXTURE_Y_UV_WL 0x31D8 ++#define EGL_TEXTURE_Y_XUXV_WL 0x31D9 ++ ++struct wl_display; ++struct wl_resource; ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); ++EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); ++#endif ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); ++ ++#endif ++ ++ + #ifdef __cplusplus + } + #endif +diff --git a/interface/khronos/wayland-egl/wayland-egl-priv.h b/interface/khronos/wayland-egl/wayland-egl-priv.h +new file mode 100644 +index 0000000..8e38d36 +--- /dev/null ++++ b/interface/khronos/wayland-egl/wayland-egl-priv.h +@@ -0,0 +1,53 @@ ++/* Copied from Mesa */ ++ ++#ifndef _WAYLAND_EGL_PRIV_H ++#define _WAYLAND_EGL_PRIV_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* GCC visibility */ ++#if defined(__GNUC__) && __GNUC__ >= 4 ++#define WL_EGL_EXPORT __attribute__ ((visibility("default"))) ++#else ++#define WL_EGL_EXPORT ++#endif ++ ++#include "interface/vmcs_host/vc_dispmanx.h" ++#include "interface/khronos/egl/egl_client_surface.h" ++ ++#include ++ ++struct wl_dispmanx_client_buffer { ++ struct wl_buffer *wl_buffer; ++ DISPMANX_RESOURCE_HANDLE_T resource; ++ ++ int pending_allocation; ++ int in_use; ++ int width; ++ int height; ++}; ++ ++struct wl_egl_window { ++ struct wl_surface *wl_surface; ++ ++ int width; ++ int height; ++ int dx; ++ int dy; ++ ++ int attached_width; ++ int attached_height; ++ ++ /* XXX: The VC side seems to expect a valid element handle to be ++ passed to eglIntCreateSurface_impl and/or eglIntSwapBuffers_impl, ++ even for host-managed surfaces. */ ++ DISPMANX_ELEMENT_HANDLE_T dummy_element; ++}; ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/interface/khronos/wayland-egl/wayland-egl.c b/interface/khronos/wayland-egl/wayland-egl.c +new file mode 100644 +index 0000000..b8f050b +--- /dev/null ++++ b/interface/khronos/wayland-egl/wayland-egl.c +@@ -0,0 +1,59 @@ ++/* Copied from Mesa */ ++ ++#include ++ ++#include ++#include ++#include "wayland-egl-priv.h" ++ ++WL_EGL_EXPORT void ++wl_egl_window_resize(struct wl_egl_window *egl_window, ++ int width, int height, ++ int dx, int dy) ++{ ++ if (egl_window->width == width && ++ egl_window->height == height && ++ egl_window->dx == dx && ++ egl_window->dy == dy) ++ return; ++ ++ egl_window->width = width; ++ egl_window->height = height; ++ egl_window->dx = dx; ++ egl_window->dy = dy; ++} ++ ++WL_EGL_EXPORT struct wl_egl_window * ++wl_egl_window_create(struct wl_surface *surface, ++ int width, int height) ++{ ++ struct wl_egl_window *egl_window; ++ ++ egl_window = calloc(1, sizeof *egl_window); ++ if (!egl_window) ++ return NULL; ++ ++ egl_window->wl_surface = surface; ++ wl_egl_window_resize(egl_window, width, height, 0, 0); ++ egl_window->attached_width = 0; ++ egl_window->attached_height = 0; ++ egl_window->dummy_element = PLATFORM_WIN_NONE; ++ ++ return egl_window; ++} ++ ++WL_EGL_EXPORT void ++wl_egl_window_destroy(struct wl_egl_window *egl_window) ++{ ++ free(egl_window); ++} ++ ++WL_EGL_EXPORT void ++wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, ++ int *width, int *height) ++{ ++ if (width) ++ *width = egl_window->attached_width; ++ if (height) ++ *height = egl_window->attached_height; ++} +diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in +new file mode 100644 +index 0000000..8bafc15 +--- /dev/null ++++ b/interface/khronos/wayland-egl/wayland-egl.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: wayland-egl ++Description: VideoCore wayland-egl library ++Version: @PROJECT_APIVER@ ++Libs: -L${libdir} -lwayland-egl ++Cflags: -I${includedir} +diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt +index cbef80c..552312a 100755 +--- a/interface/vmcs_host/CMakeLists.txt ++++ b/interface/vmcs_host/CMakeLists.txt +@@ -7,13 +7,24 @@ + # vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response + add_definitions(-fno-strict-aliasing) + +-add_library(vchostif ++set(VCHOSTIF_SOURCE + ${VMCS_TARGET}/vcmisc.c + vc_vchi_gencmd.c vc_vchi_gpuserv.c + vc_vchi_tvservice.c vc_vchi_cecservice.c + vc_vchi_dispmanx.c vc_service_common.c) + # ${VMCS_TARGET}/vmcs_main.c + # vc_vchi_haud.c ++ ++if (BUILD_WAYLAND) ++wayland_add_protocol_server( ++ VCHOSTIF_SOURCE ++ ../../interface/wayland/dispmanx.xml ++ dispmanx ++) ++endif () ++ ++add_library(vchostif ${VCHOSTIF_SOURCE}) ++ + #add_library(bufman vc_vchi_bufman.c ) + set(INSTALL_TARGETS vchostif) + +diff --git a/interface/vmcs_host/vc_dispmanx.h b/interface/vmcs_host/vc_dispmanx.h +index 37fdae1..fe3619a 100755 +--- a/interface/vmcs_host/vc_dispmanx.h ++++ b/interface/vmcs_host/vc_dispmanx.h +@@ -39,6 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef __cplusplus + extern "C" { + #endif ++ ++#ifdef BUILD_WAYLAND ++struct wl_resource; ++#endif ++ + // Same function as above, to aid migration of code. + VCHPRE_ int VCHPOST_ vc_dispman_init( void ); + // Stop the service from being used +@@ -135,6 +140,11 @@ VCHPRE_ int VCHPOST_ vc_dispmanx_resource_set_palette( DISPMANX_RESOURCE_HANDLE_ + // Start triggering callbacks synced to vsync + VCHPRE_ int VCHPOST_ vc_dispmanx_vsync_callback( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_CALLBACK_FUNC_T cb_func, void *cb_arg ); + ++#ifdef BUILD_WAYLAND ++VCHPRE_ DISPMANX_RESOURCE_HANDLE_T VCHPOST_ vc_dispmanx_get_handle_from_wl_buffer( struct wl_resource *_buffer ); ++ ++VCHPRE_ void VCHPOST_ vc_dispmanx_set_wl_buffer_in_use( struct wl_resource *_buffer, int in_use ); ++#endif + #ifdef __cplusplus + } + #endif +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c +index 7a6cdcd..eab146e 100755 +--- a/interface/vmcs_host/vc_vchi_dispmanx.c ++++ b/interface/vmcs_host/vc_vchi_dispmanx.c +@@ -1319,3 +1319,45 @@ static void *dispmanx_notify_func( void *arg ) { + } + return 0; + } ++ ++ ++#ifdef BUILD_WAYLAND ++/*********************************************************** ++ * Name: vc_dispmanx_get_handle_from_wl_buffer ++ * ++ * Arguments: ++ * struct wl_resource *_buffer ++ * ++ * Description: Return the handle of the resource associated to this Wayland buffer ++ * ++ * Returns: A resource handle ++ * ++ ***********************************************************/ ++VCHPRE_ DISPMANX_RESOURCE_HANDLE_T VCHPOST_ vc_dispmanx_get_handle_from_wl_buffer( struct wl_resource *_buffer ) ++{ ++ struct wl_dispmanx_server_buffer *buffer = (struct wl_dispmanx_server_buffer*)_buffer->data; ++ if (!buffer) ++ return DISPMANX_NO_HANDLE; ++ ++ return buffer->handle; ++} ++ ++/*********************************************************** ++ * Name: vc_dispmanx_set_wl_buffer_in_use ++ * ++ * Arguments: ++ * struct wl_resource *_buffer ++ * int in_use ++ * ++ * Description: Mark this Wayland buffer as being in use by the compositor ++ * ++ ***********************************************************/ ++VCHPRE_ void VCHPOST_ vc_dispmanx_set_wl_buffer_in_use( struct wl_resource *_buffer, int in_use ) ++{ ++ struct wl_dispmanx_server_buffer *buffer = (struct wl_dispmanx_server_buffer*)_buffer->data; ++ if (!buffer) ++ return; ++ ++ buffer->in_use = in_use; ++} ++#endif +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h +index b723b76..f0bae30 100644 +--- a/interface/vmcs_host/vc_vchi_dispmanx.h ++++ b/interface/vmcs_host/vc_vchi_dispmanx.h +@@ -66,4 +66,19 @@ typedef struct { + #define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) + #define ELEMENT_CHANGE_TRANSFORM (1<<5) + ++#ifdef BUILD_WAYLAND ++/* XXX: This should be in a private header that can be included from EGL and vc_* */ ++#include ++#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h" ++struct wl_dispmanx_server_buffer { ++ struct wl_resource *resource; ++ struct wl_dispmanx *dispmanx; ++ enum wl_dispmanx_format format; ++ DISPMANX_RESOURCE_HANDLE_T handle; ++ int32_t width; ++ int32_t height; ++ int in_use; ++}; ++#endif ++ + #endif +diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml +new file mode 100644 +index 0000000..c18626d +--- /dev/null ++++ b/interface/wayland/dispmanx.xml +@@ -0,0 +1,123 @@ ++ ++ ++ ++ ++ Copyright © 2008-2011 Kristian Høgsberg ++ Copyright © 2010-2011 Intel Corporation ++ Copyright © 2013 Raspberry Pi Foundation ++ ++ Permission to use, copy, modify, distribute, and sell this ++ software and its documentation for any purpose is hereby granted ++ without fee, provided that\n the above copyright notice appear in ++ all copies and that both that copyright notice and this permission ++ notice appear in supporting documentation, and that the name of ++ the copyright holders not be used in advertising or publicity ++ pertaining to distribution of the software without specific, ++ written prior permission. The copyright holders make no ++ representations about the suitability of this software for any ++ purpose. It is provided "as is" without express or implied ++ warranty. ++ ++ THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS ++ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND ++ FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ++ AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ++ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ++ THIS SOFTWARE. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/makefiles/cmake/Wayland.cmake b/makefiles/cmake/Wayland.cmake +new file mode 100644 +index 0000000..ad90d30 +--- /dev/null ++++ b/makefiles/cmake/Wayland.cmake +@@ -0,0 +1,72 @@ ++#============================================================================= ++# Copyright (C) 2012-2013 Pier Luigi Fiorini ++# All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions ++# are met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# * 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. ++# ++# * Neither the name of Pier Luigi Fiorini nor the names of his ++# contributors may be used to endorse or promote products derived ++# from this software without specific prior written permission. ++# ++# 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 ++# HOLDER 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. ++#============================================================================= ++ ++find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) ++ ++# wayland_add_protocol_client(outfiles inputfile basename) ++function(WAYLAND_ADD_PROTOCOL_CLIENT _sources _protocol _basename) ++ if(NOT WAYLAND_SCANNER_EXECUTABLE) ++ message(FATAL "The wayland-scanner executable has nto been found on your system. You must install it.") ++ endif() ++ ++ get_filename_component(_infile ${_protocol} ABSOLUTE) ++ set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.h") ++ set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-protocol.c") ++ ++ add_custom_command(OUTPUT "${_client_header}" ++ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header < ${_infile} > ${_client_header} ++ DEPENDS ${_infile} VERBATIM) ++ ++ add_custom_command(OUTPUT "${_code}" ++ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code} ++ DEPENDS ${_infile} VERBATIM) ++ ++ list(APPEND ${_sources} "${_client_header}" "${_code}") ++ set(${_sources} ${${_sources}} PARENT_SCOPE) ++endfunction() ++ ++# wayland_add_protocol_server(outfiles inputfile basename) ++function(WAYLAND_ADD_PROTOCOL_SERVER _sources _protocol _basename) ++ if(NOT WAYLAND_SCANNER_EXECUTABLE) ++ message(FATAL "The wayland-scanner executable has nto been found on your system. You must install it.") ++ endif() ++ ++ get_filename_component(_infile ${_protocol} ABSOLUTE) ++ set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.h") ++ ++ add_custom_command(OUTPUT "${_server_header}" ++ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header < ${_infile} > ${_server_header} ++ DEPENDS ${_infile} VERBATIM) ++ ++ list(APPEND ${_sources} "${_server_header}") ++ set(${_sources} ${${_sources}} PARENT_SCOPE) ++endfunction() diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch new file mode 100644 index 0000000000000000000000000000000000000000..e10f9ab88dc661d569fb78a5512fc00bbc4455d4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch @@ -0,0 +1,863 @@ +From 03053b119a625a03e28a86be0f0ab2aa9e2a6a49 Mon Sep 17 00:00:00 2001 +From: Tomeu Vizoso +Date: Tue, 1 Oct 2013 13:19:20 +0200 +Subject: [PATCH] wayland: Add Wayland example + +--- + .../linux/apps/hello_pi/CMakeLists.txt | 1 + + .../linux/apps/hello_pi/Makefile | 2 + + .../hello_pi/hello_wayland/CMakeLists.txt | 8 + + .../hello_pi/hello_wayland/Djenne_128_128.raw | 3 + + .../apps/hello_pi/hello_wayland/Makefile | 5 + + .../hello_wayland/cube_texture_and_coords.h | 100 +++ + .../apps/hello_pi/hello_wayland/triangle.c | 666 ++++++++++++++++++ + 7 files changed, 785 insertions(+) + create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt + create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/Djenne_128_128.raw + create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/Makefile + create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/cube_texture_and_coords.h + create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/triangle.c + +diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt +index b28a94a..2849fad 100644 +--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt ++++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt +@@ -25,6 +25,7 @@ add_subdirectory(hello_encode) + add_subdirectory(hello_jpeg) + add_subdirectory(hello_videocube) + add_subdirectory(hello_teapot) ++add_subdirectory(hello_wayland) + + if(BUILD_FONT) + set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c) +diff --git a/host_applications/linux/apps/hello_pi/Makefile b/host_applications/linux/apps/hello_pi/Makefile +index 4c2b2ef..d2b2555 100644 +--- a/host_applications/linux/apps/hello_pi/Makefile ++++ b/host_applications/linux/apps/hello_pi/Makefile +@@ -24,6 +24,7 @@ apps: libs/ilclient/libilclient.a libs/vgfont/libvgfont.a libs/revision/librevis + $(MAKE) -C hello_teapot + $(MAKE) -C hello_fft + $(MAKE) -C hello_mmal_encode ++ $(MAKE) -C hello_wayland + + clean: + $(MAKE) -C libs/ilclient clean +@@ -43,4 +44,5 @@ clean: + $(MAKE) -C hello_teapot clean + $(MAKE) -C hello_fft clean + $(MAKE) -C hello_mmal_encode clean ++ $(MAKE) -C hello_wayland clean + +diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt +new file mode 100644 +index 0000000..9a2f75c +--- /dev/null ++++ b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt +@@ -0,0 +1,8 @@ ++set(EXEC hello_wayland.bin) ++set(SRCS triangle.c) ++ ++add_executable(${EXEC} ${SRCS}) ++target_link_libraries(${EXEC} ${HELLO_PI_LIBS} -lwayland-client -lwayland-egl) ++ ++install(TARGETS ${EXEC} ++ RUNTIME DESTINATION bin) +diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/Djenne_128_128.raw b/host_applications/linux/apps/hello_pi/hello_wayland/Djenne_128_128.raw +new file mode 100644 +index 0000000..de9173c +--- /dev/null ++++ b/host_applications/linux/apps/hello_pi/hello_wayland/Djenne_128_128.raw +@@ -0,0 +1,3 @@ ++ֿֿվֿվվվվվվվվվվԽԽվվվվӼԽԽӼһһһһккккккккиѹииζϷϷѹ͵ϷϷ͵ζ͵͵͵͵͵̴̴̴˳˳˳˱˱˱˱˱˱˱ʰʰʰɯɯȮǭǭǭƬƬƬūūūƬƬéĪĪéééé¨ֿֿֿֿֿֿֿվվվվվӽӽӽӽҼҼҼҼӺӻӻӻѹҺҺҺиѹѹииииϷиϷϷϷϷζζζδδδδδδͳͳͳ̲̲̲˱ʰʰʰɯɯɯȮɯȮȮǭǭȮȮǭƬƬūūֿֿֿֿֿֿվվվվվӽӽӽӽҼҼҼҼӺӻӻҺҺҺҺҺѹѹѹѹѹѹиииииϷϷϷζζδδδδδδͳͳͳ̲̲̲˱˱ʰʰʰɯɯɯʰɯȮǭǭǭǭƬǭƬƬƬֿֿվվվվվӽӽӽӽҼҼҼҼӺӻӻҺӻӻҺҺѹиѹҺѹѹииѹиииϷϷϷζϵϵϵϵδδͳͳͳ̲̲̲˱˱˱ʰʰʰɯɯɯɯɯɯȮɯɯȮǭǭƬƬ׿ս׿ֿֿֿվվԾԼԼս־ѹԼսսӻӻӻӻҺҺҺҺѹѹѹѹѹѹѹѹѹѹѹѹииϷϷжϵϵϵδδͳͳ̲̲̲̲̲̲˱˱˱˱˱ʰʰɯɯɯʰɯɯɯǭǭǭƬ׿ֿտ־־׿׿ԼսսԼսսսսԼԼԼԼӻӻӻӻӻӻӻӻѹѹѹѹѹииижжжϵжжϵϵδδδδͳ̲̲̲̲̲˱˱˱ʰʰʰʰʰɯɯɯɯɯȮ׿׿׿׿׿־սսսսսսԼԼԼԼԼԼԼԼӻӻӻӻӻӻӻӻҺҺѹѹҸѷѷѷжжϵϵжϵϵϵδδͳͳͳͳͳ̲̲̲˱˱˱˱˱ʰʰʰɯȮ׿־־׿־־־־սսսսսսսսԼԼԼԼԼԼԼԼӻӻҺҺӹҸҸҸѷѷѷжжжϵδϵϵδδδδδͳͳͳͳ̲̲̲̲˱˱̲˱ʰٿٿٿٿٿٿٿؾֿֿֿֿ־սսսսսսսԼսԼӻӻӻӻҺѹҺѹиѹииииϷϷϷииииϷϷϷζζζ͵͵ͳͳͳ̲̲̲˱˱׿׿־־־־ս־սԼ־սսԼԼԼӻҺӻӻҺҺҺѹѹѹϷϷϷϷϷϷζζϷζζζϵϵϵδδδͳͳؿؿؿؿ׿׿־־־־սսսսԼӻӻӻӻӻҺҺѹѹииииииϷϷииϷϷϵϵϵδδδͳͳ׿׿׿׿׿׿־սսսԼԼԼӻӻӻҺҺҺҺҺҺѹѹѹѹииѷжжжϵϵϵδؿؿؿؿ׾׾׾ֽ־սսսԼԼԼԼӺӺӺӺӺӺҹҹииϷϷϷϷϷζ׿־־־սսսԼռռռռԻԻԻӺҺѹѹѹииϷϷ׿׿׿׿־־׾׾׾ֽֽֽռռӻӻҺҺѹѹѹиؿؿؿ׾ֽֽֽռռԻԻԻӺӺӺӺҹؿؿؿ׾ֽ׾ֽռռռռԻԻԻӺӺؿؿ׾׾ֽֽֽռռռԻԻԻԻؿ׾׾׾׾ֽֽֽռռռԻnhc׾׾ؿ׾׾ֽֽֽֽռռ]egؿؿ׾׾ֽֽռռռռӬUdlYheؿ׾׾׾׾ֽֽռЁ@Vg:PMؿؿؿ׾ؿ׾ֽlyzB[n>VWIJؿؿ׾׾׾׾A;=?LWI]`AU[ֿGV`=QV@TY.23D2+ð_pzGV]@T\MRShwv͐\m|M[d:T\LSVڦViuˢ /5G\nJS_M_BSg=L`KXhFO]OU]ΰsKRhL]h#>:JM[Ӡv}yx|s^^gv@Q]>N^N\BPEJ]ঠySuqm|]pt:dfNU`^mvZcdûտ?TX˽Zp~Xdrn{usxne|7N]>R^=Q_8MR@U\@V]@S[9MU/6;MVU`@Vc:P\AT[@SZ@RZEX`?OYGXaBS\DT^9WRHX[ԓoh|DTdfvDU^9ITIa[HQbF>H¼fpz9JXT\@S[}U\iZ]h鲶І}ouxu|aue|8KV@S_F[bFV_>OXIZcFW`GU^GV_ET]ES\7Y^G[c@FJǕ~{Ldt=P]_q|?RY;NWCZYWar_^lͧUbl4DTGQ[IHM`ruBZbAT\]addpxKXeZcglzO[kѧXjvAS\ߟ^o 1C!SZ1FN-:)5=JW!.;1?LJUaFR^NXd:XbBUaBDMЕƝ̌Lcr9P[OdoI\cKZCU^ۏTjx>R__eg~D`lA^eglf獗kzxTj|yBWfG^i?R]@U\9NV0?L7GS0>J#1=6DP#/%1"-9"6F2PWDWX;F\)8;GRg詭Ug{T]],9G!,:7=H #,/.3a|Jbh?UZ>MTEDSjHV^;IU:P`mtsrUnt4OYGVXgz~>[e9TZ7EIx8I8I}vzczqQitLPCRP8KY:NR>RR=PW?M\BIVeIRULU_/J]WaexI_c@[h8LXqxwqLdtIZ`2LTHQ`Nj{.?Pet^|rnxo`{8P\=Ua'%,;1;J6FN2DN3FR2ES1DP8IS7HR1?L?P];P_5KX@P\>P^J`rqftBX`9MW=P]7K[Zr|Kbk4MT7PZ.KVwnkhfua}B]jXsd{@Tc?P`=P_8CQ*7+ܣyvssi}^sas;N\I[f@QZ;NU6JP;M\@RV>HQ,3@-7@CEJݥաϒ͆l4DK)9BEOY2;D4=G"0)2?1=I6EN:IQ5EQ7GT8IV9IU5CL(.?L5ER6GTQa:M\H[h6JU6KR2IQ2JV`wd}d|za|qhE6CK8BL6BN4AP5AO5BP:GUDP\8BK1BO5ER8ES8ES2?M8BP)7.8F0EP6HR;KYCS`%6C$5B2BM5EQ7JR=MV&6C+;F/<]lyM^k9IV-8CMnThy0?9LYEWb$4=)0&8?*9B2=C*.sJW^CKP|Khj\mw`t[n{@R\OY^_^[3BS3@P5?M.7D/8F7AJ6BL(9?-6D)5A3@N1=N2>O#0>'/7E7HU8HU6BQ7DRAN\5?M9DR>HV.?L2BP3FP:LW0?L)9E-:H/G #$-(1(1-=F9AGO\`?KSAPY7ITBUbXpTk|1N^@MZqgj{7DP\qsK_q,@R`r9LYEWb:KT8JPCV\BP]?JR4?C +.1@G2O7FV)6C0:H?LW;KX:JW3DQ1AN0MU1?L1;I,6H4GS;IU5?H'0:#'3 )3#0<,:&31>J:ERDQ^DS`@R^?S^9MY1DK6GP+9B +5&2<&1;0@H)207=$(.$17'-:MT?R_J_n,L[CS_z~g{by|[nM`o7KX?Q\>OXL%2@%3?.:I1AQ/?O1AQ/>N00=I8FS$0&.=.6C;GQ:KQ;MT3FMM.>N,O2DP3CO2@H)4=8DO5=K4;M(O&7C->K8HU8IV>O\GWe;LY6FT3CQ8HU+4C#18@O?FUCQ_%3'0G6DX6GS1ANQa3P^@JUEKX6Qb'J_dt &2Pcu/A1@AUbEWb>OX'9@L^c?NdGXf@PWDX^8P]H]fS\`Ζ^fm]{fw}eU^jNYdAPVWehU]X0=I0>J(13J0=K1>M*8D,=I'8E+>M.BN2DN3EM3CI1@M/?K1AN4DQ6EV,;K+9L/P/?Q)9I*7E-*8D+KW4?K4?KCP\,N0AN5EQ3BK1BH3CP4DP->I7GT6FS2AR1@P0@P0@L0@L1BO7FW6EV+:K+8F*6B,>K/?L'4B#.<)1>#/;'3?)7C/;J0@M1AN4ER6JW;N[.EQ/EQ/EP-@K+@K8JUHP)15BJ,4Q4@K7BP0G->J3CP:JW2?K-8B09C0AN2>L)4B(0?)1>%-;)1?*6B/9H0=K2?M3CP:JW=N[8HV7JX7KV5JU7HS7IT:JV1AM6DP;IU5GR4DQ3AM=IU8DP.:FFT`6GR3BS3@N@LX"+5.8B'09*6B0;F2?M0=L2AL8EQES`7FOCR[APYBF妪XW]5GX-=M9IV)6E*7E*9I)9J(;-"0.;K2?N3@P-:H!.$-7".8%0:$09*6@=IR.9F%1=5AM8EL0N/?L&3A,9G2BR-=N!3F08F0:K9GV5@S.;J/7?L)1>',9#)6 &0)2<+3=-6E.7E'2@*4BMV>IT@IS1>H7BL6EN2CL=IX8ES&5@&1>2=D$+2"'4;<(/?$409F7@M?LX7CM&1<&6?1BI8IOMYaGT\VckN[cMZb;IQFQW;JOHU]CS[DR^4DRgx6GYJT\R^dCOU>JPEOWIS[bltN;KXL7DT+9K)8K,7E.7I/:M0?Q/=P6CS/;F/;G+8F&3A,:F)7C/=I,:F+;C$3< ,6(4@&5A-:F*6$+$$(+8)5A)'5*#"-)3%+9)7"08DR;LY:KX6GT!1=&2/;(4)7C*9E.&6>/;E.8B5?I+4>9EO.=F3DM:HT3@N0=L.J.=N)9I+:J%6B*;H0@L&6C*:G.8G&3A*6D'8E/=I'2=(-"-0&4A+7C/7D(1%.#-".5$.6"-<%0>$2@,8F1BN9JW:KX:KX*7C1>J0=I,9E1?K-;G9JV%6B/:E(2<+5@(2<(1;9EO.@I6HQ5AJ04@LAO\AR[N,9J)8H*:K*=N-?P2BR,=J0?K-;O+8K(7G)8I5EQ2CP%5A*:F&3A.;K&6F0?O1AN(7?!.6%16+K6DP4BN3AM3@L2BN3CP7BI7@H;EMELU6AH3@G+?E3GM19C1>J5AP,OX7KSKSJTV^h?IM9EGQZY6>APY]KSYR`VJR]EJ[^fd$@Q$J7?L/;D,=H/@M3CT0=T-J7AI+:B/=H,8F,9I1>O3?M.29B'-63;E2>J-;G@P\IQ>KP>IO:EL3O-:Q0?R5DT3AM/J-N3DP(6B(1;!-4*:L.?K'5A!,3)1!,4%08'3=%0;,8B%4=1>K5ER6HS5ES8KX3EP8JU+=H0CM9IU.>J7GS3CO2IP5HP6IQAR\0@H,8B*4>6?I.=I'3?2>J(2<%/9 )"..6>#,!++7C3@LDI.49?BGJ>LX1?K@NZ5CL;JS=MUEPZ?KU/;E1:D9BL/>J,7C6BO+5>%/9"+5(-9+2;*1:(1;(4@0>J:JV:KW>MV5EL:FR8DP8FS,8@&07)3:,4;"*2-380386:?DLSHRYAMT6BF.:>+7;5BC=FIANNX``LQQPQM5DM6AM=FS,5C/7E-7I/:L"0C&2@,F(7@-9-9H'3D.;K&2@"/;%.&-!+5&2>3?J ,!+"+$*(9J*;G%1 *2$, '/$0;"'5&/<'3%2A:FT7GT'7C!-%5A#/-9#1=$0*6B!- +5 * *#-+5.:D,9C5AK4CO)5A6BN4=G&0:$-7(.9*1:.4=*3=(4@0>J5EQ@P\@OX=NT:GV@NZ;KW9IU9IV>NWFR\8CM:CL;EL4?F8@G-2:3:?8KMBKN@GJ?DEHMLTXW2>H'2>&/<+4B2;I6@Q.'0<)3B%3@7DRJ0@L2?K-;G0?K2>J1=I6BN4@J.:D7BM8DN6BL($.1=G&5A)4@6BN7@J%/9#,6-3>+2;-4=/7A(4@/=I7HT?O\IXaCTZ?KZAR^HS;CMEL=FM06>O.>N3N.>M-=M+;K2CO+;H.>K4EM.>K3CP,;L2AQ9IV*:F,=F4=G*7C&4@4AO7EQ-8B#+4",3+%0?+8F,8F5FR!-$0+7C"+ *4&0)/:+2;.5>.7@(4@-;G:KWDTa(7@"28)5+77GTEV_+=F+:C:GO)4<'0:)18.6=.4;#*126:,/41389AHCMT:FL0<@-9=.:>3@B*46;>B:?@=ACIRQק3CS+;K/?O&3A/J->F/:G.;J'8E0?P8IU+9E%.8)1+NZ1GN;MU8LS=NX;JS0;F&/9;EN)7D&2>:GS0:C%/(!&2(/8(.71:D/;G*8D>NZBR_?MVJP7BH8?H:BI:BI8>E(+326;/271386>EHRYKW]JVZ@LPAMRJVX>HKIKOHLM?IINYWþ׻¼ܬ2EW4EW8GX&6C)5D.=H0AM,>F37M4=P1@P/AM0AM8IV,=J.=N,>F.>K.>K(7H6FV5FS-=J&8@+8G):G$3D/@Q6EV+8F'4@'2*#1A$1@$6C'8E):K1AR3GV5GW9NY:OZ6KV:MX5HS5HS1AM:JW5OV3LT4JR7KS;JT1=G%0:4=G6ER*5B6BN2NTBPVKV\?IO;AK;CJ74L-F4BN)6D0G+6=&06,9F7DQ:DK$.4#*1%,3*3<)2<06>/8@-7@*6?.LU=GRH5BL%2;5AK5?I&/8"+4&-5%,5$-6,5?,4A-9E@MYBR^EV_9MTBRYGW^=MTAQX>NU>OVEV]:LS5?F=GN3=@E9@B;CGFQRizwaupn~b{rl^uid}|[rp[ljcqk}}m|cvw^uvtw|.JT1JT2FQ/?K1@K4@L -8*"+,9/?L,-6"-&0%4@5CN'5A)"*!(#4B0>J#,6'0%+$.%.7#,6'2(0:*3&3$2>6FR3DQ)=K,4!* /8$-!,6*5)3'1%/",&0$/+7B%/#03> )&02>H*3>'/$-6%+4&,5"+4(1;*3@/;G3AM@Q]CT]6JQ&6=-4,IMIVXCQSbwt\sp_tsUthp`|rczucvt[libpn}yz{n4JV8KXL+6D5?M(4C!-<,N-L,;F(5$3<(3=-;H"0<.?L1>J*5?(/ &&7E-;G%/"+ $(1&0)*4=&.<"-,9E:JV2CP(8F$5==NW$5>3AJ/>G.>G2=G'2<3CL-'3?1?K=MZ8HQ(;B7FM?OVGW^BRYBRY=MT/?F0AH4=F@IR5=D@HO(-5.59,/41498=DFNUFPX?KN>NPAMQBNRK.>K5BP/9G/:H0=K.?L(9E.;H1AM3DP,@O+>M7GW/?L+9D1@H)7C+7F"/=1=K7DR2@L-2@LAQ^EV_BU\BRY@PW?OVAQX@PWAQXCSZCT[2>EAJS+5>DLS05<+1947<48<1:@@JQEQWESZFVXBRUAMQF>MVvwlrcvz^qnXkbRdV\naycqxwcp~zv{}fwhwdq(7D*71>K1M(;J7GT8HT)9F.>J-=I.>K&5E4CS7GT3DO,K/=I(8E4DP8HU8FR(4>(0(:G3DQ7CL&18"+ )1%0:'0>'2@+6D*8F0P[8KS8KS9LT9LT6GP5FO:KT>LU5IQ9LT8NU9NV7KR5FO+53RYJY`GW^=MTAQX?OVHX_AQXGW^/:BDOW6>H@IR-6<16=/6=45>/6??HQIU[GU[DRXBRTEQU=IM=JP=IN6BJJ3@L->K$4A-=MK0@M9IVGPLV_ESXCTZCQWCQX?JN=JP9EK6CK;FP;IVUfs[kxSbtcv}kz}bnn{qw_otvarzpbs|ex~lzbrt2IX0ET6IX-M.>K8HX2ET+>M)'4?)9I+:J,;K/?K,1:C=FOHU]BSZFV\CSYESY@LR>GOBKS3?ELW_ERZ>ITM]fZiraqwxz{~{^mvFVbn~x{DPV0M[0LZ7M]1EU0AQ2BR4DT.AO0?L4CT2ET*>P+AP4HT;OU,=E3CO3CP5CT+:J2AQ:IY2CO/?K8FR3CP(8I1AQ9IY7HT2>J)3/@Q1AN:HT(4>$.%.8(0>(5@(5J+9L-(7C?O\HYb:NUBRYEU\CRY;KRFV]IX_:JQGW^1=H>HR.8CAIS09C.5>04>49@/8A>IQER[FW^DTZBRXDRX?JQ@KN=HKK2AQ/?P.?S/CO.AN3FU.>O*:K5EU9JX0@M2BO4DQ4DQ-=J2BO8IU5ER0@N4BN0@M"2?1AR8HT6DP.:C",6+N.=N:JW8KV9MT7JR;NVQYBU]=LUDU^>RZ>PWDV]CV]@RYEX_FX_ASZEY`9EKO8IVJ8ES4CS/?P.?R3FR2ER6IX0@Q,K/=I2BO 0=1AR?O\7DP0N9IU;MX>RY:MU9LT8KS7JR@S[@S[>QYCV^=PX>QY=PX:MU:MU2AJ ,61;D;JV*8D6BN8DN*4>",6%.8&/8%1;)2<+5?,6@7@JAPYGXa-@H7GM2AH+;B1AHCSZ#3:$4;%5<)/4AG09@@KQ08?.7>27>39@9>G:BIIU[ESYCSZCSVBSV9JMO.>O7GW9KW.>K4DQ6FS7GT0@M/?L9IV6FS-=J1?K-=J#3@/?P7GT8FR0;E!+50AN9IU5FO0?H&0!.7&/<,5C+;C,:F):G-;L,;K3CP7IT:MU8KS9LT=PX?RZ9LT=PX@S[CV^AT\?RZ=PX8KS,6@3NW>OX!5=)9@%5<-=DAQXAQX4DK>NU?OV9DJBNT2?DBLS29@/8?27>5;B3:D6=DHTZESY@QW@QTCQT6EHETZJ3CS3EV3FS6IV3FU.>O,K4DQ8HU4DQ/?L2@L3CQ%5B1ARIYf/=I3>H!*42CP6FR0AJ-QYBU]=PX?RZ:NU4CL&2<1;D4BO/=I2=J7DM/8B$.8)2<$-6*6@+5?-7A-7A5>HDBKR+5<19@*3:4:A29B0:AFRX@NTFSZDTVBRT8CGFVXBMR2?A=FEMQRBGG:AD9>CCOSP\^forIUWKV\̳yfm|t|t{lz\er4K[1FT:NZ.?L.>K3CO1AQ4CU/BO3FS6IX/?P*:K4DT6HT1AN1AN3CP7GT0@M0@M8HU7GT/?L2@L4ER3CP+;L3CP4BN3?I)3=->KQY4CL*6@09C6EQ3BN+7CDFRX-8?,3:.6=-6<3:C.8?EQV@OU>MSCNRFRV6@E@PSIVX0<>>FECLKGMP',1/7>?JNEQRNWZ?KM>KR\mx]t[t_t@O_LVgwxr2J]4L\>P`/@M5EQ5ER2BS5EU2ER3FS1DS-=N)9J5EU7IU2AN3CP2BO4DQ.>K3CP9IV7GT.>K=KW.?L"2?3CS1AN1?K3?H,5?,=K9IU6GP-QY?RZ=PX=PXQY:MU?RZ:MU6EN-9C,6?4CO2@L*6B?KU7AK!+5*3=)1:)5@.8B-7A.8B3F>KS(0 )&4:0>D7EK:FL/9@&18+3:/7>18A.8?COU>JP>MS@LP>JN4<@AMQIUY1>?:BFILhtzx>IPDPTN[\?KM8GJ4GNpnh0HZ4JZH1;E.7B$5>,5>43B12A0RW>PWAS\*:C(6<>HMJWT>RW9MR6FL5FL8GM:GL?IP=GN9HK7FI;GK>IM@HLINS:@E=?D4AG?KQANTFPXCMT=GNBIP@FM7BH?JPGV\FTZJV_HX_JZ`P`fN]hO^jM\hO^jM\hL[gM\hN^j*K.>J3CS6JX=Ra*BNG]i5HUQ8IZ2AS/CUt;V`9R\4EP6BN07F0?K8JV7JR2@I.4B2;IBRcOfkEYaEWb1AN5AO;GVQY:MU>QY>QY>PX3SW9NVAMYAP^TnwEYd!3;5AH;HP4AI7GP7CM4AK8BL8AK-AH1RW:OSASZ?PY?MW@PV:LOERT@TYHO=FN;@E@LP=IMDOS>IMBMQ>JMP{8S]?U`7IT4?K27G5CO6JQ7JR4BK09F5=KScsqLglH_fCT_+;I1=L8FQ;LU:KTQY;NV>QY=PX=PX7RXMZ*:GlI`j>MZ1?H:IR8GP5@J8DN7CM;GRAIT0FJ:HN>GPMS@LR=JPBJR=LN8HJ8CG4AD0;>+7:6?B=FJ6JNAMQGVYFUWIW]JZ`HX^HX^P[cR]eS^fVahU`hWbjYdkYdl:T`5K[4JY1CT5GXQ^/@M%6D3DQ6IV2ER1=K3@N1AN-=J.>K9IV7GW/?P,AWЈTlxMY(8D4CP;LU;LU;NVPX2AMFXhyCXgL[h6JP5FO9HQ;GQ8EO=GO>KS?KT6ML:LNBLTAOWJcniDWnDU[ASZ?QW>QX@SZ@TY?TY@UZHX^EU[?PUGU[APU@LQ7CI7CI?MS=KQ?NS@KQ:FL.:@8AI#.58<@>BF9>CAJMDOS;GJ@OR@OQFRVEPUJY[JY\HV\BRXIY^Ufl_hq`ir^gp`hqajsbjt`hr^gp0KWKdp1GV-AO1CT0AT1DZGZosRgr7KV6HS+=H1CN5IT/CN.:I5BP4DQ2BO1AO8HU3DQ3DQ1I`džNfq=S^:LW.;H9DP,=F6HQ2IN7HQ?JV,8IUtF]hG]hDXc9KW*;C3DM=NW6IQ8KSQY8QW>PX>N\Ym|tH_oETdH\g1CO:HQ:EP>IQ>IQKQ9PP;MOBMU=NYiq@UnCV]BU]BS\FX^BT[CV]>PWI]cEV]HY`IV^IV^ANVCPXGT]KX`NZcVckUbjTbjWdlCPXLW_S_g\]fX^dPX_XbiS_eP^dP]cL\cQ]aUadTchYgmWejXhoXio\mt_jq`ksbmtcnualtbmt`ks^iq3GS4ER1AQ4DU7H[3I[|Lbm>R]L1AN2BO6FR>NZ6HS3EPOhqNet?S]BT_7GS8FR5HN4KQ2HN4GO7DQO^noIaqAXgEXcDW_(9B5EN:MU;NVN[mOgyt_z:NY:JW@KUALT?IR=LQ?OU?SUAQWOY@R^EV_BT\FW]CPY-4IV`=JRCPXERZFS[KX`MZbR_gUbjScjRbiPagT`hUbjZgnZgoWdl\enYaj]enWaiZgoZfnWgnVfm\go\goXemYgn\gq\ks\ks]mubmw`lv]irZeo]isalv]hrVak_qx0?HDR_8IV0@P.BS6L^݆Ndo=P[8JU5GR6HS7KV2FQ0J:LR2IN.GM5GO)9Feue]uD[jGZeGZb/BH:MT6IQ9LT;NV=PXQY;PX=NZ(;G~mHavp>T_5ER>GQDMVBNSCQWFV\ARWERZCMW6JUΑrBWm:MZ?Q\8IRARXHUZXaj ++bepSaiYfnYfn[hpWdlZgo\iq]iqYhrWfoYhq[ktUdm[jsZir[js[jr]ktZjrZirZir[js[js]lu\fo^hr]ir_kw^jv\kv\iwYftWgsQamO_kRbnM]iM]iM]iN^jgsy=IQDOY:HT6FS4IX/HX̅BWc6JU8JU:LW7IT6KV4IS0&;B(9A)KR9LM@MVAITHQ^1COݑ`}BWj@QaNbmYjsYhm]gmbjr41@gu|gt|cpxanvcpxamvZkqSdkZhpWfn[irZhq]ktXiqWhq[ltZlxYlvaq}`p|^o{ao{_ny^lxem{fm{amxbl{_hv\huZeuR]nL_lL_lL_lL_lJ^kI\iG[hFYgOjp2IN;LU8FR6FS3HW/JZv>V\8MU3HP7IT4ER1AN1AN18;MX]ozeykj}h~PfsE]iG\gJ[eO_l^n~іɓÃrwOfvI`pG^n{ҰߚЀUrvGam>LT?HPESXAQWHV[HSY[ggO^cZp{d~ޘd@Yi7R^FakXkr`pyv,1>kp~3YhpWgo\gr_ls]jqanu_ltbntWkyWkx[o{Xmx[ny^p{]oz\nz[nx^nz`p|aq}dqdqerercrz^nz[jvVgsPcrL`rKcsNfvOeqNepRerWguVfrUeqZgtWfoPjp;PV5HO;KW@P]2ETYqw:PU6KS4IQ:LW5FSN^kbr~t\nyRdoL`kM`mK^k>T`>T`4LX=S_\lyZkx>Raaxtwwh~\sYq~\tšƦҖƏ†tyׁSZFXcQ]jK\aN`jXq뜺όiCZi=Vb9P[Ymt`kuYclX`mt{06Ebs_o|_o{_o{`nz^lxao{_lx[kxUfsTenTenSdmTfoTfoZirZjv]mxYiuScpScpYiuZhxVduTfpXhtUhuSfuSftRgxThyThzRhtPcpPdqSepXhuZjv\ktXgp\v|=T[3EP5DQ8HUL`lpG]b7LT5JR6GS9KV8IV8HU:IY7JT9KV>P[MZ\myyŪְ֥虵΃^tDYh=T`9MXWhqbnxCLWHS\DMZ%,;as^o|]n{Zkx_p}YjwQboYjx]jq]jr^ksbowiv~dqybowhu|evjzjzfw`o[m|TixPetPfuOfuQetNbsOctRduPbsM_qOcnPdoUfr_q}XiqRclRakQ`i^wCYd/DN6HR8IV6GTlH^j>QY9LT5IP6IT5FS8IU8HY:JZ7JT;MW8JU9LY6IV7JV7L[7L[4N]:Q`@S`BUb=Ra7Qasx|ox}kyd}h[v|tDP`AUf|ʔˏƆ{zuB\l?Q`PduÖ˗lj֫ݚt]qGVgP[9KV7HQ6GP7GS2BN7HU7GW9IX5EU8JT:KX8IV3FS6IV;M]5JY4IX3K]E^nRhs7MY6K[VfCYhBTbFWaBWg>Q^>OXiv~v}$/7S_hz{v}wxxn}mziy]lxWgsN`oObpM^oNasJ_rI_qG_pG_sHbuJcwFbvPfxNdwShy[o~`q~euYiu]luK\eJ]dHZaEX_FV\AQWAPWBRXI`pNeu9N^=P]T`?QbQ^u~„}xx}ݍc{IXgETd8KZUp~e}L^tCXjEYl=OaG[h@R]DUa=RZAV]8O`8N[=QY[goxjt|":CMclsgsxis{lwiw`o{[kwZjvUhwQcrQftLcrG^pG_sG`sG^uF`pFaqHauIbvIcvKcyMe|Nf}Xi}[n~aqZkxXhu[luN`gK[bL\cFV]M\dGV\CSYDTZ=PS;NQLctAXh=Ra9KXCT^DQYEQXIRZDO[6CO-:F,9G$+;-M^BM\ANZNTCTYCSYASU;OR@SVfD_h6P\6P\5O[>YgB]kHcqTjtATaqo~ytrxڥVm|BXdATa?Rb8KZ>TXBZcF\i?ZjF`tkpmwsjg}—ȉ7MY=P_.BSx‚y{ǃdFX^>QY@R]=OZ7HU=NZ9IY;K[;J[ZoA]rB^q9Xr>Yt>XqBZsF^tBZqC[qF`sM_tK_tG_rB_tFcwFbzMgSiNkYtLg}^yWqWo~WlxLanHfkQjoEX_IY`IU]GW^ASZBT[=VV?TV>NTDOWEPXDOUCQT>OR_xPiu7Q]4N\5O]:TbE^nOhxƀəßՕŅVm|F\gI[h@Rb;N]DXXCV[K^fNaoVi|F`pv}|zoqv杻ΕXpxC[g@Ud9M^txÅ{dUpF]q?YjBT[BU]>P\:LW;LZ8JV:JZ9IZ4EQ6GT8IVNUBMUFPXAMS?NQ=OPlSm{6P^2K[5O^:ScC[mLdulv~~mql}{Ζvk?Sb@Ud@Ud=PbKZ^N]dTemZlvK^kYo{Umyw~z{ӟљɄ_{?Ye>Tc.EUw`yk;Sf@Wg>Vf0EUNT9KUThwLcuGbuKfzMgzLezHeyEauLh{Kf~Hg}Gf|IfKlNoSuKkPoSpOkjy}patI]hN_kCV^CT^BQZ@OX?NW?NW>OX:MU9MS@QZ>NV@LVAMW=KQ?MP=OPzXq5N^6N`1I[;SeAYmH`tizXsugWuq{|r}¥ڛΑnXf5Q^9Rb>Uem?TfBUl:P^>Td?R_BVc9KU>P[5GR:IVQY8LT?MN@OU;MS7JUE^mJg{MjJhPmPrXzVzTxJoVzlz‡ǎɎƖ̕Ĉ{]qUgyPdsL]jHYf=OZBU`AR[DU^>LV?MVAPY?PZ;KUMVAQY;IU>IVBNXAOUBSV@RSr_w5M_/GY1I[7OcC[oNfzrvwbIe~=\u6Tp=^{Xwclk}֚|pC]k;Uc:ScWkE]qC^r}ۨܔȑ}VsB`oOX>OV>PX4GNASZ7JQ:LSASZ>QXCQY;GQ7FOBQZ@NX@PV?PS=OPd}>Wg0HZ2J\7OaBZoNfznumXs9Ti5Qj$A]"@]">RJh}squw։VpIcsPY>PX:RW5MR5MQ6OS4JO;OT9LR;LRMT9KS=OVOS|kD]m3L\4M]7OaBZlOgynxs\uIct-H\,Gb4S4GX,CSċz}Ոc~Jdt;Ue6Sb3O`7Ug@_rIf|LhvǏǝӉqWn>VhRYPX:OW8MU=SY9NTEdcDdc8WV+JI1MM2KK=OP:ILCQMDRP9KL@SV=QV>RV>NT=LO{s=We7O_6O_7P`B[kPhzqziXn}=Wd0IZ,G_8T7EO/AN{zאĉu[y9Vd7Tc2Pa;V`A[iLeuTmzup|ȏŇyh|PP:IK=KHBNO=MR6J[2Kd3Qq8Sx8Vw4Uu2Vo9\uMj[p]l~QhtJ\gQ_kJV_T\fO\cDSZ=OU=PX:MU2IP;QX7NT7MT9MT#5>UuuCgfMqpRrsPmnF[].15>CMXPLYUburF[\DY^ATZ?NUN[bse7Sd0JZ3L\6Pa@YmMh|x}}\w7Wj3Sf.F\'5O;R[7M_rˌ~k^yMV6EN8GP7KS5HO9LS5IM6JO9JLP[?Q\9KV4HO-;G7CO4@L2BIAWZ40SyqDyk?uf:oaH|jF{iPpPqNmLsU{p.A>{ENQ0BA9SO4OKub?Yj1JZ4M];SeB[pKg{}tnh4Ue3Sf+CY%3N5LU,BTrßщqhJcw?[o>Yn3Pe5Wf@]nHcwTkd|iuvwsɇvrkIcs:Sc5L\8L]1CT6EV5DV3HR3GR3GR2ES2CP0AN2CP4DR3DM4EN8IR9KT>MV;JS:IR:HR6IP6HO9LS9IPPZXi5N^8Qa;SeB[oLeyslvUq<^m0Qd.DZ 0G/FP2H[}|ڍ{r_xD]r:Sh7Sd7Vi@^qGbwOf}WotttywwrRl|:Sc6M]7K\2CT3EV5DV4HR2FQ1FQ4FQ3EP5HS9IU8GT;MT4FM3FMMR>MSCNT;OS;NS7IP9KRL]fJZfO_k`p|]mzTdq[kwUdpOalHYeGZb>RXBS`=N[AR_;LY7HU9JW:KX4FS1AM6EP6>L!+2;EBNRFXWf|xTwJunN|rM}tExnG|rHqKv?pGwCuiquºrĻ~fB\m?Xh7P`?WiHauIbvtro[u8Zj5Sf)?V!.EE\f?Ug΅~qЉvwZq>Wh4M]:UkC^sHcxNh}Xsw}v~~rUn~KSKS>KSANV:GPALTHP2EK9KR:MSFW`N`hRbnP`lO_kP]kKWfJ[fGWcBT^?S^DYcR$1IAXb8Na׉tƝԈ}Wn~L`oKR;LUEV_^ow[ltO_kTdpQamO`lKXdIWbBR_@P]?O\>Q^:NZ;N[;KX7GT3DP1AN7GS9IV3CP5FR0=K.:F1;E")35;@JOR"'*"''46-/ $"!=:Xurs~rZ:u^oM~zgyoNfx?VfAXhF\nf~t~qf=\k/M^(=R!.E1HRAWi݉}ɜӄ^s3FS7IT3FM9RhE^rIdyPmZyk{{LJ{~|f?Yj2K[6M]3HW1FU4GS4ER6GT7IT6FR8IR1DK6FM;KR;KR=MT7HN?LT>KSCEJM&)- #(-/527:48;7>A!!"1-&FAcrssu^vRiyjpy{x:Zi0N_(=R!-C4>1GYyw{ěԈnZlyJ\g:KT/AG5K_C[mFavKjSrjruvˍąwlNU9IN=MSMS>JP:FL6CL8DM7HO;;LR9GM9EJ/;A5AG7EJ=MT?OUAR[WgpZlwM_jXjuQaoM]kJ\gFXcAS^>P[:LW\o=Wf7Q_;Q]6JU7HS1FQ4HT6KS9KS7IP6FM;IO>IO:PR7LM:MU3EM1AN%7@=KU;KQ?QX:LSWip[msQbkRclVgpPajCV^J]e@S[N.;K$/='4#,!&!%/45#"#(' .,,&!"+"O93D($gRQqgj~rjrnwm~v|i^xOhx@WgCWfMapƉʒǕɛЕɂ~azEZi6FSARZ8GP/BM/CRJ_u\tysuw~Ǧ݈~~r{:Xk5N^9Tb:O[9MW3GR4FQ7IT9LT9MU6IO9IPF:FP1>J@LX?KULWbSfm\nuQcjQcjL]fHYbK\eFW`GZb>QY:MT>P[7IT:LW6GT7HT6FV9IY8HX6FV7GW8HX7GW7GW3CS3CS1AQ3BR/>N,G19FAJWZbp\fpfnyNahFX_GY_@QZHYbEV_;LTFUbDW_:MT;MX5GR:LV3CQ3DQ4FR3CT5EU4DT3CS6FV6FV5EU4DT1BR/?O/>N.=M-P[2DO6GT2CP6GT3EQ3CS3CS4DT7GW4DT5EU3CS->N2AQ.=M0?O.=M.;K+8H2?O#1A"0*& &6<=%%% ebdLNLAIB&!)"&ȋрvŅ{msWss̍Ƃžٓ˞֍ā ӍlOdoDVa;KW8ER7FO/@N*>Quȇҟ֡؏ņ†mRq@[l=Vh9Rb:Qa6M]:MS9JS5DM:FP:DM4@L3AM:JV?U\-ALוmRhsLdkCT]HYb?PY>PX:JWL3DQ4ER4ER3CS3CS2BR3CS1AQ4DT6FV4DT/?O1@P2AQ.=M1>N0=M-;K2(6"/#-$$)*  %!&XWY@ECCJE87.\RKgXRzjjxtlt{foĂvya}ƎˍŌőɕɌ[tKak;MX9HT8ES4DJ2BO.CTBZqÒʌŌĤ۠׏ƎČtn|v`~B]n=Wh:Te9Qa1K[4HO6IQ6DM2=J,8D0>JDVa9KXLguwNfr=Va3/ub]B)%bhqvqvvmp}~{ŃvƄ}̀ǎ|jE\d@RZ:JW6BS9FL/?L/AS0H^Ɇ˒ʏǏƣzs{wgNX:KT9JS7GS2BN:JU6FS9HV2EO.?L5FS1BO0AM1AQ1AQ1AQ2BR2BR2BR2BR1AQ3CS4DT3CS2AQ0=M0=M/K[9FM3CP*Ym=Yj:Te8Rc6Pb1KQ/FO9IR>KX}^x[vf}Oct:L]BQbAN\;GSDMW;MV5GO1AM5EQ5EQ5ER9IV3BO1BO/@M3DQ/@L3CS/?O0@P2BR0@P0@P2BR3CS0@P1AQ1AQ1AQ,9I0=M1>N'4D+5F1;L'1B'1C"-;!*7$.$*&+/&*+"'((,-".+%-,#"%$#!!,+'/+*=98%-& +\ No newline at end of file +diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/Makefile b/host_applications/linux/apps/hello_pi/hello_wayland/Makefile +new file mode 100644 +index 0000000..c9ddf23 +--- /dev/null ++++ b/host_applications/linux/apps/hello_pi/hello_wayland/Makefile +@@ -0,0 +1,5 @@ ++OBJS=triangle.o ++BIN=hello_wayland.bin ++LDFLAGS+=-lwayland-client -lwayland-egl ++ ++include ../Makefile.include +diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/cube_texture_and_coords.h b/host_applications/linux/apps/hello_pi/hello_wayland/cube_texture_and_coords.h +new file mode 100644 +index 0000000..663e23b +--- /dev/null ++++ b/host_applications/linux/apps/hello_pi/hello_wayland/cube_texture_and_coords.h +@@ -0,0 +1,100 @@ ++/* ++Copyright (c) 2012, Broadcom Europe Ltd ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * 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. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++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 HOLDER 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. ++*/ ++ ++// Spatial coordinates for the cube ++ ++static const GLbyte quadx[6*4*3] = { ++ /* FRONT */ ++ -10, -10, 10, ++ 10, -10, 10, ++ -10, 10, 10, ++ 10, 10, 10, ++ ++ /* BACK */ ++ -10, -10, -10, ++ -10, 10, -10, ++ 10, -10, -10, ++ 10, 10, -10, ++ ++ /* LEFT */ ++ -10, -10, 10, ++ -10, 10, 10, ++ -10, -10, -10, ++ -10, 10, -10, ++ ++ /* RIGHT */ ++ 10, -10, -10, ++ 10, 10, -10, ++ 10, -10, 10, ++ 10, 10, 10, ++ ++ /* TOP */ ++ -10, 10, 10, ++ 10, 10, 10, ++ -10, 10, -10, ++ 10, 10, -10, ++ ++ /* BOTTOM */ ++ -10, -10, 10, ++ -10, -10, -10, ++ 10, -10, 10, ++ 10, -10, -10, ++}; ++ ++/** Texture coordinates for the quad. */ ++static const GLfloat texCoords[6 * 4 * 2] = { ++ 0.f, 0.f, ++ 1.f, 0.f, ++ 0.f, 1.f, ++ 1.f, 1.f, ++ ++ 0.f, 0.f, ++ 1.f, 0.f, ++ 0.f, 1.f, ++ 1.f, 1.f, ++ ++ 0.f, 0.f, ++ 1.f, 0.f, ++ 0.f, 1.f, ++ 1.f, 1.f, ++ ++ 0.f, 0.f, ++ 1.f, 0.f, ++ 0.f, 1.f, ++ 1.f, 1.f, ++ ++ 0.f, 0.f, ++ 1.f, 0.f, ++ 0.f, 1.f, ++ 1.f, 1.f, ++ ++ 0.f, 0.f, ++ 1.f, 0.f, ++ 0.f, 1.f, ++ 1.f, 1.f, ++}; ++ +diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/triangle.c b/host_applications/linux/apps/hello_pi/hello_wayland/triangle.c +new file mode 100644 +index 0000000..1a7bfc4 +--- /dev/null ++++ b/host_applications/linux/apps/hello_pi/hello_wayland/triangle.c +@@ -0,0 +1,666 @@ ++/* ++Copyright (c) 2012, Broadcom Europe Ltd ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * 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. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++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 HOLDER 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. ++*/ ++ ++// A rotating cube rendered with OpenGL|ES. Three images used as textures on the cube faces. ++ ++#define _GNU_SOURCE ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "GLES/gl.h" ++#include "EGL/egl.h" ++#include "EGL/eglext.h" ++ ++#include "cube_texture_and_coords.h" ++ ++#define PATH "./" ++ ++#define IMAGE_SIZE 128 ++ ++#ifndef M_PI ++ #define M_PI 3.141592654 ++#endif ++ ++ ++typedef struct ++{ ++ uint32_t screen_width; ++ uint32_t screen_height; ++// OpenGL|ES objects ++ EGLDisplay display; ++ EGLSurface surface; ++ EGLContext context; ++ GLuint tex[6]; ++// model rotation vector and direction ++ GLfloat rot_angle_x_inc; ++ GLfloat rot_angle_y_inc; ++ GLfloat rot_angle_z_inc; ++// current model rotation angles ++ GLfloat rot_angle_x; ++ GLfloat rot_angle_y; ++ GLfloat rot_angle_z; ++// current distance from camera ++ GLfloat distance; ++ GLfloat distance_inc; ++// pointers to texture buffers ++ char *tex_buf1; ++ char *tex_buf2; ++ char *tex_buf3; ++ struct wl_display *wl_display; ++ struct wl_registry *wl_registry; ++ struct wl_shell *wl_shell; ++ struct wl_shell_surface *wl_shell_surface; ++ struct wl_compositor *wl_compositor; ++ struct wl_surface *wl_surface; ++ struct wl_callback *wl_callback; ++ struct wl_egl_window *wl_egl_window; ++ int needs_update; ++ int ellapsed_frames; ++ int kill_compositor; ++ int single_frame; ++ int terminate_abruptly; ++} CUBE_STATE_T; ++ ++static void init_ogl(CUBE_STATE_T *state); ++static void init_model_proj(CUBE_STATE_T *state); ++static void reset_model(CUBE_STATE_T *state); ++static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc); ++static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc); ++static void redraw_scene(CUBE_STATE_T *state); ++static void update_model(CUBE_STATE_T *state); ++static void init_textures(CUBE_STATE_T *state); ++static void load_tex_images(CUBE_STATE_T *state); ++static void exit_func(CUBE_STATE_T *state); ++ ++static void ++registry_handle_global(void *data, struct wl_registry *registry, ++ uint32_t name, const char *interface, uint32_t version) ++{ ++ CUBE_STATE_T *state = data; ++ ++ if (strcmp(interface, "wl_compositor") == 0) { ++ state->wl_compositor = ++ wl_registry_bind(registry, name, ++ &wl_compositor_interface, 1); ++ } else if (strcmp(interface, "wl_shell") == 0) { ++ state->wl_shell = wl_registry_bind(registry, name, ++ &wl_shell_interface, 1); ++ } ++} ++ ++static void ++registry_handle_global_remove(void *data, struct wl_registry *registry, ++ uint32_t name) ++{ ++} ++ ++static const struct wl_registry_listener registry_listener = { ++ registry_handle_global, ++ registry_handle_global_remove ++}; ++ ++/*********************************************************** ++ * Name: init_ogl ++ * ++ * Arguments: ++ * CUBE_STATE_T *state - holds OGLES model info ++ * ++ * Description: Sets the display, OpenGL|ES context and screen stuff ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void init_ogl(CUBE_STATE_T *state) ++{ ++ EGLBoolean result; ++ EGLint num_config; ++ ++ static const EGLint attribute_list[] = ++ { ++ EGL_RED_SIZE, 8, ++ EGL_GREEN_SIZE, 8, ++ EGL_BLUE_SIZE, 8, ++ EGL_ALPHA_SIZE, 8, ++ EGL_SURFACE_TYPE, EGL_WINDOW_BIT, ++ EGL_NONE ++ }; ++ ++ EGLConfig config; ++ ++ state->wl_display = wl_display_connect(NULL); ++ ++ state->wl_registry = wl_display_get_registry(state->wl_display); ++ wl_registry_add_listener(state->wl_registry, ®istry_listener, state); ++ ++ wl_display_dispatch(state->wl_display); ++ ++ // get an EGL display connection ++ state->display = eglGetDisplay(state->wl_display); ++ assert(state->display!=EGL_NO_DISPLAY); ++ ++ // initialize the EGL display connection ++ result = eglInitialize(state->display, NULL, NULL); ++ assert(EGL_FALSE != result); ++ ++ // get an appropriate EGL frame buffer configuration ++ result = eglChooseConfig(state->display, attribute_list, &config, 1, &num_config); ++ assert(EGL_FALSE != result); ++ ++ // create an EGL rendering context ++ state->context = eglCreateContext(state->display, config, EGL_NO_CONTEXT, NULL); ++ assert(state->context!=EGL_NO_CONTEXT); ++ ++ // create an EGL window surface ++ state->screen_width = 1024; ++ state->screen_height = 860; ++ ++ state->wl_surface = wl_compositor_create_surface(state->wl_compositor); ++ state->wl_shell_surface = wl_shell_get_shell_surface(state->wl_shell, state->wl_surface); ++ ++ wl_shell_surface_set_toplevel(state->wl_shell_surface); ++ wl_shell_surface_set_title(state->wl_shell_surface, "triangle.c"); ++ ++ state->wl_egl_window = wl_egl_window_create(state->wl_surface, state->screen_width, state->screen_height); ++ ++ state->surface = eglCreateWindowSurface( state->display, config, state->wl_egl_window, NULL ); ++ assert(state->surface != EGL_NO_SURFACE); ++ ++ // connect the context to the surface ++ result = eglMakeCurrent(state->display, state->surface, state->surface, state->context); ++ assert(EGL_FALSE != result); ++ ++ // Set background color and clear buffers ++ glClearColor(0.15f, 0.25f, 0.35f, 1.0f); ++ ++ // Enable back face culling. ++ glEnable(GL_CULL_FACE); ++ ++ glMatrixMode(GL_MODELVIEW); ++} ++ ++/*********************************************************** ++ * Name: init_model_proj ++ * ++ * Arguments: ++ * CUBE_STATE_T *state - holds OGLES model info ++ * ++ * Description: Sets the OpenGL|ES model to default values ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void init_model_proj(CUBE_STATE_T *state) ++{ ++ float nearp = 1.0f; ++ float farp = 500.0f; ++ float hht; ++ float hwd; ++ ++ glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); ++ ++ glViewport(0, 0, (GLsizei)state->screen_width, (GLsizei)state->screen_height); ++ ++ glMatrixMode(GL_PROJECTION); ++ glLoadIdentity(); ++ ++ hht = nearp * (float)tan(45.0 / 2.0 / 180.0 * M_PI); ++ hwd = hht * (float)state->screen_width / (float)state->screen_height; ++ ++ glFrustumf(-hwd, hwd, -hht, hht, nearp, farp); ++ ++ glEnableClientState( GL_VERTEX_ARRAY ); ++ glVertexPointer( 3, GL_BYTE, 0, quadx ); ++ ++ reset_model(state); ++} ++ ++/*********************************************************** ++ * Name: reset_model ++ * ++ * Arguments: ++ * CUBE_STATE_T *state - holds OGLES model info ++ * ++ * Description: Resets the Model projection and rotation direction ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void reset_model(CUBE_STATE_T *state) ++{ ++ // reset model position ++ glMatrixMode(GL_MODELVIEW); ++ glLoadIdentity(); ++ glTranslatef(0.f, 0.f, -50.f); ++ ++ // reset model rotation ++ state->rot_angle_x = 45.f; state->rot_angle_y = 30.f; state->rot_angle_z = 0.f; ++ state->rot_angle_x_inc = 0.5f; state->rot_angle_y_inc = 0.5f; state->rot_angle_z_inc = 0.f; ++ state->distance = 40.f; ++} ++ ++/*********************************************************** ++ * Name: update_model ++ * ++ * Arguments: ++ * CUBE_STATE_T *state - holds OGLES model info ++ * ++ * Description: Updates model projection to current position/rotation ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void update_model(CUBE_STATE_T *state) ++{ ++ // update position ++ state->rot_angle_x = inc_and_wrap_angle(state->rot_angle_x, state->rot_angle_x_inc); ++ state->rot_angle_y = inc_and_wrap_angle(state->rot_angle_y, state->rot_angle_y_inc); ++ state->rot_angle_z = inc_and_wrap_angle(state->rot_angle_z, state->rot_angle_z_inc); ++ state->distance = inc_and_clip_distance(state->distance, state->distance_inc); ++ ++ glLoadIdentity(); ++ // move camera back to see the cube ++ glTranslatef(0.f, 0.f, -state->distance); ++ ++ // Rotate model to new position ++ glRotatef(state->rot_angle_x, 1.f, 0.f, 0.f); ++ glRotatef(state->rot_angle_y, 0.f, 1.f, 0.f); ++ glRotatef(state->rot_angle_z, 0.f, 0.f, 1.f); ++} ++ ++/*********************************************************** ++ * Name: inc_and_wrap_angle ++ * ++ * Arguments: ++ * GLfloat angle current angle ++ * GLfloat angle_inc angle increment ++ * ++ * Description: Increments or decrements angle by angle_inc degrees ++ * Wraps to 0 at 360 deg. ++ * ++ * Returns: new value of angle ++ * ++ ***********************************************************/ ++static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc) ++{ ++ angle += angle_inc; ++ ++ if (angle >= 360.0) ++ angle -= 360.f; ++ else if (angle <=0) ++ angle += 360.f; ++ ++ return angle; ++} ++ ++/*********************************************************** ++ * Name: inc_and_clip_distance ++ * ++ * Arguments: ++ * GLfloat distance current distance ++ * GLfloat distance_inc distance increment ++ * ++ * Description: Increments or decrements distance by distance_inc units ++ * Clips to range ++ * ++ * Returns: new value of angle ++ * ++ ***********************************************************/ ++static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc) ++{ ++ distance += distance_inc; ++ ++ if (distance >= 120.0f) ++ distance = 120.f; ++ else if (distance <= 40.0f) ++ distance = 40.0f; ++ ++ return distance; ++} ++ ++static pid_t get_server_pid(CUBE_STATE_T *state) ++{ ++ struct ucred ucred; ++ socklen_t len; ++ int fd; ++ ++ fd = wl_display_get_fd(state->wl_display); ++ len = sizeof ucred; ++ getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len); ++ ++ return ucred.pid; ++} ++ ++static void ++frame(void *data, struct wl_callback *callback, uint32_t time) ++{ ++ CUBE_STATE_T *state = (CUBE_STATE_T *) data; ++ ++ state->needs_update = 1; ++} ++ ++static const struct wl_callback_listener frame_listener = { ++ frame ++}; ++ ++static void ++update(CUBE_STATE_T *state) ++{ ++ if (!state->single_frame || state->ellapsed_frames == 0) { ++ update_model(state); ++ redraw_scene(state); ++ } ++ ++ state->wl_callback = wl_surface_frame(state->wl_surface); ++ wl_callback_add_listener(state->wl_callback, &frame_listener, state); ++ ++ if (state->ellapsed_frames == 100) { ++ if (state->kill_compositor) { ++ fprintf(stderr, "reached frame 100, killing compositor\n"); ++ pid_t pid = get_server_pid(state); ++ kill(pid, SIGTERM); ++ } else if (state->terminate_abruptly) { ++ fprintf(stderr, "reached frame 100, terminating right away\n"); ++ exit_func(state); ++ exit(0); ++ } ++ } ++ ++ if (!state->single_frame || state->ellapsed_frames == 0) ++ eglSwapBuffers(state->display, state->surface); ++ else { ++ wl_surface_damage(state->wl_surface, 0, 0, state->screen_width, ++ state->screen_height); ++ wl_surface_commit(state->wl_surface); ++ } ++ ++ state->ellapsed_frames++; ++} ++ ++/*********************************************************** ++ * Name: redraw_scene ++ * ++ * Arguments: ++ * CUBE_STATE_T *state - holds OGLES model info ++ * ++ * Description: Draws the model and calls eglSwapBuffers ++ * to render to screen ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void redraw_scene(CUBE_STATE_T *state) ++{ ++ // Start with a clear screen ++ glClear( GL_COLOR_BUFFER_BIT ); ++ ++ // Draw first (front) face: ++ // Bind texture surface to current vertices ++ glBindTexture(GL_TEXTURE_2D, state->tex[0]); ++ ++ // Need to rotate textures - do this by rotating each cube face ++ glRotatef(270.f, 0.f, 0.f, 1.f ); // front face normal along z axis ++ ++ // draw first 4 vertices ++ glDrawArrays( GL_TRIANGLE_STRIP, 0, 4); ++ ++ // same pattern for other 5 faces - rotation chosen to make image orientation 'nice' ++ glBindTexture(GL_TEXTURE_2D, state->tex[1]); ++ glRotatef(90.f, 0.f, 0.f, 1.f ); // back face normal along z axis ++ glDrawArrays( GL_TRIANGLE_STRIP, 4, 4); ++ ++ glBindTexture(GL_TEXTURE_2D, state->tex[2]); ++ glRotatef(90.f, 1.f, 0.f, 0.f ); // left face normal along x axis ++ glDrawArrays( GL_TRIANGLE_STRIP, 8, 4); ++ ++ glBindTexture(GL_TEXTURE_2D, state->tex[3]); ++ glRotatef(90.f, 1.f, 0.f, 0.f ); // right face normal along x axis ++ glDrawArrays( GL_TRIANGLE_STRIP, 12, 4); ++ ++ glBindTexture(GL_TEXTURE_2D, state->tex[4]); ++ glRotatef(270.f, 0.f, 1.f, 0.f ); // top face normal along y axis ++ glDrawArrays( GL_TRIANGLE_STRIP, 16, 4); ++ ++ glBindTexture(GL_TEXTURE_2D, state->tex[5]); ++ glRotatef(90.f, 0.f, 1.f, 0.f ); // bottom face normal along y axis ++ glDrawArrays( GL_TRIANGLE_STRIP, 20, 4); ++} ++ ++/*********************************************************** ++ * Name: init_textures ++ * ++ * Arguments: ++ * CUBE_STATE_T *state - holds OGLES model info ++ * ++ * Description: Initialise OGL|ES texture surfaces to use image ++ * buffers ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void init_textures(CUBE_STATE_T *state) ++{ ++ // load three texture buffers but use them on six OGL|ES texture surfaces ++ load_tex_images(state); ++ glGenTextures(6, &state->tex[0]); ++ ++ // setup first texture ++ glBindTexture(GL_TEXTURE_2D, state->tex[0]); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, ++ GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf1); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); ++ ++ // setup second texture - reuse first image ++ glBindTexture(GL_TEXTURE_2D, state->tex[1]); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, ++ GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf1); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); ++ ++ // third texture ++ glBindTexture(GL_TEXTURE_2D, state->tex[2]); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, ++ GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf2); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); ++ ++ // fourth texture - reuse second image ++ glBindTexture(GL_TEXTURE_2D, state->tex[3]); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, ++ GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf2); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); ++ ++ //fifth texture ++ glBindTexture(GL_TEXTURE_2D, state->tex[4]); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, ++ GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf3); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); ++ ++ // sixth texture - reuse third image ++ glBindTexture(GL_TEXTURE_2D, state->tex[5]); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, ++ GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf3); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); ++ ++ // setup overall texture environment ++ glTexCoordPointer(2, GL_FLOAT, 0, texCoords); ++ glEnableClientState(GL_TEXTURE_COORD_ARRAY); ++ ++ glEnable(GL_TEXTURE_2D); ++} ++ ++/*********************************************************** ++ * Name: load_tex_images ++ * ++ * Arguments: ++ * void ++ * ++ * Description: Loads three raw images to use as textures on faces ++ * ++ * Returns: void ++ * ++ ***********************************************************/ ++static void load_tex_images(CUBE_STATE_T *state) ++{ ++ FILE *tex_file1 = NULL, *tex_file2=NULL, *tex_file3 = NULL; ++ int bytes_read, image_sz = IMAGE_SIZE*IMAGE_SIZE*3; ++ ++ state->tex_buf1 = malloc(image_sz); ++ state->tex_buf2 = malloc(image_sz); ++ state->tex_buf3 = malloc(image_sz); ++ ++ tex_file1 = fopen(PATH "Lucca_128_128.raw", "rb"); ++ if (tex_file1 && state->tex_buf1) ++ { ++ bytes_read=fread(state->tex_buf1, 1, image_sz, tex_file1); ++ assert(bytes_read == image_sz); // some problem with file? ++ fclose(tex_file1); ++ } ++ ++ tex_file2 = fopen(PATH "Djenne_128_128.raw", "rb"); ++ if (tex_file2 && state->tex_buf2) ++ { ++ bytes_read=fread(state->tex_buf2, 1, image_sz, tex_file2); ++ assert(bytes_read == image_sz); // some problem with file? ++ fclose(tex_file2); ++ } ++ ++ tex_file3 = fopen(PATH "Gaudi_128_128.raw", "rb"); ++ if (tex_file3 && state->tex_buf3) ++ { ++ bytes_read=fread(state->tex_buf3, 1, image_sz, tex_file3); ++ assert(bytes_read == image_sz); // some problem with file? ++ fclose(tex_file3); ++ } ++} ++ ++//------------------------------------------------------------------------------ ++ ++static void exit_func(CUBE_STATE_T *state) ++{ ++ // clear screen ++ glClear( GL_COLOR_BUFFER_BIT ); ++ eglSwapBuffers(state->display, state->surface); ++ ++ // Release OpenGL resources ++ eglMakeCurrent( state->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); ++ ++ wl_egl_window_destroy(state->wl_egl_window); ++ wl_shell_surface_destroy(state->wl_shell_surface); ++ wl_surface_destroy(state->wl_surface); ++ ++ eglDestroySurface( state->display, state->surface ); ++ eglDestroyContext( state->display, state->context ); ++ eglTerminate( state->display ); ++ ++ wl_display_flush(state->wl_display); ++ ++ // release texture buffers ++ free(state->tex_buf1); ++ free(state->tex_buf2); ++ free(state->tex_buf3); ++ ++ printf("\ncube closed\n"); ++} // exit_func() ++ ++static int running = 1; ++ ++static void ++signal_int(int signum) ++{ ++ running = 0; ++} ++ ++//============================================================================== ++ ++int main (int argc, char *argv[]) ++{ ++ struct sigaction sigint; ++ CUBE_STATE_T state = {0,}; ++ int ret = 0; ++ int i; ++ ++ for (i = 0; i < argc; i++) { ++ if (strcmp(argv[i], "--kill-compositor") == 0) ++ state.kill_compositor = 1; ++ if (strcmp(argv[i], "--single-frame") == 0) ++ state.single_frame = 1; ++ if (strcmp(argv[i], "--terminate-abruptly") == 0) ++ state.terminate_abruptly = 1; ++ else if (strcmp(argv[i], "--help") == 0 || ++ strcmp(argv[i], "-h") == 0) { ++ printf("Usage: hello_wayland.bin [OPTION]\n\n"); ++ printf("\t--kill-compositor\tkill the Wayland compositor after 100 frames\n"); ++ printf("\t-h, --help\t\tshow this text\n"); ++ printf("\t--single-frame\t\tupdate the display only once\n"); ++ printf("\t--terminate-abruptly\texit right after rendering the 100th frame\n"); ++ return 0; ++ } ++ } ++ ++ // Start OGLES ++ init_ogl(&state); ++ ++ // Setup the model world ++ init_model_proj(&state); ++ ++ // initialise the OGLES texture(s) ++ init_textures(&state); ++ ++ sigint.sa_handler = signal_int; ++ sigemptyset(&sigint.sa_mask); ++ sigint.sa_flags = SA_RESETHAND; ++ sigaction(SIGINT, &sigint, NULL); ++ ++ state.needs_update = 1; ++ while (running && ret != -1) { ++ if (state.needs_update) { ++ update(&state); ++ state.needs_update = 0; ++ } ++ ++ ret = wl_display_dispatch(state.wl_display); ++ } ++ ++ exit_func(&state); ++ ++ return 0; ++} ++ diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch new file mode 100644 index 0000000000000000000000000000000000000000..19608be2807faec6ef41b3e7b1f80fa8c85fa5de --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch @@ -0,0 +1,25 @@ +From 73e338f99f89bc85fe384759a385d95e904adb7f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 10 Aug 2015 02:38:27 -0700 +Subject: [PATCH] wayland-egl: Add bcm_host to dependencies + +It uses headers like vcos_platform_types.h but does not +depend on module which should add the required include paths +lets add the dependency on bcm_host module which should do it + +Signed-off-by: Khem Raj +--- + interface/khronos/wayland-egl/wayland-egl.pc.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in +index 8bafc15..fd259c9 100644 +--- a/interface/khronos/wayland-egl/wayland-egl.pc.in ++++ b/interface/khronos/wayland-egl/wayland-egl.pc.in +@@ -6,5 +6,6 @@ includedir=${prefix}/include + Name: wayland-egl + Description: VideoCore wayland-egl library + Version: @PROJECT_APIVER@ ++Requires: bcm_host + Libs: -L${libdir} -lwayland-egl + Cflags: -I${includedir} diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch new file mode 100644 index 0000000000000000000000000000000000000000..27723236fe6946be6f63a15e9a59ae901afdaba5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch @@ -0,0 +1,26 @@ +From 8e79662e7b396325bee3f310a9406c74110cc7f4 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sat, 24 Jan 2015 22:07:19 +0100 +Subject: [PATCH] interface: remove faulty assert() to make weston happy at + runtime + +This was removed after a discussion on IRC with the weston guys +('daniels' on irc.freenode.net/#wayland). + +Signed-off-by: "Yann E. MORIN" +--- + interface/vmcs_host/vc_vchi_dispmanx.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c +index eab146e..29e0dee 100755 +--- a/interface/vmcs_host/vc_vchi_dispmanx.c ++++ b/interface/vmcs_host/vc_vchi_dispmanx.c +@@ -1306,7 +1306,6 @@ static void *dispmanx_notify_func( void *arg ) { + // Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit. + vchi_service_release(dispmanx_client.notify_handle[0]); + if (dispmanx_client.update_callback ) { +- vcos_assert( dispmanx_client.pending_update_handle == handle); + dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param); + } + } else { diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch new file mode 100644 index 0000000000000000000000000000000000000000..5a1d8cf4aa8977ad9a51cc514ece296cbffeca49 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch @@ -0,0 +1,30 @@ +From 22652fec1206eb6e5b3c05e2c4933feffce922e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 6 Feb 2016 11:10:47 -0800 +Subject: [PATCH] zero-out wl buffers in egl_surface_free + +origins from buildroot + +Signed-off-by: Khem Raj +--- + interface/khronos/egl/egl_client_surface.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c +index 42350bf..1f923d9 100644 +--- a/interface/khronos/egl/egl_client_surface.c ++++ b/interface/khronos/egl/egl_client_surface.c +@@ -690,11 +690,13 @@ void egl_surface_free(EGL_SURFACE_T *surface) + if (surface->back_wl_buffer) { + wl_buffer_destroy(surface->back_wl_buffer->wl_buffer); + free(surface->back_wl_buffer); ++ surface->back_wl_buffer = 0; + } + + if (surface->front_wl_buffer) { + wl_buffer_destroy(surface->front_wl_buffer->wl_buffer); + free(surface->front_wl_buffer); ++ surface->front_wl_buffer = 0; + } + #endif + } diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch new file mode 100644 index 0000000000000000000000000000000000000000..bae39e1441b1c96ed791e3e033e2a76ed2af1c76 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch @@ -0,0 +1,31 @@ +From 5c0fb637f8b1286da19b904c7be1692a4aa61244 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 6 Feb 2016 11:11:41 -0800 +Subject: [PATCH] initialize front back wayland buffers + +origins from metrological wayland support + +Signed-off-by: Khem Raj +--- + interface/khronos/egl/egl_client_surface.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c +index 1f923d9..9a9582c 100644 +--- a/interface/khronos/egl/egl_client_surface.c ++++ b/interface/khronos/egl/egl_client_surface.c +@@ -401,11 +401,14 @@ EGL_SURFACE_T *egl_surface_create( + #ifdef BUILD_WAYLAND + if (type == WINDOW && wl_display) { + surface->wl_egl_window = (struct wl_egl_window*)win; ++ surface->front_wl_buffer = NULL; + surface->back_wl_buffer = allocate_wl_buffer( + surface->wl_egl_window, color); + resource = surface->back_wl_buffer->resource; + } else { + surface->wl_egl_window = NULL; ++ surface->front_wl_buffer = NULL; ++ surface->back_wl_buffer = NULL; + resource = DISPMANX_NO_HANDLE; + } + #endif diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c15009515c380ce816642408f02e1ffa25ec3d7 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch @@ -0,0 +1,24 @@ +From 18839d288b60aa3592ba5a3ac4ac44eb8328a793 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 6 Feb 2016 11:09:18 -0800 +Subject: [PATCH] Remove RPC_FLUSH + +Origins from buildroot + +Signed-off-by: Khem Raj +--- + interface/khronos/ext/gl_oes_egl_image_client.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/interface/khronos/ext/gl_oes_egl_image_client.c b/interface/khronos/ext/gl_oes_egl_image_client.c +index f9b7287..b04ffef 100644 +--- a/interface/khronos/ext/gl_oes_egl_image_client.c ++++ b/interface/khronos/ext/gl_oes_egl_image_client.c +@@ -107,7 +107,6 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageO + GLEGLIMAGETARGETTEXTURE2DOES_ID, + RPC_ENUM(target), + RPC_EGLID(image)); +- RPC_FLUSH(thread); + #if EGL_BRCM_global_image + } + #endif diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch new file mode 100644 index 0000000000000000000000000000000000000000..7d28453ada681c4197bd7061d58c16563fa0798f --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch @@ -0,0 +1,75 @@ +From f324e2724973aa76d054c3662d5d0903fd405390 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 6 Feb 2016 13:12:47 -0800 +Subject: [PATCH] fix cmake dependency race + +Fixes errors like + +/a/builder/mnt/build-oe/tmp-glibc/work/raspberrypi2-oe-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_vchi_dispmanx.h:72:66: +fatal error: interface/vmcs_host/wayland-dispmanx-server-protocol.h: No +such file or directory +compilation terminated. +interface/khronos/CMakeFiles/EGL_static.dir/build.make:773: recipe for +target 'interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o' +failed +make[2]: *** +[interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o] Error 1 + +Signed-off-by: Khem Raj +--- + interface/vcos/pthreads/CMakeLists.txt | 8 ++++++++ + interface/vmcs_host/CMakeLists.txt | 8 -------- + interface/vmcs_host/vc_vchi_dispmanx.h | 2 +- + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt +index 1d81ca3..d6cd415 100644 +--- a/interface/vcos/pthreads/CMakeLists.txt ++++ b/interface/vcos/pthreads/CMakeLists.txt +@@ -33,6 +33,14 @@ set (SOURCES + ../generic/vcos_generic_blockpool.c + ) + ++if (BUILD_WAYLAND) ++wayland_add_protocol_server( ++ SOURCES ++ ../../../interface/wayland/dispmanx.xml ++ dispmanx ++) ++endif () ++ + if (VCOS_PTHREADS_BUILD_SHARED) + add_library (vcos SHARED ${SOURCES}) + target_link_libraries (vcos pthread dl rt) +diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt +index 552312a..775742d 100755 +--- a/interface/vmcs_host/CMakeLists.txt ++++ b/interface/vmcs_host/CMakeLists.txt +@@ -15,14 +15,6 @@ set(VCHOSTIF_SOURCE + # ${VMCS_TARGET}/vmcs_main.c + # vc_vchi_haud.c + +-if (BUILD_WAYLAND) +-wayland_add_protocol_server( +- VCHOSTIF_SOURCE +- ../../interface/wayland/dispmanx.xml +- dispmanx +-) +-endif () +- + add_library(vchostif ${VCHOSTIF_SOURCE}) + + #add_library(bufman vc_vchi_bufman.c ) +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h +index f0bae30..8c44c58 100644 +--- a/interface/vmcs_host/vc_vchi_dispmanx.h ++++ b/interface/vmcs_host/vc_vchi_dispmanx.h +@@ -69,7 +69,7 @@ typedef struct { + #ifdef BUILD_WAYLAND + /* XXX: This should be in a private header that can be included from EGL and vc_* */ + #include +-#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h" ++#include "interface/vcos/pthreads/wayland-dispmanx-server-protocol.h" + struct wl_dispmanx_server_buffer { + struct wl_resource *resource; + struct wl_dispmanx *dispmanx; diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch new file mode 100644 index 0000000000000000000000000000000000000000..b6a4c589ed6f6df88c54a1859dd1bc9a76dfa971 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch @@ -0,0 +1,57 @@ +From 09de2ce12ed8a879cc822cd20c5f2756d030808a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 29 Mar 2016 20:38:30 -0700 +Subject: [PATCH] Fix for framerate with nested composition + +frame rate appears irregular and lower than expected when using nested composition. + +Signed-off-by: Khem Raj +--- + interface/khronos/egl/egl_client.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c +index 03fe67b..13a110c 100644 +--- a/interface/khronos/egl/egl_client.c ++++ b/interface/khronos/egl/egl_client.c +@@ -2342,6 +2342,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + surface->back_wl_buffer = buffer; + } + ++ glFlush(); ++ glFinish(); ++ + RPC_CALL7(eglIntSwapBuffers_impl, + thread, + EGLINTSWAPBUFFERS_ID_V2, +@@ -2353,6 +2356,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + RPC_UINT(khrn_platform_get_window_position(surface->win)), + RPC_INT(surface->back_wl_buffer->resource)); + ++ RPC_FLUSH(thread); ++ + surface->front_wl_buffer->in_use = 1; + wl_surface_attach(wl_egl_window->wl_surface, + surface->front_wl_buffer->wl_buffer, +@@ -2360,11 +2365,13 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + wl_surface_damage(wl_egl_window->wl_surface, 0, 0, + surface->width, surface->height); + wl_surface_commit(wl_egl_window->wl_surface); ++ wl_display_flush(wl_display); + + while(ret != -1 && surface->back_wl_buffer->in_use) + ret = wl_display_dispatch_queue(wl_display, process->wl_queue); + } else + #endif ++ { + RPC_CALL6(eglIntSwapBuffers_impl, + thread, + EGLINTSWAPBUFFERS_ID, +@@ -2376,6 +2383,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + RPC_UINT(khrn_platform_get_window_position(surface->win))); + + RPC_FLUSH(thread); ++ } + + #ifdef ANDROID + CLIENT_UNLOCK(); diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch new file mode 100644 index 0000000000000000000000000000000000000000..0d8ccd15e5df9dc644a63f85c712ba52d6b8be92 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch @@ -0,0 +1,25 @@ +From 140df8cbf93fc3295f57bffeb254adeb0b17d3a0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 2 Apr 2016 10:37:24 -0700 +Subject: [PATCH] build shared library for vchostif + +Fixes #149 + +Signed-off-by: Khem Raj +--- + interface/vmcs_host/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt +index 775742d..76813c9 100755 +--- a/interface/vmcs_host/CMakeLists.txt ++++ b/interface/vmcs_host/CMakeLists.txt +@@ -15,7 +15,7 @@ set(VCHOSTIF_SOURCE + # ${VMCS_TARGET}/vmcs_main.c + # vc_vchi_haud.c + +-add_library(vchostif ${VCHOSTIF_SOURCE}) ++add_library(vchostif SHARED ${VCHOSTIF_SOURCE}) + + #add_library(bufman vc_vchi_bufman.c ) + set(INSTALL_TARGETS vchostif) diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch new file mode 100644 index 0000000000000000000000000000000000000000..e652cc2d582d82a1644061071d1c1b9c74448ba2 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch @@ -0,0 +1,89 @@ +From bdb5bbe994b91a7c64ca6103fbf2bbd590e6b8e5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 2 Apr 2016 10:54:59 -0700 +Subject: [PATCH] implement buffer wrapping interface for dispmanx + +Courtesy: Zan Dobersek + +Signed-off-by: Khem Raj +--- + interface/khronos/ext/egl_wayland.c | 42 +++++++++++++++++++++++++++++ + interface/wayland/dispmanx.xml | 10 +++++++ + 2 files changed, 52 insertions(+) + +diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c +index 5730743..9ef89cd 100644 +--- a/interface/khronos/ext/egl_wayland.c ++++ b/interface/khronos/ext/egl_wayland.c +@@ -133,8 +133,50 @@ dispmanx_create_buffer(struct wl_client *client, struct wl_resource *resource, + buffer->handle); + } + ++static void ++dispmanx_wrap_buffer(struct wl_client *client, struct wl_resource *resource, ++ uint32_t id, uint32_t handle, int32_t width, int32_t height, ++ uint32_t stride, uint32_t buffer_height, uint32_t format) ++{ ++ struct wl_dispmanx_server_buffer *buffer; ++ VC_IMAGE_TYPE_T vc_format = get_vc_format(format); ++ uint32_t dummy; ++ ++ if(vc_format == VC_IMAGE_MIN) { ++ wl_resource_post_error(resource, ++ WL_DISPMANX_ERROR_INVALID_FORMAT, ++ "invalid format"); ++ return; ++ } ++ ++ buffer = calloc(1, sizeof *buffer); ++ if (buffer == NULL) { ++ wl_resource_post_no_memory(resource); ++ return; ++ } ++ ++ buffer->handle = handle; ++ buffer->width = width; ++ buffer->height = height; ++ buffer->format = format; ++ ++ buffer->resource = wl_resource_create(resource->client, &wl_buffer_interface, ++ 1, id); ++ if (!buffer->resource) { ++ wl_resource_post_no_memory(resource); ++ vc_dispmanx_resource_delete(buffer->handle); ++ free(buffer); ++ return; ++ } ++ ++ wl_resource_set_implementation(buffer->resource, ++ (void (**)(void)) &dispmanx_buffer_interface, ++ buffer, destroy_buffer); ++} ++ + static const struct wl_dispmanx_interface dispmanx_interface = { + dispmanx_create_buffer, ++ dispmanx_wrap_buffer, + }; + + static void +diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml +index c18626d..11ed1ef 100644 +--- a/interface/wayland/dispmanx.xml ++++ b/interface/wayland/dispmanx.xml +@@ -118,6 +118,16 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch new file mode 100644 index 0000000000000000000000000000000000000000..b60928ab8c10c46139aadfb9a8266f128d518eb1 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch @@ -0,0 +1,87 @@ +From ffdcdf7605f4f266b408cf161e7c76dab54d689b Mon Sep 17 00:00:00 2001 +From: Jeff Wannamaker +Date: Thu, 19 Jan 2017 18:56:07 +0000 +Subject: [PATCH] Implement triple buffering for wayland + +Change from double to triple buffering for wayland. +This enables higher frame rates without tearing artifacts +by allowing both the glFinish and the buffer release +interlock to operate without pushing the frame period +to two vertical intervals + +Signed-off-by: Jeff Wannamaker +Signed-off-by: Khem Raj +--- + interface/khronos/egl/egl_client.c | 3 ++- + interface/khronos/egl/egl_client_surface.c | 8 ++++++++ + interface/khronos/egl/egl_client_surface.h | 11 +++++++++++ + 3 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c +index 13a110c..0380274 100644 +--- a/interface/khronos/egl/egl_client.c ++++ b/interface/khronos/egl/egl_client.c +@@ -2323,7 +2323,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) + + buffer_temp = surface->front_wl_buffer; + surface->front_wl_buffer = surface->back_wl_buffer; +- surface->back_wl_buffer = buffer_temp; ++ surface->back_wl_buffer = surface->middle_wl_buffer; ++ surface->middle_wl_buffer = buffer_temp; + + configid = egl_config_to_id(surface->config); + color = egl_config_get_color_format(configid); +diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c +index 9a9582c..10b3b04 100644 +--- a/interface/khronos/egl/egl_client_surface.c ++++ b/interface/khronos/egl/egl_client_surface.c +@@ -402,12 +402,14 @@ EGL_SURFACE_T *egl_surface_create( + if (type == WINDOW && wl_display) { + surface->wl_egl_window = (struct wl_egl_window*)win; + surface->front_wl_buffer = NULL; ++ surface->middle_wl_buffer = NULL; + surface->back_wl_buffer = allocate_wl_buffer( + surface->wl_egl_window, color); + resource = surface->back_wl_buffer->resource; + } else { + surface->wl_egl_window = NULL; + surface->front_wl_buffer = NULL; ++ surface->middle_wl_buffer = NULL; + surface->back_wl_buffer = NULL; + resource = DISPMANX_NO_HANDLE; + } +@@ -696,6 +698,12 @@ void egl_surface_free(EGL_SURFACE_T *surface) + surface->back_wl_buffer = 0; + } + ++ if (surface->middle_wl_buffer) { ++ wl_buffer_destroy(surface->middle_wl_buffer->wl_buffer); ++ free(surface->middle_wl_buffer); ++ surface->middle_wl_buffer = 0; ++ } ++ + if (surface->front_wl_buffer) { + wl_buffer_destroy(surface->front_wl_buffer->wl_buffer); + free(surface->front_wl_buffer); +diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h +index e328b77..58a3184 100644 +--- a/interface/khronos/egl/egl_client_surface.h ++++ b/interface/khronos/egl/egl_client_surface.h +@@ -312,6 +312,17 @@ typedef struct { + */ + struct wl_dispmanx_client_buffer *front_wl_buffer; + ++ /* ++ middle_wl_buffer ++ ++ Validity: ++ type == WINDOW ++ ++ Invariant: ++ client-side information about the wl_buffer in the middle ++ */ ++ struct wl_dispmanx_client_buffer *middle_wl_buffer; ++ + /* + back_wl_buffer + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch new file mode 100644 index 0000000000000000000000000000000000000000..7e637a0edaef5d3bc9631ba81e238cc25513f021 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch @@ -0,0 +1,32 @@ +From 4624c934d1a783968306e61ded4389c153e3d009 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 10 May 2017 06:39:34 +0000 +Subject: [PATCH] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT + +weston code uses these defines +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + interface/khronos/include/GLES2/gl2ext.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/interface/khronos/include/GLES2/gl2ext.h b/interface/khronos/include/GLES2/gl2ext.h +index 4eacf7f..b1acc9f 100644 +--- a/interface/khronos/include/GLES2/gl2ext.h ++++ b/interface/khronos/include/GLES2/gl2ext.h +@@ -327,6 +327,14 @@ typedef void* GLeglImageOES; + #define GL_RGBX_BRCM 0x80EE + #endif + ++#ifndef GL_EXT_texture_rg ++#define GL_EXT_texture_rg 1 ++#define GL_RED_EXT 0x1903 ++#define GL_RG_EXT 0x8227 ++#define GL_R8_EXT 0x8229 ++#define GL_RG8_EXT 0x822B ++#endif /* GL_EXT_texture_rg */ ++ + /* GL_EXT_texture_type_2_10_10_10_REV */ + #ifndef GL_EXT_texture_type_2_10_10_10_REV + #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c2e5bc8392ff818fb48c7938cb468b479717b61 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch @@ -0,0 +1,29 @@ +From 528a439539a77e67bf136d425eac3240ca6f1cd7 Mon Sep 17 00:00:00 2001 +From: Andrea Galbusera +Date: Fri, 14 Jul 2017 09:52:54 +0200 +Subject: [PATCH] EGL/glplatform.h: define EGL_CAST + +C++ / C typecast macros for special EGL handle values: used by libepoxy code +The definition comes from the updated version of this header in mesa. + +Upstream-Status: Pending +--- + interface/khronos/include/EGL/eglplatform.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/interface/khronos/include/EGL/eglplatform.h b/interface/khronos/include/EGL/eglplatform.h +index 1f7c930..c39d425 100644 +--- a/interface/khronos/include/EGL/eglplatform.h ++++ b/interface/khronos/include/EGL/eglplatform.h +@@ -202,4 +202,11 @@ EGLAPI void EGLAPIENTRY BEGL_GetDefaultDriverInterfaces(BEGL_DriverInterfaces *i + #include "interface/khronos/common/khrn_client_mangle.h" + #endif + ++/* C++ / C typecast macros for special EGL handle values */ ++#if defined(__cplusplus) ++#define EGL_CAST(type, value) (static_cast(value)) ++#else ++#define EGL_CAST(type, value) ((type) (value)) ++#endif ++ + #endif /* __eglplatform_h */ diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch new file mode 100644 index 0000000000000000000000000000000000000000..fa7984c331b5f6d7f7066f6372ff4a255219a6b9 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch @@ -0,0 +1,141 @@ +From c5969e5e5c50e2c9b32c6f945040a8e5763ba06c Mon Sep 17 00:00:00 2001 +From: Jeff Wannamaker +Date: Sat, 27 Jan 2018 12:28:31 -0500 +Subject: [PATCH] Allow multiple wayland compositor state data per process + +When eglBindWaylandDisplayWL is called store the wl_global +created in a list associated with the wayland display. +This allows multiple wayland compositor instances to be +created and used per process. This scenario is common for +applications integrating externl process UI elements +via embedded composition e.g. westeros + +Signed-off-by: Jeff Wannamaker +Signed-off-by: Khem Raj +--- + interface/khronos/common/khrn_client.c | 2 +- + interface/khronos/common/khrn_client.h | 11 +++++- + interface/khronos/ext/egl_wayland.c | 50 ++++++++++++++++++++++---- + 3 files changed, 55 insertions(+), 8 deletions(-) + +diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c +index d7e798e..60bdb63 100644 +--- a/interface/khronos/common/khrn_client.c ++++ b/interface/khronos/common/khrn_client.c +@@ -147,7 +147,7 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process) + { + if (!process->inited) { + #ifdef BUILD_WAYLAND +- process->wl_global = NULL; ++ process->wlStateMap = NULL; + #endif + + if (!khrn_pointer_map_init(&process->contexts, 64)) +diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h +index 615f7b4..4fa86f7 100644 +--- a/interface/khronos/common/khrn_client.h ++++ b/interface/khronos/common/khrn_client.h +@@ -170,6 +170,15 @@ static INLINE CLIENT_THREAD_STATE_T *CLIENT_GET_CHECK_THREAD_STATE(void) + return (CLIENT_THREAD_STATE_T *)platform_tls_get_check(client_tls); + } + ++#ifdef BUILD_WAYLAND ++typedef struct WAYLAND_STATE ++{ ++ struct WAYLAND_STATE *next; ++ struct wl_display *display; ++ struct wl_global *wl_global; ++} WAYLAND_STATE_T; ++#endif ++ + /* + per-process state + +@@ -318,7 +327,7 @@ struct CLIENT_PROCESS_STATE { + struct wl_event_queue *wl_queue; + + /* Compositor-side Wayland state */ +- struct wl_global *wl_global; ++ WAYLAND_STATE_T *wlStateMap; + #endif + }; + +diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c +index 9ef89cd..abd5ab3 100644 +--- a/interface/khronos/ext/egl_wayland.c ++++ b/interface/khronos/ext/egl_wayland.c +@@ -208,17 +208,38 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) + { + CLIENT_THREAD_STATE_T *thread; + CLIENT_PROCESS_STATE_T *process; ++ WAYLAND_STATE_T *stateIter; ++ WAYLAND_STATE_T *stateNew; ++ struct wl_global *wl_global; + + if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process)) + return EGL_FALSE; + +- if (process->wl_global != NULL) ++ stateIter= process->wlStateMap; ++ while( stateIter ) ++ { ++ if ( stateIter->display == display ) ++ goto error; ++ stateIter= stateIter->next; ++ } ++ ++ wl_global = wl_global_create(display, &wl_dispmanx_interface, 1, ++ NULL, bind_dispmanx); ++ if (wl_global == NULL) + goto error; + +- process->wl_global = wl_global_create(display, &wl_dispmanx_interface, 1, +- NULL, bind_dispmanx); +- if (process->wl_global == NULL) ++ stateNew= (WAYLAND_STATE_T*)calloc( 1, sizeof(WAYLAND_STATE_T)); ++ if (stateNew == NULL ) ++ { ++ wl_global_destroy(wl_global); + goto error; ++ } ++ ++ stateNew->next= process->wlStateMap; ++ stateNew->display= display; ++ stateNew->wl_global= wl_global; ++ process->wlStateMap= stateNew; ++ CLIENT_UNLOCK(); + + return EGL_TRUE; + +@@ -232,12 +253,29 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) + { + CLIENT_THREAD_STATE_T *thread; + CLIENT_PROCESS_STATE_T *process; ++ WAYLAND_STATE_T *stateIter; ++ WAYLAND_STATE_T *statePrev; + + if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process)) + return EGL_FALSE; + +- wl_global_destroy(process->wl_global); +- process->wl_global = NULL; ++ statePrev= NULL; ++ stateIter= process->wlStateMap; ++ while( stateIter ) ++ { ++ if ( stateIter->display == display ) ++ { ++ wl_global_destroy(stateIter->wl_global); ++ if ( statePrev ) ++ statePrev->next= stateIter->next; ++ else ++ process->wlStateMap= stateIter->next; ++ free( stateIter ); ++ break; ++ } ++ statePrev= stateIter; ++ stateIter= stateIter->next; ++ } + + CLIENT_UNLOCK(); + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch new file mode 100644 index 0000000000000000000000000000000000000000..97340d7ef1a7c7d5ea7a87aca6045634aa0ab3fd --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch @@ -0,0 +1,34 @@ +From 8091dac73f792fb000e7ec97de6be23cd84b7cb7 Mon Sep 17 00:00:00 2001 +From: Hugo Hromic +Date: Sun, 13 May 2018 10:49:04 +0100 +Subject: [PATCH] khronos: backport typedef for EGL_EXT_image_dma_buf_import + +The `gstreamer1.0-plugins-base` package version `1.14` uses `EGL_EXT_image_dma_buf_import`, which +expects the `EGLuint64KHR` typedef that is present in recent versions of Khronos. +However, the older version included in userland does not provide it. + +This patch backports the missing typedef from recent Khronos into userland. +See: + +Submitted to userland in + +Upstream-Status: Submitted +--- + interface/khronos/include/EGL/eglext.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h +index d7e5ba7..dcc90ce 100755 +--- a/interface/khronos/include/EGL/eglext.h ++++ b/interface/khronos/include/EGL/eglext.h +@@ -190,6 +190,10 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSy + typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); + #endif + ++#ifndef EGL_KHR_uint64_typedef ++#define EGL_KHR_uint64_typedef 1 ++typedef khronos_uint64_t EGLuint64KHR; ++#endif /* EGL_KHR_uint64_typedef */ + + #ifndef EGL_WL_bind_wayland_display + #define EGL_WL_bind_wayland_display 1 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch new file mode 100644 index 0000000000000000000000000000000000000000..88434893ee07cdfdaa3c921c8bc80607546c4d2a --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch @@ -0,0 +1,32 @@ +From 214f1895db14e3a88d5b2b3b6c844af3890e2eba Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 15 Jul 2018 00:48:38 -0700 +Subject: [PATCH] Add EGL_IMG_context_priority related defines + +These defines are needed for compiling weston 4.x +taken from Khronos headers + +Signed-off-by: Khem Raj +--- + interface/khronos/include/EGL/eglext.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h +index dcc90ce..6842bf9 100755 +--- a/interface/khronos/include/EGL/eglext.h ++++ b/interface/khronos/include/EGL/eglext.h +@@ -93,6 +93,14 @@ typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGL + typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); + #endif + ++#ifndef EGL_IMG_context_priority ++#define EGL_IMG_context_priority 1 ++#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3102 ++#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 ++#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 ++#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 ++#endif /* EGL_IMG_context_priority */ ++ + #ifndef EGL_KHR_vg_parent_image + #define EGL_KHR_vg_parent_image 1 + #define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch new file mode 100644 index 0000000000000000000000000000000000000000..841341e033c0f907af5979f4be08c855c028eab2 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch @@ -0,0 +1,28 @@ +From bcdc525b2e4403f9e878e93cbd0d146ce9e37bb8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 25 Jul 2019 23:30:27 -0700 +Subject: [PATCH] libfdt: Undefine __wordsize if already defined + +glibc 2.30+ defines __wordsize, which is same so its easier to compile +for multiple versions of glibc even ones which does not have this define + +Signed-off-by: Khem Raj +--- + opensrc/helpers/libfdt/libfdt_env.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/opensrc/helpers/libfdt/libfdt_env.h b/opensrc/helpers/libfdt/libfdt_env.h +index f4608be..5e83a27 100644 +--- a/opensrc/helpers/libfdt/libfdt_env.h ++++ b/opensrc/helpers/libfdt/libfdt_env.h +@@ -18,6 +18,10 @@ + #include + #include + ++#ifdef __bitwise ++#undef __bitwise ++#endif ++ + #ifdef __CHECKER__ + #define FDT_FORCE __attribute__((force)) + #define FDT_BITWISE __attribute__((bitwise)) diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch new file mode 100644 index 0000000000000000000000000000000000000000..65fc5eb5ef1eb9aea117466e77a4771ecd6f4e0d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch @@ -0,0 +1,40 @@ +From 372b3b75945300604c9b7b012ecb25c0548a1495 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 13 Jun 2018 18:22:22 +0000 +Subject: [PATCH] openmaxil: add pkg-config file + +--- + CMakeLists.txt | 2 +- + pkgconfig/openmaxil.pc.in | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + create mode 100644 pkgconfig/openmaxil.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80337b2..3e3c90e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,7 +133,7 @@ include_directories("${PROJECT_BINARY_DIR}") + include(FindPkgConfig QUIET) + if(PKG_CONFIG_FOUND) + # Produce a pkg-config file +- foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc) ++ foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc openmaxil.pc) + configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +diff --git a/pkgconfig/openmaxil.pc.in b/pkgconfig/openmaxil.pc.in +new file mode 100644 +index 0000000..8793a61 +--- /dev/null ++++ b/pkgconfig/openmaxil.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: openmaxil ++Description: Broadcom openmaxil library ++Version: 1 ++Libs: -L${libdir} -lopenmaxil -lvcos -lvchiq_arm -pthread ++Cflags: -I${includedir} -I${includedir}/IL -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..43f9f29cd6ad1c67c1f7713f14bd0e90fb51fd43 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch @@ -0,0 +1,34 @@ +From d08003ab30452b4268121bcf82e03fdf21c89cdd Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 31 Mar 2020 11:51:02 -0700 +Subject: [PATCH] cmake: Disable format-overflow warning as error + +gcc10 complains about a check which could potentially be null + +build/inc/interface/vcos/vcos_logging.h:234:88: error: '%s' directive argument is null [-Werror=format-overflow=] + 234 | # define _VCOS_LOG_X(cat, _level, fmt...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat,_level,fmt); } while (0) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A potential fix would be to check for fmt not being null but lets leave +that to experts + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt +index 2f4beb9..7a4ab06 100644 +--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt ++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt +@@ -3,7 +3,7 @@ if (WIN32) + set(VCOS_PLATFORM win32) + else () + set(VCOS_PLATFORM pthreads) +- add_definitions(-Wall -Werror) ++ add_definitions(-Wall -Werror -Wno-error=format-overflow) + endif () + + # set this as we want all the source of vchostif to be available in libbcm_host diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch new file mode 100644 index 0000000000000000000000000000000000000000..595eefb3cc1d9c27c16d5346b620bd0025d56172 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch @@ -0,0 +1,30 @@ +From 451e8458e45926e4e1c0433864ac4cf8b05d792b Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 27 Nov 2020 03:12:26 -0500 +Subject: [PATCH] all host_applications: remove non-existent projects + +The ALL_APPS symbol will optionally build an additional set of projects, +however, several of them don't exist anymore. Remove them from the list of +ALL_APPS. + +Upstream-status: submitted [https://github.com/raspberrypi/userland/pull/661] +Signed-off-by: Trevor Woerner +--- + host_applications/linux/CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt +index 928b637..554ae46 100644 +--- a/host_applications/linux/CMakeLists.txt ++++ b/host_applications/linux/CMakeLists.txt +@@ -14,10 +14,6 @@ add_subdirectory(apps/dtoverlay) + add_subdirectory(apps/dtmerge) + + if(ALL_APPS) +- add_subdirectory(apps/vcdbg) +- add_subdirectory(libs/elftoolchain) +- # add_subdirectory(apps/smct) +- add_subdirectory(apps/edid_parser) + add_subdirectory(apps/hello_pi) + endif() + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch new file mode 100644 index 0000000000000000000000000000000000000000..642ee86c54ec468a913fc27d83fe83380cc5a95a --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch @@ -0,0 +1,28 @@ +From 5f4324a0008c2e8e1f511432f98bf85c9fffd35c Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 27 Nov 2020 03:18:50 -0500 +Subject: [PATCH] hello_pi: optionally build wayland-specific app + +Only build the wayland-specific hello_pi app when building for wayland. + +Upstream-status: inappropriate [the wayland example is not part of upstream] +Signed-off-by: Trevor Woerner +--- + host_applications/linux/apps/hello_pi/CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt +index 2849fad..7de3265 100644 +--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt ++++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt +@@ -25,7 +25,9 @@ add_subdirectory(hello_encode) + add_subdirectory(hello_jpeg) + add_subdirectory(hello_videocube) + add_subdirectory(hello_teapot) +-add_subdirectory(hello_wayland) ++if (BUILD_WAYLAND) ++ add_subdirectory(hello_wayland) ++endif() + + if(BUILD_FONT) + set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c) diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..ec74cc22057cfe176943e652677d561a3bbf374c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch @@ -0,0 +1,38 @@ +From 4a3e515d3ea7ff0fc4063b9677b056af4ee7a3f6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Dec 2020 14:28:01 -0800 +Subject: [PATCH] userland: Sync needed defines for weston build + +eglext.h from userland is not sufficient to compile latest weston, +therefore import needed defines and typedefs from latest mesa + +Signed-off-by: Khem Raj +--- + interface/khronos/include/EGL/eglext.h | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h +index 6842bf9..7118e92 100755 +--- a/interface/khronos/include/EGL/eglext.h ++++ b/interface/khronos/include/EGL/eglext.h +@@ -225,6 +225,20 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st + + #endif + ++typedef void* EGLSyncKHR; ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); ++typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); ++#ifndef EGL_ANDROID_native_fence_sync ++#define EGL_ANDROID_native_fence_sync 1 ++#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 ++#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 ++#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 ++#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 ++typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync); ++#endif ++#endif /* EGL_ANDROID_native_fence_sync */ + + #ifdef __cplusplus + } diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb b/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..6fdedd32fd0e927daf6020ee289e37a028afc130 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb @@ -0,0 +1,108 @@ +DESCRIPTION = "This repository contains the source code for the ARM side \ +libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \ +and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\ +vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196" + +PROVIDES += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "virtual/libgles2 virtual/egl", d)}" +PROVIDES += "virtual/libomxil" + +RPROVIDES_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "libgles2 egl libegl libegl1 libglesv2-2", d)}" +COMPATIBLE_MACHINE = "^rpi$" + +SRCBRANCH = "master" +SRCFORK = "raspberrypi" +SRCREV = "3fd8527eefd8790b4e8393458efc5f94eb21a615" + +# Use the date of the above commit as the package version. Update this when +# SRCREV is changed. +PV = "20210319" + +SRC_URI = "\ + git://github.com/${SRCFORK}/userland.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-Allow-applications-to-set-next-resource-handle.patch \ + file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \ + file://0003-wayland-Add-Wayland-example.patch \ + file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \ + file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \ + file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \ + file://0007-initialize-front-back-wayland-buffers.patch \ + file://0008-Remove-RPC_FLUSH.patch \ + file://0009-fix-cmake-dependency-race.patch \ + file://0010-Fix-for-framerate-with-nested-composition.patch \ + file://0011-build-shared-library-for-vchostif.patch \ + file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \ + file://0013-Implement-triple-buffering-for-wayland.patch \ + file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \ + file://0015-EGL-glplatform.h-define-EGL_CAST.patch \ + file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \ + file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \ + file://0018-Add-EGL_IMG_context_priority-related-defines.patch \ + file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \ + file://0020-openmaxil-add-pkg-config-file.patch \ + file://0021-cmake-Disable-format-overflow-warning-as-error.patch \ + file://0022-all-host_applications-remove-non-existent-projects.patch \ + file://0023-hello_pi-optionally-build-wayland-specific-app.patch \ + file://0024-userland-Sync-needed-defines-for-weston-build.patch \ +" + +SRC_URI_remove_toolchain-clang = "file://0021-cmake-Disable-format-overflow-warning-as-error.patch" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +ASNEEDED = "" + +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \ + -DVMCS_INSTALL_PREFIX=${exec_prefix} \ +" + +EXTRA_OECMAKE_append_aarch64 = " -DARM64=ON " + + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" + +PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland" +PACKAGECONFIG[allapps] = "-DALL_APPS=true,,," + +CFLAGS_append = " -fPIC" + +do_install_append () { + for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do + sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f} + sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f} + sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f} + done + rm -rf ${D}${prefix}${sysconfdir} + if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then + rm -rf ${D}${libdir}/libEGL* + rm -rf ${D}${libdir}/libGLES* + rm -rf ${D}${libdir}/libwayland-* + rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc \ + ${D}${libdir}/pkgconfig/wayland-egl.pc + rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR + else + ln -sf brcmglesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc + ln -sf brcmegl.pc ${D}${libdir}/pkgconfig/egl.pc + ln -sf brcmvg.pc ${D}${libdir}/pkgconfig/vg.pc + fi +} + +# Shared libs from userland package build aren't versioned, so we need +# to force the .so files into the runtime package (and keep them +# out of -dev package). +FILES_SOLIBSDEV = "" +INSANE_SKIP_${PN} += "dev-so" + +FILES_${PN} += " \ + ${libdir}/*.so \ + ${libdir}/plugins" +FILES_${PN}-dev += "${includedir} \ + ${prefix}/src" +FILES_${PN}-doc += "${datadir}/install" +FILES_${PN}-dbg += "${libdir}/plugins/.debug" + +RDEPENDS_${PN} += "bash" +RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/files/egl.pc b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/files/egl.pc new file mode 100644 index 0000000000000000000000000000000000000000..c3142022c0c50106882a31c0f84ec3fdfeda563b --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/files/egl.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: egl for RaspberryPI +Version: 0.0 +Libs: -L${libdir} -lEGL -lGLESv2 +Cflags: -I${includedir}/vc -I${includedir}/interface -I${includedir}/interface/vcos -I${includedir}/interface/vcos/pthreads diff --git a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/files/vchiq.sh b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/files/vchiq.sh new file mode 100644 index 0000000000000000000000000000000000000000..c73e3a9c6b31d0258a5a1b51b2ae401db4ef7973 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/files/vchiq.sh @@ -0,0 +1,24 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: vchiq.sh +# Required-Start: $remote_fs rmnologin +# Required-Stop: +# Default-Start: S +# Default-Stop: +# Short-Description: Create /dev/vchiq. +# Description: Get the major number from /proc/devices and use it +# ti create /dev/vchiq +### END INIT INFO + +rm -f /dev/vchiq + +#Get the major number +major=$(awk "\$2==\"vchiq\" {print \$1}" /proc/devices) + +if [ -z "$major" ]; then + echo "Error: Cannot find vchiq in /proc/devices" + exit 2 +else + mknod /dev/vchiq c "$major" 0 + chmod a+w /dev/vchiq +fi diff --git a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb new file mode 100644 index 0000000000000000000000000000000000000000..0db71fdb0ceaeaaf387ff3ab72d6b0833206b298 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb @@ -0,0 +1,6 @@ +CONFLICTS = "vc-graphics" + +VCDIR = "hardfp/opt/vc" +require vc-graphics.inc + +PR = "${INCPR}.0" diff --git a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.bb b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.bb new file mode 100644 index 0000000000000000000000000000000000000000..a1bce567b32d81696398df303f9e8287bbe40aa4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.bb @@ -0,0 +1,6 @@ +CONFLICTS = "vc-graphics-hardfp" + +VCDIR = "opt/vc" +require vc-graphics.inc + +PR = "${INCPR}.0" diff --git a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc new file mode 100644 index 0000000000000000000000000000000000000000..540e289548719ddf85e3bc554c8ca8658379ca03 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc @@ -0,0 +1,54 @@ +DESCRIPTION = "Graphics libraries for BCM2835." +LICENSE = "Broadcom-RPi" + +LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" + +PROVIDES = "virtual/libgles2 virtual/egl" +COMPATIBLE_MACHINE = "^rpi$" + +INHIBIT_DEFAULT_DEPS = "1" + +include recipes-bsp/common/raspberrypi-firmware.inc + +SRC_URI += " \ + file://egl.pc \ + file://vchiq.sh \ +" + +S = "${RPIFW_S}/${VCDIR}" + +INCPR = "r1" + +inherit pkgconfig update-rc.d + +do_install () { + install -d ${D}${bindir} + cp -R bin/* ${D}${bindir} + + install -d ${D}${libdir} + # note: -H option to deref symlinked .so + cp -R -H lib/* ${D}${libdir} + + install -d ${D}${includedir} + cp -R include/* ${D}${includedir} + + install -d ${D}${libdir}/pkgconfig + install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/ + + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/vchiq.sh ${D}${sysconfdir}/init.d/ +} + +# These are proprietary binaries generated elsewhere so don't check ldflags +INSANE_SKIP_${PN} = "ldflags" + +INITSCRIPT_NAME = "vchiq.sh" +INITSCRIPT_PARAMS = "start 03 S ." + +FILES_${PN} = "${bindir}/* \ + ${libdir}/lib*.so \ + ${sysconfdir}/init.d \ + ${libdir}/plugins" +FILES_${PN}-dev = "${libdir}/pkgconfig \ + ${includedir}" +FILES_${PN}-dbg += "${libdir}/plugins/.debug" diff --git a/bsp/meta-raspberrypi/recipes-graphics/wayland/wayland_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/wayland/wayland_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e5bbf4aaabba4eacbc73137af3132bb1f2fd0e4e --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/wayland/wayland_%.bbappend @@ -0,0 +1,7 @@ +# until fully tested, prefer `libwayland-egl` provided by `userland` instead of `wayland` when not using vc4graphics +do_install_append_rpi () { + if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "0" ]; then + rm -f ${D}${libdir}/libwayland-egl* + rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc + fi +} diff --git a/bsp/meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..55cf7007b006699e8e75c6837e49329b68a1e896 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,10 @@ +PACKAGECONFIG_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'fbdev', '', d)}" + +EXTRA_OECONF_append_rpi = " \ + --disable-xwayland-test \ + --disable-simple-egl-clients \ + ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' \ + --disable-resize-optimization \ + --disable-setuid-install \ + ', d)} \ +" diff --git a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf new file mode 100644 index 0000000000000000000000000000000000000000..6fd52985fb620aacecaacdc36096b802d1efaaa8 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf @@ -0,0 +1,6 @@ +# Initial xorg.conf for the RaspberryPi +# Most things are setup automatically by magic pixies in the system. +# +# It is suggested this file is not used any more and configuration +# snippets are placed in xorg.conf.d instead. +# diff --git a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf new file mode 100644 index 0000000000000000000000000000000000000000..0d2b36b2e4b9eacfd46514cf2380c3d7c3fbc949 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf @@ -0,0 +1,5 @@ +Section "Device" + Identifier "Adafruit PiTFT" + Driver "fbdev" + Option "fbdev" "/dev/fb1" +EndSection diff --git a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf new file mode 100644 index 0000000000000000000000000000000000000000..f8b578c015d92f8f7e032800b4c75a34466171b3 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "stmpe-ts" + Option "Calibration" "3800 200 200 3800" + Option "SwapAxes" "1" +EndSection diff --git a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..71e0adcd4f3b6a464aacaaa7240106f7d09275ad --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -0,0 +1,16 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rpi = " \ + file://xorg.conf.d/98-pitft.conf \ + file://xorg.conf.d/99-calibration.conf \ +" +do_install_append_rpi () { + PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" + if [ "${PITFT}" = "1" ]; then + install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ + fi +} + +FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*" diff --git a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..9574fa5b8a99386cfc306947b867a9ab86540fa8 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -0,0 +1,5 @@ +OPENGL_PKGCONFIGS_rpi = "dri glx ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'dri3 xshmfence glamor', '', d)}" + +# when using userland graphic KHR/khrplatform.h is provided by userland but virtual/libgl is provided by mesa-gl where +# we explicitly delete KHR/khrplatform.h since its already coming from userland package +DEPENDS_append_rpi = " ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'userland', d)}" diff --git a/bsp/meta-raspberrypi/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb b/bsp/meta-raspberrypi/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..450206c361dfe9b25d2c3e7924060cf075d5c7bd --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb @@ -0,0 +1,100 @@ +SUMMARY = "Linux kernel Bluetooth firmware files from Raspbian distribution" +DESCRIPTION = "Updated Bluetooth firmware files for RaspberryPi hardware. \ +RPi-Distro obtains these directly from Cypress; they are not submitted \ +to linux-firmware for general use." +HOMEPAGE = "https://github.com/RPi-Distro/bluez-firmware" +SECTION = "kernel" + +# Upstream has provided[^1] licensing information in the Debian +# copyright file. The wording of the Cypress license subsequently +# changed in linux-firmware. +# +# Rather than make assumptions about what's supposed to be what, we'll +# use the license implied by the source of these files, named to avoid +# conflicts with linux-firmware. +# +# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 +LICENSE = "Firmware-cypress-rpidistro" +LIC_FILES_CHKSUM = "\ + file://LICENCE.cypress-rpidistro;md5=c5d12ae0b24ef7177902a8e288751a4e \ +" + +# These are not common licenses, set NO_GENERIC_LICENSE for them +# so that the license files will be copied from fetched source +NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro" + +SRC_URI = "git://github.com/RPi-Distro/bluez-firmware;branch=master;protocol=https" +SRCREV = "e7fd166981ab4bb9a36c2d1500205a078a35714d" +PV = "1.2-4+rpt8" + +S = "${WORKDIR}/git" + +inherit allarch + +CLEANBROKEN = "1" + +do_extract_lic() { + # Extract the license from the Debian copyright file + sed -e '1,23d' ${S}/debian/copyright > ${S}/LICENCE.cypress-rpidistro +} +# Must be before both do_install and do_populate_lic. Putting it before +# their common ancestor works; other approaches do not. +addtask extract_lic after do_unpack before do_patch + +do_compile() { + : +} + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/brcm + + cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware + install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/ +} + +PACKAGES = "\ + ${PN}-cypress-license \ + ${PN}-bcm43430a1-hcd \ + ${PN}-bcm43430b0-hcd \ + ${PN}-bcm4345c0-hcd \ + ${PN}-bcm4345c5-hcd \ +" + +LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro" +LICENSE_${PN}-bcm43430b0-hcd = "Firmware-cypress-rpidistro" +LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro" +LICENSE_${PN}-bcm4345c5-hcd = "Firmware-cypress-rpidistro" +LICENSE_${PN}-cypress-license = "Firmware-cypress-rpidistro" + +FILES_${PN}-cypress-license = "\ + ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \ +" +FILES_${PN}-bcm43430a1-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \ +" +FILES_${PN}-bcm43430b0-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM43430B0.hcd \ +" +FILES_${PN}-bcm4345c0-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \ +" +FILES_${PN}-bcm4345c5-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM4345C5.hcd \ +" + +RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license" +RDEPENDS_${PN}-bcm43430b0-hcd += "${PN}-cypress-license" +RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license" +RDEPENDS_${PN}-bcm4345c5-hcd += "${PN}-cypress-license" +RCONFLICTS_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" +RREPLACES_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" +RCONFLICTS_${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" +RREPLACES_${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" +RCONFLICTS_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" +RREPLACES_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" +RCONFLICTS_${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" +RREPLACES_${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" + +# Firmware files are generally not run on the CPU, so they can be +# allarch despite being architecture specific +INSANE_SKIP = "arch" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb b/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..f1b566daf692f89aa7ad7a0a712d3f754500bfd6 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb @@ -0,0 +1,116 @@ +SUMMARY = "Linux kernel firmware files from Raspbian distribution" +DESCRIPTION = "Updated firmware files for RaspberryPi hardware. \ +RPi-Distro obtains these directly from Cypress; they are not submitted \ +to linux-firmware for general use." +HOMEPAGE = "https://github.com/RPi-Distro/firmware-nonfree" +SECTION = "kernel" + +# In maintained upstream linux-firmware: +# * brcmfmac43430-sdio falls under LICENCE.cypress +# * brcmfmac43455-sdio falls under LICENCE.broadcom_bcm43xx +# * brcmfmac43456-sdio falls under LICENCE.broadcom_bcm43xx +# +# It is likely[^1] that both of these should be under LICENCE.cypress. +# Further, at this time the text of LICENCE.broadcom_bcm43xx is the same +# in linux-firmware and RPi-Distro/firmware-nonfree, but this may +# change. +# +# Rather than make assumptions about what's supposed to be what, we'll +# use the license implied by the source of these files, named to avoid +# conflicts with linux-firmware. +# +# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 +LICENSE = "\ + Firmware-broadcom_bcm43xx-rpidistro \ + & WHENCE \ +" +LIC_FILES_CHKSUM = "\ + file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ + file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \ +" + +# These are not common licenses, set NO_GENERIC_LICENSE for them +# so that the license files will be copied from fetched source +NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm43xx" +NO_GENERIC_LICENSE[WHENCE] = "WHENCE" + +SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=buster;protocol=https" + +SRCREV = "83938f78ca2d5a0ffe0c223bb96d72ccc7b71ca5" +PV = "20190114-1+rpt11" + +S = "${WORKDIR}/git" + +inherit allarch + +CLEANBROKEN = "1" + +do_compile() { + : +} + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/brcm + + cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro + + # Replace outdated linux-firmware files with updated ones from + # raspbian firmware-nonfree. Raspbian adds blobs and nvram + # definitions that are also necessary so copy those too. + for fw in brcmfmac43430-sdio brcmfmac43455-sdio brcmfmac43456-sdio ; do + install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ + done + # add compat links. Fixes errors like + # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2 + ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt + ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt + ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt + ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt +} + +PACKAGES = "\ + ${PN}-broadcom-license \ + ${PN}-bcm43430 \ + ${PN}-bcm43455 \ + ${PN}-bcm43456 \ +" + +LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro" +LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" +LICENSE_${PN}-bcm43456 = "Firmware-broadcom_bcm43xx-rpidistro" +LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" +FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro" +FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*" +FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*" +FILES_${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*" +RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license" +RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license" +RDEPENDS_${PN}-bcm43456 += "${PN}-broadcom-license" +RCONFLICTS_${PN}-bcm43430 = "\ + linux-firmware-bcm43430 \ + linux-firmware-raspbian-bcm43430 \ +" +RREPLACES_${PN}-bcm43430 = "\ + linux-firmware-bcm43430 \ + linux-firmware-raspbian-bcm43430 \ +" +RCONFLICTS_${PN}-bcm43455 = "\ + linux-firmware-bcm43455 \ + linux-firmware-raspbian-bcm43455 \ +" +RREPLACES_${PN}-bcm43455 = "\ + linux-firmware-bcm43455 \ + linux-firmware-raspbian-bcm43455 \ +" +RCONFLICTS_${PN}-bcm43456 = "\ + linux-firmware-bcm43456 \ + linux-firmware-raspbian-bcm43456 \ +" +RREPLACES_${PN}-bcm43456 = "\ + linux-firmware-bcm43456 \ + linux-firmware-raspbian-bcm43456 \ +" + +# Firmware files are generally not run on the CPU, so they can be +# allarch despite being architecture specific +INSANE_SKIP = "arch" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch new file mode 100644 index 0000000000000000000000000000000000000000..66efde13869b97e81bb79d6bd058c1d21f9c288e --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch @@ -0,0 +1,35 @@ +From 754e3030788702c1f013a88a4fc8546742d84e27 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 18 Jun 2020 13:45:04 -0700 +Subject: [PATCH] Revert "selftests/bpf: Skip perf hw events test if the setup + disabled it" + +This reverts commit da43712a7262891317883d4b3a909fb18dac4b1d. + +Signed-off-by: Khem Raj +--- + .../selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c +index 437cb93e72ac..f62aa0eb959b 100644 +--- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c ++++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c +@@ -49,12 +49,8 @@ void test_stacktrace_build_id_nmi(void) + pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, + 0 /* cpu 0 */, -1 /* group id */, + 0 /* flags */); +- if (pmu_fd < 0 && errno == ENOENT) { +- printf("%s:SKIP:no PERF_COUNT_HW_CPU_CYCLES\n", __func__); +- test__skip(); +- goto close_prog; +- } +- if (CHECK(pmu_fd < 0, "perf_event_open", "err %d errno %d\n", ++ if (CHECK(pmu_fd < 0, "perf_event_open", ++ "err %d errno %d. Does the test host support PERF_COUNT_HW_CPU_CYCLES?\n", + pmu_fd, errno)) + goto close_prog; + +-- +2.27.0 + diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch new file mode 100644 index 0000000000000000000000000000000000000000..d18b942bc98ba86e070c899a11beb8f7d547d01a --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch @@ -0,0 +1,94 @@ +From 366487b86a8c87954fb4ab7bd88ab49a929a32f6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 13 Apr 2020 11:25:58 -0700 +Subject: [PATCH 2/2] Revert "selftests/bpf: Fix perf_buffer test on systems w/ + offline CPUs" + +This reverts commit 77bb53cb094828a31cd3c5b402899810f63073c1. +--- + .../selftests/bpf/prog_tests/perf_buffer.c | 29 ++++--------------- + 1 file changed, 5 insertions(+), 24 deletions(-) + +diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +index cf6c87936c69..3003fddc0613 100644 +--- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c ++++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include "libbpf_internal.h" + + static void on_sample(void *ctx, int cpu, void *data, __u32 size) + { +@@ -20,7 +19,7 @@ static void on_sample(void *ctx, int cpu, void *data, __u32 size) + + void test_perf_buffer(void) + { +- int err, prog_fd, on_len, nr_on_cpus = 0, nr_cpus, i, duration = 0; ++ int err, prog_fd, nr_cpus, i, duration = 0; + const char *prog_name = "kprobe/sys_nanosleep"; + const char *file = "./test_perf_buffer.o"; + struct perf_buffer_opts pb_opts = {}; +@@ -30,27 +29,15 @@ void test_perf_buffer(void) + struct bpf_object *obj; + struct perf_buffer *pb; + struct bpf_link *link; +- bool *online; + + nr_cpus = libbpf_num_possible_cpus(); + if (CHECK(nr_cpus < 0, "nr_cpus", "err %d\n", nr_cpus)) + return; + +- err = parse_cpu_mask_file("/sys/devices/system/cpu/online", +- &online, &on_len); +- if (CHECK(err, "nr_on_cpus", "err %d\n", err)) +- return; +- +- for (i = 0; i < on_len; i++) +- if (online[i]) +- nr_on_cpus++; +- + /* load program */ + err = bpf_prog_load(file, BPF_PROG_TYPE_KPROBE, &obj, &prog_fd); +- if (CHECK(err, "obj_load", "err %d errno %d\n", err, errno)) { +- obj = NULL; +- goto out_close; +- } ++ if (CHECK(err, "obj_load", "err %d errno %d\n", err, errno)) ++ return; + + prog = bpf_object__find_program_by_title(obj, prog_name); + if (CHECK(!prog, "find_probe", "prog '%s' not found\n", prog_name)) +@@ -77,11 +64,6 @@ void test_perf_buffer(void) + /* trigger kprobe on every CPU */ + CPU_ZERO(&cpu_seen); + for (i = 0; i < nr_cpus; i++) { +- if (i >= on_len || !online[i]) { +- printf("skipping offline CPU #%d\n", i); +- continue; +- } +- + CPU_ZERO(&cpu_set); + CPU_SET(i, &cpu_set); + +@@ -99,8 +81,8 @@ void test_perf_buffer(void) + if (CHECK(err < 0, "perf_buffer__poll", "err %d\n", err)) + goto out_free_pb; + +- if (CHECK(CPU_COUNT(&cpu_seen) != nr_on_cpus, "seen_cpu_cnt", +- "expect %d, seen %d\n", nr_on_cpus, CPU_COUNT(&cpu_seen))) ++ if (CHECK(CPU_COUNT(&cpu_seen) != nr_cpus, "seen_cpu_cnt", ++ "expect %d, seen %d\n", nr_cpus, CPU_COUNT(&cpu_seen))) + goto out_free_pb; + + out_free_pb: +@@ -109,5 +91,4 @@ void test_perf_buffer(void) + bpf_link__destroy(link); + out_close: + bpf_object__close(obj); +- free(online); + } +-- +2.26.0 + diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/android-drivers.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/android-drivers.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f74ac0e1c78a0505f56e9b0199e1db9e7f2fe76c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/android-drivers.cfg @@ -0,0 +1,8 @@ +CONFIG_ANDROID=y + +#CONFIG_ANDROID_BINDERFS is not set +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_BINDER_DEVICES="binder" + +CONFIG_ASHMEM=y + diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/initramfs-image-bundle.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/initramfs-image-bundle.cfg new file mode 100644 index 0000000000000000000000000000000000000000..8d3ad168fd52b7085744bef9f6c9ba6a26e5359e --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/initramfs-image-bundle.cfg @@ -0,0 +1,5 @@ +CONFIG_OVERLAY_FS=y +CONFIG_SQUASHFS=y +CONFIG_MTD=y +CONFIG_MTD_UBI=y +CONFIG_UBIFS_FS=y diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9c48eff19e9b065195dd655acf09aeb5003bade3 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg @@ -0,0 +1,13 @@ +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HIBERNATE_CALLBACKS=y +CONFIG_HIBERNATION=y +CONFIG_PM_STD_PARTITION="/dev/mmcblk0p2" +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y +CONFIG_PM_GENERIC_DOMAINS_SLEEP=y +CONFIG_ARCH_HIBERNATION_HEADER=y diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg new file mode 100644 index 0000000000000000000000000000000000000000..fd97ed71f18b5df7caca14406f7a74cfec3a7cd9 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg @@ -0,0 +1,2 @@ +# see emmc node +CONFIG_MMC_SDHCI_IPROC=y diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/vc4graphics.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/vc4graphics.cfg new file mode 100644 index 0000000000000000000000000000000000000000..0b4ba48434e7e993005813fe94b015205d99394b --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/vc4graphics.cfg @@ -0,0 +1,6 @@ +CONFIG_I2C_BCM2835=y +CONFIG_DRM=y +CONFIG_DRM_FBDEV_EMULATION=y +CONFIG_DRM_VC4=y +CONFIG_SND=y +CONFIG_SND_SOC=y diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb new file mode 100644 index 0000000000000000000000000000000000000000..e0a446162e1115e20a5966c7a1960da4446ee0f8 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb @@ -0,0 +1,35 @@ +python __anonymous() { + if "linux-raspberrypi-dev" not in d.getVar("PREFERRED_PROVIDER_virtual/kernel"): + msg = "Skipping linux-raspberrypi-dev as it is not the preferred " + \ + "provider of virtual/kernel." + raise bb.parse.SkipRecipe(msg) +} + +LINUX_VERSION ?= "5.10.y" +LINUX_RPI_BRANCH ?= "rpi-5.10.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-5.10" + +# Set default SRCREVs. Both the machine and meta SRCREVs are statically set +# to the as in 5.10 recipe, and hence prevent network access during parsing. If +# linux-yocto-dev is the preferred provider, they will be overridden to +# AUTOREV in following anonymous python routine and resolved when the +# variables are finalized. +SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-raspberrypi-dev", "${AUTOREV}", "89399e6e7e33d6260a954603ca03857df594ffd3", d)}' +SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-raspberrypi-dev", "${AUTOREV}", "a19886b00ea7d874fdd60d8e3435894bb16e6434", d)}' + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +KERNEL_DTC_FLAGS += "-@ -H epapr" + +# Disable version check so that we don't have to edit this recipe every time +# upstream bumps the version +KERNEL_VERSION_SANITY_SKIP = "1" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc new file mode 100644 index 0000000000000000000000000000000000000000..5ad9b781b23d9d89121a902eefc9c4b5f34dc95d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc @@ -0,0 +1,36 @@ +DESCRIPTION = "Linux Kernel for Raspberry Pi" +SECTION = "kernel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +COMPATIBLE_MACHINE = "^rpi$" + +PE = "1" +PV = "${LINUX_VERSION}+git${SRCPV}" + +inherit siteinfo +require recipes-kernel/linux/linux-yocto.inc + +SRC_URI += " \ + ${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \ + " + +KCONFIG_MODE = "--alldefconfig" +KBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG_raspberrypi-cm3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig" +KBUILD_DEFCONFIG_raspberrypi4 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig" + +LINUX_VERSION_EXTENSION ?= "" + +KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}" + +# A LOADADDR is needed when building a uImage format kernel. This value is not +# set by default in rpi-4.8.y and later branches so we need to provide it +# manually. This value unused if KERNEL_IMAGETYPE is not uImage. +KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.10.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.10.bb new file mode 100644 index 0000000000000000000000000000000000000000..b13ec7e05d65d5e7a1d636f8ee5b95275f8bcc8d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.10.bb @@ -0,0 +1,19 @@ +LINUX_VERSION ?= "5.10.31" +LINUX_RPI_BRANCH ?= "rpi-5.10.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-5.10" + +SRCREV_machine = "89399e6e7e33d6260a954603ca03857df594ffd3" +SRCREV_meta = "a19886b00ea7d874fdd60d8e3435894bb16e6434" + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +KERNEL_DTC_FLAGS += "-@ -H epapr" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..16914f14e605ea22a88e1f99efbebe1f3fc60b72 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb @@ -0,0 +1,23 @@ +LINUX_VERSION ?= "5.4.83" +LINUX_RPI_BRANCH ?= "rpi-5.4.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-5.4" + +SRCREV_machine = "08ae2dd9e7dc89c20bff823a3ef045de09bfd090" +SRCREV_meta = "d676bf5ff7b7071e14f44498d2482c0a596f14cd" + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch \ + file://0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +KERNEL_DTC_FLAGS += "-@ -H epapr" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch new file mode 100644 index 0000000000000000000000000000000000000000..c8af7da0e0579b5c30a1fbe8871945fe6635c02b --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch @@ -0,0 +1,48 @@ +From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 11 Feb 2016 12:53:20 -0800 +Subject: [PATCH] Don't try to acquire buffer when src pad isn't active + +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= + +This solves a race condition when setting the pipeline from PAUSE to +NULL while the decoder loop is still running. Without this patch, the +thread which interacts with the decode sink pad gets blocked here: + + gst_element_change_state() + gst_element_change_state_func() + gst_element_pads_activate() --> Deactivating pads + activate_pads() + gst_pad_set_active() + gst_pad_activate_mode() + post_activate() + GST_PAD_STREAM_LOCK() + +while gst_omx_port_acquire_buffer() gets stalled forever in +gst_omx_component_wait_message() waiting for a message that will never +arrive: + + gst_omx_video_dec_loop() + gst_omx_port_acquire_buffer() + gst_omx_component_wait_message() + +--- + omx/gstomxvideodec.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index abe6e30..c4dc33f 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) + GstOMXAcquireBufferReturn acq_return; + OMX_ERRORTYPE err; + ++ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) { ++ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead"); ++ goto flushing; ++ } ++ + #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) + port = self->eglimage ? self->egl_out_port : self->dec_out_port; + #else diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch new file mode 100644 index 0000000000000000000000000000000000000000..434232661e44e119cd24bb07eb7d20987e02ab95 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch @@ -0,0 +1,24 @@ +From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 13 Feb 2016 11:42:29 -0800 + +--- + omx/gstomxvideodec.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index c4dc33f..ba5304f 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -2021,9 +2021,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) + g_cond_broadcast (&self->drain_cond); + g_mutex_unlock (&self->drain_lock); + +- gst_omx_component_get_state (self->dec, 5 * GST_SECOND); ++ gst_omx_component_get_state (self->dec, 0); + #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) +- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND); ++ gst_omx_component_get_state (self->egl_render, 0); + #endif + + gst_buffer_replace (&self->codec_data, NULL); diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch new file mode 100644 index 0000000000000000000000000000000000000000..144ced6ab7864d472f6c46a244fd753af8d14918 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch @@ -0,0 +1,30 @@ +From 140bf8548843a98b0af2ddc1765ab59c16c8994c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= +Date: Tue, 17 Nov 2015 16:51:27 +0000 +Subject: [PATCH] Properly handle drain requests while flushing + +Without this commit the decoder streaming thread stops without ever attending +the drain request, leaving the decoder input thread waiting forever. + +--- + omx/gstomx.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/omx/gstomx.c b/omx/gstomx.c +index 038ce32..5202d33 100644 +--- a/omx/gstomx.c ++++ b/omx/gstomx.c +@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name, + + g_mutex_lock (&comp->lock); + gst_omx_component_handle_messages (comp); ++ ++ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { ++ GST_ERROR_OBJECT (comp->parent, ++ "Last operation returned an error. Setting last_error manually."); ++ comp->last_error = err; ++ } ++ + g_mutex_unlock (&comp->lock); + + return comp; diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch new file mode 100644 index 0000000000000000000000000000000000000000..3245294eae3ebd58b538343ba7d89eb3836698be --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch @@ -0,0 +1,36 @@ +From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 28 May 2019 18:02:24 +0100 +Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a + timeout releasing the buffers taken by the egl_render out port + +From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= + +Date: Fri, 4 Dec 2015 18:39:59 +0100 +Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a +timeout releasing the buffers taken by the egl_render out port + +Upstream-status: Pending +Signed-off-by: Andrei Gherzan +--- + omx/gstomxvideodec.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index ba5304f..8bd5d3d 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self) + return FALSE; + if (gst_omx_port_wait_buffers_released (out_port, + 1 * GST_SECOND) != OMX_ErrorNone) ++#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)) + return FALSE; ++#endif + if (!gst_omx_video_dec_deallocate_output_buffers (self)) + return FALSE; + if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone) +-- +2.17.1 + diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a971236f2163baff81be7080fac482c8461c3d97 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/${PN}:" + +SRC_URI_append_rpi = " \ + file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ + file://0003-no-timeout-on-get-state.patch \ + file://0004-Properly-handle-drain-requests-while-flushing.patch \ + file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ +" + +GSTREAMER_1_0_OMX_TARGET_rpi = "rpi" +GSTREAMER_1_0_OMX_CORE_NAME_rpi = "${libdir}/libopenmaxil.so" +EXTRA_OEMESON_append_rpi = " -Dheader_path=${STAGING_DIR_TARGET}/usr/include/IL" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..8ab1510d8c4e76b45db821a55ab4c5f9953071f8 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend @@ -0,0 +1,2 @@ +PACKAGECONFIG_append_rpi = " hls libmms \ + ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'faad', '', d)}" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..6bed42a873249f241aaddaa0d2422bebd941cdd6 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -0,0 +1,6 @@ +# if using bcm driver enable dispmanx not when using VC4 driver +PACKAGECONFIG_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' dispmanx', d)}" +DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" + +PACKAGECONFIG_GL_VC4GRAPHICS = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" +PACKAGECONFIG_GL_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '${PACKAGECONFIG_GL_VC4GRAPHICS}', 'egl gles2', d)}" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..80a324f0ca1436f5b0a3f30208a2672df5335e8a --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' rpi', d)}" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch new file mode 100644 index 0000000000000000000000000000000000000000..37d0724a4396fb395e317852202624f4c11e6033 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch @@ -0,0 +1,49 @@ +From 25302469b6ceb2fa10ac68c07da25c6068ffd218 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 7 Nov 2018 01:16:59 -0800 +Subject: [PATCH] Fix build with vc4 driver + +Signed-off-by: Khem Raj +--- + SubtitleRenderer.cpp | 7 ++++++- + SubtitleRenderer.h | 1 + + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/SubtitleRenderer.cpp b/SubtitleRenderer.cpp +index 540162f..fcfc708 100644 +--- a/SubtitleRenderer.cpp ++++ b/SubtitleRenderer.cpp +@@ -36,6 +36,11 @@ + #include + + #include "bcm_host.h" ++typedef struct { ++ DISPMANX_ELEMENT_HANDLE_T element; ++ int width; ++ int height; ++} EGL_DISPMANX_WINDOW_T; + + class BoxRenderer { + VGPath path_; +@@ -618,4 +623,4 @@ void SubtitleRenderer::set_rect(int x1, int y1, int x2, int y2) BOOST_NOEXCEPT + float font_size = height*font_size_; + ENFORCE(!FT_Set_Pixel_Sizes(ft_face_, 0, font_size)); + ENFORCE(!FT_Set_Pixel_Sizes(ft_face_italic_, 0, font_size)); +-} +\ No newline at end of file ++} +diff --git a/SubtitleRenderer.h b/SubtitleRenderer.h +index 3f60798..ebac9a1 100644 +--- a/SubtitleRenderer.h ++++ b/SubtitleRenderer.h +@@ -26,6 +26,7 @@ + // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + // DEALINGS IN THE SOFTWARE. + ++#include + #include + #include + #include +-- +2.19.1 + diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch new file mode 100644 index 0000000000000000000000000000000000000000..0c8843e7710f61201de9577c81f907cdb9f140cb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch @@ -0,0 +1,84 @@ +From 19c9bc5fd8f43d3e9117906c3c48a3891357f8bc Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 20 Aug 2013 16:10:51 +0300 +Subject: [PATCH] Remove Makefile.include which includes hardcoded + +Remove Makefile.include which includes hardcoded paths and rely on +variables provided by build system. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Andrei Gherzan + +Updated patch to apply to c0dd9502ed2c43c487674939195c69680f3d98b0 revision + +--- + Makefile | 1 - + Makefile.ffmpeg | 1 - + Makefile.include | 40 ---------------------------------------- + 3 files changed, 42 deletions(-) + delete mode 100644 Makefile.include + +diff --git a/Makefile b/Makefile +index 2857e94..76ee9bf 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,3 @@ +-include Makefile.include + + CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST + +diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg +index ea12aad..749f47f 100644 +--- a/Makefile.ffmpeg ++++ b/Makefile.ffmpeg +@@ -1,4 +1,3 @@ +-include Makefile.include + + CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT + +diff --git a/Makefile.include b/Makefile.include +deleted file mode 100644 +index 58e9560..0000000 +--- a/Makefile.include ++++ /dev/null +@@ -1,40 +0,0 @@ +-USE_BUILDROOT=0 +-FLOAT=hard +- +-ifeq ($(USE_BUILDROOT), 1) +-BUILDROOT :=/opt/xbmc-bcm/buildroot +-SDKSTAGE :=$(BUILDROOT)/output/staging +-TARGETFS :=$(BUILDROOT)/output/target +-TOOLCHAIN :=$(BUILDROOT)/output/host/usr/ +-HOST :=arm-unknown-linux-gnueabi +-SYSROOT :=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot +-else +-BUILDROOT :=/opt/bcm-rootfs +-SDKSTAGE :=/opt/bcm-rootfs +-TARGETFS :=/opt/bcm-rootfs +-TOOLCHAIN :=/home/dc4/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/ +-HOST :=arm-linux-gnueabihf +-#SYSROOT :=$(TOOLCHAIN)/arm-bcm2708hardfp-linux-gnueabi/sysroot +-SYSROOT :=/opt/bcm-rootfs +-endif +- +-JOBS=7 +- +-CFLAGS := -isystem$(PREFIX)/include +-CXXFLAGS := $(CFLAGS) +-CPPFLAGS := $(CFLAGS) +-LDFLAGS := -L$(BUILDROOT)/lib +-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT) +-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT) +-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT) +-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump +-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib +-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip +-AR := $(TOOLCHAIN)/bin/$(HOST)-ar +-CXXCP := $(CXX) -E +-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH) +- +-CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog +-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build +-#INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2 +-INCLUDES += -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch new file mode 100644 index 0000000000000000000000000000000000000000..82dfd3e65ad1791d09b2add78af11fa1d0d72c29 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch @@ -0,0 +1,42 @@ +From 9b4b7f8726171e97f12c587d50e54bab0dc42da5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 12 Sep 2018 22:18:07 -0700 +Subject: [PATCH] Specify --cc, --cxx and --ld variables from environment + +This helps in compiling with non-gcc compilers + +Signed-off-by: Khem Raj +--- + Makefile.ffmpeg | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -22,12 +22,15 @@ configure: + CFLAGS="$(CFLAGS) ${INCLUDES}" \ + LDFLAGS="" \ + ./configure \ ++ --ld="${CCLD}" \ ++ --cc="${CC}" \ ++ --cxx="${CXX}" \ + --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \ + --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \ + --enable-shared \ + --disable-static \ + --arch=arm \ +- --cpu=arm1176jzf-s \ ++ --cpu=$(CPU) \ + --target-os=linux \ + --disable-hwaccels \ + --enable-parsers \ +@@ -42,7 +45,7 @@ configure: + --enable-gpl \ + --enable-version3 \ + --enable-protocols \ +- --enable-libsmbclient \ ++ --disable-libsmbclient \ + --enable-libssh \ + --enable-nonfree \ + --enable-openssl \ diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch new file mode 100644 index 0000000000000000000000000000000000000000..dd1d4f3d70cde9050f53969e44d8b4ff4dfd6372 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch @@ -0,0 +1,63 @@ +From e46208c4a3e35da461e0e8f662970339eae47fca Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Sun, 24 Aug 2014 00:13:13 +0200 +Subject: [PATCH] Libraries and headers from ffmpeg are installed in /usr. + +Don't search for libraries and headers in /usr/local. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Andrei Gherzan +Signed-off-by: Jonathan Liu + +--- + Makefile | 6 +++--- + Makefile.ffmpeg | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -2,9 +2,9 @@ CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1 + CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST + + LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/ +-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound ++LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound + +-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/freetype2 -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads ++INCLUDES+=-I./ -Ilinux + + DIST ?= omxplayer-dist + STRIP ?= strip +@@ -90,7 +90,7 @@ dist: omxplayer.bin omxplayer.1 + cp COPYING $(DIST)/usr/share/doc/omxplayer + cp README.md $(DIST)/usr/share/doc/omxplayer/README + cp omxplayer.1 $(DIST)/usr/share/man/man1 +- cp -P ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/ ++ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ + cd $(DIST); tar -czf ../$(DIST).tgz * + + install: +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -238,7 +238,8 @@ configure: + --disable-decoder=xbin \ + --disable-decoder=idf \ + --disable-decoder=hevc \ +- --enable-decoder=opus ++ --enable-decoder=opus \ ++ --disable-stripping + + .PHONY : clean + clean: +@@ -251,5 +252,5 @@ checkout: + .PHONY : install + install: + cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install +- $(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so ++ $(HOST)-strip ffmpeg_compiled/usr/lib/*.so + diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch new file mode 100644 index 0000000000000000000000000000000000000000..0b6aafdf465cc2a8167fa2c41ce1ed0e56197df3 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch @@ -0,0 +1,27 @@ +From 6975d8a902837dd6c604f7fdd2a2f977285855ed Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Sun, 24 Aug 2014 00:18:05 +0200 +Subject: [PATCH] Remove strip step in Makefile + +Build system will strip binaries so remove strip step in Makefile. +Avoid warnings/errors like: +WARNING: File '/usr/lib/omxplayer/libavutil.so.51.56.100' from +omxplayer was already stripped, this will prevent future debugging! + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Andrei Gherzan + +--- + Makefile.ffmpeg | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -252,5 +252,3 @@ checkout: + .PHONY : install + install: + cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install +- $(HOST)-strip ffmpeg_compiled/usr/lib/*.so +- diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch new file mode 100644 index 0000000000000000000000000000000000000000..d137592cf08ffffa55cb99e58f16bc8bbf5484d2 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch @@ -0,0 +1,37 @@ +From be007b01e7d91f5f83518c0388c16db8dab31d2e Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Sun, 25 Jan 2015 11:13:51 +0200 +Subject: [PATCH] Add FFMPEG_EXTRA_CFLAGS and FFMPEG_EXTRA_LDFLAGS + +In this way we can inject flags to LD and CC using +--extra-cflags and --extra-ldflags. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Andrei Gherzan + +--- + Makefile.ffmpeg | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -1,5 +1,7 @@ + CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT + ++FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) ++ + WORK=$(PWD) + + .PHONY : all +@@ -20,7 +22,8 @@ configure: + CFLAGS="$(CFLAGS) ${INCLUDES}" \ + LDFLAGS="" \ + ./configure \ +- --extra-cflags="-mfpu=vfp -mfloat-abi=hard" \ ++ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \ ++ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \ + --enable-shared \ + --disable-static \ + --arch=arm \ diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6abd7b88285760d09cce4b0d8d298980b71b4ef --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch @@ -0,0 +1,55 @@ +From 81d1f8bc102b23bdfa63a01f252f3e4c74ae7da9 Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Thu, 7 Sep 2017 19:14:20 +0000 +Subject: [PATCH] Don't require internet connection during build + +The following issues break offline builds: + +* Building the man page uses a web service hosted on heroku. + +* Makefile.ffmpeg explicitly does a "git clone" from the internet. + +Signed-off-by: Paul Barker +Upstream-status: Inappropriate + +--- + Makefile | 6 ++---- + Makefile.ffmpeg | 2 +- + 2 files changed, 3 insertions(+), 5 deletions(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -81,17 +81,14 @@ ffmpeg: + make -f Makefile.ffmpeg + make -f Makefile.ffmpeg install + +-dist: omxplayer.bin omxplayer.1 ++dist: omxplayer.bin + mkdir -p $(DIST)/usr/lib/omxplayer + mkdir -p $(DIST)/usr/bin + mkdir -p $(DIST)/usr/share/doc/omxplayer +- mkdir -p $(DIST)/usr/share/man/man1 + cp omxplayer omxplayer.bin $(DIST)/usr/bin + cp COPYING $(DIST)/usr/share/doc/omxplayer + cp README.md $(DIST)/usr/share/doc/omxplayer/README +- cp omxplayer.1 $(DIST)/usr/share/man/man1 + cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ +- tar -czf omxplayer-dist.tar.gz $(DIST) + + install: + cp -r $(DIST)/* / +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -5,7 +5,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-a + WORK=$(PWD) + + .PHONY : all +-all: checkout configure compile ++all: configure compile + + .PHONY : copy + copy: diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch new file mode 100644 index 0000000000000000000000000000000000000000..890adde501ed0d43e6509a07badaaa0d07a080f1 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch @@ -0,0 +1,37 @@ +From f570b9985ff2d57d21c1e64ed08c43b6d89fd0b1 Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Thu, 7 Sep 2017 20:02:15 +0000 +Subject: [PATCH] Prevent ffmpeg configure/compile race condition + +Additional dependency information is needed in Makefile.ffmpeg to ensure that +the configure stage is finished before the compile stage starts. + +Signed-off-by: Paul Barker +Upstream-status: Pending + +--- + Makefile.ffmpeg | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -5,7 +5,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-a + WORK=$(PWD) + + .PHONY : all +-all: configure compile ++all: compile + + .PHONY : copy + copy: +@@ -13,7 +13,7 @@ copy: + $(HOST)-strip *.so* + + .PHONY : compile +-compile: ++compile: configure + +$(MAKE) -j$(shell nproc) -C ffmpeg + + .PHONY : configure diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch new file mode 100644 index 0000000000000000000000000000000000000000..a8c51d5ce6a7a8ee9cd17fb3d9abea4ded392074 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch @@ -0,0 +1,8 @@ +--- a/Makefile 2019-06-20 15:04:53.390282996 +0200 ++++ b/Makefile 2019-06-20 15:03:45.538763872 +0200 +@@ -1,4 +1,4 @@ +-CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -g ++CFLAGS+= -fomit-frame-pointer -mabi=aapcs-linux -Wno-psabi -g + CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST + + LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/ diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch new file mode 100644 index 0000000000000000000000000000000000000000..20ed7c7b9cdf2c7eb28cd2982493eb45d0f929db --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch @@ -0,0 +1,12 @@ +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -22,6 +22,7 @@ configure: + CFLAGS="$(CFLAGS) ${INCLUDES}" \ + LDFLAGS="" \ + ./configure \ ++ --enable-cross-compile \ + --ld="${CCLD}" \ + --cc="${CC}" \ + --cxx="${CXX}" \ diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch new file mode 100644 index 0000000000000000000000000000000000000000..70859aa49bcc6d4efd52d2bcaa2092d5ecc825bb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch @@ -0,0 +1,32 @@ +From 23a97efde2aef171312000f7859ef4c573ce2ada Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Sun, 19 Jan 2014 20:35:29 +0200 +Subject: [PATCH] omxplayer: Update to remote HEAD + +Revert the tar command change introduced in: +https://github.com/popcornmix/omxplayer/commit/201c77973155861e60492e45d35467b19b69c1c4 + +This fails if DIST is an absolute path. The old command was working just fine. + +Upstream-Status: Pending + +Signed-off-by: Andrei Gherzan +Signed-off-by: Jonathan Liu + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -91,7 +91,7 @@ dist: omxplayer.bin omxplayer.1 + cp README.md $(DIST)/usr/share/doc/omxplayer/README + cp omxplayer.1 $(DIST)/usr/share/man/man1 + cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ +- cd $(DIST); tar -czf ../$(DIST).tgz * ++ tar -czf omxplayer-dist.tar.gz $(DIST) + + install: + cp -r $(DIST)/* / diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch new file mode 100644 index 0000000000000000000000000000000000000000..e580470c05a0dc3dfdb75bf02a0662c9e19c7e4d --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch @@ -0,0 +1,28 @@ +From da6c24a2a87b8cf9692017e32be25d30c0cc7ef4 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 10 Feb 2015 00:52:18 +0100 +Subject: [PATCH] omxplayer: Bump SRCREV + +Force the pkg-config native tool. Strangely ffmpeg prepends cross_prefix +to the default value which obviously is wrong. + +Signed-off-by: Andrei Gherzan + +--- + Makefile.ffmpeg | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: git/Makefile.ffmpeg +=================================================================== +--- git.orig/Makefile.ffmpeg ++++ git/Makefile.ffmpeg +@@ -242,7 +242,8 @@ configure: + --disable-decoder=idf \ + --disable-decoder=hevc \ + --enable-decoder=opus \ +- --disable-stripping ++ --disable-stripping \ ++ --pkg-config=pkg-config + + .PHONY : clean + clean: diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..82706a47a481ed18f9bb62b5388c6b0ffd47d648 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb @@ -0,0 +1,108 @@ +SUMMARY = "A commandline OMX player for the Raspberry Pi" +DESCRIPTION = "This player was developed as a testbed for the XBMC \ +Raspberry PI implementation and is quite handy to use standalone" +HOMEPAGE = "https://github.com/popcornmix/omxplayer" +SECTION = "console/utils" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6" + +DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland" + +PR = "r5" + +SRCREV_default = "f543a0d0e707ab56415f17b0ca6d397394ee8b63" + +# omxplayer builds its own copy of ffmpeg from source instead of using the +# system's ffmpeg library. This isn't ideal but it's ok for now. We do however +# want to keep control of the exact version of ffmpeg used instead of just +# fetching the latest commit on a release branch (which is what the checkout job +# in Makefile.ffmpeg in the omxplayer source tree does). +# +# This SRCREV corresponds to the v4.0.3 release of ffmpeg. +SRCREV_ffmpeg = "fcbd117df3077bad495e99e20f01cf93737bce76" + +SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=https;branch=master \ + git://github.com/FFmpeg/FFmpeg;branch=release/4.0;protocol=https;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \ + file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ + file://0003-Remove-strip-step-in-Makefile.patch \ + file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \ + file://fix-tar-command-with-DIST.patch \ + file://use-native-pkg-config.patch \ + file://0005-Don-t-require-internet-connection-during-build.patch \ + file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \ + file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \ + file://cross-crompile-ffmpeg.patch \ + file://0007-Remove-Makefile-hardcoded-arch-tune.patch \ + " + +SRC_URI_append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "^rpi$" +COMPATIBLE_HOST_aarch64 = "null" + +def cpu(d): + for arg in (d.getVar('TUNE_CCARGS') or '').split(): + if arg.startswith('-mcpu='): + return arg[6:] + return 'generic' + +export CPU = "${@cpu(d)}" + +inherit autotools-brokensep pkgconfig + +# This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which +# runs the ffmpeg configuration +PACKAGECONFIG ??= "" +PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba" + +# Needed in ffmpeg configure +export TEMPDIR = "${S}/tmp" + +# Needed in Makefile.ffmpeg +export HOST = "${HOST_SYS}" +export WORK = "${S}" +export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" +export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" + +# Needed in top Makefile + +export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \ + -L${STAGING_DIR_HOST}/lib \ + -L${STAGING_DIR_HOST}/usr/lib \ + " +export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D__GBM__", "", d)} \ + -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \ + -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \ + -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \ + -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \ + -isystem${STAGING_DIR_HOST}/usr/lib/dbus-1.0/include \ + " +export DIST = "${D}" + +do_compile() { + # Needed for compiler test in ffmpeg's configure + mkdir -p tmp + + sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg + + oe_runmake -f Makefile.ffmpeg + oe_runmake -f Makefile.ffmpeg install + oe_runmake +} + +do_install() { + oe_runmake STRIP='echo skipping strip' dist + mkdir -p ${D}${datadir}/fonts/truetype/freefont/ + install ${S}/fonts/* ${D}${datadir}/fonts/truetype/freefont/ +} + +FILES_${PN} = "${bindir}/omxplayer* \ + ${libdir}/omxplayer/lib*${SOLIBS} \ + ${datadir}/fonts" + +FILES_${PN}-dev += "${libdir}/omxplayer/*.so" + +RDEPENDS_${PN} += "bash procps userland" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..505719efb8adb7c7f7178c4f498b89ee8e0980b1 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend @@ -0,0 +1,2 @@ +EXTRA_OECONF_append_raspberrypi = " --disable-asm" +EXTRA_OECONF_append_raspberrypi0-wifi = " --disable-asm" diff --git a/bsp/meta-raspberrypi/wic/sdimage-raspberrypi.wks b/bsp/meta-raspberrypi/wic/sdimage-raspberrypi.wks new file mode 100644 index 0000000000000000000000000000000000000000..01fbaeaeb12d44c215becc17792b21932686ce26 --- /dev/null +++ b/bsp/meta-raspberrypi/wic/sdimage-raspberrypi.wks @@ -0,0 +1,6 @@ +# short-description: Create Raspberry Pi SD card image +# long-description: Creates a partitioned SD card image for use with +# Raspberry Pi. Boot files are located in the first vfat partition. + +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 20 +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d0c3cbf1020d5c292abdedf27627c6abe25e2293 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/image/.keep b/docs/image/.keep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/image/dsoftbus/dsoftbus_architecture.png b/docs/image/dsoftbus/dsoftbus_architecture.png new file mode 100644 index 0000000000000000000000000000000000000000..779a25d29855d22c015284a549943e34645e4fcd Binary files /dev/null and b/docs/image/dsoftbus/dsoftbus_architecture.png differ diff --git a/docs/image/dsoftbus/dsoftbus_networking.png b/docs/image/dsoftbus/dsoftbus_networking.png new file mode 100644 index 0000000000000000000000000000000000000000..3de13275f3be67f6b91dd97fb9b42c5e12910ea6 Binary files /dev/null and b/docs/image/dsoftbus/dsoftbus_networking.png differ diff --git a/docs/image/openeuler_architecture.png b/docs/image/openeuler_architecture.png new file mode 100755 index 0000000000000000000000000000000000000000..cbc2013e7a74c71f3099178b21e2c6f150f33076 Binary files /dev/null and b/docs/image/openeuler_architecture.png differ diff --git a/docs/image/raspberrypi/putty_config.png b/docs/image/raspberrypi/putty_config.png new file mode 100644 index 0000000000000000000000000000000000000000..4c18c7665f4fe6101c456cc964e136d72420478f Binary files /dev/null and b/docs/image/raspberrypi/putty_config.png differ diff --git a/docs/image/raspberrypi/rasp-ttyusb-connect.png b/docs/image/raspberrypi/rasp-ttyusb-connect.png new file mode 100644 index 0000000000000000000000000000000000000000..4341a8f7ede6ac847d097cd7b8dc89654087f48d Binary files /dev/null and b/docs/image/raspberrypi/rasp-ttyusb-connect.png differ diff --git a/docs/image/yocto-poky.png b/docs/image/yocto-poky.png new file mode 100644 index 0000000000000000000000000000000000000000..bea3b9d2eb020c08ca7f8b1a992cbadc108d7cda Binary files /dev/null and b/docs/image/yocto-poky.png differ diff --git a/docs/image/yocto/bitbake_g.png b/docs/image/yocto/bitbake_g.png new file mode 100755 index 0000000000000000000000000000000000000000..74c1eb00a5f98fea8f58b2bf5f7f7cac78e8e9a6 Binary files /dev/null and b/docs/image/yocto/bitbake_g.png differ diff --git a/docs/image/yocto/conf_bblayer_conf.png b/docs/image/yocto/conf_bblayer_conf.png new file mode 100755 index 0000000000000000000000000000000000000000..d96802f4d18c07e3c934ab70975c8247f636dcc9 Binary files /dev/null and b/docs/image/yocto/conf_bblayer_conf.png differ diff --git a/docs/image/yocto/conf_distro_conf.png b/docs/image/yocto/conf_distro_conf.png new file mode 100755 index 0000000000000000000000000000000000000000..69b36f9fbee64e5dde8d6e0723454f388e71e1db Binary files /dev/null and b/docs/image/yocto/conf_distro_conf.png differ diff --git a/docs/image/yocto/conf_layer_conf.png b/docs/image/yocto/conf_layer_conf.png new file mode 100755 index 0000000000000000000000000000000000000000..52ce6750ec353a14e176e00785bb556d70b79b81 Binary files /dev/null and b/docs/image/yocto/conf_layer_conf.png differ diff --git a/docs/image/yocto/conf_local_conf.png b/docs/image/yocto/conf_local_conf.png new file mode 100755 index 0000000000000000000000000000000000000000..b6985b472e6f2c784346f6808c100875de4fe129 Binary files /dev/null and b/docs/image/yocto/conf_local_conf.png differ diff --git a/docs/image/yocto/create_layer.png b/docs/image/yocto/create_layer.png new file mode 100755 index 0000000000000000000000000000000000000000..5a6dcd213710867c5ee27b436a583a6d1ea7063f Binary files /dev/null and b/docs/image/yocto/create_layer.png differ diff --git a/docs/image/yocto/hosttools.png b/docs/image/yocto/hosttools.png new file mode 100755 index 0000000000000000000000000000000000000000..83bb076a7763d522dde36168b1f713e524141531 Binary files /dev/null and b/docs/image/yocto/hosttools.png differ diff --git a/docs/image/yocto/open_embedded_architecture_workflow.png b/docs/image/yocto/open_embedded_architecture_workflow.png new file mode 100755 index 0000000000000000000000000000000000000000..ccf7b167dbda3ffda89546a3188fffa7e08bb413 Binary files /dev/null and b/docs/image/yocto/open_embedded_architecture_workflow.png differ diff --git a/docs/image/yocto/package_feeds.png b/docs/image/yocto/package_feeds.png new file mode 100755 index 0000000000000000000000000000000000000000..53ee05c59c41b91beb5c4eecd071fef30aaf6487 Binary files /dev/null and b/docs/image/yocto/package_feeds.png differ diff --git a/docs/image/yocto/poky_code_structure.png b/docs/image/yocto/poky_code_structure.png new file mode 100755 index 0000000000000000000000000000000000000000..c707fce7a445ed6ddd524c971004a7f79138482b Binary files /dev/null and b/docs/image/yocto/poky_code_structure.png differ diff --git a/docs/image/yocto/tasks_do_compile.png b/docs/image/yocto/tasks_do_compile.png new file mode 100755 index 0000000000000000000000000000000000000000..64bd71e2ee1f9257126cc0b281aafb62164b8fd4 Binary files /dev/null and b/docs/image/yocto/tasks_do_compile.png differ diff --git a/docs/image/yocto/tasks_do_fetch.png b/docs/image/yocto/tasks_do_fetch.png new file mode 100755 index 0000000000000000000000000000000000000000..bfbe509d28706ecb1ce0935fff42aa0868619284 Binary files /dev/null and b/docs/image/yocto/tasks_do_fetch.png differ diff --git a/docs/image/yocto/tasks_do_image.png b/docs/image/yocto/tasks_do_image.png new file mode 100755 index 0000000000000000000000000000000000000000..dac2259415c0e6752b7ac00496ad2bdd7c954faf Binary files /dev/null and b/docs/image/yocto/tasks_do_image.png differ diff --git a/docs/image/yocto/tasks_do_package.png b/docs/image/yocto/tasks_do_package.png new file mode 100755 index 0000000000000000000000000000000000000000..d2be66b48f3b562a400e5f52d3c8e73d1a1d84d3 Binary files /dev/null and b/docs/image/yocto/tasks_do_package.png differ diff --git a/docs/image/yocto/tasks_do_patch.png b/docs/image/yocto/tasks_do_patch.png new file mode 100755 index 0000000000000000000000000000000000000000..f2cdf6822d6f3f5c6f50759793b3a43d0e6cf737 Binary files /dev/null and b/docs/image/yocto/tasks_do_patch.png differ diff --git a/docs/image/yocto/tasks_do_patch_log.png b/docs/image/yocto/tasks_do_patch_log.png new file mode 100755 index 0000000000000000000000000000000000000000..802d6653dbe512d3f97c87a2b531cabed420e871 Binary files /dev/null and b/docs/image/yocto/tasks_do_patch_log.png differ diff --git a/docs/image/yocto/yocto_main_components.png b/docs/image/yocto/yocto_main_components.png new file mode 100755 index 0000000000000000000000000000000000000000..746d69c483e7b43f6b458910a52a35d966096f8c Binary files /dev/null and b/docs/image/yocto/yocto_main_components.png differ diff --git a/docs/image/yocto/yocto_tasks.png b/docs/image/yocto/yocto_tasks.png new file mode 100755 index 0000000000000000000000000000000000000000..f87f00d47b238ba703634cecbfd56f126491eb0c Binary files /dev/null and b/docs/image/yocto/yocto_tasks.png differ diff --git a/docs/source/_static/.keep b/docs/source/_static/.keep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/source/_templates/.keep b/docs/source/_templates/.keep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..ee7a5a59cf90ac4850a1a388e2b2e6e7159b4ee4 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,68 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +import sphinx_rtd_theme + +# -- Project information ----------------------------------------------------- + +project = 'openEuler Embedded在线文档' +copyright = '2022, openEuler Embedded' +author = 'openEuler Embedded' + +# The full version, including alpha/beta/rc tags +release = '1.0.0' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = 'zh_CN' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +#html_theme = 'alabaster' +html_theme = "sphinx_rtd_theme" +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +master_doc= 'index' + +html_show_sourcelink = False diff --git a/docs/source/contribute_doc.rst b/docs/source/contribute_doc.rst new file mode 100644 index 0000000000000000000000000000000000000000..1c5a44385345abe78e5f0076fd26d5834a038563 --- /dev/null +++ b/docs/source/contribute_doc.rst @@ -0,0 +1,247 @@ +.. _contribute_doc: + +如何撰写并贡献文档 +################## + +openEuler Embedded采用了Sphinx来构建文档,生成html静态面,并最终托管在gitee pages上。 +本章主要简述如何通过Sphinx向openEuler Embedded贡献文档。 + +关于Sphinx +=========== + +这里直接引用sphinx官方网站 [#sphinx_web]_ 上的介绍: + +:: + + Sphinx是一个工具,可以轻松创建由Georg Brandl编写并根据BSD许可证授权的智能和美观文档 + 它最初是为Python文档创建的,它具有出色的工具,可用于各种语言的软件项目文档 + + 输出格式: HTML(包括Windows HTML帮助),LaTeX(适用于可打印的PDF版本),ePub, + Texinfo,手册页,纯文本 + + 广泛的交叉引用: 语义标记和功能,类,引用,词汇表术语和类似信息的自动链接 + 分层结构: 轻松定义文档树,自动链接到平级,上级和下级 + 自动索引: 一般索引以及特定于语言的模块索引 + 代码处理: 使用Pygments荧光笔自动突出显示 + 扩展: 自动测试代码片段,包含Python模块(API文档)中的文档字符串等 + 贡献的扩展: 用户在第二个存储库中贡献了50多个扩展;其中大多数可以从PyPI安装 + +更多的使用细节可以前往其 `官方网站 `_ 查找 + +关于reStructuredText语法 +=============================== + +依据维基百科 [#rst_wikipedia]_ 的介绍:: + + reStructuredText(RST、ReST或reST)是一种用于文本数据的文件格式,主要用于 Python 编程语言社区的技术文档。 + 它是Python Doc-SIG(Documentation Special Interest Group)的Docutils项目的一部分,旨在为Python创建 + 一组类似于 Java 的 Javadoc 或 Perl 的 Plain Old Documentation(pod)的工具。Docutils可以从Python程序 + 中提取注释和信息,并将它们格式化为各种形式的程序文档 + +reStructuredText的语法与Markdown十分类似,但能以更好的结构化的方式撰写专业文档,vscode中也有相应的插件提供辅助。 +reStructuredText的语法无需专门记忆,需要用到时再去查询即可,具体可以参考 [#rst_tutorial]_ 。 + +如何贡献文档(Linux环境) +============================== + +* git clone yocto-meta-openeuler仓库 + + .. code-block:: bash + + git clone https://gitee.com/openeuler/yocto-meta-openeuler.git + +* 环境准备 + + 如果你只是开发文档的话,那么你需要准备好python3, 然后通过pip3按照如下命令安装相应的python软件包,包括sphinx、文 + 档主题等: + + .. code-block:: bash + + pip3 install sphinx + pip3 install --user -r yocto-meta-openeuler/scripts/requirements-doc.txt + +* 编辑文档 + + 相关文档源码位于 :file:`docs/source` 目录,根据你的需要修改或新增相应的文档,新增文档命名要按照Linux命名方法命名为xxx_yyy_zzz.rst,请按照如下目录规则布局文档: + + .. csv-table:: 文档目录布局 + :header: "文件/目录名", "用途" + :widths: 20, 20 + + "index.rst", "目录页" + "introduction", "openEuler Embedded总揽与简介" + "getting_started", "openEuler Embedded快速使用入门" + "features", "openEuler Embedded主要特性介绍" + "yocto", "openeuler Embedded的Yocto构建系统" + "release", "openEuler Embedded的发布说明" + +* 编译文档 + + 在 :file:`docs` 目录下编译文档 + + .. code-block:: bash + + make html + + 编译成功之后,可以切换到gitee_pages分支,打开 :file:`docs/build/html/*.html` 查看最终生成的网页形式的文档。 + +* 提交修改 + + 像提交代码一样,把所有的修改以commit的形式提交,然后在gitee上生成PR提交到openEuler Embedded对应的仓库, 经过审查后, + 修改就会被CI自动编译并发布。 + + .. attention:: + + - 新增文档必须将该文档加入到对应目录的index索引文件中,新增目录必须将目录和索引加入到 :file:`docs/source/getting_started/index.html` 中,图片加入到 :file:`docs/image/` 目录中。 + - git提交时标题加上 :file:`doc:` 开头,例如doc:(空一格)modify doc。并加上Signed-off-by,与提交的message中间空一行。 + - 提交PR时标题要以 :file:`[文档]` 开头,例如[文档]:修改xx文档内容。如果有issue,要和issue进行关联。 + +如何贡献文档(Windows环境) +================================ + +* git clone yocto-meta-openeuler仓库 + + .. code-block:: bash + + git clone https://gitee.com/openeuler/yocto-meta-openeuler.git + +* 环境准备 + +sphinx依赖于python,所以要先安装python环境,并安装pip工具和sphinx。 + +1.下载并安装python3 for windows:https://www.python.org/downloads/windows/ + +- 下载python3.10.3安装包 + +- 安装python3,默认安装或自定义安装路径如 :file:`D:/python3` + +- 添加到系统路径,如python3安装到 :file:`D:/python3` 下,则将 :file:`D:/Python3` 和 :file:`D:/Python3/Scripts` 添加到系统环境变量Path中,后面那个路径一般是easy_install,pip等扩展工具安装的目录。 + +- 安装pip3,默认pip3已经在 :file:`Scripts` 目录中了无需额外安装,如果没有,则下载并安装: + + - 下载 :file:`get-pip.py` 脚本到 :file:`Scripts` 目录,地址: https://bootstrap.pypa.io/get-pip.py + + - 在 :file:`Scripts` 目录运行下面命令安装pip3: + + .. code-block:: python + + python3 get-pip.py + +2.使用pip3安装sphinx(运行此命令): + + .. code-block:: bash + + pip3 install sphinx + +3.在python的 :file:`Scripts` 目录下,找到easy_install,在控制台下执行该命令,在命令行输入 + + .. code-block:: bash + + easy_install sphinx + +easy_install可以自动下载并安装sphinx以及它所依赖的其他模块。 + +4.安装完成后,命令行会提示Finished Processing dependencies for shinx + +5.在命令行输入sphinx-build,如果在安装python时,没有设置环境变量,可能会弹出sphinx-build不是内部或者外部命令。 + +6.通过pip3按照如下命令安装相应的python软件包,包括sphinx、文档主题等: + + .. code-block:: bash + + pip3 install --user -r yocto-meta-openeuler/scripts/requirements-doc.txt + +* 创建工程 + +安装完sphinx后,会在python的 :file:`Scripts` 目录下产生sphinx-quickstart,确保该目录已经添加到系统环境变量中。 + +1.启动cmd。进入要创建sphinx文档的目录,如 :file:`D:/Learn/python` 。 + + .. code-block:: bash + + cd /d d:\Learn\python + +或直接在 :file:`D:/Learn/python` 目录下,按住Shift,点击鼠标右键选择在此处打开Powershell窗口(S)。 + +2.执行下面过程,创建编写Python文档的工程,其实设置工程名、作者名、版本号,其他默认就行。我们这里把source和build两个目录分开,因为这样比较方便。 + + .. code-block:: bash + + PS D:\Learn\python> sphinx-quickstart + Welcome to the Sphinx 3.5.4 quickstart utility. + + Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). + + Selected root path: . + + You have two options for placing the build directory for Sphinx output. + Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. + + > Separate source and build directories (y/n) [n]: y + + The project name will occur in several places in the built documentation. + + > Project name: embedded + > Author name(s): yang + > Project release []: 1.0.0 + + If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. + + For a list of supported codes, see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language. + + > Project language [en]: + + Creating file D:\Learn\python\source\conf.py. + Creating file D:\Learn\python\source\index.rst. + Creating file D:\Learn\python\Makefile. + Creating file D:\Learn\python\make.bat. + + Finished: An initial directory structure has been created. + + You should now populate your master file D:\Learn\python\source\index.rst and create other documentation source files. Use the Makefile to build the docs, like so: + make builder + where "builder" is one of the supported builders, e.g. html, latex or linkcheck. + + PS D:\Learn\python> + +安装完成后,将clone的 :file:`yocto-meta-openeuler/docs/` 目录下的 :file:`image` 和 :file:`source` 目录全部复制到新建工程目录( :file:`D:/Learn/python` )内并替换原文件。 + +* 编辑文档 + +相关文档源码位于 :file:`docs/source` 目录,根据你的需要修改或新增相应的文档,新增文档命名要按照Linux命名方法命名为xxx_yyy_zzz.rst,请按照如下目录规则布局文档: + + .. csv-table:: 文档目录布局 + :header: "文件/目录名", "用途" + :widths: 20, 20 + + "index.rst", "目录页" + "introduction", "openEuler Embedded总揽与简介" + "getting_started", "openEuler Embedded快速使用入门" + "features", "openEuler Embedded主要特性介绍" + "yocto", "openeuler Embedded的Yocto构建系统" + "release", "openEuler Embedded的发布说明" + + +* 编译文档 + +将 :file:`docs` 下的 :file:`image` 和 :file:`source` 目录内新增和修改的文件全部复制替换到工程(:file:`D:/Learn/python`)对应目录内,在该目录下编译文档 + + .. code-block:: bash + + .\make html + +编译成功之后,可以打开 :file:`build/html` 目录下的html文件查看最终生成的网页形式的文档。 + +* 提交修改 + +像提交代码一样,把所有的修改以commit的形式提交,然后在gitee上生成PR提交到openEuler Embedded对应的仓库, 经过审查后,修改就会被CI自动编译并发布。 + + .. attention:: + + - 新增文档必须将该文档加入到对应目录的index索引文件中,新增目录必须将目录和索引加入到 :file:`docs/source/getting_started/index.html` 中,图片加入到 :file:`docs/image/` 目录中。 + - git提交时标题加上 :file:`doc:` 开头,例如doc:(空一格)modify doc。并加上Signed-off-by,与提交的message中间空一行。 + - 提交PR时标题要以 :file:`[文档]` 开头,例如[文档]:修改xx文档内容。如果有issue,要和issue进行关联。 + +.. [#sphinx_web] `Sphinx官方网站 `_ +.. [#rst_wikipedia] `reStructuredText维基百科 `_ +.. [#rst_tutorial] `reStructuredText简易教程 `_ \ No newline at end of file diff --git a/docs/source/features/distributed_soft_bus.rst b/docs/source/features/distributed_soft_bus.rst new file mode 100644 index 0000000000000000000000000000000000000000..78492282a6ce71e6f2c441a6184de041e777406e --- /dev/null +++ b/docs/source/features/distributed_soft_bus.rst @@ -0,0 +1,118 @@ +.. _distributed_soft_bus: + +分布式软总线 +############# + +特性介绍 +************** + +**背景** + +openEuler秉承着打造“数字化基础设施操作系统”的愿景,为促进与OpenHarmony生态的合作与互通,实现端边领域的互通和协同,首次在嵌入式领域引入分布式软总线技术。 + +分布式软总线是OpenHarmony社区开源的分布式设备通信基座,为设备之间的互通互联提供统一的分布式协同能力,实现设备无感发现和高效传输。 + +OpenHarmony主要面向强交互等需求的智能终端、物联网终端和工业终端。openEuler主要面向有高可靠、高性能等需求的服务器、边缘计算、云和嵌入式设备,二者各有侧重。通过以分布式软总线为代表的技术进行生态互通,以期实现“1+1>2”的效果,支撑社区用户开拓更广阔的行业空间。 + +**架构** + +软总线的主要架构如下: + +.. figure:: ../../image/dsoftbus/dsoftbus_architecture.png + +软总线主体功能分为发现、组网、连接和传输四个基本模块,实现: +即插即用:快速便捷发现周边设备 +自由流转:各设备间自组网,任意建立业务连接,实现自由通信 +高效传输:通过wifi、蓝牙设备下软硬件协同最大化发挥硬件传输性能 + +软总线南向支持标准以太网通信,同时后续可持续拓展wifi、蓝牙等多种通信方式。并为北向的分布式应用提供统一的API接口,屏蔽底层通信机制。 + +软总线依赖于设备认证、IPC、日志和系统参数(SN号)等周边模块,嵌入式系统中将这些依赖模块进行了样板性质的替换,以实现软总线基本功能。实际的周边模块功能实现,还需要用户根据实际业务场景进行丰富和替换,以拓展软总线能力。 + +应用指南 +************** + +**部署示意** + +软总线支持局域网内多设备部署,设备间通过以太网通信。单设备上分为server和client,二者通过IPC模块进行交互。 + +.. figure:: ../../image/dsoftbus/dsoftbus_networking.png + +注意:当前IPC模块和SN号等系统参数,嵌入式版本提供的仅为参考模板,还无法支持多节点和多client部署。用户可根据实际业务场景进行IPC模块和SN号系统参数进行功能丰富,以拓展软总线部署能力。 + +**服务端启动** + +服务端主程序为softbus_server_main,执行该主程序既可拉起软总线服务端。 + +.. code-block:: console + + openeuler ~ # softbus_server_main >log.file & + +当服务端被拉起时,会主动通过名为ethX的网络设备进行coap广播,若探测到对端设备存在则会启动自组网。 + +**客户端API** + +头文件在sdk和initrd中均存放在/usr/include/dsoftbus/下,其中: + +1.discovery_service.h:发现模块头文件,支持应用主动探测和发布的API + + a.PublishService:发布特定服务能力 + + b.UnPublishService:取消发布特定服务能力 + + c.StartDiscovery:订阅/探测特定服务能力 + + d.StopDiscovery:取消订阅特性服务能力 + +其中服务能力通过g_capbilityMap数组定义,用户若新增能力需要自定义修改该数组,并重新编译软总线服务端和客户端程序来生效。 + +2.softbus_bus_center.h:组网模块头文件,支持获取组网内设备信息API + + a.GetAllNodeDeviceInfo:获取当前组网内所有节点信息 + +3.session.h:连接/传输模块头文件,支持创建session和数据传输API + + a.CreateSessionServer:创建session服务端 + + b.RemoveSessionServer:移除session服务端 + + c.OpenSession:创建到对端的传输连接(同时依赖于本端和对端提前创建的SessionServer) + + d.CloseSession:断开传输连接 + + e.SendBytes:根据建好的连接ID,进行数据传输。 + +各API参数详见头文件描述。 + +编译指导 +************** + +编译依托于embedded版本发布的容器镜像,请参考“openEuler Embedded容器构建指导”章节进行容器环境准备。 + +1)下载脚本所在仓库(例如下载到src/yocto-meta-openeuler目录下) + + | ``git clone https://gitee.com/openeuler/yocto-meta-openeuler.git -b openEuler-22.03-LTS -v src/yocto-meta-openeuler`` + +2)执行下载脚本 + + | 下载最新软总线代码: + + | ``sh src/yocto-meta-openeuler/scripts/download_code.sh dsoftbus`` + + | 代码默认下载到与yocto-meta-openeuler同级别的路径,如需修改软总线或者其依赖的模块代码可到对应路径下查找dsoftbus_standard和yocto-embedded-tools仓库进行对应修改。 + +3)编译编译脚本 + + | 编译最新软总线代码: + + | ``sh src/yocto-meta-openeuler/scripts/compile.sh dsoftbus`` + + | 编译工作目录名为“dsoftbus_build”,编译生成件目录名为“dsoftbus_output”,二者均默认与yocto-meta-openeuler在同级别路径。 + +限制约束 +************** + +1.仅支持局域网下的coap发现。wifi/ble等功能在后续版本中持续支持。 + +2.目前提供的IPC、SN号等软总线的依赖模块均为样例,仅支持双设备节点部署,client-server一对一部署的能力。期待后续与社区伙伴,根据实际场景共同对这些依赖模块进行实例化。 + diff --git a/docs/source/features/index.rst b/docs/source/features/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..986fbb65b3bf27c87cdb5e708a394ba4f9219e63 --- /dev/null +++ b/docs/source/features/index.rst @@ -0,0 +1,15 @@ +.. _openeuler_embedded_features: + + +openEuler Embedded关键特性 +################################ + +.. toctree:: + :maxdepth: 1 + :caption: 内容 + + software_package_description.rst + mcs.rst + distributed_soft_bus.rst + raspberrypi.rst + preempt_rt.rst diff --git a/docs/source/features/mcs.rst b/docs/source/features/mcs.rst new file mode 100644 index 0000000000000000000000000000000000000000..a700adf6819de563fefd880a671954ea846397b1 --- /dev/null +++ b/docs/source/features/mcs.rst @@ -0,0 +1,4 @@ +.. _mixed_critical_system: + +混合关键性系统 +################### diff --git a/docs/source/features/preempt_rt.rst b/docs/source/features/preempt_rt.rst new file mode 100644 index 0000000000000000000000000000000000000000..48e554b424b714dac989927e15a918a94a6a7b5b --- /dev/null +++ b/docs/source/features/preempt_rt.rst @@ -0,0 +1,185 @@ +.. preempt_rt: + +openEuler Embedded软实时系统介绍 +################################ + +本章主要介绍openEuler Embedded软实时系统的特性说明,构建方式和性能测试。 + +软实时特性介绍 +************** + +**实时性简介** + +实时的诉求通常是事件的响应时间不能超过规定的期限,一个事件的最大响应时间应该是确定的、可以预测的。 + +**PREEMPT_RT补丁简介** + +PREEMPT_RT补丁(以下简称RT补丁)可直接打在内核源码上,并通过内核配置选项 CONFIG_PREEMPT_RT=y 使能软实时功能。RT补丁实现的核心在于最小化内核中不可抢占部分的代码,从而使高优先级任务就绪时能及时抢占低优先级任务,减少切换时延。除此之外,补丁通过多种降低时延的措施,对锁、驱动等模块也进行了优化。 + +openEuler Embedded版本中可使用的RT补丁请参考: + +1. qemu: + + 1. `patch-5.10.0-60.10.0-rt62.patch `_ + + 2. `patch-5.10.0-60.10.0-rt62_openeuler_defconfig.patch `_ + +2. raspberrypi: + + 1. `0000-raspberrypi-kernel.patch (树莓派补丁) `_ + + 2. `0001-add-preemptRT-patch.patch `_ + + 3. `0002-modifty-bcm2711_defconfig-for-rt-rpi-kernel.patch `_ + +**补丁关键功能举例** + +1. 增加中断程序的可抢占性(中断线程化、软中断线程化) + +2. 增加临界区的可抢占性(如自旋锁) + +3. 增加关中断代码的可抢占性 + +4. 解决优先级反转问题(优先级继承) + +软实时镜像构建指导 +****************** + +具体下载源码和编译流程建议参考:`openEuler Embedded容器构建指导 `_ + +**通用构建方式** + +如需构建openEuler Embedded软实时镜像,可以根据所需板级支持包(Board Support Package),在内核源码打入上述补丁后进行编译和调试。 + +- 步骤: + +下载源码 --> 从源码仓 :file:`src-kernel-5.10` 获取RT补丁 --> 在内核 :file:`kernel-5.10` 打入RT补丁 --> 编译构建 + +- 以树莓派为例,打补丁方法示例: + +.. code-block:: console + + cd /path/to/src/kernel-5.10/ + + cp ../src-kernel-5.10/*.patch ./ + + patch -p1 < 0000-raspberrypi-kernel.patch + + patch -p1 < 0001-add-preemptRT-patch.patch + + patch -p1 < 0002-modifty-bcm2711_defconfig-for-rt-rpi-kernel.patch + +- 注意: + +1. 如果开发人员使用的内核配置不是RT补丁中修改的defconfig(qemu::file:`arch/arm64/configs/openeuler_defconfig`,树莓派::file:`arch/arm64/configs/bcm2711_defconfig`),则需要在自己的defconfig中开启内核配置选项 CONFIG_PREEMPT_RT + +2. openEuler Embedded 软实时特性当前仅支持 arm64 架构 + +**aarch64-pro一键式构建方式** + +yocto-meta-openeuler中也提供了一个可直接构建RT镜像的架构,便于开发人员一键式构建,无需再手动打RT补丁。通过 `编译构建 `_ 中选择 **aarch64-pro** 架构,即可编译出支持树莓派的RT镜像。 + +- 构建命令示例: + +.. code-block:: console + + cd /usr1/openeuler/src/yocto-meta-openeuler/scripts + + source compile.sh aarch64-pro /usr1/build /usr1/openeuler/gcc/openeuler_gcc_arm64le + + bitbake openeuler-image + +- 构建镜像生成目录: + + :file:`/usr1/build/output/` + +- 二进制介绍: + + 1. :file:`Image-5.10.0-rt62-v8`: 树莓派RT内核镜像 + + 2. :file:`openeuler-image-qemu-aarch64-<时间戳>.rootfs.cpio.gz`:树莓派RT文件系统 + + 3. :file:`openeuler-glibc-x86-64-openeuler-image-aarch64-qemu-aarch64-toolchain-22.03.30.sh`: sdk工具链 + + 4. :file:`zImage`: 树莓派RT内核的压缩镜像 + +- 验证环境的软实时是否使能,可查看系统是否有PREEMPT_RT字样: + +输入示例: + +.. code-block:: console + + uname -a + +输出示例: + +.. code-block:: console + + Linux openeuler 5.10.0-rt62-v8 #1 SMP PREEMPT_RT Fri Mar 25 03:58:22 UTC 2022 aarch64 GNU/Linux + +软实时性能测试 +************** + +**软实时相关测试** + +参考 `RT-Tests 指导 `_ 进行软实时相关测试,用例包括但不限于: + +1. cyclictest 时延性能测试 + +2. pi_stress 优先级继承测试 + +3. hackbench 负载构造工具 + +下面以cyclictest 时延性能测试为例进行说明。 + +**cyclictest 时延性能测试** + +1. 准备开发环境 + +参考 `安装SDK `_,准备编译环境,示例: + +.. code-block:: console + + sh openeuler-glibc-x86_64-openeuler-image-aarch64-qemu-aarch64-toolchain-22.03.sh + + . /path/to/sdk/environment-setup-aarch64-openeuler-linux + +2. 编译用例 + +.. code-block:: console + + git clone https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git + + cd rt-tests + + git checkout stable/v1.0 + + make all + +3. 执行用例 + +编译完成后生成二进制 :file:`cyclictest`,传入单板环境后可查看执行cyclictest时可配置的参数: + +.. code-block:: console + + ./cyclictest --help + +cyclictest有多种参数配置方法,用例具体的入参设计可参考:`test-design `_ + +输入示例: + +.. code-block:: console + + ./cyclictest -p 90 -m -i 100 -n -h 100 -l 10000000 + +输出示例: + +.. code-block:: console + + # /dev/cpu_dma_latency set to 0us + policy: fifo: loadavg: 2.32 1.99 1.58 1/95 311 + + T: 0 ( 311) P:90 I:100 C:10000000 Min: 7 Act: 9 Avg: 8 Max: 16 + +即用例循环1000万次后,平均时延为8us,最坏时延为16us(该数据仅为示例,具体以环境实测为准)。 + diff --git a/docs/source/features/raspberrypi.rst b/docs/source/features/raspberrypi.rst new file mode 100644 index 0000000000000000000000000000000000000000..100e27c6fd820b1863d14a997830fd694b2df9c6 --- /dev/null +++ b/docs/source/features/raspberrypi.rst @@ -0,0 +1,213 @@ +.. raspberrypi: + +openEuler Embedded树莓派系统介绍 +###################################### + +本章主要介绍openEuler Embedded树莓派系统的构建,使用和特性介绍。 + +树莓派镜像构建指导 +*********************************** +**构建环境** + +1.构建环境推荐:openEuler-22.03 LTS + +2.构建指导: `参考容器构建指导 `_ + +- 构建命令示例: + +.. code-block:: console + + su openeuler + + source /usr1/openeuler/src/yocto-meta-openeuler/scripts/compile.sh raspberrypi4-64 /usr1/openeuler/src/build/build-raspberrypi4-64/ + + bitbake openeuler-image + +- 构建镜像生成目录示例: + +.. code-block:: console + + /usr1/openeuler/src/build/build-raspberrypi4-64/output + + +- 二进制介绍: + + 1. Image: 树莓派内核镜像 + + 2. openeuler-glibc-x86-64-openeuler-image-cortexa72-raspberrypi4-64-toolchain-22.03.30.sh: SDK工具链 + + 3. openeuler-image-raspberrypi4-64-\*.rootfs.rpi-sdimg: openEuler Embedded树莓派支持SD卡镜像 + + +**镜像使用方法** + +1.镜像烧录: + +参考: `树莓派SD卡烧录指导 `_ + +2.镜像使用 + +- 使用 losetup 将磁盘镜像文件虚拟成块设备 + +.. code-block:: console + + losetup -f --show openeuler-image-raspberrypi4-64-*.rootfs.rpi-sdimg + +例如,显示结果为 /dev/loop0 + +- 使用 kpartx 创建分区表 /dev/loop0 的设备映射 + +.. code-block:: console + + kpartx -va /dev/loop0 + +得到结果是 /dev/loop0 的两个分区设备 + +.. code-block:: console + + add map loop0p1 + add map loop0p2 + +运行 ls /dev/mapper/loop0p* 可以看到对应的两个分区 + +.. code-block:: console + + /dev/mapper/loop0p1 /dev/mapper/loop0p2 + +- 分区挂载 + +创建挂载目录 + +.. code-block:: console + + mkdir ${WORKDIR}/boot ${WORKDIR}/root + +挂载boot分区 + +.. code-block:: console + + mount -t vfat -o uid=root,gid=root,umask=0000 /dev/mapper/loop0p1 ${WORKDIR}/boot + +挂载root分区 + +.. code-block:: console + + mount -t ext4 /dev/mapper/loop0p2 ${WORKDIR}/root + +挂载完成后,可以查看boot分区和root分区下树莓派镜像的文件,其中boot分区为启动引导分区,包含了引导程序,内核镜像,设备树,config.txt和cmdline等配置文件,root分区为根文件系统分区。 + +基于openEuler Embedded树莓派使用 +********************************************** + +**启用树莓派** + +硬件版本要求:树莓派4B + +默认用户名:root,密码:第一次启动没有默认密码,需重新配置,且密码强度有相应要求, 需要数字、字母、特殊字符组合最少8位,例如openEuler@2021。 + +将刷写镜像后的SD卡插入树莓派,通电启用。 + +**树莓派登录方式** + +1.本地登录 + +a.使用串口登录: + +镜像使能了串口登录功能,按照树莓派的串口连接方式,如下图,可以启用串口操作。 + +示例:使用ttyusb转接器,将树莓派串口通过USB连接到putty: + +.. image:: ../../image/raspberrypi/rasp-ttyusb-connect.png + +putty配置参考: Serial line:ttyUSB0 speed:115200 Connection type:Serial + +.. image:: ../../image/raspberrypi/putty_config.png + +b.使用HDMI登录: + +树莓派连接显示器(树莓派视频输出接口为 Micro HDMI)、键盘、鼠标后,启动树莓派,可以看到树莓派启动日志输出到显示器上。待树莓派启动成功,输入用户名(root)和密码登录。 + +注意:当前镜像默认使能串口登录,如果需要通过HDMI,需要修改相关配置: + +(1)修改boot分区下的cmdline文件内参数,添加 console=tty1 + +(2)将root分区下的/etc/inittab文件内参数字段ttyS0修改为tty1 + + +2.ssh 远程登录 + +参考: `树莓派使用:启用树莓派:ssh 登录 `_ + +**分区扩容** + +以下内容引用: `树莓派使用:启用树莓派:分区扩容 `_ + +默认根目录分区空间比较小,在使用之前,需要对分区进行扩容。 + +1.查看磁盘分区信息 + +执行 fdisk -l 命令查看磁盘分区信息。回显如下: + +.. code-block:: console + + Device Boot StartCHS EndCHS StartLBA EndBLA Sectors size Id Type + + /dev/mmcblk0p1 * 64,0,1 831,3,32 8192 106495 98304 48.0M c Win95 FAT32(LBA) + + /dev/mmcblk0p2 832,0,1 1023,3,32 106496 360447 253952 124M 83 Linux + +SD 卡对应盘符为 /dev/mmcblk0,包括 2 个分区,分别为 + +.. code-block:: console + + /dev/mmcblk0p1:引导分区 + + /dev/mmcblk0p2:根目录分区 + +这里我们需要将根目录分区 /dev/mmcblk0p2 进行扩容。 + +2.分区扩容 + +- 对根目录/dev/mmcblk0p2进行扩容 + + 1.执行 fdisk /dev/mmcblk0 命令进入到交互式命令行界面,按照以下步骤扩展分区,如下图所示。 + + 2.输入 p,查看分区信息。 + + 3.记录分区 /dev/mmcblk0p2 的起始扇区号,即 /dev/mmcblk0p2 分区信息中 Start 列的值,示例中为 106496。 + + 4.输入 d,删除分区。 + + 5.输入 2 或直接按 Enter,删除序号为 2 的分区,即 /dev/mmcblk0p2 分区。 + + 6.输入 n,创建新的分区。 + + 7.输入 p 或直接按 Enter,创建 Primary 类型的分区。 + + 8.输入 2 或直接按 Enter,创建序号为 2 的分区,即 /dev/mmcblk0p2 分区。 + + 9.输入新分区的起始扇区号,即第 1 步中记录的起始扇区号,示例中为 106496。 + + 须知: + 请勿直接按“Enter”或使用默认参数,否则会擦损磁盘数据。 + + 10.按 Enter,使用默认的最后一个扇区号作为新分区的终止扇区号。 + + 11.输入 w,保存分区设置并退出交互式命令行界面。 + +- 增大未加载的文件系统大小 + +.. code-block:: console + + resize2fs /dev/mmcblk0p2 + +树莓派镜像特性介绍 +************************** + +1.树莓派硬件特性,参考:`树莓派使用:GPIO介绍 `_ + +目前已使能串口设备,可以访问mini-uart,其他硬件特性暂不支持。 + +2.支持百级嵌入式软件包,见软件包功能列表。 + +3.支持部署rt实时内核。 diff --git a/docs/source/features/software_package_description.rst b/docs/source/features/software_package_description.rst new file mode 100644 index 0000000000000000000000000000000000000000..c35b78584df5c1ea7260a2f6669aa2a1e4ad0f05 --- /dev/null +++ b/docs/source/features/software_package_description.rst @@ -0,0 +1,297 @@ +openEuler Embedded所支持的软件包 +===================================== + +.. csv-table:: + :header: "软件名称","RPM名称","软件包名称","功能说明","详细情况","依赖关系" + :widths: 10,50,20,50,80,80 + + "acl", "acl-2.3.1-r0.aarch64.rpm", "acl", "提供操纵访问控制列表的命令", "提供操作程序控制列表的getfacl和setfacl程序。", "glibc >= 2.34;libacl1 >= 2.3.1;" + "acl", "libacl1-2.3.1-r0.aarch64.rpm", "libacl1", "提供用于访问POSIX访问控制列表的动态库", "提供libacl.so动态库,其中包含POSIX 1003.1e标准草案中用于操作访问控制列表的17个函数。", "/bin/sh;glibc >= 2.34;libattr1 >= 2.5.1" + "attr", "attr-2.5.1-r0.aarch64.rpm", "attr", "用于管理文件系统扩展属性", "一种在文件系统对象上操作扩展属性的工具集,特别是getfattr和setfattr工具。;还提供了一个attr命令,它在很大程度上兼容使用同名的SGI IRIX工具。", "glibc >= 2.34;libattr1 >= 2.5.1" + "attr", "libattr1-2.5.1-r0.aarch64.rpm", "libattr1", "提供文件扩展属性支持的动态库", "提供libattr.so动态库,其中包含扩展属性库函数。", "" + "audit", "audispd-plugins-3.0.1-r0.aarch64.rpm", "audispd-plugins", "提供审计事件调度器的插件", "为audit系统、audispd的实时接口的提供插件;;此插件能够传达事件到远端及其或者为分析可疑行为的事件。", "" + "audit", "audit-3.0.1-r0.aarch64.rpm", "audit", "为审计提供用户空间工具", "通过审计系统提供用户空间程序来存储和搜索审计记录生成。", "/bin/sh;glibc >= 2.34;libcap-ng >= 0.8.2" + "audit", "auditd-3.0.1-r0.aarch64.rpm", "auditd", "提供audit的守护进程", "", "audit >= 3.0.1;config(auditd) = 3.0.1-r0;glibc >= 2.34;libcap-ng >= 0.8.2" + "bash", "bash-5.1.8-r0.aarch64.rpm", "bash", "命令处理器", "与sh兼容的命令解释器,从标准输入或文件中读取来执行命令,并结合了ksh和csh的有用功能。", "/bin/sh;glibc >= 2.34;glibc >= 2.34;libtinfo5 >= 6.2;libtinfo5 >= 6.2" + "bind", "bind-9.11.14-r0.aarch64.rpm", "bind", "域名系统(DNS)协议的一种实现", "提供DNS服务器,将主机名转换为IP地址;;提供解析器库,是与DNS交互式应用程序使用的例程;;提供工具,验证DNS服务是否正常运行。", "/bin/sh;config(bind) = 9.11.14-r0;glibc >= 2.34;libcap >= 2.61;libcrypto1.1 >= 1.1.1m;libz1 >= 1.2.11" + "bind", "bind-utils-9.11.14-r0.aarch64.rpm", "bind-utils", "用于查询DNS名称服务器", "从DNS名称服务器中获取信息。", "bind >= 9.11.14;glibc >= 2.34;libreadline8 >= 8.1" + "binutils", "libbfd-2.37-r0.aarch64.rpm", "libbfd", "二进制描述器", "提供libbfd-2.37.so动态库。", "/bin/sh;glibc >= 2.34;libz1 >= 1.2.11" + "busybox", "busybox-1.34.1-r1.aarch64.rpm", "busybox", "许多常见UNIX实用程序的微小版本组合", "替代通常在filetuils、shellutils、findutils、textutils、grep、gzip、tar等中的实用程序,;提供相当完整的POSIX小型或嵌入式系统环境。", "glibc >= 2.34;libtirpc3 >= 1.3.2" + "busybox", "busybox-linuxrc-1.34.1-r1.aarch64.rpm", "busybox-linuxrc", "提供初始化程序", "提供linuxrc和init程序。", "busybox" + "bzip2", "libbz2-1-1.0.8-r0.aarch64.rpm", "libbz2-1", "bzip2运行时库", "提供libbz2.so.1动态库。", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "cifs-utils", "cifs-utils-6.14-r0.aarch64.rpm", "cifs-utils", "用于执行和管理Linu CIFS文件系统的挂载", "包含用于执行和管理Linux CIFS文件系统挂载的使用程序。", "glibc >= 2.34" + "cracklib", "cracklib-2.9.7-r0.aarch64.rpm", "cracklib", "使用字典破解密码的库", "测试密码以确定它们是否匹配一定的安全导向特性,可阻止用户选择太过简单的密码。", "/bin/sh;glibc >= 2.34;libz1 >= 1.2.11" + "cronie", "cronie-1.5.7-r0.aarch64.rpm", "cronie", "用于周期性执行指令", "提供cron的守护进程,cron用于在特定时间自动启动任务程序。", "config(cronie) = 1.5.7-r0;glibc >= 2.34;libpam >= 1.5.2;libpam-runtime;pam-plugin-access;pam-plugin-loginuid" + "curl", "curl-7.79.1-r0.aarch64.rpm", "curl", "用于从远端服务器获取文件", "一个命令行工具,用于使用URL语法传输数据,支持多种协议和大量有用的技巧。", "glibc >= 2.34;libcurl4 >= 7.79.1" + "curl", "libcurl4-7.79.1-r0.aarch64.rpm", "libcurl4", "用于从URL传输数据的库", "curl共享库,用于使用不同的网络协议访问数据", "/bin/sh;glibc >= 2.34" + "dhcp", "dhcp-4.4.2-r0.aarch64.rpm", "dhcp", "提供ISC DHCP软件使用的常用程序", "包含ISC DHCP服务端和客户端使用的常用程序。", "bind >= 9.11.14;dhcp-libs >= 4.4.2;glibc >= 2.34" + "dhcp", "dhcp-libs-4.4.2-r0.aarch64.rpm", "dhcp-libs", "ISC DHCP服务端和客户端使用的共享库", "提供ISC DHCP服务端和客户端使用的共享库。", "/bin/sh;glibc >= 2.34" + "dhcp", "dhcp-server-4.4.2-r0.aarch64.rpm", "dhcp-server", "提供ISC DHCP服务端", "提供DHCP服务端和dhcp守护进程。", "/bin/sh;bind >= 9.11.14;dhcp-libs >= 4.4.2;glibc >= 2.34" + "dhcp", "dhcp-server-config-4.4.2-r0.aarch64.rpm", "dhcp-server-config", "ISC DHCP服务端配置", "提供默认的DHCP服务端和dhcp守护进程配置文件。", "/etc;/etc/default;/etc/default/dhcp-server;/etc/dhcp;/etc/dhcp/dhcpd.conf" + "dosfstools", "dosfstools-4.2-r0.aarch64.rpm", "dosfstools", "用于创建和检查MS-DOS FAT文件系统", "包含用于Linux中 创建和检查硬盘或软盘上的MS-DOS FAT文件系统的两个工具。", "glibc >= 2.34" + "e2fsprogs", "e2fsprogs-1.46.4-r0.aarch64.rpm", "e2fsprogs", "用于管理ext2、ext3和ext4文件系统", "包含许多用于ext2、ext3和ext4文件系统中创建、检查、修改和纠正任何不一致的程序。", "e2fsprogs-badblocks;e2fsprogs-dumpe2fs;glibc >= 2.34;libblkid1 >= 2.37.2;libcom-err2 >= 1.46.4;libe2p2 >= 1.46.4;libext2fs2 >= 1.46.4;libss2 >= 1.46.4;libuuid1 >= 2.37.2" + "e2fsprogs", "e2fsprogs-badblocks-1.46.4-r0.aarch64.rpm", "e2fsprogs-badblocks", "用于检查磁盘装置中损坏的区块", "提供badblocks命令,用于检查磁盘装置中损坏的区块。", "glibc >= 2.34;libcom-err2 >= 1.46.4;libext2fs2 >= 1.46.4" + "e2fsprogs", "e2fsprogs-dumpe2fs-1.46.4-r0.aarch64.rpm", "e2fsprogs-dumpe2fs", "用于查看格式化之后的文件系统信息", "提供dumpe2fs命令,用于查看格式化之后的文件系统信息。", "glibc >= 2.34;libblkid1 >= 2.37.2;libcom-err2 >= 1.46.4;libe2p2 >= 1.46.4;libext2fs2 >= 1.46.4" + "e2fsprogs", "e2fsprogs-e2fsck-1.46.4-r0.aarch64.rpm", "e2fsprogs-e2fsck", "用于检查使用Linux ext2档案系统的partition", "提供e2fsck命令,用于检查使用Linux ext2档案系统的partition是否正常工作。", "glibc >= 2.34;libblkid1 >= 2.37.2;libcom-err2 >= 1.46.4;libe2p2 >= 1.46.4;libext2fs2 >= 1.46.4;libuuid1 >= 2.37.2" + "e2fsprogs", "e2fsprogs-mke2fs-1.46.4-r0.aarch64.rpm", "e2fsprogs-mke2fs", "用于建立ext2文件系统", "提供mke2fs.conf和mke2fs.e2fsprogs,mke2fs命令用于建立ext2文件系统。", "glibc >= 2.34;libblkid1 >= 2.37.2;libcom-err2 >= 1.46.4;libe2p2 >= 1.46.4;libext2fs2 >= 1.46.4;libuuid1 >= 2.37.2" + "e2fsprogs", "e2fsprogs-tune2fs-1.46.4-r0.aarch64.rpm", "e2fsprogs-tune2fs", "调整和查看ext2/ext3文件系统参数的命令行工具", "提供e2label、tune2fs.e2fsprogs命令", "glibc >= 2.34;libblkid1 >= 2.37.2;libcom-err2 >= 1.46.4;libe2p2 >= 1.46.4;libext2fs2 >= 1.46.4;libuuid1 >= 2.37.2" + "e2fsprogs", "libcom-err2-1.46.4-r0.aarch64.rpm", "libcom-err2", "e2fsprogs报错库", "一个错误信息显示库。", "/bin/sh;glibc >= 2.34" + "e2fsprogs", "libe2p2-1.46.4-r0.aarch64.rpm", "libe2p2", "e2fsprogs共享库", "提供libe2p.so.2和libe2p.so.2.3动态库。", "/bin/sh;glibc >= 2.34" + "e2fsprogs", "libext2fs2-1.46.4-r0.aarch64.rpm", "libext2fs2", "e2fsprogs共享库", "提供libext2fs2.so.2和libext2fs.2.4动态库。", "/bin/sh;glibc >= 2.34;libblkid1 >= 2.37.2;libcom-err2 >= 1.46.4" + "e2fsprogs", "libss2-1.46.4-r0.aarch64.rpm", "libss2", "e2fsprogs共享库", "提供libss.so.2和libss.so.2.0动态库。", "/bin/sh;glibc >= 2.34;glibc >= 2.34;libcom-err2 >= 1.46.4;libcom-err2 >= 1.46.4" + "elfutils", "libasm1-0.185-r0.aarch64.rpm", "libasm1", "用于处理编译对象的实用程序和DSO集合", "提供libasm-0.185.so和libasm.so.1动态库", "/bin/sh;glibc >= 2.34;libdw1 >= 0.185;libelf1 >= 0.185" + "elfutils", "libelf1-0.185-r0.aarch64.rpm", "libelf1", "读写ELF文件的库", "提供libelf-0.185.so好libelf.so.1动态库", "/bin/sh;glibc >= 2.34;libz1 >= 1.2.11" + "elfutils", "libdw1-0.185-r0.aarch64.rpm", "libdw1", "访问DWARF调试信息的库", "提供libdw-0.185.so和libdw.so.1动态库", "glibc >= 2.34;libelf1 >= 0.185;libz1 >= 1.2.11" + "ethtool", "ethtool-5.15-r0.aarch64.rpm", "ethtool", "以太网网卡的设置工具", "允许在许多网络设备尤其是以太网设备中查询和更改设置,;例如速度、端口、自动协商、PCI位置、校验和卸载。", "glibc >= 2.34" + "expat", "libexpat1-2.4.1-r0.aarch64.rpm", "libexpat1", "XML解析器工具包", "提供libexpat.so.1好libexpat.so.1.8.1动态库", "/bin/sh;glibc >= 2.34" + "gdb", "gdb-11.1-r0.aarch64.rpm", "gdb", "用于C、C++、Fortran和其他语言的GNU源代码级调试器", "GDB是GNU调试器,允许您调试用C、C++、Java和其他语言编写的程序,方法是以受控的方式执行这些程序并打印它们的数据。", "gcc-bin-toolchain-compilerlibs-aarch64 >= 1.0;glibc >= 2.34;libexpat1 >= 2.4.1;libgmp10 >= 6.2.1;libreadline8 >= 8.1;libtinfo5 >= 6.3" + "gdb", "gdbserver-11.1-r0.aarch64.rpm", "gdbserver", "GDB(GNU源级调试器)的独立服务器", "此软件包提供了一个程序,允许您在运行正在调试程序的计算机之外的计算机上运行GDB。openEuler Embedded 330 版本中,SDK中暂时不支持主机端交叉调试工具gdb,可以使用gdb-multiarch代替,一般都可以通过zypper/apt/yum 安装(openeuler镜像暂不支持)。", "gcc-bin-toolchain-compilerlibs-aarch64 >= 1.0;glibc >= 2.34" + "glib-2.0", "libglib-2.0-0-2.68.1-r0.aarch64.rpm", "libglib-2.0-0", "通用使用程序库", "", "/bin/sh;glibc >= 2.34;libffi8 >= 3.4.2;libmount1 >= 2.37.2;libpcre1 >= 8.45;libz1 >= 1.2.11" + "glibc", "glibc-2.34-r1.aarch64.rpm", "glibc", "GNU C库", "包含重要的共享库集:标准C库和标准数学库。", "/bin/sh" + "gmp", "libgmp10-6.2.1-r0.aarch64.rpm", "libgmp10", "一个用于计算巨大数字的库", "GMP是一个用于任意精度算术的库,对有符号整数、有理数和浮点数进行操作。", "/bin/sh;glibc >= 2.34" + "grep", "grep-3.7-r0.aarch64.rpm", "grep", "用于打印与模式匹配的行", "提供grep命令,用于在一个或多个输入文件中搜索包含匹配指定的模式,;默认情况下,grep打印匹配的行。", "glibc >= 2.34;libpcre1 >= 8.45" + "gzip", "gzip-1.11-r0.aarch64.rpm", "gzip", "GNU 数据压缩程序", "包含GNU gzip数据压缩程序。", "glibc >= 2.34" + "http-parser", "libhttp-parser2.9-2.9.4-r0.aarch64.rpm", "libhttp-parser2.9", "解析http的库", "", "/bin/sh;glibc >= 2.34" + "initscripts", "initscripts-10.12-1.aarch64.rpm", "initscripts", "提供System V初始化脚本的基本支持", "提供System V初始化脚本的基本支持以及一些工具和实用程序。", "/bin/sh;initd-functions" + "initscripts", "initscripts-functions-10.12-1.aarch64.rpm", "initscripts-functions", "shell公共函数", "提供一些基础的功能。", "" + "iproute2", "iproute2-ip-5.15.0-r0.aarch64.rpm", "iproute2-ip", "提供iproute2程序", "提供ip.iproute2工具。", "glibc >= 2.34;libcap >= 2.61;libelf1 >= 0.185" + "iptables", "iptables-1.8.7-r0.aarch64.rpm", "iptables", "用于管理Linux内核包过滤功能的工具", "在Linux内核中控制网络包过滤代码,用于设置防火墙或IP伪装。", "" + "iptables", "iptables-module-ip6t-ah-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-ah", "提供libip6t_ah.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-dnat-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-dnat", "提供libip6t_DNAT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-dnpt-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-dnpt", "提供libip6t_DNPT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-dst-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-dst", "提供libip6t_dst.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-eui64-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-eui64", "提供libip6t_eui64.so动态库", "", "iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-frag-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-frag", "提供libip6t_frag.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-hbh-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-hbh", "提供libip6t_hbh.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-hl-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-hl", "提供libip6t_HL.so和libip6t_hl.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-icmp6-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-icmp6", "提供libip6t_icmp6.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-ipv6header-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-ipv6header", "提供libip6t_ipv6header.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-log-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-log", "提供libip6t_LOG.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-masquerade-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-masquerade", "提供libip6t_MASQUERADE.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-mh-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-mh", "提供libip6t_mh.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-netmap-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-netmap", "提供libip6t_NETMAP.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-redirect-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-redirect", "提供libip6t_REDIRECT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-reject-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-reject", "提供libip6t_REJECT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-rt-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-rt", "提供libip6t_rt.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-snat-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-snat", "提供libip6t_SNAT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-snpt-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-snpt", "提供libip6t_SNPT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ip6t-srh-1.8.7-r0.aarch64.rpm", "iptables-module-ip6t-srh", "提供libip6t_srh.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-ah-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-ah", "提供libipt_ah.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-clusterip-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-clusterip", "提供libipt_CLUSTERIP.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-dnat-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-dnat", "提供libipt_DNAT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-ecn-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-ecn", "提供libipt_ECN.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-icmp-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-icmp", "提供libipt_icmp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-log-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-log", "提供libipt_LOG.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-masquerade-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-masquerade", "提供libipt_MASQUERADE.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-netmap-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-netmap", "提供libipt_NETMAP.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-realm-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-realm", "提供libipt_realm.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-redirect-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-redirect", "提供libipt_REDIRECT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-reject-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-reject", "提供libipt_REJECT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-snat-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-snat", "提供libipt_SNAT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-ttl-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-ttl", "提供libipt_TTL.so和libipt_ttl.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-ipt-ulog-1.8.7-r0.aarch64.rpm", "iptables-module-ipt-ulog", "提供libipt_ULOG.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-addrtype-1.8.7-r0.aarch64.rpm", "iptables-module-xt-addrtype", "提供libxt_addrtype.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-audit-1.8.7-r0.aarch64.rpm", "iptables-module-xt-audit", "提供libxt_AUDIT.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-bpf-1.8.7-r0.aarch64.rpm", "iptables-module-xt-bpf", "提供libxt_bpf.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-cgroup-1.8.7-r0.aarch64.rpm", "iptables-module-xt-cgroup", "提供libxt_cgroup.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-checksum-1.8.7-r0.aarch64.rpm", "iptables-module-xt-checksum", "提供libxt_CHECKSUM.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-classify-1.8.7-r0.aarch64.rpm", "iptables-module-xt-classify", "提供libxt_CLASSIFY.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-cluster-1.8.7-r0.aarch64.rpm", "iptables-module-xt-cluster", "提供libxt_cluster.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-comment-1.8.7-r0.aarch64.rpm", "iptables-module-xt-comment", "提供libxt_comment.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-connbytes-1.8.7-r0.aarch64.rpm", "iptables-module-xt-connbytes", "提供libxt_connbytes.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-connlimit-1.8.7-r0.aarch64.rpm", "iptables-module-xt-connlimit", "提供libxt_connlimit.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-connmark-1.8.7-r0.aarch64.rpm", "iptables-module-xt-connmark", "提供libxt_CONNMARK.so和libxt_connmark.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-connsecmark-1.8.7-r0.aarch64.rpm", "iptables-module-xt-connsecmark", "提供libxt_CONNSECMARK.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-conntrack-1.8.7-r0.aarch64.rpm", "iptables-module-xt-conntrack", "提供libxt_conntrack.so和libxt_state.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-cpu-1.8.7-r0.aarch64.rpm", "iptables-module-xt-cpu", "提供libxt_cpu.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-ct-1.8.7-r0.aarch64.rpm", "iptables-module-xt-ct", "提供libxt_CT.so和libxt_NOTRACK.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-dccp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-dccp", "提供libxt_dccp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-devgroup-1.8.7-r0.aarch64.rpm", "iptables-module-xt-devgroup", "提供libxt_devgroup.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-dscp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-dscp", "提供libxt_DSCP.so和libxt_dscp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-ecn-1.8.7-r0.aarch64.rpm", "iptables-module-xt-ecn", "提供libxt_ecn.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-esp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-esp", "提供libxt_esp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-hashlimit-1.8.7-r0.aarch64.rpm", "iptables-module-xt-hashlimit", "提供ibxt_hashlimit.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-helper-1.8.7-r0.aarch64.rpm", "iptables-module-xt-helper", "提供libxt_helper.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-hmark-1.8.7-r0.aarch64.rpm", "iptables-module-xt-hmark", "提供libxt_HMARK.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-idletimer-1.8.7-r0.aarch64.rpm", "iptables-module-xt-idletimer", "提供libxt_IDLETIMER.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-ipcomp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-ipcomp", "提供libxt_ipcomp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-iprange-1.8.7-r0.aarch64.rpm", "iptables-module-xt-iprange", "提供libxt_iprange.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-ipvs-1.8.7-r0.aarch64.rpm", "iptables-module-xt-ipvs", "提供libxt_ipvs.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-led-1.8.7-r0.aarch64.rpm", "iptables-module-xt-led", "提供libxt_LED.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-length-1.8.7-r0.aarch64.rpm", "iptables-module-xt-length", "提供libxt_length.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-limit-1.8.7-r0.aarch64.rpm", "iptables-module-xt-limit", "提供libxt_limit.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-mac-1.8.7-r0.aarch64.rpm", "iptables-module-xt-mac", "提供libxt_mac.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-mark-1.8.7-r0.aarch64.rpm", "iptables-module-xt-mark", "提供libxt_MARK.so和libxt_mark.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-multiport-1.8.7-r0.aarch64.rpm", "iptables-module-xt-multiport", "提供libxt_multiport.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-nfacct-1.8.7-r0.aarch64.rpm", "iptables-module-xt-nfacct", "提供libxt_nfacct.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-nflog-1.8.7-r0.aarch64.rpm", "iptables-module-xt-nflog", "提供libxt_NFLOG.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-nfqueue-1.8.7-r0.aarch64.rpm", "iptables-module-xt-nfqueue", "提供libxt_NFQUEUE.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-osf-1.8.7-r0.aarch64.rpm", "iptables-module-xt-osf", "提供libxt_osf.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-owner-1.8.7-r0.aarch64.rpm", "iptables-module-xt-owner", "提供libxt_owner.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-physdev-1.8.7-r0.aarch64.rpm", "iptables-module-xt-physdev", "提供libxt_physdev.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-pkttype-1.8.7-r0.aarch64.rpm", "iptables-module-xt-pkttype", "提供libxt_pkttype.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-policy-1.8.7-r0.aarch64.rpm", "iptables-module-xt-policy", "提供libxt_policy.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-quota-1.8.7-r0.aarch64.rpm", "iptables-module-xt-quota", "提供libxt_quota.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-rateest-1.8.7-r0.aarch64.rpm", "iptables-module-xt-rateest", "提供libxt_RATEEST.so和libxt_rateest.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-recent-1.8.7-r0.aarch64.rpm", "iptables-module-xt-recent", "提供libxt_recent.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-rpfilter-1.8.7-r0.aarch64.rpm", "iptables-module-xt-rpfilter", "提供libxt_rpfilter.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-sctp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-sctp", "提供libxt_sctp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-secmark-1.8.7-r0.aarch64.rpm", "iptables-module-xt-secmark", "提供libxt_SECMARK.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-set-1.8.7-r0.aarch64.rpm", "iptables-module-xt-set", "提供libxt_SET.so和libxt_set.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-socket-1.8.7-r0.aarch64.rpm", "iptables-module-xt-socket", "提供libxt_socket.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-standard-1.8.7-r0.aarch64.rpm", "iptables-module-xt-standard", "提供libxt_standard.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-statistic-1.8.7-r0.aarch64.rpm", "iptables-module-xt-statistic", "提供libxt_statistic.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-string-1.8.7-r0.aarch64.rpm", "iptables-module-xt-string", "提供libxt_string.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-synproxy-1.8.7-r0.aarch64.rpm", "iptables-module-xt-synproxy", "提供libxt_SYNPROXY.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-tcp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-tcp", "提供libxt_tcp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-tcpmss-1.8.7-r0.aarch64.rpm", "iptables-module-xt-tcpmss", "提供libxt_TCPMSS.so和libxt_tcpmss.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-tcpoptstrip-1.8.7-r0.aarch64.rpm", "iptables-module-xt-tcpoptstrip", "提供libxt_TCPOPTSTRIP.so库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-tee-1.8.7-r0.aarch64.rpm", "iptables-module-xt-tee", "提供libxt_TEE.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-time-1.8.7-r0.aarch64.rpm", "iptables-module-xt-time", "提供libxt_time.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-tos-1.8.7-r0.aarch64.rpm", "iptables-module-xt-tos", "提供libxt_TOS.so和libxt_tos.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-tproxy-1.8.7-r0.aarch64.rpm", "iptables-module-xt-tproxy", "提供libxt_TPROXY.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-trace-1.8.7-r0.aarch64.rpm", "iptables-module-xt-trace", "提供libxt_TRACE.so动态库", "", "iptables >= 1.8.7" + "iptables", "iptables-module-xt-u32-1.8.7-r0.aarch64.rpm", "iptables-module-xt-u32", "提供libxt_u32.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iptables", "iptables-module-xt-udp-1.8.7-r0.aarch64.rpm", "iptables-module-xt-udp", "提供libxt_udp.so动态库", "", "glibc >= 2.34;iptables >= 1.8.7" + "iSulad", "iSulad-2.0.10-r0.aarch64.rpm", "iSulad", "云原生轻量级容器解决方案", "", "/bin/sh;glibc >= 2.34;lcr >= 2.0.7;libcrypto1.1 >= 1.1.1m;libcurl4 >= 7.79.1;libevent >= 2.1.12;libevhtp >= 1.2.18;libhttp-parser2.9 >= 2.9.4;libz1 >= 1.2.11;yajl >= 2.1.0" + "json-c", "libjson-c5-0.15-r0.aarch64.rpm", "libjson-c5", "C中json实现", "提供在C中处理json的动态库。", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "kmod", "kmod-29-r0.aarch64.rpm", "kmod", "将模块加载到内核中", "提供内核模块插入、删除、列出、检查属性、解析等工具。", "glibc >= 2.34;libz1 >= 1.2.11" + "lcr", "lcr-2.0.6-r0.aarch64.rpm", "lcr", "轻量级容器", "提供轻量级容器动态库。", "/bin/sh;glibc >= 2.34;glibc >= 2.34;lxc >= 4.0.3;lxc >= 4.0.3;yajl >= 2.1.0;yajl >= 2.1.0" + "less", "less-590-r0.aarch64.rpm", "less", "文本文件浏览器", "提供less等命令,用于查看文本,类似于more,但具有更多的能力。", "glibc >= 2.34;libtinfo5 >= 6.2" + "libaio1", "libaio1-0.3.112-r0.aarch64.rpm", "libaio1", "Linux原生异步I/O访问库", "提供给POSIX异步I/O工具内核加速的异步I/O功能。", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "libarchive", "libarchive-3.5.2-r0.aarch64.rpm", "libarchive", "用于处理流归档格式的库", "提供创建和读取不同流存档格式的功能。", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "libcap", "libcap-2.61-r0.aarch64.rpm", "libcap", "用于获取和设置POSIX.1e功能的库", "数据包捕获函数库,用于捕获网卡数据或分析pcap格式的抓包报文。", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "libcap", "libcap-bin-2.61-r0.aarch64.rpm", "libcap-bin", "提供libcap二进制工具", "提供/usr/sbin/capsh、/usr/sbin/getcap、/usr/sbin/getpcaps、/usr/sbin/setcap", "glibc >= 2.34;libcap >= 2.61" + "libcap-ng", "libcap-ng-0.8.2-r0.aarch64.rpm", "libcap-ng", "备用POSIX功能库", "提供比传统libcap库更容易使用POSIX功能编程的库", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "libcap-ng", "libcap-ng-bin-0.8.2-r0.aarch64.rpm", "libcap-ng-bin", "提供libcap-ng二进制工具", "提供/usr/bin/captest、/usr/bin/filecap、/usr/bin/netcap、/usr/bin/pscap", "glibc >= 2.34;libcap-ng >= 0.8.2" + "libestr0", "libestr0-0.1.11-r0.aarch64.rpm", "libestr0", "字符串处理必备库", "提供了rsyslog守护进程使用的字符串处理必备共享库", "/bin/sh;glibc >= 2.34;glibc >= 2.34" + "libevent", "libevent-2.1.12-r0.aarch64.rpm", "libevent", "抽象异步事件通知库", "libevent API提供了一种机制,在文件描述符上发生特定事件或达到超时后执行回调函数。libevent旨在替换事件驱动网络服务器中发现的异步事件循环。应用程序只需要调用event_dispatch(),然后就可以动态添加或删除事件,而不必更改事件循环。", "/bin/sh;glibc >= 2.34" + "libevhtp", "libevhtp-1.2.18-r0.aarch64.rpm", "libevhtp", "libevhtp包的调试源", "此软件包为libevhtp包提供调试源。;调试源在开发使用此软件包的应用程序或调试此软件包时非常有用。", "/bin/sh;glibc >= 2.34;libevent >= 2.1.12" + "libfastjson", "libfastjson4-0.99.9-r0.aarch64.rpm", "libfastjson4", "JSON解析库", "一个JSON解析库,json-c的分叉,由rsyslog团队开发,用于rsyslog和liblognorm。;此软件包包括libfastjson库。", "/bin/sh;glibc >= 2.34" + "libffi", "libffi8-3.4.2-r0.aarch64.rpm", "libffi8", "外部函数接口库", "libffi库为各种调用约定提供了一个可移植的高级编程接口。这允许程序员在运行时调用调用接口描述指定的任何函数。", "/bin/sh;glibc >= 2.34" + "libhugetlbfs", "libhugetlbfs-2.23-r0.aarch64.rpm", "libhugetlbfs", "用于大型翻译Lookaside缓冲区文件系统的帮助程序库", "libhugetlbfs包与Linux hugetlbfs交互,以透明的方式使大页面可供应用程序使用。", "/bin/sh;glibc >= 2.34" + "libnl", "libnl-3-200-3.5.0-r0.aarch64.rpm", "libnl-3-200", "内核网络套接字的便利库", "这个包包含一个方便的库,可以简化使用Linux内核的netlink套接字接口进行网络操作", "/bin/sh;glibc >= 2.34" + "libnl", "libnl-3-cli-3.5.0-r0.aarch64.rpm", "libnl-3-cli", "libnl3的命令行界面实用程序", "此软件包包含各种libnl3实用程序和它们所依赖的其他库", "/bin/sh;glibc >= 2.34;libnl-3-200 >= 3.5.0;libnl-genl-3-200 >= 3.5.0;libnl-idiag-3-200 >= 3.5.0;libnl-nf-3-200 >= 3.5.0;libnl-route-3-200 >= 3.5.0" + "libnl", "libnl-genl-3-200-3.5.0-r0.aarch64.rpm", "libnl-genl-3-200", "Netlink操作库", "提供libnl-genl-3.so.*", "/bin/sh;glibc >= 2.34;libnl-3-200 >= 3.5.0" + "libnl", "libnl-idiag-3-200-3.5.0-r0.aarch64.rpm", "libnl-idiag-3-200", "libnl-idiag动态库", "提供libnl-idiag-3.so.*", "/bin/sh;glibc >= 2.34;libnl-3-200 >= 3.5.0" + "libnl", "libnl-nf-3-200-3.5.0-r0.aarch64.rpm", "libnl-nf-3-200", "NetFilter以及接口监控相关的Netlink操作库", "提供libnl-nf-3.so.*", "/bin/sh;glibc >= 2.34;libnl-3-200 >= 3.5.0;libnl-route-3-200 >= 3.5.0" + "libnl", "libnl-route-3-200-3.5.0-r0.aarch64.rpm", "libnl-route-3-200", "提供NETLINK_ROUTE家族的API接口库", "提供libnl-route-3.so.*", "/bin/sh;glibc >= 2.34;libnl-3-200 >= 3.5.0" + "libnl", "libnl-xfrm-3-200-3.5.0-r0.aarch64.rpm", "libnl-xfrm-3-200", "libnl-xfrm动态库", "提供libnl-xfrm-3.so.*", "/bin/sh;glibc >= 2.34;libnl-3-200 >= 3.5.0" + "libpam", "libpam-1.5.2-r0.aarch64.rpm", "libpam", "为应用程序提供身份验证的可扩展库", "提供/lib64/libpam.so.*、/lib64/libpam_misc.so.*和/lib64/libpamc.so.*", "/bin/sh;glibc >= 2.34" + "libpam", "pam-plugin-access-1.5.2-r0.aarch64.rpm", "pam-plugin-access", "pam_access.so动态库", "提供/lib64/security/pam_access.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "libpam-runtime-1.5.2-r0.aarch64.rpm", "libpam-runtime", "pam实用程序", "PAM(可插拔身份验证模块)是一种系统安全工具,允许系统管理员设置身份验证策略,而不必重新编译处理身份验证的程序。", "config(libpam-runtime) = 1.5.2-r0;glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64;pam-plugin-deny-suffix64;pam-plugin-permit-suffix64;pam-plugin-unix-suffix64;pam-plugin-warn-suffix64" + "libpam", "pam-plugin-debug-1.5.2-r0.aarch64.rpm", "pam-plugin-debug", "pam_debug.so动态库", "提供/lib64/security/pam_debug.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-deny-1.5.2-r0.aarch64.rpm", "pam-plugin-deny", "pam_deny.so动态库", "提供/lib64/security/pam_deny.so", "libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-echo-1.5.2-r0.aarch64.rpm", "pam-plugin-echo", "pam_echo.so动态库", "提供/lib64/security/pam_echo.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-env-1.5.2-r0.aarch64.rpm", "pam-plugin-env", "pam_env.so动态库", "提供/lib64/security/pam_env.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-exec-1.5.2-r0.aarch64.rpm", "pam-plugin-exec", "pam_exec.so动态库", "提供/lib64/security/pam_exec.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-faildelay-1.5.2-r0.aarch64.rpm", "pam-plugin-faildelay", "pam_faildelay.so动态库", "提供/lib64/security/pam_faildelay.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-faillock-1.5.2-r0.aarch64.rpm", "pam-plugin-faillock", "pam_faillock.so动态库", "提供/lib64/security/pam_faillock.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-filter-1.5.2-r0.aarch64.rpm", "pam-plugin-filter", "pam_filter.so动态库", "提供/lib64/security/pam_filter.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-ftp-1.5.2-r0.aarch64.rpm", "pam-plugin-ftp", "pam_ftp.so动态库", "提供/lib64/security/pam_ftp.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-group-1.5.2-r0.aarch64.rpm", "pam-plugin-group", "pam_group.so动态库", "提供/lib64/security/pam_group.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-issue-1.5.2-r0.aarch64.rpm", "pam-plugin-issue", "pam_issue.so动态库", "提供/lib64/security/pam_issue.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-keyinit-1.5.2-r0.aarch64.rpm", "pam-plugin-keyinit", "pam_keyinit.so动态库", "提供/lib64/security/pam_keyinit.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-lastlog-1.5.2-r0.aarch64.rpm", "pam-plugin-lastlog", "pam_lastlog.so动态库", "提供/lib64/security/pam_lastlog.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-limits-1.5.2-r0.aarch64.rpm", "pam-plugin-limits", "pam_limits.so动态库", "提供/lib64/security/pam_limits.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-listfile-1.5.2-r0.aarch64.rpm", "pam-plugin-listfile", "pam_listfile.so动态库", "提供/lib64/security/pam_listfile.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-localuser-1.5.2-r0.aarch64.rpm", "pam-plugin-localuser", "pam_localuser.so动态库", "提供/lib64/security/pam_localuser.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-loginuid-1.5.2-r0.aarch64.rpm", "pam-plugin-loginuid", "pam_loginuid.so动态库", "提供/lib64/security/pam_loginuid.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-mail-1.5.2-r0.aarch64.rpm", "pam-plugin-mail", "pam_mail.so动态库", "提供/lib64/security/pam_mail.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-mkhomedir-1.5.2-r0.aarch64.rpm", "pam-plugin-mkhomedir", "pam_mkhomedir.so动态库", "提供/lib64/security/pam_mkhomedir.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-motd-1.5.2-r0.aarch64.rpm", "pam-plugin-motd", "pam_motd.so动态库", "提供/lib64/security/pam_motd.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-namespace-1.5.2-r0.aarch64.rpm", "pam-plugin-namespace", "pam_namespace.so动态库", "提供/lib64/security/pam_namespace.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-nologin-1.5.2-r0.aarch64.rpm", "pam-plugin-nologin", "pam_nologin.so动态库", "提供/lib64/security/pam_nologin.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-permit-1.5.2-r0.aarch64.rpm", "pam-plugin-permit", "pam_permit.so动态库", "提供/lib64/security/pam_permit.so", "libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-pwhistory-1.5.2-r0.aarch64.rpm", "pam-plugin-pwhistory", "pam_pwhistory.so动态库", "提供/lib64/security/pam_pwhistory.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-rhosts-1.5.2-r0.aarch64.rpm", "pam-plugin-rhosts", "pam_rhostsso动态库", "提供/lib64/security/pam_rhostsso", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-rootok-1.5.2-r0.aarch64.rpm", "pam-plugin-rootok", "pam_rootok.so动态库", "提供/lib64/security/pam_rootok.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-securetty-1.5.2-r0.aarch64.rpm", "pam-plugin-securetty", "pam_securetty.so动态库", "提供/lib64/security/pam_securetty.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-setquota-1.5.2-r0.aarch64.rpm", "pam-plugin-setquota", "pam_setquota.so动态库", "提供/lib64/security/pam_setquota.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-shells-1.5.2-r0.aarch64.rpm", "pam-plugin-shells", "pam_shells.so动态库", "提供/lib64/security/pam_shells.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-stress-1.5.2-r0.aarch64.rpm", "pam-plugin-stress", "pam_stress.so动态库", "提供/lib64/security/pam_stress.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-succeed-if-1.5.2-r0.aarch64.rpm", "pam-plugin-succeed-if", "pam_succeed_if.so动态库", "提供/lib64/security/pam_succeed_if.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-time-1.5.2-r0.aarch64.rpm", "pam-plugin-time", "pam_time.so动态库", "提供/lib64/security/pam_time.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-timestamp-1.5.2-r0.aarch64.rpm", "pam-plugin-timestamp", "pam_timestamp.so动态库", "提供/lib64/security/pam_timestamp.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-umask-1.5.2-r0.aarch64.rpm", "pam-plugin-umask", "pam_umask.so动态库", "提供/lib64/security/pam_umask.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-unix-1.5.2-r0.aarch64.rpm", "pam-plugin-unix", "pam_unix.so动态库", "提供/lib64/security/pam_unix.so", "libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-usertype-1.5.2-r0.aarch64.rpm", "pam-plugin-usertype", "pam_usertypeso动态库", "提供/lib64/security/pam_usertypeso", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-warn-1.5.2-r0.aarch64.rpm", "pam-plugin-warn", "pam_warn.so动态库", "提供/lib64/security/pam_warn.so", "libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-wheel-1.5.2-r0.aarch64.rpm", "pam-plugin-wheel", "pam_wheel.so动态库", "提供/lib64/security/pam_wheel.so", "glibc >= 2.34;libpam >= 1.5.2;libpam-suffix64" + "libpam", "pam-plugin-xauth-1.5.2-r0.aarch64.rpm", "pam-plugin-xauth", "pam_xauth.so动态库", "提供/lib64/security/pam_xauth.so", "libpam >= 1.5.2;libpam-suffix64" + "libpcap", "libpcap1-1.10.1-r0.aarch64.rpm", "libpcap1", "网络嗅探器库", "libpcap是数据包嗅探器程序使用的库。它为他们提供了一个接口,用于捕获和分析来自网络设备的数据包。;只有当您计划自己编译或编写这样的程序时,才需要此软件包。", "/bin/sh;glibc >= 2.34" + "libpcre", "libpcre1-8.45-r0.aarch64.rpm", "libpcre1", "Perl兼容正则表达式的库", "PCRE库是一组函数,使用与Perl 5相同的语法和语义实现正则表达式模式匹配;;此PCRE库变体支持8位和UTF-8字符串。", "/bin/sh;glibc >= 2.34" + "libpwquality", "libpwquality-1.4.4-r0.aarch64.rpm", "libpwquality", "密码生成和密码质量检查库", "这是一个用于密码质量检查和生成通过检查的随机密码的库。;此库使用破解库和破解库字典执行一些检查。", "/bin/sh;cracklib >= 2.9.7;glibc >= 2.34;libpam >= 1.5.2" + "libseccomp", "libseccomp-2.5.3-r0.aarch64.rpm", "libseccomp", "增强的seccomp库", "libseccomp库为Linux内核的syscall过滤机制(seccomp)提供了一个易于使用的接口。libseccomp API允许应用程序指定允许应用程序执行哪些syscall,以及可选的哪些syscall参数,所有这些都由Linux内核强制执行。", "/bin/sh;glibc >= 2.34" + "libselinux", "libselinux1-3.3-r0.aarch64.rpm", "libselinux1", "SELinux运行时库", "libselinux提供了一个接口,用于获取和设置进程和文件安全上下文,以及获取安全策略决策。;(安全增强的Linux是内核和一些实施强制性访问控制策略的实用程序的一个功能,如类型实施、基于角色的访问控制和多级安全。)", "/bin/sh;glibc >= 2.34;libpcre1 >= 8.45" + "libselinux", "libselinux-bin-3.3-r0.aarch64.rpm", "libselinux-bin", "SELinux libselinux实用程序", "libselinux-bin软件包包含实用程序", "glibc >= 2.34;libpcre1 >= 8.45;libselinux1 >= 3.3;libsepol2 >= 3.3" + "libsemanage", "libsemanage2-3.3-r0.aarch64.rpm", "libsemanage2", "SELinux策略管理库", "libsemanage是策略管理库。使用libsepol和libselinux与SELinux系统交互,它还调用帮助程序来加载策略和检查file_contexts配置是否有效。", "/bin/sh;audit >= 3.0.1;glibc >= 2.34;libbz2-1 >= 1.0.8;libselinux1 >= 3.3;libsepol2 >= 3.3" + "libsepol", "libsepol2-3.3-r0.aarch64.rpm", "libsepol2", "SELinux二进制策略操作库", "提供SELinux二进制策略操作库", "/bin/sh;glibc >= 2.34" + "libsepol", "libsepol-bin-3.3-r0.aarch64.rpm", "libsepol-bin", "SELinux二进制策略操作工具", "libsepol提供了一个用于操作SELinux二进制策略的API。它由checkpolicy(策略编译器)和类似的工具,以及需要对二进制策略执行特定转换(如自定义策略布尔设置)的程序使用。", "glibc >= 2.34;libsepol2 >= 3.3" + "libtirpc", "libtirpc3-1.3.2-r0.aarch64.rpm", "libtirpc3", "与传输无关的RPC库", "传输独立RPC库(TI-RPC)是glibc中不支持IPv6地址的标准SunRPC库的替代。;此实现允许支持UDP和TCP over IPv4以外的其他传输。", "/bin/sh;glibc >= 2.34" + "libusb1", "libusb-1.0-0-1.0.24-r0.aarch64.rpm", "libusb-1.0-0", "USB库", "Libusb是一个允许用户空间访问USB设备的库。", "/bin/sh;glibc >= 2.34" + "libwebsockets", "libwebsockets-4.3.0-r0.aarch64.rpm", "libwebsockets", "用于Websockets的轻量级C库", "这是用于轻量级websocket客户端和服务器的libwebsockets C库。", "/bin/sh;glibc >= 2.34;libcrypto1.1 >= 1.1.1m;libssl1.1 >= 1.1.1m;libz1 >= 1.2.11" + "libxml2", "libxml2-2.9.12-r0.aarch64.rpm", "libxml2", "提供XML和HTML支持的库", "此库允许操作XML文件。它包括读取、修改和写入XML和HTML文件的支持。DTD支持,这包括解析和验证,即使是复杂的DtD,可以在解析时或在修改文档后更晚。输出可以是简单的SAX流,也可以是内存中类似DOM的表示。;在这种情况下,可以使用内置的XPath和XPointer实现来选择子节点或范围。提供灵活的输入/输出机制,具有现有的HTTP和FTP模块,并组合到URI库。", "/bin/sh;glibc >= 2.34;libz1 >= 1.2.11" + "libxml2", "libxml2-utils-2.9.12-r0.aarch64.rpm", "libxml2-utils", "用于操作XML文件的实用程序", "此软件包包含用于操作XML文件的实用程序。", "glibc >= 2.34;libxml2 >= 2.9.12" + "logrotate", "logrotate-3.18.1-r0.aarch64.rpm", "logrotate", "用于旋转、压缩、邮寄和删除系统日志文件的Cron服务", "logrotate实用程序自动旋转、压缩、邮寄和删除日志文件。Logrotate可以设置为每天、每周、每月或当日志文件达到一定大小时处理日志文件。通常,logrotate作为每日cron作业运行。;它只管理普通文件,不参与systemd的日志轮换。", "config(logrotate) = 3.18.1-r0;glibc >= 2.34;libacl1 >= 2.3.1;libpopt0 >= 1.18" + "lvm2", "lvm2-2.03.14-r0.aarch64.rpm", "lvm2", "Userland逻辑卷管理工具", "LVM2包括处理物理卷(硬盘、RAID系统、磁光等,多个设备(MD),请参阅mdm(8),甚至环路设备,请参见Lostup(8))上的读/写操作的所有支持,从一个或多个物理卷创建卷组(虚拟磁盘种类),并在卷组中创建一个或多个逻辑卷(逻辑分区种类)。", "/bin/sh;config(lvm2) = 2.03.14-r0;glibc >= 2.34;libaio1 >= 0.3.112;libblkid1 >= 2.37.2" + "lvm2", "lvm2-scripts-2.03.14-r0.aarch64.rpm", "lvm2-scripts", "提供blkdeactivate、fsadm、lvmdum命令", "提供/usr/sbin/blkdeactivate、/usr/sbin/fsadm和/usr/sbin/lvmdump", "bash;lvm2 = 2.03.14-r0" + "lxc", "lxc-4.0.3-r0.aarch64.rpm", "lxc", "Linux内核容器的用户空间工具", "LXC是众所周知的、经过严格测试的低层次Linux容器运行时。", "/bin/sh;gcc-bin-toolchain-compilerlibs-aarch64 >= 1.0;glibc >= 2.34;libcap >= 2.61;libseccomp >= 2.5.3;yajl >= 2.1.0" + "ncurses", "libform5-6.3-r0.aarch64.rpm", "libform5", "libform动态库", "提供/usr/lib64/libform.so.*", "/bin/sh;glibc >= 2.34;libncurses5 >= 6.3" + "ncurses", "libmenu5-6.3-r0.aarch64.rpm", "libmenu5", "libmenu动态库", "提供/usr/lib64/libmenu.so.*", "/bin/sh;glibc >= 2.34;libncurses5 >= 6.3" + "ncurses", "libncurses5-6.3-r0.aarch64.rpm", "libncurses5", "libncurses动态库", "提供/lib64/libncurses.so.*", "/bin/sh;glibc >= 2.34;libtinfo5 >= 6.3" + "ncurses", "libpanel5-6.3-r0.aarch64.rpm", "libpanel5", "libpanel动态库", "提供/usr/lib64/libpanel.so.*", "/bin/sh;glibc >= 2.34;libncurses5 >= 6.3" + "ncurses", "libtinfo5-6.3-r0.aarch64.rpm", "libtinfo5", "libtinfo动态库", "提供/lib64/libtinfo.so.*", "/bin/sh;glibc >= 2.34" + "ncurses", "ncurses-6.3-r0.aarch64.rpm", "ncurses", "CRT屏幕处理和优化包", "提供/usr/bin/tput、/usr/bin/tset功能", "glibc >= 2.34;libtinfo5 >= 6.3" + "ncurses", "ncurses-terminfo-6.3-r0.aarch64.rpm", "ncurses-terminfo", "终端描述数据库", "这是ncures包中维护的术语信息基本数据库。此数据库是4.4BSD术语帽文件的官方继承者,包含有关任何已知终端的信息。ncures库利用此数据库正确使用终端。", "ncurses-terminfo-base" + "ncurses", "ncurses-terminfo-base-6.3-r0.aarch64.rpm", "ncurses-terminfo-base", "提供终端信息基础", "提供/etc/terminfo/*", "" + "nfs-utils", "nfs-utils-2.5.4-r0.aarch64.rpm", "nfs-utils", "NFS实用程序以及内核NFS服务器的支持客户端和守护程序", "nfs-utils软件包为内核NFS服务器和相关工具提供了一个守护程序,它提供了比大多数用户使用的传统Linux NFS服务器更高的性能级别。", "glibc >= 2.34;libblkid1 >= 2.37.2;libtirpc3 >= 1.3.2;libuuid1 >= 2.37.2;nfs-utils-client" + "nfs-utils", "nfs-utils-client-2.5.4-r0.aarch64.rpm", "nfs-utils-client", "查询远程主机上的装载守护程序", "此软件包还包含showmount程序。Showmount查询远程主机上的装载守护程序,以了解有关远程主机上NFS(网络文件系统)服务器的信息。例如,showmount可以显示装载在该主机上的客户端。", "config(nfs-utils-client) = 2.5.4-r0;glibc >= 2.34;libcap >= 2.61;libtirpc3 >= 1.3.2;nfs-utils-mount" + "nfs-utils", "nfs-utils-mount-2.5.4-r0.aarch64.rpm", "nfs-utils-mount", "挂载或卸载文件系统", "此软件包还包含mount.nfs和umount.nfs程序。", "glibc >= 2.34;libmount1 >= 2.37.2;libtirpc3 >= 1.3.2" + "openssh", "openssh-keygen-8.8p1-r0.aarch64.rpm", "openssh-keygen", "生成ssh公钥认证所需的公钥和私钥文件", "提供/usr/bin/ssh-keygen", "glibc >= 2.34" + "openssh", "openssh-misc-8.8p1-r0.aarch64.rpm", "openssh-misc", "ssh远程登陆管理主机", "提供/usr/bin/ssh、/usr/bin/ssh-add、/usr/bin/ssh-agent、/usr/bin/ssh-copy-id、/usr/bin/ssh-keyscan等", "glibc >= 2.34;libz1 >= 1.2.11" + "openssh", "openssh-scp-8.8p1-r0.aarch64.rpm", "openssh-scp", "远程复制命令", "提供/usr/bin/scp", "glibc >= 2.34" + "openssh", "openssh-sftp-8.8p1-r0.aarch64.rpm", "openssh-sftp", "远程文件传输服务", "提供/usr/bin/sftp", "glibc >= 2.34" + "openssh", "openssh-sftp-server-8.8p1-r0.aarch64.rpm", "openssh-sftp-server", "”sftp“协议的服务器端程序,使用加密的方式进行文件传输", "提供/usr/libexec/sftp-server", "glibc >= 2.34" + "openssh", "openssh-ssh-8.8p1-r0.aarch64.rpm", "openssh-ssh", "ssh服务配置文件", "提供/etc/ssh/ssh_config", "config(openssh-ssh) = 8.8p1-r0" + "openssh", "openssh-sshd-8.8p1-r0.aarch64.rpm", "openssh-sshd", "ssh服务进程启动", "提供/usr/sbin/sshd、/usr/libexec/openssh/sshd_check_keys等", "config(openssh-sshd) = 8.8p1-r0;glibc >= 2.34;libpam >= 1.5.2;libz1 >= 1.2.11;openssh-keygen;pam-plugin-keyinit;pam-plugin-loginuid" + "openssl", "openssl-conf-1.1.1m-r0.aarch64.rpm", "openssl-conf", "openssl的主配置文件", "提供/etc/ssl/openssl.cnf", "config(openssl-conf) = 1.1.1m-r0" + "openssl", "libcrypto1.1-1.1.1m-r0.aarch64.rpm", "libcrypto1.1", "OpenSSL crypto库", "提供/usr/lib64/libcrypto.so.*", "/bin/sh;glibc >= 2.34" + "openssl", "libssl1.1-1.1.1m-r0.aarch64.rpm", "libssl1.1", "OpenSSL SSL库", "提供/usr/lib64/libssl.so.*", "/bin/sh;glibc >= 2.34;libcrypto1.1 >= 1.1.1m" + "os-release", "os-release-1.0-r0.noarch.rpm", "os-release", "添加openeuler版本信息", "添加openeuler版本信息,同时添加os-revision记录构建时间戳。;生成的镜像也放到时间戳目录便于区分不同版本", "" + "os-base", "os-base-1.0-r1.aarch64.rpm", "os-base", "提供OS基础", "提供hostname、passwd、modules等配置信息", "" + "pciutils", "libpci3-3.7.0-r0.aarch64.rpm", "libpci3", "PCI实用程序库", "libpci提供了对PCI配置空间的访问。", "/bin/sh;glibc >= 2.34;libz1 >= 1.2.11" + "pciutils", "pciutils-3.7.0-r0.aarch64.rpm", "pciutils", "Linux内核的PCI实用程序", "lspci:此程序显示有关系统中所有PCI总线和设备的详细信息,取代原始的/proc/pci接口;;setpci:此程序允许读取和写入PCI设备配置寄存器。例如,您可以使用它调整延迟计时器;;update-pciids:此程序下载pci.ids文件的当前版本。", "glibc >= 2.34;libpci3 >= 3.7.0;libz1 >= 1.2.11;pciutils-ids" + "pciutils", "pciutils-ids-3.7.0-r0.aarch64.rpm", "pciutils-ids", "存放系统所有支持和不支持的硬件信息", "提供/usr/share/hwdata/pci.ids.gz", "" + "policycoreutils", "policycoreutils-3.3-r0.aarch64.rpm", "policycoreutils", "显示当前seinux信息,修改selinux策略内各项规则的布尔值", "提供/etc/pam.d、/sbin/setsebool、/usr/bin/sestatus和/var/lib/selinux", "glibc >= 2.34;libselinux1 >= 3.3;libsemanage2 >= 3.3" + "policycoreutils", "policycoreutils-fixfiles-3.3-r0.aarch64.rpm", "policycoreutils-fixfiles", "检查或矫正文件系统中的安全环境数据库", "提供/sbin/fixfiles", "policycoreutils-setfiles" + "policycoreutils", "policycoreutils-hll-3.3-r0.aarch64.rpm", "policycoreutils-hll", "提供/usr/libexec/selinux/hll/pp", "提供/usr/libexec/selinux/hll/pp", "glibc >= 2.34;libsepol2 >= 3.3" + "policycoreutils", "policycoreutils-loadpolicy-3.3-r0.aarch64.rpm", "policycoreutils-loadpolicy", "装载或替换新的二进制策略到内核中,保持使用当前的Bootlean值", "提供/sbin/load_policy", "glibc >= 2.34;libselinux1 >= 3.3;libsepol2 >= 3.3" + "policycoreutils", "policycoreutils-semodule-3.3-r0.aarch64.rpm", "policycoreutils-semodule", "可以显示、加载、删除模块", "提供/sbin/semodule", "glibc >= 2.34;libselinux;libsemanage2 >= 3.3;libsepol2 >= 3.3" + "policycoreutils", "policycoreutils-sestatus-3.3-r0.aarch64.rpm", "policycoreutils-sestatus", "显示系统的详细状态", "提供/etc/sestatus.conf和/sbin/sestatus", "libselinux;policycoreutils" + "policycoreutils", "policycoreutils-setfiles-3.3-r0.aarch64.rpm", "policycoreutils-setfiles", "恢复或更改一部分文件的标签", "提供/sbin/restorecon、/sbin/restorecon_xattr和/sbin/setfiles", "glibc >= 2.34;libselinux1 >= 3.3;libsepol2 >= 3.3" + "popt", "libpopt0-1.18-r0.aarch64.rpm", "libpopt0", "一个用于解析命令行参数的C库", "Popt是一个用于解析命令行参数的C库。Popt受到getopt()和getopt_long()函数的严重影响。它通过允许更强大的参数扩展来改进它们。Popt可以解析任意argv[]样式数组,并根据命令行参数自动设置变量。Popt允许通过配置文件别名命令行参数,并包括用于使用类似shell的规则将任意字符串解析为argv[]数组的实用程序函数。", "/bin/sh;glibc >= 2.34" + "procps", "libprocps8-3.3.17-r0.aarch64.rpm", "libprocps8", "procps库", "procps库可用于从/proc读取进程信息pseudo-file系统中的信息。", "/bin/sh;glibc >= 2.34" + "procps", "procps-3.3.17-r0.aarch64.rpm", "procps", "/proc的ps实用程序", "procps包包含一组提供系统信息的系统实用程序。Procps包括ps、free、skill、snice、tload、top、uptime、vmstat、w和watch。", "glibc >= 2.34;libncurses5 >= 6.3;libprocps8 >= 3.3.17;libtinfo5 >= 6.3;procps-sysctl" + "procps", "procps-sysctl-3.3.17-r0.aarch64.rpm", "procps-sysctl", "控制和配置Linux内核及网络设置", "提供/etc/sysctl.conf", "procps-lib" + "psmisc", "pstree-23.4-r0.aarch64.rpm", "pstree", "显示进程状态树", "列出当前的进程,以及它们的树状结构", "glibc >= 2.34;libtinfo5 >= 6.3" + "quota", "quota-4.06-r0.aarch64.rpm", "quota", "用于监控用户磁盘使用情况的系统管理工具", "包含系统管理工具,用于监控和限制每个文件系统的用户和或组磁盘使用情况。", "glibc >= 2.34;libcom-err2 >= 1.46.4;libext2fs2 >= 1.46.4;libtirpc3 >= 1.3.2" + "readline", "libreadline8-8.1-r0.aarch64.rpm", "libreadline8", "Readline库", "readline库由 Bourne Again Shell(bash,标准命令解释器)用于轻松编辑命令行。这包括历史记录和搜索功能。", "/bin/sh;config(libreadline8) = 8.1-r0;glibc >= 2.34;libtinfo5 >= 6.3" + "rsyslog", "rsyslog-8.2110.0-r0.aarch64.rpm", "rsyslog", "用于Linux和Unix的增强系统日志", "Rsyslog是一个增强的多线程syslogd,支持MySQL、syslog/tcp、RFC 3195、允许的发件人列表、对任何消息部分的过滤和细粒度输出格式控制。它与库存sysklogd相当兼容,可以用作直接替换。;它的高级功能使它适合企业级、加密保护的系统日志中继链,同时也非常容易为新手用户设置。", "config(rsyslog) = 8.2110.0-r0;glibc >= 2.34;libcurl4 >= 7.79.1;libestr0 >= 0.1.11;libfastjson4 >= 0.99.9;libuuid1 >= 2.37.2;libz1 >= 1.2.11;logrotate" + "sed", "sed-4.8-r0.aarch64.rpm", "sed", "GNU流文本编辑器", "sed(流编辑器)编辑器是流或批处理(非交互式)编辑器。Sed将文本作为输入,对文本执行操作或一组操作,并输出修改后的文本。sed执行的操作(替换、删除、插入等)可以在脚本文件或命令行中指定。", "glibc >= 2.34" + "shadow", "shadow-4.9-r0.aarch64.rpm", "shadow", "用于管理用户和组帐户的实用程序", "此软件包包括将普通密码文件转换为影子密码格式以及管理用户和组帐户所需的程序。", "glibc >= 2.34;libpam >= 1.5.2;libpam-runtime;pam-plugin-env;pam-plugin-faildelay;pam-plugin-group;pam-plugin-lastlog;pam-plugin-limits;pam-plugin-mail;pam-plugin-motd;pam-plugin-nologin;pam-plugin-rootok;pam-plugin-securetty;pam-plugin-shells;shadow-base;shadow-securetty" + "shadow", "shadow-base-4.9-r0.aarch64.rpm", "shadow-base", "提供sg工具", "提供/usr/bin/sg工具", "" + "shadow", "shadow-securetty-4.8.1-r1.aarch64.rpm", "shadow-securetty", "安全终端", "提供/etc/securetty", "" + "squashfs-tools", "squashfs-tools-4.5-r0.aarch64.rpm", "squashfs-tools", "用于创建squashfs文件系统的实用程序", "squashfs是Linux的高度压缩只读文件系统。此软件包包含用于操作squashfs文件系统的实用程序。", "glibc >= 2.34;liblzma5 >= 5.2.5;libz1 >= 1.2.11" + "strace", "strace-5.14-r0.aarch64.rpm", "strace", "跟踪和显示与正在运行的进程关联的系统调用", "strace程序拦截并记录运行进程调用和接收的系统调用。strace可以打印每个系统调用、其参数和返回值的记录。strace对于诊断问题和调试以及教学目的都很有用。", "glibc >= 2.34" + "tzdata", "tzdata-core-2021e-r0.aarch64.rpm", "tzdata-core", "时区说明", "描述可用时区的配置文件。", "tzdata-core-2021e-r0.aarch64.rpm ;config(tzdata-core) = 2021e-r0" + "util-linux", "libblkid1-2.37.2-r0.aarch64.rpm", "libblkid1", "块设备ID库", "块设备识别库,util-linux的一部分。", "/bin/sh;glibc >= 2.34" + "util-linux", "libfdisk1-2.37.2-r0.aarch64.rpm", "libfdisk1", "文件系统检测库", "用于文件系统检测的库。", "/bin/sh;glibc >= 2.34;libblkid1 >= 2.37.2;libuuid1 >= 2.37.2" + "util-linux", "libmount1-2.37.2-r0.aarch64.rpm", "libmount1", "设备挂载库", "设计用于低级实用程序的库,如mount(8)和/usr/sbin/mount", "/bin/sh;glibc >= 2.34;libblkid1 >= 2.37.2" + "util-linux", "libuuid1-2.37.2-r0.aarch64.rpm", "libuuid1", "用于生成UUID的库", "用于生成通用唯一ID(UUID)的库。", "/bin/sh;glibc >= 2.34" + "util-linux", "util-linux-su-2.37.2-r0.aarch64.rpm", "util-linux-su", "用于变更为其他使用者的身份", "提供su命令,用于变更使用者身份", "glibc >= 2.34;libpam >= 1.5.2" + "xz", "liblzma5-5.2.5-r0.aarch64.rpm", "liblzma5", "Lempel–Ziv–Markov 链算法压缩库", "用于编码/解码LZMA文件的库。", "/bin/sh;glibc >= 2.34" + "xz", "xz-5.2.5-r0.aarch64.rpm", "xz", "LZMA压缩实用程序", "XZ Utils试图使LZMA压缩易于在自由(如自由)操作系统上使用。这是通过提供类似于使用的工具和库来实现的,而不是最流行的现有压缩算法的等效工具和库。;LZMA是由伊戈尔·巴甫洛夫设计的通用压缩算法,作为7-Zip的一部分。它提供了高压缩比,同时保持了快速的解压缩速度。", "glibc >= 2.34;liblzma5 >= 5.2.5" + "yajl", "yajl-2.1.0-r0.aarch64.rpm", "yajl", "又一个JSON库(YAJL)", "又是一个JSON库。YAJL是一个用ANSI C编写的小型事件驱动(SAX风格)JSON解析器,也是一个小型验证JSON生成器。", "/bin/sh;glibc >= 2.34" + "zlib", "libz1-1.2.11-r0.aarch64.rpm", "libz1", "实现DEFLATE压缩算法的库", "zlib是一个通用的无损数据压缩库,实现了DEFLATE算法的API,例如gzip和ZIP存档格式正在使用后者。", "/bin/sh;glibc >= 2.34" + diff --git a/docs/source/getting_started/index.rst b/docs/source/getting_started/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..7dca3c0484b2910936af1f5f789584f0c5ee43ce --- /dev/null +++ b/docs/source/getting_started/index.rst @@ -0,0 +1,356 @@ +.. _getting_started: + +快速上手 +########## + +openEuler Embedded是基于openEuler社区面向嵌入式场景的Linux版本。由于嵌入式系统应用受到多个因素的约束,如资源、功耗、多样性等, +使得面向服务器领域的Linux及相应的构建系统很难满足嵌入式场景的要求,因此业界广泛采用 `Yocto `_ +来定制化构建嵌入式Linux。openEuler Embedded当前也采用的Yocto构建,但实现了与openEuler其他版本代码同源,具体的构建方法请参考 +`SIG-Yocto `_ +下相关代码仓中的内容。 + +本文档主要用于介绍如何获取预先构建好的镜像,如何运行镜像,以及如何基于镜像完成基本的嵌入式Linux应用开发。 + +获取镜像 +*********** + +当前发布的已构建好的镜像,只支持arm和aarch64两种架构,且只支持qemu中ARM virt-4.0平台,您可以通过如下链接获得相应的镜像: + +- `qemu_arm `_: 32位arm架构, ARM Cortex A15处理器 +- `qemu_aarch64 `_: 64位aarch64架构 ARM Cortex A57处理器 + +只要相应环境支持qemu仿真器(版本5.0以上),您可以将提供的openEuler Embedded镜像部署在物理裸机、云环境、容器或虚拟机上。 + +镜像内容 +*********** + +所下载的镜像,由以下几部分组成: + +- 内核镜像 **zImage**: 基于openEuler社区Linux 5.10代码构建得到。相应的内核配置可通过如下链接获取: + + - `arm(cortex a15) `_ + - `arm(cortex a57) `_, + 针对aarch64架构,额外增加了镜像自解压功能,可以参见相应的 `patch `_ + +- 根文件系统镜像(依据具体需求,以下二选一)`` + + - **initrd_tiny**:极简根文件系统镜像,只包含基本功能。包含 busybox 和基本的 glibc 库。该镜像功能简单,但内存消耗很小,适合探索 Linux内核相关功能。 + - **initrd**:标准根文件系统镜像,在极简根文件系统镜像的基础上,进行了必要安全加固,增加了audit、cracklib、OpenSSH、Linux PAM、shadow、iSula容器等软件包。该镜像适合进行更加丰富的功能探索。 + +- SDK(Software Development Kit)工具 + + - **openeuler*.sh**:openEuler Embedded SDK自解压安装包,SDK包含了进行开发(用户态程序、内核模块啦.ko等)所必需的工具、库和头文件等。 + + +运行镜像 +*********** + +通过运行镜像,一方面您可以体验openEuler Embedded的功能,一方面也可以完成基本的嵌入式Linux开发。 + +.. note:: + + - 建议使用qemu 5.0以上版本运行镜像,由于一些额外功能(网络、共享文件系统)需要依赖qemu的virtio-net, virtio-fs等特性,如未在qemu中使能,则运行时可能会产生错误,此时可能需要从源码重新编译qemu。 + + - 运行镜像时,建议把内核镜像和根文件系统镜像放在同一目录下,后续说明以标准根文件系统为例(initrd)。 + + +qemu的下载与安装可以参考 `qemu官方网站 `_ , 或者下载 `源码 `_ 单独编译安装。安装好后可以运行如下命令 +确认: + +.. code-block:: console + + qemu-system-aarch64 --version + + +极简运行场景 +============== + +该场景下,qemu未使能网络和共享文件系统,适合快速的功能体验。 + +针对arm(ARM Cortex A15),运行如下命令: + +.. code-block:: console + + qemu-system-arm -M virt-4.0 -m 1G -cpu cortex-a15 -nographic -kernel zImage -initrd initrd + +针对aarch64(ARM Cortex A57),运行如下命令: + +.. code-block:: console + + qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd initrd + + +由于标准根文件系统镜像进行了安全加固,因此第一次启动时,需要为登录用户名root设置密码,且密码强度有相应要求, 需要数字、字母、特殊字符组合最少8位,例如openEuler@2021。当使用极简根文件系统镜像时,系统会自动登录, 无需输入用户名和密码。 + +qemu运行成功并登录后,将会呈现openEuler Embedded的Shell。 + +使能共享文件系统场景 +========================== + +通过共享文件系统,可以使得运行qemu仿真器的宿主机和openEuler Embedded共享文件,这样在宿主机上交叉编译的程序,拷贝到共享目录中,即可在openEuler Embedded上运行。 + +假设将宿主机的/tmp目录作为共享目录,并事先在其中创建了名为hello_openeuler.txt的文件,使能共享文件系统功能的操作指导如下: + +1. **启动qemu** + +针对arm(ARM Cortex A15),运行如下命令: + +.. code-block:: console + + qemu-system-arm -M virt-4.0 -m 1G -cpu cortex-a15 -nographic -kernel zImage -initrd initrd -device virtio-9p-device,fsdev=fs1,mount_tag=host -fsdev local,security_model=passthrough,id=fs1,path=/tmp + +针对aarch64(ARM Cortex A57),运行如下命令: + +.. code-block:: console + + qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd initrd -device virtio-9p-device,fsdev=fs1,mount_tag=host -fsdev local,security_model=passthrough,id=fs1,path=/tmp + + +2. **映射文件系统** + +在openEuler Embedded启动并登录之后,需要运行如下命令,映射(mount)共享文件系统 + +.. code-block:: console + + cd /tmp + mkdir host + mount -t 9p -o trans=virtio,version=9p2000.L host /tmp/host + +即把共享文件系统映射到openEuler Embedded的/tmp/host目录下。 + +3. **检查共享是否成功** + +在openEuler Embedded中,运行如下命令: + +.. code-block:: console + + cd /tmp/host + ls + +如能发现hello_openeuler.txt,则共享成功。 + +使能网络场景 +=============== + +通过qemu的virtio-net和宿主机上的虚拟网卡,可以实现宿主机和openEuler Embedded之间的网络通信。 + +1. **启动qemu** + +针对arm(ARM Cortex A15),运行如下命令: + +.. code-block:: console + + qemu-system-arm -M virt-4.0 -m 1G -cpu cortex-a15 -nographic -kernel zImage -initrd initrd -device virtio-net-device,netdev=tap0 -netdev tap,id=tap0,script=/etc/qemu-ifup + +针对aarch64(ARM Cortex A57),运行如下命令: + +.. code-block:: console + + qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd initrd -device virtio-net-device,netdev=tap0 -netdev tap,id=tap0,script=/etc/qemu-ifup + +2. **宿主上建立虚拟网卡** + +在宿主机上需要建立名为tap0的虚拟网卡,可以借助/etc/qemu-ifup脚本实现,其执行需要root权限,具体内容如下: + +.. code-block:: console + + #!/bin/bash + ifconfig $1 192.168.10.1 up + +通过qemu-ifup脚本,宿主机上将创建名为tap0的虚拟网卡,地址为192.168.10.1。 + +3. **配置openEuler Embedded网卡** + +openEuler Embedded登陆后,执行如下命令: + +.. code-block:: console + + ifconfig eth0 192.168.10.2 + + +4. **确认网络连通** + +在openEuler Embedded中,执行如下命令: + +.. code-block:: console + + ping 192.168.10.1 + +如能ping通,则宿主机和openEuler Embedded之间的网络是连通的。 + +.. note:: + + 如需openEuler Embedded借助宿主机访问互联网,则需要在宿主机上建立网桥,此处不详述,如有需要,请自行查阅相关资料。 + + + +基于openEuler Embedded的SDK应用开发 +******************************************** + +当前发布的镜像除了体验openEuler Embedded的基本功能外,还可以进行基本的应用开发,也即在openEuler Embedded上运行用户自己的程序。 + +安装SDK +============= + +1. **执行SDK自解压安装脚本** + +运行如下命令: + +.. code-block:: console + + sh openeuler-glibc-x86_64-openeuler-image-aarch64-qemu-aarch64-toolchain-22.03.sh + +根据提示输入工具链的安装路径,默认路径是 :file:`/opt/openeuler//`; +若不设置,则按默认路径安装;也可以配置相对路径或绝对路径 + +一个例子如下: + + +.. code-block:: console + + sh ./openeuler-glibc-x86_64-openeuler-image-armv7a-qemu-arm-toolchain-22.03.sh`` + openEuler embedded(openEuler Embedded Reference Distro) SDK installer version 22.03 + ================================================================ + Enter target directory for SDK (default: /opt/openeuler/22.03): sdk + You are about to install the SDK to "/usr1/openeuler/sdk". Proceed [Y/n]? y + Extracting SDK...............................................done + Setting it up...SDK has been successfully set up and is ready to be used. + Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. + $ . /usr1/openeuler/sdk/environment-setup-armv7a-openeuler-linux-gnueabi + +2. **设置SDK环境变量** + +前一步执行结束最后已打印source命令,运行即可 + +.. code-block:: console + + . /usr1/openeuler/myfiles/sdk/environment-setup-armv7a-openeuler-linux-gnueabi + +3. **查看是否安装成功** + +运行如下命令,查看是否安装成功、环境设置成功 + +.. code-block:: console + + arm-openeuler-linux-gnueabi-gcc -v + +使用SDK编译hello world样例 +============================= + +1. **准备代码** + +以构建一个hello world程序为例,运行在openEuler Embedded根文件系统镜像中。 + +创建一个hello.c文件,源码如下: + +.. code-block:: c + + #include + + int main(void) + { + printf("hello world\n"); + } + +编写CMakelist.txt,和hello.c文件放在同一个目录 + +:: + + project(hello C) + + add_executable(hello hello.c) + + +2. **编译生成二进制** + +进入hello.c文件所在目录,使用工具链编译, 命令如下: + +.. code-block:: console + + cmake .. + make + +把编译好的hello程序拷贝到openEuler Embedded系统的/tmp/某个目录下(例如/tmp/myfiles/)。如何拷贝可以参考前文所述共享文件系统场景 + +3. **运行用户态程序** + +在openEuler Embedded系统中运行hello程序。 + +.. code-block:: console + + cd /tmp/myfiles/ + ./hello + +如运行成功,则会输出"hello world"。 + +使用SDK编译内核模块样例 +============================= + +1. **准备代码** + +以编译一个内核模块为例,运行在openEuler Embedded内核中。 + +创建一个hello.c文件,源码如下: + +.. code-block:: c + + #include + #include + + static int hello_init(void) + { + printk("Hello, openEuler Embedded!\r\n"); + return 0; + } + + static void hello_exit(void) + { + printk("Byebye!"); + } + + module_init(hello_init); + module_exit(hello_exit); + + MODULE_LICENSE(GPL); + +编写Makefile,和hello.c文件放在同一个目录: + +:: + + KERNELDIR := ${KERNEL_SRC_DIR} + CURRENT_PATH := $(shell pwd) + + target := hello + obj-m := $(target).o + + build := kernel_modules + + kernel_modules: + $(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules + clean: + $(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean + +:file:`KERNEL_SRC_DIR` 为SDK中内核源码树的目录,该变量在安装SDK后会被自动设置。 + +2. **编译生成内核模块** + +进入hello.c文件所在目录,使用工具链编译,命令如下: + +.. code-block:: console + + make + +将编译好的hello.ko拷贝到openEuler Embedded系统的目录下。 + +如何拷贝可以参考前文所述共享文件系统场景。 + +3. **插入内核模块** + +在openEuler Embedded系统中插入内核模块: + +.. code-block:: console + + insmod hello.ko + +如运行成功,则会在内核日志中出现"Hello, openEuler Embedded!"。 + diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..4a0ec49ea132230d095a6dfbbf2f1cacca98ef20 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,31 @@ +.. __openeuler_embedded : + + +openEuler Embedded使用与开发手册 +=========================================== + +openEuler Embedded是基于openEuler社区面向嵌入式场景的Linux版本,旨在成为一个高质量的以Linux为中心的嵌入式系统软件平台。 +openEuler Embedded在内核版本、软件包版本等代码层面会与openEuler其他场景的Linux保持一致,共同演进,不同之处 +在于针对嵌入场景的内核配置、软件包的组合与配置、代码特性补丁的不同。 + +本手册包含了openEuler Embedded如何使用、如何构建,如何开发的相关内容。 + + +章节 +***** + +.. toctree:: + :maxdepth: 1 + :caption: 内容 + + introduction/index.rst + getting_started/index.rst + features/index.rst + yocto/index.rst + qemu/index.rst + contribute_doc.rst + releases/index.rst + security_hardening/index.rst + +索引与表格 +*********** diff --git a/docs/source/introduction/index.rst b/docs/source/introduction/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..24d90828c4c0b4f33277447ce007716ebbcd5447 --- /dev/null +++ b/docs/source/introduction/index.rst @@ -0,0 +1,72 @@ +.. _introducing_openeuler_embedded: + + +openEuler Embedded介绍 +###################################### + +openEuler Embedded是基于openEuler社区面向嵌入式场景的Linux版本,旨在成为一个高质量的以Linux为中心的嵌入式系统软件平台 +其总体架构如下图所示: + +.. figure:: ../../image/openeuler_architecture.png + + openEuler Embedded总体架构 + +- **以Linux为中心** + +openEuler Embedded的中心是Linux,采用了与openEuler其他场景相同的Linux 5.10内核,该版本内核最长支持周期为6年。 +在软件包层面也与内核一样共代码、共演进,当前已经支持80+嵌入式场景核心软件包,远期目标是支持openEuler社区所有软件包。 + +同时针对嵌入式场景的需求,openEuler Embedded会在内核特性、系统配置、软件包组合、镜像裁剪、安全加固、轻量化等方面 +进行创新,包括但不限于: **基于Preempt-RT补丁提供软实时能力、最小OS镜像<5M、小于<5S的快速启动能力** 等。 + +- **混合部署框架** + +在嵌入式场景中,虽然Linux已经得到了广泛应用,但并不能覆盖所有需求,例如高实时、高可靠、高安全的场合。这些场合往往是实时操作系统 +的用武之地。在既需要Linux的管理能力、丰富的生态有又需要实时操作系统的高实时特性的场合,传统的设计是一颗性能较大的处理器运行Linux, +一颗微控制器/DSP/实时处理器运行实时操作系统,两者之间通过I/O、网络或片外总线通信。现在随着硬件技术的快速发展,片上系统的集成度越来 +越高,同时集成多核、异构多核已经很常见,这就带了在软件上同时部署多个OS的需求。 + +openEuler Embedded的混合部署框架就是为了解决这一问题而推出的,目的是通过一套框架实现Linux和其他OS的便捷地混合部署,依托硬件 +上的多核能力使得Linux和实时操作系统有效互补,从而达到全系统兼有Linux的富生态和实时操作系统的高实时。 + +- **嵌入式虚拟化** + +混合部署框架虽然可以解决Linux和实时操作系统的混合部署的问题, 但也存在着Linux和实时操作系统未实现强隔离,静态部署资源利用率低等问题。嵌入式虚拟化 +是解决这些的问题的途径之一。由于嵌入式场景的诸多约束,嵌入式虚拟化与以服务器、云计算为代表的通用虚拟化有着显著的不同,openEuler Embedded +正就嵌入式虚拟化相关技术积极布局,未来将推出相应的解决方案,有力支撑混合关键性系统。 + +- **分布式软总线** + +欧拉和鸿蒙两大社区正积极合作,通过在openEuler Embedded中引入分布式软总线技术,使得鸿蒙设备和欧拉设备能够彼此互联互通,打通鸿蒙和欧拉两大 +生态。鸿蒙主要面向有强交互等需求的智能终端、物联网终端和工业终端,欧拉主要面向有高可靠、高性能等需求的服务器、边缘计算、云、嵌入式设备,二者各有 +侧重,通过以分布式软总线为代表的技术相互联通,可以实现”1+1>2“的效果。 + +- **工具体系** + +由于嵌入式系统资源受限,无法像通用系统那样方便地进行开发工作,非常依赖工具体系的支持。除了嵌入式Linux外,openEuler Embedded的发布件中还包含能有力 +支持嵌入式开发工作的SDK(Software Development Kit), 同时近期也会集成与openEuler Embedded配套嵌入式系统仿真方案,未来还计划集成图形化的IDE +(Integrated Development Environment), 最终形成一套相对完整的开发工具体系。 + +- **DFX体系** + +还是由于嵌入式系统资源受限,无法像通用系统那样方便地进行优化和调试。openEuler Embedded的DFX(Design For X)为一个包含了针对嵌入式Linux的调试机制、性能 +优化机制和维测机制在完善体系,旨在帮助开发者高效地完成相关工作。 + +- **统一构建系统** + +openEuler Embedded采用的面向嵌入式系统Yocto构建体系,而非openEuler服务器场景的OBS构建体系。虽然实现了内核和软件包在代码层面 +的共享,但在具体构建上有着巨大的差异,需要专门编写相应的构建文件,这也意味当前openEuler体系中众多软件包的构建规则不能直接应用于嵌 +入式场景。当前openEuler Embedded已经实现了80+软件包的支持,未来为了实现所有软件包的支持,显然不能把所有的软件包的构建在Yocto下 +重新实现一遍。 + +因此,openEuler Embedded正在与其他场景共同努力,希望打造一套支持全场景的统一构建系统,包括统一的软件包描述、面向构建的领域专用语言 +和统一的执行引擎。一些初步的构想可以参考 `基于Yocto的openEuler Embedded构建实践 `_ + +- **南向生态** + +openEuler Embedded初步支持了在嵌入式系统广泛使用的ARM架构,包括arm32和arm64,并通过QEMU和树莓派4B两个平台承载。未来,openEuler Embedded将 +支持更多的ARM架构平台,并逐步支持RISC-V、X86、龙芯等架构,不断丰富南向生态。 + +- **北向生态** + +openEuler Embedded的北向生态正在起步中,将会与openEuler的相关SIG组与社区伙伴合作不断完善,重点聚焦在工控、机器人、能源等场景。 \ No newline at end of file diff --git a/docs/source/qemu/index.rst b/docs/source/qemu/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..09b1962bdd94c070d305f3f47b076059c1d2ccea --- /dev/null +++ b/docs/source/qemu/index.rst @@ -0,0 +1,14 @@ +.. _openeuler_embedded_with_qemu: + +openEuler Embedded结合qemu使用 +################################ + +使用qemu的仿真模式(tcg模式)可以快速的在自己的机器上启动一个Linux镜像。如果你想快速搭建一个openEuler Embedded环境,使用qemu可以屏蔽硬件和操作环境的差异,让你获得一个可运行的OS。 + +本章介绍如何使用qemu来搭建openEuler Embedded环境,以及一些qemu相关的使用指南。具体内容如下: + +.. toctree:: + :maxdepth: 1 + + qemu_start.rst + qemu_monitor.rst \ No newline at end of file diff --git a/docs/source/qemu/qemu_monitor.rst b/docs/source/qemu/qemu_monitor.rst new file mode 100644 index 0000000000000000000000000000000000000000..78e89f028187accc71f26a2f590c426d497c0298 --- /dev/null +++ b/docs/source/qemu/qemu_monitor.rst @@ -0,0 +1,281 @@ +.. _qemu_monitor: + +Qemu控制台 +########## + +Qemu控制台,即qemu monitor,是在qemu模拟器运行时为其提供各种有用功能模块的工具,可以在比如调试时得到意想不到的帮助。在qemu模拟器启动后,通过ctrl +a + c的操作序列进入。 + +.. code-block:: console + + (qemu) + +在操作后即为如图所示的样子,会显示(qemu)的字样。在这个时候,有各种命令可以使用。使用help命令,即可以看到所有支持的命令(下面的图只是示例,并不包含全部内容) + +.. code-block:: console + + acl_add aclname match allow|deny [index] -- add a match rule to the access control list + acl_policy aclname allow|deny -- set default access control list policy + acl_remove aclname match -- remove a match rule from the access control list + acl_reset aclname -- reset the access control list + acl_show aclname -- list rules in the access control list + announce_self [interfaces] [id] -- Trigger GARP/RARP announcements + balloon target -- request VM to change its memory allocation (in MB) + block_job_cancel [-f] device -- stop an active background block operation (use -f + if you want to abort the operation immediately + instead of keep running until data is in sync) + block_job_complete device -- stop an active background block operation + block_job_pause device -- pause an active background block operation + block_job_resume device -- resume a paused background block operation + block_job_set_speed device speed -- set maximum speed for a background block operation + block_passwd block_passwd device password -- set the password of encrypted block devices + block_resize device size -- resize a block image + block_set_io_throttle device bps bps_rd bps_wr iops iops_rd iops_wr -- change I/O throttle limits for a block drive + block_stream device [speed [base]] -- copy data from a backing file into a block device + boot_set bootdevice -- define new values for the boot device list + change device filename [format [read-only-mode]] -- change a removable medium, optional format + chardev-add args -- add chardev + chardev-change id args -- change chardev + chardev-remove id -- remove chardev + chardev-send-break id -- send a break on chardev + client_migrate_info protocol hostname port tls-port cert-subject -- set migration information for remote display + closefd closefd name -- close a file descriptor previously passed via SCM rights + commit device|all -- commit changes to the disk images (if -snapshot is used) or backing files + cpu index -- set the default CPU + cpu-add id -- add cpu (deprecated, use device_add instead) + c|cont -- resume emulation + delvm tag -- delete a VM snapshot from its tag + device_add driver[,prop=value][,...] -- add device, like -device on the command line + device_del device -- remove device + drive_add [-n] [[:]:] + [file=file][,if=type][,bus=n] + [,unit=m][,media=d][,index=i] + [,snapshot=on|off][,cache=on|off] + [,readonly=on|off][,copy-on-read=on|off] -- add drive to PCI storage controller + drive_backup [-n] [-f] [-c] device target [format] -- initiates a point-in-time + copy for a device. The device's contents are + copied to the new image file, excluding data that + is written after the command is started. + The -n flag requests QEMU to reuse the image found + in new-image-file, instead of recreating it from scratch. + The -f flag requests QEMU to copy the whole disk, + so that the result does not need a backing file. + The -c flag requests QEMU to compress backup data + (if the target format supports it). + + drive_del device -- remove host block device + ... + +使用help [命令]的方式,可以看到某个具体命令的使用说明。 + +本篇文章会介绍几个调试过程中相对较为常用的控制台命令,希望对开发、定位问题能有所帮助。 + +1、Info +******** + +Info顾名思义,是查看这个启动的虚拟机相关的各项信息的一个命令。它本身又是一套命令的合集,可以查看虚拟机相关的很多方面。使用help info,可以看到如下图所示的所有可用的info命令(下面的图只是示例,并不包含info的全部内容)。 + +.. code-block:: console + + info migrate -- show migration status + info migrate_cache_size -- show current migration xbzrle cache size + info migrate_capabilities -- show current migration capabilities + info migrate_parameters -- show current migration parameters + info mtree [-f][-d][-o] -- show memory tree (-f: dump flat view for address spaces;-d: dump dispatch tree, valid with -f only);-o: dump region owners/parents + info name -- show the current VM name + info network -- show the network state + info numa -- show NUMA information + info opcount -- show dynamic compiler opcode counters + info pci -- show PCI info + info pic -- show PIC state + info profile -- show profiling information + info qdm -- show qdev device model list + info qom-tree [path] -- show QOM composition tree + info qtree -- show device tree + info ramblock -- Display system ramblock information + info rdma -- show RDMA state + info registers [-a] -- show the cpu registers (-a: all - show register info for all cpus) + info rocker name -- Show rocker switch + info rocker-of-dpa-flows name [tbl_id] -- Show rocker OF-DPA flow tables + info rocker-of-dpa-groups name [type] -- Show rocker OF-DPA groups + info rocker-ports name -- Show rocker ports + info roms -- show roms + info snapshots -- show the currently saved VM snapshots + info status -- show the current VM status (running|paused) + info sync-profile [-m] [-n] [max] -- show synchronization profiling info, up to max entries (default: 10), sorted by total wait time. (-m: sort by mean wait time; -n: do not coalesce objects with the same call site) + info tpm -- show the TPM device + info trace-events [name] [vcpu] -- show available trace-events & their state (name: event name pattern; vcpu: vCPU to query, default is any) + info usb -- show guest USB devices + info usbhost -- show host USB devices + info usernet -- show user network stack connection states + info uuid -- show the current VM UUID + info version -- show the version of QEMU + info vm-generation-id -- Show Virtual Machine Generation ID + info vnc -- show the vnc server status + +这里比较常用的,如 + +- (1)可以查看物理地址空间结构的info mtree。任何一次qemu模拟器的system级运行都可以理解为qemu构建了一块完整的虚拟单板,而通过info mtree,可以看到这块虚拟单板的物理地址空间布局。 + +.. code-block:: console + + 0000000000000000-ffffffffffffffff (prio 0, i/o): system + 0000000000000000-0000000003ffffff (prio 0, romd): virt.flash0 + 0000000004000000-0000000007ffffff (prio 0, romd): virt.flash1 + 0000000008000000-0000000008000fff (prio 0, i/o): gic_dist + 0000000008010000-0000000008011fff (prio 0, i/o): gic_cpu + 0000000008020000-0000000008020fff (prio 0, i/o): gicv2m + 0000000009000000-0000000009000fff (prio 0, i/o): pl011 + 0000000009010000-0000000009010fff (prio 0, i/o): pl031 + 0000000009020000-0000000009020007 (prio 0, i/o): fwcfg.data + 0000000009020008-0000000009020009 (prio 0, i/o): fwcfg.ctl + 0000000009020010-0000000009020017 (prio 0, i/o): fwcfg.dma + 0000000009030000-0000000009030fff (prio 0, i/o): pl061 + 000000000a000000-000000000a0001ff (prio 0, i/o): virtio-mmio + 000000000a000200-000000000a0003ff (prio 0, i/o): virtio-mmio + 000000000a000400-000000000a0005ff (prio 0, i/o): virtio-mmio + 000000000a000600-000000000a0007ff (prio 0, i/o): virtio-mmio + 000000000a000800-000000000a0009ff (prio 0, i/o): virtio-mmio + 000000000a000a00-000000000a000bff (prio 0, i/o): virtio-mmio + +- (2)可以查看物理地址空间所有外设相关信息的info qtree。比起info mtree重点放在地址空间布局上,info qtree更注重每个外设本身的一些信息,如有多少mmio空间、数据位宽、中断个数等 + +.. code-block:: console + + bus: main-system-bus + type System + dev: platform-bus-device, id "platform-bus-device" + gpio-out "sysbus-irq" 64 + num_irqs = 64 (0x40) + mmio_size = 33554432 (0x2000000) + mmio ffffffffffffffff/0000000002000000 + dev: fw_cfg_mem, id "" + data_width = 8 (0x8) + dma_enabled = true + x-file-slots = 32 (0x20) + mmio 0000000009020008/0000000000000002 + mmio 0000000009020000/0000000000000008 + mmio 0000000009020010/0000000000000008 + dev: virtio-mmio, id "" + gpio-out "sysbus-irq" 1 + format_transport_address = true + force-legacy = true + mmio 000000000a003e00/0000000000000200 + bus: virtio-mmio-bus.31 + type virtio-mmio-bus + +- (3)可以查看有多少个cpu的info cpus。前面有*标志的cpu表示当前的cpu。使用cpu [cpu号]的命令,可以切换到某个其他的cpu上面。当前cpu表示正在观察的cpu,如info registers操作(后面会讲),如果不使用info registers -a,默认只会打印当前cpu的寄存器信息。 + +.. code-block:: console + + * CPU #0: thread_id=3639 + CPU #1: thread_id=3640 + CPU #2: thread_id=3641 + CPU #3: thread_id=3642 + +- (4)可以查看每个模拟cpu的寄存器信息的info registers + +.. code-block:: console + + PC=ffffffc0104d16c0 X00=0000000000000000 X01=ffffffc010730000 + X02=ffffffc01075e340 X03=0000000000048600 X04=ffffff8007f82508 + X05=0000000000000000 X06=ffffff8007f82370 X07=0000000000000004 + X08=ffffffc01075ed30 X09=ffffffc010753e20 X10=0000000000000990 + X11=0000000000000000 X12=0000000000000000 X13=0000000000000000 + X14=0000000000000000 X15=0000000000000000 X16=0000000000000000 + X17=0000000000000000 X18=0000000000000000 X19=ffffffc010730000 + X20=ffffffc010758000 X21=0000000000000000 X22=ffffffc010758740 + X23=0000000000000001 X24=ffffffc0107587c0 X25=ffffffc01073fe40 + X26=ffffffc010720004 X27=00000000400800f0 X28=00000000406e0018 + X29=ffffffc010753ea0 X30=ffffffc0104d16d8 SP=ffffffc010753ea0 + PSTATE=40000085 -Z-- EL1h FPCR=00000000 FPSR=00000000 + Q00=0000000000000000:0000000000000000 Q01=00000073252f7325:0000000000732520 + Q02=20746e697270206f:742064656c696146 Q03=ffffff0000000000:ffffffffff000000 + Q04=0000000000000000:0000000000000000 Q05=4010040040000001:4010040140000400 + Q06=0000000000000000:0000000000000000 Q07=4010040140100401:4010040140100401 + Q08=0000000000000000:41cdcd6500000000 Q09=0000000000000000:0000000000000000 + Q10=0000000000000000:0000000000000000 Q11=0000000000000000:0000000000000000 + Q12=0000000000000000:0000000000000000 Q13=0000000000000000:0000000000000000 + Q14=0000000000000000:0000000000000000 Q15=0000000000000000:0000000000000000 + Q16=0000000054415544:0000000054415544 Q17=0000000000000000:00000000a8000000 + Q18=0000000000000000:0000000000000000 Q19=0000000000000000:0000000000000000 + Q20=0000000000000000:0000000000000000 Q21=0000000000000000:0000000000000000 + Q22=0000000000000000:0000000000000000 Q23=0000000000000000:0000000000000000 + Q24=0000000000000000:0000000000000000 Q25=0000000000000000:0000000000000000 + Q26=0000000000000000:0000000000000000 Q27=0000000000000000:0000000000000000 + Q28=0000000000000000:0000000000000000 Q29=0000000000000000:0000000000000000 + Q30=0000000000000000:0000000000000000 Q31=0000000000000000:0000000000000000 + +Info还有许许多多功能,这里不再一一列举了,大家可以直接在qemu monitor中使用help info查看全部命令。 + +2、x/xp命令 +******************** + +qemu monitor控制台很多时候可用于调试,所以有时需要打印各种地址上的内容。x和xp的功能相辅相成,一个可以通过物理地址打印内容,一个可以通过虚拟地址打印内容。用法和gdb中的x命令是相同的,但是gdb并不能看到某个进程使用了哪些物理地址,所以没有能够打印物理地址中内容的xp功能。 + +x/xp命令结合前面可以切换cpu的命令,可以打印在任何虚拟核心角度的,任意的地址里面的内容。 + +.. code-block:: console + + (qemu) x/32wx 0xffffffc0104d16c0 + ffffffc0104d16c0: 0xd50323bf 0xd65f03c0 0xd503233f 0xa9bf7bfd + ffffffc0104d16d0: 0x910003fd 0x97fffff8 0xa8c17bfd 0xd50323bf + ffffffc0104d16e0: 0xd65f03c0 0xd503233f 0xa9bf7bfd 0x910003fd + ffffffc0104d16f0: 0x97fffff6 0xd2801c00 0xd50342ff 0xa8c17bfd + ffffffc0104d1700: 0xd50323bf 0xd65f03c0 0xd5184600 0xd503233f + ffffffc0104d1710: 0xa9bc7bfd 0xd5384101 0x910003fd 0xa90153f3 + ffffffc0104d1720: 0xaa0003f4 0xa9025bf5 0xa90363f7 0xb9401020 + ffffffc0104d1730: 0xf9401035 0x11000400 0xb9001020 0xf00012e2 + (qemu) xp/32wx 0x404d2780 + 00000000404d2780: 0xd503233f 0xa9bd7bfd 0x910003fd 0xa90153f3 + 00000000404d2790: 0x90001873 0xa9025bf5 0x913b2273 0x90000136 + 00000000404d27a0: 0x90001875 0x911782d6 0x913a02b5 0xd2800014 + 00000000404d27b0: 0x94000792 0xd1012260 0xf8747ac1 0xf900301f + 00000000404d27c0: 0x91000694 0xf9000275 0xf9001a61 0x29087e7f + 00000000404d27d0: 0xb9044a7f 0x940007ab 0x91160273 0xf100129f + 00000000404d27e0: 0x54fffea1 0xa94153f3 0xa9425bf5 0xa8c37bfd + 00000000404d27f0: 0xd50323bf 0xd65f03c0 0xd503233f 0xa9be7bfd + +3、savevm/loadvm命令 +******************** + +savevm和loadvm两个命令可以当qemu模拟器运行到某个状态时,将当前的整个内存中的镜像的状态保存和恢复到一个磁盘文件中。类似于大部分现代操作系统自带的hibernate和恢复的功能。savevm是保存镜像到磁盘文件,loadvm是从磁盘文件中加载一个之前保存过得磁盘镜像恢复出来。savevm的用法如下: + - 首先在qemu运行之前,通过qemu-img 的create命令,创建一个磁盘文件,磁盘文件必须是qcow2格式而不能是raw格式,因为raw格式的镜像不支持savevm/loadvm功能。如下面的命令,即创建了一个2G大小的,格式为qcow2,名为imagedisk的磁盘文件。 + + .. code-block:: console + + qemu-img create -f qcow2 imagedisk 2G + + + - 在qemu启动参数中,加上-hda [磁盘文件名],如-hda imagedisk。以此告知qemu模拟器使用hda参数指明的磁盘文件来保存磁盘镜像。 + + .. code-block:: console + + ./qemu-4.2.1/aarch64-softmmu/qemu-system-aarch64 \ + -M virt-4.0 \ + -cpu cortex-a57 \ + -smp 4 \ + -nographic \ + -kernel $KERNEL \ + -initrd $INITRD \ + -hda imagedisk + + - 这样一来,当qemu运行的时候,就可以随时将当前状态通过savevm [tag]命令保存到imagedisk磁盘文件中了。[tag]可以自己决定,只是为镜像起一个名字,如savevm img0。在保存后,使用info snapshots命令即可以看到所有保存的磁盘镜像。 + + .. code-block:: console + + (qemu) info snapshots + List of snapshots present on all disks: + ID TAG VM SIZE DATE VM CLOCK + -- img0 57.3 MiB 2022-03-16 01:50:22 00:00:26.950 + + - 在保存镜像至磁盘文件后,只要后面启动的时候在参数-hda后面带上这个磁盘文件,即可以通过loadvm [tag]的方式恢复保存的镜像,并回到保存时的机器状态进行使用了。 + +4、gva2gpa/gpa2hpa/gpa2hva +*************************** + +在调试裸机程序或者内核的时候,可能经常需要知道某块虚拟内存对应的物理地址,从而进行操作,在qemu中,模拟器中guest的虚拟地址叫做gva,物理地址叫做gpa。而gva和gpa之间的转换关系在有些时候是很利于调试的。Qemu的monitor控制台提供了gva2gpa这个功能,让我们能把一个gva转换为对应的gpa。同时,还提供了gpa2hpa,gpa2hva两个功能,让我们可以将gpa转换为物理机眼中的物理地址或者虚拟地址,在需要的时候可以使用。 + +.. code-block:: console + + (qemu) gva2gpa 0xffffffc0104d16c0 + gpa: 0x404d16c0 diff --git a/docs/source/qemu/qemu_start.rst b/docs/source/qemu/qemu_start.rst new file mode 100644 index 0000000000000000000000000000000000000000..b46755a650f8c996f5ffedae0bf03de87813be3f --- /dev/null +++ b/docs/source/qemu/qemu_start.rst @@ -0,0 +1,136 @@ +.. _qemu_start_debug: + +qemu使用和调试 +############################## + +本文档主要用于介绍如何获得qemu的二进制,qemu的运行,以及如何基于qemu进行一些简单的调试。 + +qemu使用 +************************ + +下面介绍如何在自己的机器上编译并运行一个linux镜像。 + +获取二进制 +======================== + +获取qemu的二进制可以通过如下方式: + +- 基于openEuler社区 `qemu `_ 代码自行编译: + + - 首先下载对应的代码并切换到stable-5.0分支: + + .. code-block:: console + + git clone https://gitee.com/openeuler/qemu.git qemu + cd qemu + git checkout -b stable-5.0 remotes/origin/stable-5.0 + + - 编译生成对应的二进制: + + .. code-block:: console + + ./configure --target-list=arm-softmmu,aarch64-softmmu --disable-werror + make -j 8 + make install #调试不需要 + + 编译完成后会生成arm-softmmu/qemu-system-arm、aarch64-softmmu/qemu-system-aarch64两个文件。 + + .. note:: + + configure执行过程中,可能会有诸如”glib-2.48 gthread-2.0 is required to compile QEMU“的失败打印,请按照提示自行安装升级对应的软件包。 + + configure时可以通过不同的参数来enable/disable一些qemu的特性或编译选项,如示例中增加的--disable-werror可以允许编译warning;如想要体验openEuler Embedded共享文件系统场景,需要在configure时增加--enable-virtfs来使能对应功能。 + +openEuler Embedded镜像 +======================== + +参照 :ref:`快速上手` 部分。 + +qemu运行 +======================== + +一个简单的qemu执行命令如下: + +.. code-block:: console + + qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd initrd + +执行之后等待OS加载完成,很快就能看到登陆提示: + +.. code-block:: console + + Authorized uses only. All activity may be monitored and reported. + openeuler login: + +这也意味你已经成功在机器上启动了openEuler Embedded的系统。 + +这里也介绍一些常用的qemu启动参数: + +- **-M virt**: 指定需要使用的machine类型,virt是qemu提供的一个通用machine,可以同时支持arm32和arm64(部分cortex不支持), ``-M help`` 可以列出所有支持的machine列表 +- **-m 1G**: 可选,可以通过修改此参数来增大OS的可用内存 +- **-cpu cortex-a57**: 指定模拟的cpu类型,指定 ``-M`` 的情况下可以使用 ``-cpu help`` 查看当前machine支持的cpu类型 +- **-smp 2**: 可选,可以修改OS的cpu数量,默认为1 +- **-append**: 可选,指定内核的启动参数(cmdline) +- **-kernel**、**-initrd**: 分别用于指定OS的内核和文件系统 +- **-dtb**: 可选,用于指定dtb(device tree)文件 +- **-d in_asm -D qemu.log**: 可选,输出qemu在tcg模式下的"指令流"。 ``-d`` 选择指令流类型,可以用 ``-d help`` 查看支持的选项列表; ``-D`` 指定输出的文件名 +- **-s -S**: 可选,调试参数。 ``-S`` 可以让qemu加载OS的zImage、initrd到指定位置后停止运行,等待gdb连接; ``-s`` 等价于 ``--gdb tcp::1234`` ,启动gdb server并默认监听1234端口 +- **-serial**: 可选,用于串口重定向。不指定时默认为 ``-serial stdio`` ,即打印到标准输入输出。也可以重定向到tcp: ``-serial tcp::1111,server,nowait`` ,通过 ``telnet localhost 1111`` 连接 + +内核调试 +************************ + +qemu的另一大优势便是可以使用gdb来对内核进行调试,这对于嵌入式开发者来说能极大的提高开发效率。 +在原有的开发环境中,如果想调试内核,只能在出问题的代码附近加上printk打印,重编内核,将镜像烧到开发板上查看打印信息,如果出问题的阶段非常早,无法调用printk,还需要手动实现往串口物理地址打印的代码。 + +而有了gdb之后,可以直接在内核需要调试的位置下断点,查看对应的寄存器和变量的值。 + +调试准备 +======================== + +除了上面使用部分需要的东西之外,我们还需要一个vmlinux文件,一般在编译linux内核后在内核的根目录下就能找到。可以自行从openEuler社区下载linux的源码并编译生成。另外请确保vmlinux和zImage是由同一份内核源码和同一份内核config生成。 + +实例 +======================== + +以aarch64为例,介绍如何使用qemu进行内核调试。 + +.. note:: + + 调试自解压部分时,需要使用arch/arm64/boot/compressed/vmlinux,并在gdb加载vmlinux时,使用 + + .. code-block:: console + + (gdb) add-symbol-file vmlinux 0x40080000 + + 的方式来加载符号信息,0x40080000对应的地址实际上就是qemu加载zImage的位置,可以在qemu的控制台通过 ``info roms`` 查看 + + +在终端执行如下命令: + +.. code-block:: console + + qemu-system-aarch64 -M virt-4.0 -m 1G -cpu cortex-a57 -nographic -kernel zImage -initrd initrd "-S -s" + +可以发现此时命令行不再继续往下执行,我们另外打开一个窗口,启动gdb并连接qemu: + +.. code-block:: console + + gdb + (gdb) file vmlinux + (gdb) target remote :1234 + (gdb) b start_kernel + (gdb) c + +上面的 ``target remote :1234`` 用于连接qemu启动的gdb server; ``file vmlinux`` 用于加载符号信息。 +在执行完 ``c`` 之后,内核会开始运行,遇到我们在start_kernel下的断点后会再次停止,此时可以通过 ``p / bt`` 等方式查看变量或调用栈。 + +一些调试内核时常用的gdb命令: + +- **p**: 打印通用寄存器或者变量。 ``p $x1`` 或者 ``p command_line`` +- **x/32wx addr**: 以16进制,按word(32位)为单位,打印从addr开始的32个值 +- **disas [addr]**: 反汇编,可以结合qemu.log和objdump后的vmlinux一起查看 +- **n, s / ni, si**: 单步执行,ni,si 针对汇编 +- **info registers**: 打印寄存器 +- **bt**: 查看调用栈 +- **b [addr] [if condition]**: 断点,某些场景下可能需要条件断点来过滤部分(如想查看某个中断是否上报可以在中断入口处增加调试断点,减少非预期的停止) diff --git a/docs/source/releases/index.rst b/docs/source/releases/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..0b6da24977871fd281db8a837ecf75a1fc4b65d4 --- /dev/null +++ b/docs/source/releases/index.rst @@ -0,0 +1,12 @@ +.. _release_notes: + +版本说明 +######### + + +.. toctree:: + :maxdepth: 1 + :glob: + :reversed: + + release-notes-* diff --git a/docs/source/releases/release-notes-21.09.30.rst b/docs/source/releases/release-notes-21.09.30.rst new file mode 100644 index 0000000000000000000000000000000000000000..b0aa9826cbb50782857325aabff65b165ca86c25 --- /dev/null +++ b/docs/source/releases/release-notes-21.09.30.rst @@ -0,0 +1,9 @@ +:orphan: + +.. _openeuler_embedded_21_09_30: + +openEuler embedded 21.09.30 +########################### + +openEuler embedded 21.09.30的主要特性包括: + diff --git a/docs/source/releases/release-notes-22.03.30.rst b/docs/source/releases/release-notes-22.03.30.rst new file mode 100644 index 0000000000000000000000000000000000000000..4387d4e67e9639c0d915c2ddcdd8eefbcb5a5f72 --- /dev/null +++ b/docs/source/releases/release-notes-22.03.30.rst @@ -0,0 +1,9 @@ +:orphan: + +.. _openeuler_embedded_22_03_30: + +openEuler embedded 22.03.30 +########################### + +openEuler embedded 22.03.30的主要特性包括: + diff --git a/docs/source/security_hardening/index.rst b/docs/source/security_hardening/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..ea097f35cab35e928a74049c813dd127104cb45d --- /dev/null +++ b/docs/source/security_hardening/index.rst @@ -0,0 +1,11 @@ +.. _openeuler_embedded_security_hardening: + + +openEuler Embedded的安全加固说明 +################################ + +.. toctree:: + :maxdepth: 1 + :caption: 内容 + + security_configuration_baseline.rst diff --git a/docs/source/security_hardening/security_configuration_baseline.rst b/docs/source/security_hardening/security_configuration_baseline.rst new file mode 100644 index 0000000000000000000000000000000000000000..2bf8e7eb577de391784773e23ad0d75cf8800330 --- /dev/null +++ b/docs/source/security_hardening/security_configuration_baseline.rst @@ -0,0 +1,1038 @@ +.. raw:: html + +
+ +openEuler Embedded安全配置基线 + +.. raw:: html + +
+ +.. raw:: html + +
+ +.. raw:: html + +
+ +.. raw:: html + +
+ +.. raw:: html + +
+ +.. raw:: html + +
+ +.. raw:: html + +
+ +.. raw:: html + +
+ +-------------- + +概述 +======================= + +目的 +----------- + +本文旨在指导openEuler Embedded用户根据自身使用场景,正确使用和配置、加固操作系统,从而获得安全可靠的服务。 + +使用对象 +-------------- + +本文的读者及使用对象是使用openEuler Embedded系列版本的人员,及需要了解openEuler Embedded系列版本安全机制的开发、测试等人员。 + +适用范围 +-------------------- + +本基线适用于使用openEuler Embedded作为操作系统的人员。 + +基线解释 +-------------------------- + +本基线由openEuler Embedded团队输出并维护,落地实施过程中遇到问题,请在社区上讨论。 + +规则组织方式 +------------------------------------------ + +每个安全配置规则内容都有统一的结构,各字段描述如下: + +**规则背景说明** :用于对规则进行解读说明。 + +**检查方法** :提供该规则项的检查方法。提供经过验证的检查命令。 + +规则 +====================== + +文件系统保护 +---------------------------------------- + +确保/tmp、/var和/dev/shm所在分区设置合适的挂载选项 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +为了防止给系统带来风险,外置存储、日志分区、临时存储分区中不要有可执行文件、setuid可执行文件、设备节点等文件,各分区应使用nodev, +nosuid, noexec, +ro等挂载选项。对于数据文件等分区应以noexec方式挂载分区;对于文件禁止修改的分区应以ro方式挂载;对于不需要SUID/SGID的分区应以nosuid方式挂载;/var、/tmp目录应以nodev方式挂载。请根据场景判断分区挂载选项的合理性,使用对应的挂载选项。 + +**检查方法:** + +查看/var、/tmp和/dev/shm是否设置了合适的挂载选项。 +例如,通过以下命令查看是否为/var目录设置了合适的挂载选项: + +.. code-block:: bash + + # mount | grep /var + none on /var type tmpfs (rw,nosuid,nodev,relatime,mode=755) + +编辑/etc/fstab文件: + +.. code-block:: bash + + + /dev/sda1 / ext4 acl,user_xattr 0 1 + /dev/sda2 /tmp ext4 nodev,nosuid,noexec 0 0 + +- nosuid:表示分区内的二进制文件无法使用setuid权限运行,应对不包含suid可执行文件的分区进行设置。 +- noexec::表示分区不能包含可执行的二进制文件。 +- nodev:表示分区不能包含设备节点文件。 +- ro:表示分区以只读方式挂载。 + +确保系统中的重要文件和目录设置严格的访问权限 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +确保在系统中的重要文件和目录的权限设置正确,文件或目录仅能够被赋予该权限的用户或属组访问。 + +对系统中的文件,建议按文件类型进行访问权限设置: + +- 配置文件:644或更严格 +- 日志类文件:640或更严格 +- 二进制可执行文件:755或更严格 +- 库文件:755或更严格 + +**检查方法:** + +系统中部分重要文件的权限见下表,不建议弱化这些文件/目录的默认权限设置: + ++--------------------------+----------+----------+----------+ +| **文件或目录** | **属主** | **属组** | **权限** | ++==========================+==========+==========+==========+ +| /dev/mem | root | root | 0640 | ++--------------------------+----------+----------+----------+ +| /etc/fstab | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /etc/group | root | root | 0644 | ++--------------------------+----------+----------+----------+ +| /etc/init.d/ | root | root | 0750 | ++--------------------------+----------+----------+----------+ +| /etc/init.d/\* | root | root | 0750 | ++--------------------------+----------+----------+----------+ +| /etc/passwd | root | root | 0644 | ++--------------------------+----------+----------+----------+ +| /etc/securetty | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /etc/security/opasswd | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /etc/shadow | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /etc/ssh/\*key | root | root | 0400 | ++--------------------------+----------+----------+----------+ +| /etc/ssh/\*key.pub | root | root | 0644 | ++--------------------------+----------+----------+----------+ +| /etc/ssh/sshd_config | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /etc/sysctl.conf | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /lib/modules/ | root | root | 0750 | ++--------------------------+----------+----------+----------+ +| /root/ | root | root | 0700 | ++--------------------------+----------+----------+----------+ +| /tmp/ | root | root | 1777 | ++--------------------------+----------+----------+----------+ +| /dev/shm | root | root | 1777 | ++--------------------------+----------+----------+----------+ +| /var/log/audit/ | root | root | 0750 | ++--------------------------+----------+----------+----------+ +| /var/log/audit/audit.log | root | root | 0600 | ++--------------------------+----------+----------+----------+ +| /var/log/ | root | root | 0750 | ++--------------------------+----------+----------+----------+ +| /var/log/\* | root | root | 0640 | ++--------------------------+----------+----------+----------+ +| /var/log/secure | root | root | 0640 | ++--------------------------+----------+----------+----------+ +| /var/log/wtmp | root | root | 0640 | ++--------------------------+----------+----------+----------+ +| /bin/ | root | root | 0755 | ++--------------------------+----------+----------+----------+ +| /etc/ | root | root | 0755 | ++--------------------------+----------+----------+----------+ +| /home/ | root | root | 0755 | ++--------------------------+----------+----------+----------+ +| /lib/ | root | root | 0755 | ++--------------------------+----------+----------+----------+ +| /dev/ | root | root | 0755 | ++--------------------------+----------+----------+----------+ +| /init(软链接) | root | root | 0777 | ++--------------------------+----------+----------+----------+ +| /sbin/init | root | root | 0755 | ++--------------------------+----------+----------+----------+ +| /var/volatile/log | root | root | 0750 | ++--------------------------+----------+----------+----------+ +| /etc/motd | root | root | 0644 | ++--------------------------+----------+----------+----------+ +| /etc/issue | root | root | 0644 | ++--------------------------+----------+----------+----------+ +| /etc/issue.net | root | root | 0644 | ++--------------------------+----------+----------+----------+ + +例如,通过以下命令检查/var/log/wtmp文件的权限设置,如果有返回结果则检查成功,否则检查失败: + +.. code-block:: bash + + # find /var/log/wtmp -type f -user root -group root -perm 640 + /var/log/wtmp + +确保umask缺省值设置为027或更严格 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +umask决定了用户创建的文件和目录的默认权限,一般在/etc/bashrc,/etc/profile.d/\*.sh,/etc/profile、$HOME/.bash_profile或$HOME/.profile中设置umask值。因此,系统必须设置umask值,推荐值为027或更严格。 + +umask如果设置不合理,可能导致新建文件权限过小或过大,从而影响系统正常运行或导致安全风险。 + +**检查方法:** + +- 执行umask命令,查询默认的umask值: + +.. code-block:: bash + + # umask + 0077 + +- 检查配置文件/etc/login.defs、/etc/profile、/etc/bashrc中umask值是否正确。例如,以下命令检查/etc/login.defs文件,获得umask值为077: + +.. code-block:: bash + + # grep -iE "^\s*umask\s+" /etc/login.defs + UMASK 077 + +- 使用root用户登录,创建文件或目录,确认权限是否正确: + +.. code-block:: bash + + # touch test + # ll test + -rw------- 1 root root 0 May 17 23:34 test + + # mkdir testdir + # ll -d testdir/ + drwx------ 2 root root 40 May 17 23:35 testdir/ + +- 使用普通账户test登录,创建文件或目录,确认权限是否正确: + +.. code-block:: bash + + $ touch test + $ ll test + -rw------- 1 test test 0 May 17 23:55 test + + $ mkdir testdir + $ ll -d testdir/ + drwx------ 2 test test 40 May 17 23:55 testdir/ + +确保全局可写目录设置粘滞位 +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +全局可写目录下的文件,是文件替换攻击的高发区,是攻击者放置恶意程序的首选目标。 +因此,需设置粘贴位,使得目录下的文件只有文件owner才能删除,避免个人文件被他人修改。 + +如果用户对目录有写权限,则可以删除其中的文件和子目录,即使该用户不是这些文件的所有者,而且也没有读或写许可。 + +**检查方法:** + +使用如下命令查找有全局可写权限且未设置粘滞位的目录,返回为空表示未找到: + +.. code-block:: bash + + # find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) 2>/dev/null | sort + +确保LD_LIBRARY_PATH和PATH变量被严格定义 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +LD_LIBRARY_PATH是Linux的环境变量,该环境变量包含动态库的搜索路径。程序加载动态链接库时,会优先从该环境变量指定的路径中获取。通常情况下该环境变量不应该被设置,如果被恶意设置为不正确的值,程序在运行时就有可能链接到不正确的动态库,导致安全风险。如果存在LD_LIBRARY_PATH环境变量的话,应审核其中的所有路径是否合法。 + +PATH是Linux的环境变量,该环境变量包含可执行文件路径。为防止系统命令被恶意的可执行文件替代,确保用户执行的都是合法的命令,所有帐户的PATH环境变量中应当避免包含当前目录“.”。非系统账号的PATH环境变量,定义的目录顺序的必须是:合法的系统目录,然后是合法的应用路径,最后是合法的用户目录。这里合法指的是目录在文件系统中存在,并符合系统的设计期望的路径。异常PATH值可能导致系统命令或库被恶意程序替代。 + +**检查方法:** + +1. 检查在用户成功登录后会自动执行的脚本,如: :file:`/etc/profile` ,:file:`/etc/bashrc` ,:file:`$HOME/.profile` ,:file:`$HOME/.bashrc` ,:file:`/etc/ld.so.conf` 等,是否设置了 :file:`$LD_LIBRARY_PATH` 变量的值。 + +使用grep命令进行检查,例如,检查/etc/profile文件中是否设置了LD_LIBRARY_PATH值: + +.. code-block:: bash + + # grep "LD_LIBRARY_PATH" /etc/profile + +2. 检查当前用户上下文中是否存在LD_LIBRARY_PATH值,如果未设置LD_LIBRARY_PATH,则echo命令执行完以后打印为空,否则打印出当前设置的LD_LIBRARY_PATH值: + +.. code-block:: bash + + # echo $LD_LIBRARY_PATH + +3. 通过echo命令可以打印出当前用户上下文中PATH的值,检查是否存在非法路径,如 :file:`.` ,:file:`..` 等相对路径,:file:`/tmp` 等全局可写目录。openEuler + embedded root用户上下文中PATH值如下: + +.. code-block:: bash + + # echo $PATH + /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin + +用户账户与环境 +-------------------------- + +确保系统只有唯一的管理员账户 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +确保只有root帐户UID为0,因为在Linux中,UID为0的用户具有系统最高权限,系统中只能有一个。 + +如果存在非root的UID为0账号,容易被外界质疑,通过修改UID,隐藏普通账户的超级管理员权限。 + +**检查方法:** + +执行如下命令,查找系统中的root用户: + +.. code-block:: bash + + # cat /etc/passwd | awk -F: '{ if ($3 == 0) print $0 }' + root:x:0:0:root:/root:/bin/bash + +禁用系统账户登录 +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +Linux系统中为某些服务而提供的账户通常称为系统用户,这些用户的UID通常小于500,应该删除不必要的系统账户,对于必须提供的系统账户,应该禁止为其提供交互Shell。 + +如果不禁止无登录需求账号的登陆功能,可能导致被利用登录系统执行任意命令。 + +**检查方法:** + +执行如下命令检查系统中的系统用户的Shell是否设置正确,如果命令输出非空,则需要对命令所输出的用户进行处理: + +.. code-block:: bash + + # cat /etc/passwd | awk -F: '($1!="root" && $3<500 && $7!="/sbin/nologin" && $7!="/bin/false") {print}' + +确保连续3次输入错误口令后锁定用户 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +攻击者在对目标进行攻击时,最常用的手段是不断进行登录尝试,爆破用户的口令。因此,需要设置用户的失败登录重试次数,当用户连续失败登录达到阈值时,要对用户进行锁定。pam_faillock记录登录失败事件并在一定次数登录失败之后就不再允许登录,账号也因此被锁定一段时间,直到系统管理员解锁该账号。deny=N选项将最大登录次数设置为N。选项unlock_time=N设置达到最大登录次数之后账号被锁定的时长(秒)。 + +如果不限制登陆尝试次数,攻击者能不断进行登录尝试爆破用户口令。 + +**检查方法:** + +在/etc/pam.d/common-auth文件中检查“连续失败登录次数”和“锁定时间”的配置情况: + +.. code-block:: bash + + # cat /etc/pam.d/common-auth | grep "deny" | grep "unlock_time" + auth required pam_faillock.so audit deny=3 even_deny_root unlock_time=300 + +对口令复杂度进行检查 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +禁止用户使用弱口令,openEuler Embedded当前的默认密码策略最小长度为8位。其中,root账户修改密码时不做该检查,与业界标准保持一致。PAM模块pam_pwquality提供多个配置项,可通过定制口令策略来实现口令复杂度检查。用户在修改口令时,输入新密码之后该模块会进行多种检查。 + +口令设置过于简单,容易被猜测,太短的口令容易被暴力破解工具猜测出来。 + +**检查方法:** + +在/etc/pam.d/common-password文件中检查“设置口令复杂度”的配置情况: + +.. code-block:: bash + + # grep -E "^[[:space:]]*password[[:space:]]+(required|requisite)[[:space:]]+pam_pwquality.so[[:space:]]+" /etc/pam.d/common-password 2>/dev/null | grep "retry=3" | grep "minlen=8"| grep "minclass=3" + password requisite pam_pwquality.so try_first_pass minclass=3 minlen=8 lcredit=0 ucredit=0 dcredit=0 ocredit=0 reject_username gecoscheck retry=3 enforce_for_root + +禁用历史密码 +~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +频繁使用相同的历史口令容易造成口令泄露。 + +**检查方法:** + +在/etc/pam.d/common-password文件中检查“禁用历史口令”的配置情况: + +.. code-block:: bash + + cat /etc/pam.d/common-password | egrep "^\s*password\s+required\s+pam_pwhistory.so" | grep "enforce_for_root" | grep "use_authtok" | grep "remember=5" + password required pam_pwhistory.so remember=5 use_authtok enforce_for_root + +确保口令有效期设置正确 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +口令需要设置有效期,口令过期后用户重新登录时,提示口令过期,并强制修改,否则无法进入系统。 + +长期使用同一个口令将会增加口令被破解的可能(如暴力破解),同时增加密码泄露风险(如社会学攻击)。 + +**检查方法:** + +- 检查/etc/login.defs文件中是否已经配置相关字段: + +.. code-block:: bash + + # grep ^PASS_MAX_DAYS /etc/login.defs + PASS_MAX_DAYS 90 + # grep ^PASS_MIN_DAYS /etc/login.defs + PASS_MIN_DAYS 7 + # grep ^PASS_WARN_AGE /etc/login.defs + PASS_WARN_AGE 7 + +- 使用以下命令检查/etc/pam.d/common-account文件配置PAM模块验证用户的口令状态: + +.. code-block:: bash + + # egrep "^\s*account\s+\[\s*success=1\s+new_authtok_reqd=done\s+default=ignore\s*\]\s+pam_unix.so" /etc/pam.d/common-account 2>/dev/null + account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so + +确保设置Shell会话空闲超时间隔 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +当用户会话在900秒或更短的时间内没有活动的情况下应该超时退出。 + +会话超时时间设置过长,甚至永不超时,当管理员离开时没有退出登录,其他人员就可以直接在终端上以管理员权限进行操作。 + +**检查方法:** + +通过以下命令检查/etc/profile及/etc/bashrc文件中是否设置Shell会话空闲超时间隔: + +.. code-block:: bash + + # egrep "^\s*(export\s+)?TMOUT=" /etc/profile + TMOUT=300 + # egrep "^\s*(export\s+)?TMOUT=" /etc/bashrc + TMOUT=300 + +确保为系统的登录界面添加登录警告 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +操作系统不应将系统版本、应用服务器类型/功能等通过Warning +Banners暴露给用户,避免攻击者获取到系统信息,实施攻击。设置系统的登录提示信息,可实现隐藏系统版本等详细信息的目的。另外,为系统的登录界面添加登录警告,为惩戒恶意用户对系统的攻击行为,提供法律效力。 + +用户可根据需要,定制登录告警信息。 + +**检查方法:** + +- 通以下命令检查/etc/motd、/etc/issue、/etc/issue.net文件是否设置登录警告,如果结果返回为空,则没有为系统的登录界面添加登录警告: + +.. code-block:: bash + + # cat /etc/motd 2>/dev/null | egrep -v '^\s*#|^\s*$' + Authorized uses only. All activity may be monitored and reported. + #cat /etc/issue 2>/dev/null | egrep -v '^\s*#|^\s*$' + Authorized uses only. All activity may be monitored and reported. + #cat /etc/issue.net 2>/dev/null | egrep -v '^\s*#|^\s*$' + Authorized uses only. All activity may be monitored and reported. + +- 通过以下命令检查/etc/ssh/sshd_config文件是否设置Banner,如果返回为空,表示未配置: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep -i "^Banner" + Banner /etc/issue.net + +确保用户的口令必须用强哈希算法进行加密 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +对用户的口令使用强hash算法进行加密,能有效的降低口令被破解的风险。 + +**检查方法:** + +在/etc/pam.d/common-password文件中检查“口令使用强Hash算法加密”的配置情况: + +.. code-block:: bash + + # grep sha512 /etc/pam.d/common-password + password [success=1 default=ignore] pam_unix.so use_authtok nullok sha512 + +确保限制su权限的使用 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +任何用户通过su到其他用户,就可以获得该用户的权限对系统进行操作,特别是直接通过su获取root权限,因此需要严格控制su权限的使用。su滥用可能引入提权风险。 + +**检查方法:** + +检查/etc/pam.d/su中是否配置了非wheel组用户账号禁止使用su: + +.. code-block:: bash + + # grep pam_wheel.so /etc/pam.d/su | grep required + auth required pam_wheel.so use_uid + +网络配置与防火墙 +------------------------ + +确保记录所有欺骗包、源路由包、发送系统的重定向包 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +记录欺骗的包、源路由包和发给系统的重定向包有助于发现攻击源与制定防护措施。 +log_martians可以用来启动记录不合法的IP来源,便于定位来自不合法的IP来源。 + +**检查方法:** + +通过以下命令检查是否开启log_martians: + +.. code-block:: bash + + # sysctl net.ipv4.conf.default.log_martians + net.ipv4.conf.default.log_martians = 1 + # sysctl net.ipv4.conf.all.log_martians + net.ipv4.conf.all.log_martians = 1 + +确保使能tcp_syncookies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +SYN +cookie用于防止由于攻击者快速建立大量半连接而产生的DoS攻击。开启参数之后内核在回应报文中包含一个特殊构造的TCP序列号用来识别合法报文。 +推荐将该参数设置为1,减少系统在遭受SYN Flooding攻击时受到的影响。 + +**检查方法:** + +通过以下命令检查是否使能tcp_syncookies: + +.. code-block:: bash + + # sysctl net.ipv4.tcp_syncookies + net.ipv4.tcp_syncookies = 1 + +禁止IP转发 +~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +禁用IP转发功能可以防止具有多个网络接口的系统提供路由功能。 + +**检查方法:** + +通过以下命令检查是否禁止IP转发功能: + +.. code-block:: bash + + # sysctl net.ipv4.ip_forward + net.ipv4.ip_forward = 0 + +禁止发送ICMP重定向 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +ICMP重定向用于发送路由信息到其他主机。如果是独立主机,不包含路由器功能,则不需要该功能。 + +攻击者可能利用侵入的主机发送非法的ICMP重定向到其他路由器设备,破坏路由。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.conf.all.send_redirects + net.ipv4.conf.all.send_redirects = 0 + # sysctl net.ipv4.conf.default.send_redirects + net.ipv4.conf.default.send_redirects = 0 + +禁止源路由 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +源路由允许发送者指定其所发送的数据包经过的部分或者全部路由器。相比之下,非源路由包在网络中的传递路径则由网络中的路由器决定。 + +如果允许源路由数据包,则通过构造中间路由地址,可以用于访问专用地址系统;如果攻击者对原始报文截取,并利用源路由进行地址欺骗,则可以强制指定回传的报文都通过攻击者的设备进行路由返回,这样攻击者就可以成功接收到双向的数据包。 + +另外,大量报文被篡改后通过指定路由,则可以对内部网络进行定向攻击,可导致指定路由器负载过高,正常服务流量中断。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.conf.all.accept_source_route + net.ipv4.conf.all.accept_source_route = 0 + # sysctl net.ipv4.conf.default.accept_source_route + net.ipv4.conf.default.accept_source_route = 0 + +禁止接收ICMP重定向 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +ICMP重定向消息包携带了路由信息,控制主机(路由器)发送包的路径。这是允许外部路由设备来更新系统路由表的一种方式。攻击者可以伪造ICMP重定向信息恶意修改系统路由表,使得系统向错误的网络地址发送数据包,攻击者则可以获取这些数据包。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.conf.all.accept_redirects + net.ipv4.conf.all.accept_redirects = 0 + # sysctl net.ipv4.conf.default.accept_redirects + net.ipv4.conf.default.accept_redirects = 0 + +禁止接收安全ICMP重定向 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +安全ICMP重定向消息与ICMP重定向相同,但它们来自默认网关列表中的网关。 + +攻击者可以利用伪造的ICMP重定向消息恶意更改系统路由表,使它们向错误的网络发送数据包。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.conf.all.secure_redirects + net.ipv4.conf.all.secure_redirects = 0 + # sysctl net.ipv4.conf.default.secure_redirects + net.ipv4.conf.default.secure_redirects = 0 + +禁止响应广播请求 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +允许接收广播或多播的ICMP echo和timestamp请求可能使系统遭到Smurf攻击。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.icmp_echo_ignore_broadcasts + net.ipv4.icmp_echo_ignore_broadcasts = 1 + +确保启用错误消息保护 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +攻击者通过发送违反RFC-1122的相应消息,可能导致文件系统中因存储了过多的错误日志而被填满。设置icmp_ignore_bogus_error_responses为1可以防止内核记录错误响应日志,防止无用的日志信息填满文件系统。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.icmp_ignore_bogus_error_responses + net.ipv4.icmp_ignore_bogus_error_responses = 1 + +确保启用反向路径过滤 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +攻击者可以实施IP地址欺骗,在目前网络攻击中使用比较多。通过反向地址过滤在收到数据包时,取出源IP地址,然后查看该路由器的路由表中是否有该数据包的路由信息。如果路由表中没有其用于数据返回的路由信息,那么极有可能是某人伪造了该数据包,于是路由便把它丢弃。设置net.ipv4.conf.all.rp_filter和net.ipv4.conf.default.rp_filter为1强制Linux内核启用反向路径过滤验证接收的包是否合法。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl net.ipv4.conf.all.rp_filter + net.ipv4.conf.all.rp_filter = 1 + # sysctl net.ipv4.conf.default.rp_filter + net.ipv4.conf.default.rp_filter = 1 + +网络服务配置 +------------------------------ + +配置SSH +~~~~~~~~~~~~~~~~~~~~ + +确保使用V2协议版本的SSH +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +SSH1协议本身存在较多的未修复漏洞,且社区已不作为主流协议进行长期维护,容易使攻击者有机可乘,导致因传输协议不安全,而造成信息泄露、命令数据篡改等风险。与SSH +V1相比,SSH +V2进行了一系列功能改进并增强了安全性,例如基于迪菲-赫尔曼密钥交换的加密和基于消息认证码的完整性检查。SSH +V2还支持通过单个SSH连接任意数量的shell会话。SSH V2协议与SSH +V1不兼容,由于更加流行,一些实现(例如lsh和Dropbear)只支持SSH V2协议。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "Protocol 2" + Protocol 2 + +确保设置SSH的SyslogFacility和LogLevel +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +OpenSSH中的日志配置关键字是SyslogFacility和LogLevel。 + +通过SyslogFacility设置syslog的facility,如:KERN, DAEMON, USER, AUTH, +MAIL等。 + +LogLevel记录日志提供的详细程度,详细程度由低到高依次是:QUIET, FATAL, +ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, DEBUG3。 + +使用DEBUG会导致记录非常详细的日志,存在隐私问题,这个日志级别只能用于调试,禁止在现网环境中使用。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*SyslogFacility AUTH" + SyslogFacility AUTH + # cat /etc/ssh/sshd_config | grep "^\s*LogLevel" + LogLevel VERBOSE + +禁止X11转发 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +除非必须在远端直接使用X11应用程序,否则应该禁止X11 +Forwarding。如果允许X11 +Forwarding,则存在被远端X11服务器上其他用户攻击的风险。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*X11Forwarding no" + X11Forwarding no + +确保设置SSH登录失败次数上限 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +设置SSH失败登录锁定次数为3次,可防止用户暴力登录破解密码。如果不配置该值,或者该值配置比较大,则单次连接过程中客户端可以尝试多次认证失败,降低了攻击开销。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*MaxAuthTries" + MaxAuthTries 3 + +确保启用SSH的IgnoreRhosts +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +IgnoreRhosts参数设为yes,则 :file:`.hosts` 和 :file:`.shosts` 文件将不会用于 :file:`RhostsRSAAuthentication` 或 :file:`HostbasedAuthentication` 。 + +设置 :file:`IgnoreRhosts` 为yes可以强制用户使用SSH时必须输入口令进行认证,避免通过域名污染或IP欺骗后无需口令即可直接入侵系统。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*IgnoreRhosts yes" + IgnoreRhosts yes + +禁止HostbasedAuthentication +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +:file:`HostbasedAuthentication` 参数设置是否信任通过 :file:`.rhosts` 或 :file:`/etc/hosts.equiv` 指定的主机或用户,使这些用户可以不输入口令即可通过认证。 + +设置 :file:`HostbasedAuthentication` 为no,强制用户使用SSH时必须输入口令进行认证,避免通过域名污染或IP欺骗后无需口令即可直接入侵系统。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*HostbasedAuthentication no" + HostbasedAuthentication no + +禁止root用户通过SSH远程登录 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +限制root通过SSH远端登录。如果未禁止远程root账号登录,那么攻击者获取到root口令之后就可以从网络上远程登录服务器进行攻击行为,root权限具备管理员权限增加了攻击面。 + +**注意:** + +yocto构建工程在打包文件系统时候,默认使能了debug-tweaks模式,之前配置此项加固会被覆盖成未使能。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*PermitRootLogin no" + PermitRootLogin no + +禁止PermitEmptyPasswords +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +账号必须通过验证才能进行远程连接,登录系统,提升系统的安全性。若允许空口令登录,会增加空口令账号本身被攻击或被用来作为攻击账号的风险。 + +**注意:** + +yocto构建工程在打包文件系统时候,默认使能了debug-tweaks模式,之前配置此项加固会被覆盖成未使能。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*PermitEmptyPasswords no" + PermitEmptyPasswords no + +禁止PermitUserEnvironment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +设置PermitUserEnvironment参数为no,禁止sshd服务处理 :file:`~/.ssh/environment` 文件和 :file:`~/.ssh/authorized_keys` 文件中的 :file:`environment=` 。减少sshd处理外部输入数据的接口,可以减少利用sshd漏洞攻击系统的风险。如果PermitUserEnvironment配置为yes,则攻击者可以通过修改SSH环境变量绕过安全机制,或者执行攻击代码。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*PermitUserEnvironment no" + PermitUserEnvironment no + +确保SSH使用已知安全的数据摘要算法 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +openssh默认的算法集中包含了hmac-sha2-512、hmac-sha2-256、hmac-sha2-512-etm\@openssh.com等算法,其中包含“-etm”的安全性更高,在安全conf中需要以正确的顺序配置算法。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # grep -i "^MACs" /etc/ssh/sshd_config + MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com + +确保设置SSH的ClientAliveInterval和ClientAliveCountMax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +设置较短的会话超时时间可以减少会话被利用的风险,建议设置ClientAliveInterval为300秒(或更短),设置ClientAliveCountMax为0,则会话空闲300秒则自动终止。如果不设置会话超时,则非授权用户可能会利用该会话(例如,用户走开后没有锁定屏幕,则其他人可以继续使用SSH会话)。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*ClientAliveInterval 300" + ClientAliveInterval 300 + # cat /etc/ssh/sshd_config | grep "^\s*ClientAliveCountMax 0" + ClientAliveCountMax 0 + +确保设置SSH并发未认证连接数上限 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +部署SSH服务时,设置MaxStartups参数为限制并发未认证的连接数。例如,设置MaxStartups为10:30:100,则当未认证连接数达到10时,服务端开始丢弃30%的新连接,当未认证连接数达到100时,开始丢弃所有新的连接。未认证的连接在LoginGraceTime设置的时长(单位:秒)后自动断开。如果不限制并发连接数,可能导致恶意DOS攻击,消耗系统资源。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*MaxStartups" + MaxStartups 10:30:100 + # cat /etc/ssh/sshd_config | grep "^\s*LoginGraceTime" + LoginGraceTime 120 + +确保启用SSH的UsePAM +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +SSH通过配置PAM认证,可以基于Linux系统的用户认证管理模块完成SSH远程登录用户的认证授权和管理,否则将无法方便和集中的配置认证规则。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*UsePAM" + UsePAM yes + +确保设置SSH文件的权限 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +ssh会把每个访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,避免设备受到DNS +Hijack之类的攻击。 + +authorized_keys则保存认证过的机器的公钥信息,也需要设置权限避免被泄露或篡改。 + +**检查方法:** + +通过以下命令检查/root/.ssh/known_hosts、/root/.ssh/authorized_keys文件的权限,owner和group为是否为root、root,权限是否为600,返回结果为空则表明/root/.ssh/known_hosts、/root/.ssh/authorized_keys文件的权限符合要求: + +.. code-block:: bash + + # find /root/.ssh/known_hosts -maxdepth 0 \( ! -user root -o ! -group root -o -perm /177 \) 2>/dev/null + # find /root/.ssh/authorized_keys -maxdepth 0 \( ! -user root -o ! -group root -o -perm /177 \) 2>/dev/null + +确保设置SSH Banner +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**规则背景说明:** + +SSH登录前显示提示信息。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # cat /etc/ssh/sshd_config | grep "^\s*Banner /etc/issue.net" + Banner /etc/issue.net + +运行时安全 +--------------------------- + +确保使能用户态地址随机化保护 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +ASLR(Address space layout +randomization)是一种针对缓冲区溢出的安全保护技术,通过对堆(brk)、栈(stack)、共享库映射(mmap、vdso(X86))线性区布局的随机化及增加攻击者预测目的地址的难度,防止攻击者直接定位攻击代码位置,达到防御攻击者利用溢出执行任意代码的目的。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl kernel.randomize_va_space + kernel.randomize_va_space = 2 + +确保限制core dump功能的使用 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +缺省情况下应禁用core dump功能,因为core +dump功能可能会包含进程内存里的敏感信息。但是有时需要开启core +dump功能记录当时产生问题的原因,对于需要开启core +dump功能的需对日志输入的路径进行限制,同时需限制路径只允许特定用户访问。 + +openEuler +embedded默认关闭进程core功能,如果使用core功能,推荐使用更安全的openEuler +embedded +idump功能。idump是在Linux原生coredump功能上做安全增强,允许只转储栈的内容,以增加系统安全性;客户在网上环境应只转储栈空间。该功能默认关闭,用户打开该功能时,只能对该用户启动的进程生效,不影响系统其它进程。 + +**检查方法:** + +输入以下命令并检查相应的命令返回: + +.. code-block:: bash + + # sysctl fs.suid_dumpable + fs.suid_dumpable = 0 + +日志与审计 +------------------------ + +确保记录所有与认证相关的事件 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**规则背景说明:** + +记录登录事件包括登录错误日志、记录SU命令的使用日志和其它鉴权事件包括 :file:`AUTH` 类型的日志等。以便帮助分析用户登录的情况、系统状况、root权限使用情况以及监视系统上的可疑活动,如监视攻击者尝试猜测管理员密码登录活动。 + +**检查方法:** + +登录并检查日志文件中是否有登录认证日志。 +在/etc/audit/audit.rules文件添加如下规则: + +.. code-block:: bash + + -w /var/log/lastlog -p wa -k logins + -w /var/log/tallylog -p wa -k logins diff --git a/docs/source/yocto/addpackage_guide.rst b/docs/source/yocto/addpackage_guide.rst new file mode 100644 index 0000000000000000000000000000000000000000..92c3fa792ba1707b010c63df48fc8f97ec4e5cfa --- /dev/null +++ b/docs/source/yocto/addpackage_guide.rst @@ -0,0 +1,67 @@ +openEuler新增软件包指导 +############################### + +配方(.bb 文件)是 Yocto 项目环境中的基本组件。 OpenEmbedded 构建系统构建的每个软件组件都需要一个配方来定义组件; + +新增软件包到镜像中需要有软件包的源码,对应的bb文件。 + +主要过程 +******************** + +1. **源码获取/下载** + +软件包源码放在src(yocto-meta-openeuler同级目录)下。 + +2. **获取配方(.bb文件)** + +从yocto-poky仓库寻找相应软件包的bb文件; + +.. code-block:: console + + find yocto-poky -name package*.bb + +`OpenEmbedded Layer `_ 可直接搜索相应软件包的bb文件。 + + +3. **适配配方** + +在上一步中如果未找到相应版本的bb文件,可基于相近版本修改; + +.. code-block:: console + + mv package_version1.bb package_version2.bb //修改bb文件名为所需版本 + +修改bb文件适配openEuler yocto工程,主要需要修改如下字段; + +SRC_URI:表示软件包来源,修改源码包来源为本地,如果源码是从src-openEuler下载到本地,src-openEuler上该软件包有额外补丁也需要加上。 + +.. code-block:: console + + SRC_URI = "file://package//${BP}.tar.*" //BP变量表示软件名-版本号,*需改为相应的后缀。 + +依赖相关字段,如inherit、DEPENDS、RDEPENDS; + +.. code-block:: console + + bitbake -g //此命令可查看软件依赖 + cat pn-buildlist + +发现未支持依赖需优先编译依赖软件或者视情况解耦掉依赖软件。删除不支持的依赖,如inherit texinfo update-alternatives python3,这些class需要引入软件包,暂时没有支持起来。 + +4. **单包编译** + + bitbake + +5. **加入镜像** + +bb文件适配完成并验证ok后,将所需子包追加到layer配置文件RDEPNDNS变量中( 当前配置文件位于yocto-meta-openeuler工程meta-openeuler /recipes-core/packagegroups/packagegroup-xxx.bb )。 + +如果在加入镜像中与已有子包文件发生冲突的话需选择需要的子包,将另一个包从RDEPENDS变量值去除,但这个操作可能会引起一些麻烦,由于被删除子包中可能会包含其它必要的文件。 + +6. **编译镜像** + +.. code-block:: console + + bitbake openeuler-image + +这时产生的镜像中已经包含了你所需的软件包功能。 \ No newline at end of file diff --git a/docs/source/yocto/development.rst b/docs/source/yocto/development.rst new file mode 100644 index 0000000000000000000000000000000000000000..6784ef8ac841ab5a039df09f430f43631d362e5a --- /dev/null +++ b/docs/source/yocto/development.rst @@ -0,0 +1,180 @@ +.. _yocto_development: + +Yocto开发 +============= + +如何定制添加layer +******************************* + +.. image:: ../../image/yocto/create_layer.png + +即使你只有一两个配方文件,还是建议你创建自己的层,而不是把配方添加到OE-Core或者Yocto项目层,随着你的配方越来越多,这种好处更能体现出来,且容易迁移到你的其它 +项目中去。你可以修改配置文件,使你的层添加到项目中。还可以用yocto-layer脚本来创建层。 + +通常一个layer的结构包含3个文件夹:conf、classes、recipes-xxx。开发人员可以自行创建recipes-\*文件夹,存放其他软件包的bb文件。recipes-xxx目录仅用于区分 +不同类型的软件包/特性,实际可以作为一个recipes目录存放的。classes目录和poky原生的目录类似,主要存放自研的bbclass。conf目录是必须存在的,用于配置此layer的 +信息。 + + - classes: 类文件(.bbclass)中提供了一些可以和其他配方(和类文件在同一层中)共享的功能,多个配方可以从同一个类文件继承一些配置和功能。 + - conf: 这个区域包含了针对这个层和发行相关的配置信息(比如说conf/layer.conf)。local.conf和bblayers.conf的定制模板也可以放在此目录,构建时通过 + TEMPLATECONF变量指定。 + - recipes-xx: 包含了一些会影响全局的配方文件和配方追加文件。其中一些配方和追加文件被用来增加初始化脚本,特定发行版的配置和自定义的配方等文件。recepies-xx + 目录的例子就是recipes-core和recipes-kernel。不同recepies-\*目录下的内容和结构也会有所不同。通常来说,这些目录下含了配方文件(\*.bb)和配方追加文件(\*.bbappend), + 还有一些针对发行版的配置文件和其他文件。 + +添加新层可以通过以下步骤完成: + +1. 创建新层文件夹meta-xxx +#. 创建新层配置文件conf/layer.conf。 +#. 告诉 Bitbake 关于新层bblayers.conf +#. 根据层类型,添加内容。如果层添加了对机器的支持,则在层内的 conf/machine/ 文件中添加机器配置。如果层添加了发行版策略,则在层内的 conf/distro/ 文件中添加发行版配置。如果层引入了新的配方,则将需要的配方放在该层内的 recipes-* 子目录中。 + +以下是一个层的主要目录结构: + +:: + + ./ + ├── build/ 编译目录 + │ ├── bitbake.lock + │ └── conf/ + │ ├── local.conf + │ └── bblayers.conf + ├── meta-openeuler/ 新层 + │ ├── classes/ 如果需要提供公共类,则添加 + │ ├── recipe-core/ + │ ├── glibc/ + │ ├── files/ + │ ├── glibc_2.31.bb + │ └── glibc.inc + │ └── conf/ + │ ├── machine/ **按需添加** ,新硬件平台则需要 + │ ├── qemu_arm.conf + │ └── qemu_aarch64.conf + │ ├── distro/ **按需添加** ,新的发行版 + │ └── openeuler.conf + │ ├── local.conf.sample + │ ├── layer.conf + │ └── bblayers.conf.sample + └── meta/ 原始yocto社区poky下 + ├── classes/ + │ └── base.bbclass + └── conf/ + ├── bitbake.conf + └── layer.conf + +通过TEMPLATECONF变量指向新层的conf目录,yocto会自动将.sample赋值到build目录 +当前也可以通过yocto提供的工具添加新的基础layer: + + | ``bitbake-layers create-layer ../layers/meta-hello`` 创建层 + | ``bitbake-layers add-layer meta-hello`` 将层添加到conf/bblayers.conf + + +添加image +******************************* + +1)通过自定义bb文件添加image +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + | 添加bb文件如下: + +:: + + IMAGE_INSTALL = "packagegroup-core-x11-base package1 package2" + inherit core-image + +也可参考yocto提供的已有的image做定制修改 + +其中IMAGE_INSTALL中配置的名称必须使用 OpenEmbedded 表示法而不是 Debian 表示法作为名称(例如 glibc-dev 而不是 libc6-dev) + +Yocto提供了一些默认的images的配方,可参考 `https://docs.yoctoproject.org/ref-manual/images.html `_ + +2)通过自定义包组添加image +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + | 对于复杂的自定义image,自定义image的最佳方法是创建用于构建一个或多个image的自定义包组配方。 + + | 包组配方的一个很好的例子是 meta/recipes-core/packagegroups/packagegroup-base.bb。 + + | 通过PACKAGES 变量列出要生成的包组包。 inherit packagegroup 语句设置适当的默认值,并为 PACKAGES 语句中指定的每个包自动添加 -dev、-dbg 和 -ptest 补充包。 + + | inherit packagegroup 语句应该位于配方顶部附近,当然在 PACKAGES 语句之前。 + + | 对于 PACKAGES 中指定的每个包,可以使用 RDEPENDS 和 RRECOMMENDS 来提供父任务包应包含的包列表。您可以在 packagegroup-base.bb 配方中进一步查看这些示例。 + + | 以下一个简短的虚构示例: + + +:: + + DESCRIPTION = "My Custom Package Groups" + + inherit packagegroup + + PACKAGES = "\ + ${PN}-apps \ + ${PN}-tools \ + " + + RDEPENDS:${PN}-apps = "\ + dropbear \ + portmap \ + psplash" + + RDEPENDS:${PN}-tools = "\ + oprofile \ + oprofileui-server \ + lttng-tools" + + RRECOMMENDS:${PN}-tools = "\ + kernel-module-oprofile" + +在前面的示例中,创建了两个包组包,并列出了它们的依赖项和推荐的包依赖项:packagegroup-custom-apps 和 packagegroup-custom-tools。要使用这些包组包构建映像,您需要将 packagegroup-custom-apps、 packagegroup-custom-tools 添加到 IMAGE_INSTALL。 + + +添加一个新的配方bb +******************************* + +使用recipetool自动添加bb文件 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +使用devtool自动添加bb文件 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +从零添加bb +^^^^^^^^^^^^^^^^^^ + +添加bbclass +*************************** + +添加新架构 +*************************** + +支持多config +************************** + +使用外部工具链 +************************** + +recipes版本选择 +************************** + +SRC_URI中文件和目录查找 +********************************* + +配方打包时如何分包 +**************************** + +配方中添加日志打印 +*************************** + +对指定架构或任务等进行定制配置(选项、补丁等) +****************************************************** + +编译选项配置 +***************************** + +依赖关系配置(包、任务) +************************************ + +配方中的虚拟provides +*************************** \ No newline at end of file diff --git a/docs/source/yocto/exploration.rst b/docs/source/yocto/exploration.rst new file mode 100644 index 0000000000000000000000000000000000000000..d98b54e2e72ea438ad534e3791abdaf4fa37635c --- /dev/null +++ b/docs/source/yocto/exploration.rst @@ -0,0 +1,1251 @@ +.. _yocto_exploration: + +深入Yocto +======================== + +Yocto源码目录结构说明 +******************************************* + +Yocto Poky的目录结构如下图所示: + +.. image:: ../../image/yocto/poky_code_structure.png + +* bitbake + +该目录包含一份Bitbake的副本,以方便使用。该副本通常与来自Bitbake项目的当前稳定的Bitbake版本相匹配。Bitbake是一个元数据解释器, +它读取Yocto项目元数据并运行由该数据定义的任务。失败通常是由元数据中的错误引起的,而不是由Bitbake本身引起的。因此,大多数用户无需 +担心Bitbake。 + +当你运行bitbake命令时,主要的Bitbake可执行文件(位于bitbake/bin/目录中)启动。环境设置脚本(即oe-init-build-env)将scripts/ +和bitbake/bin/目录(按此顺序)放入shell的PATH环境变量中。 + +更多信息见bitbake用户手册:https://docs.yoctoproject.org/bitbake/index.html + +* documentation + +该目录包含Yocto项目文档的源代码以及允许你生成PDF和HTML版本手册的模板和工具。每本手册都包含在其自己的子文件夹中,例如,参考手册的文件位于ref-manual/目录中。 + +* meta + +该目录包含最底层OpenEmbedded-Core元数据。该目录包含严格模拟目标(qemux86、qemuarm等)的配方、通用类和机器配置。 + +该目录具体结构如下: + +:: + + meta/ + ├── classes/ *该目录包含 *.bbclass 文件。类文件用于抽象公共代码,以便它可以被多个包重用。* + │ ├── allarch.bbclass + │ ├── base.bbclass + │ └── … + ├── conf/ *yocto的核心配置文件* + │ ├── abi_version.conf + │ ├── bitbake.conf + │ ├── ccache.conf + │ ├── conf-notes.txt + │ ├── distro/ *发行版相关配置文件* + │ │ ├── defaultsetup.conf + │ │ └── include/ + │ ├── documentation.conf + │ ├── layer.conf + │ ├── licenses.conf + │ ├── machine/ *机器相关配置文件* + │ │ ├── include/ + │ │ ├── qemuarm64.conf + │ │ ├── qemuarm.conf + │ │ ├── … + │ │ └── qemux86.conf + │ ├── machine-sdk/ *OpenEmbedded 构建系统在该目录中搜索与 SDKMACHINE 值对应的配置文件。默认情况下,支持某些 SDK 主机的 Yocto 项目附带 32 位和 64 位 x86 文件。但是,可以通过在另一层的此子目录中添加其他配置文件来将该支持扩展到其他 SDK 主机。* + │ │ ├── aarch64.conf + │ │ ├── i586.conf + │ │ └── x86_64.conf + │ ├── multiconfig/ + │ │ └── default.conf + │ ├── multilib.conf + │ └── sanity.conf + ├── COPYING.MIT + ├── files/ *包含常见的许可文件和构建系统使用的几个文本文件。文本文件包含最少的设备信息以及具有已知权限的文件和目录列表。* + │ ├── common-licenses/ + │ │ ├── Apache-2.0 + │ │ ├── GPL-2.0 + │ │ └── … + │ ├── device_table-minimal.txt + │ ├── ext-sdk-prepare.py + │ ├── fs-perms-persistent-log.txt + │ ├── fs-perms.txt + │ ├── ptest-perl/ + │ │ └── run-ptest + │ ├── toolchain-shar-extract.sh + │ └── toolchain-shar-relocate.sh + ├── lib/ 该目录包含在构建过程中使用的 OpenEmbedded Python 库代码。 + │ ├── bblayers/ + │ │ ├── create.py + │ │ └── templates + │ ├── buildstats.py + │ ├── oe/ + │ │ ├── __init__.py + │ │ ├── utils.py + │ │ ├── package.py + │ │ ├── patch.py + │ │ ├── rootfs.py + │ │ ├── sdk.py + │ │ └── … + │ ├── oeqa/ + │ │ ├── buildperf + │ │ ├── controllers + │ │ ├── core + │ │ ├── files + │ │ ├── manual + │ │ ├── oetest.py + │ │ ├── runexported.py + │ │ ├── runtime + │ │ ├── sdk + │ │ ├── sdkext + │ │ ├── selftest + │ │ ├── targetcontrol.py + │ │ └── utils + │ └── rootfspostcommands.py + ├── recipes-bsp/ 包含任何链接到特定硬件或硬件配置信息的内容,例如“u-boot”和“grub”。 + │ ├── openssh + │ │ ├── openssh/ + │ │ └── openssh_8.3p1.bb + │ └── … + │ └── … + ├── recipes-core/ 此层包含构建基本工作 Linux 镜像所需的内容,包括常用的依赖项。 + │ ├── base-files/ + │ │ ├── base-files/ + │ │ └── base-files_3.0.14.bb + │ ├── images/ + │ │ ├── build-appliance-image_15.0.0.bb + │ │ ├── core-image-base.bb + │ │ ├── core-image-minimal.bb + │ │ └── core-image-tiny-initramfs.bb + │ ├── … + │ │ └── … + │ └── zlib/ + │ ├── site_config + │ ├── zlib/ + │ └── zlib_1.2.11.bb + ├── recipes-devtools/ 包含主要由构建系统使用的工具的层。也可以用于目标。 + │ ├── pseudo/ + │ │ ├── files/ + │ │ ├── pseudo_git.bb + │ │ └── pseudo.inc + │ └── … + │ └── … + ├── recipes-extended/包含与核心中的替代品相比添加功能的非必要应用程序的层。 + │ ├── bash/ + │ │ ├── bash/ + │ │ ├── bash_5.0.bb + │ │ └── bash.inc + │ └── … + │ └── … + ├── recipes-kernel/内核和具有强内核依赖性的通用应用程序和库相关的层。 + │ ├── linux/ + │ │ ├── kernel-devsrc.bb + │ │ ├── linux-dummy/ + │ │ ├── linux-dummy.bb + │ │ ├── linux-yocto_5.8.bb + │ │ ├── linux-yocto.inc + │ │ ├── linux-yocto-tiny_5.4.bb + │ │ └── … + │ ├── linux-libc-headers/ + │ │ ├── linux-libc-headers/ + │ │ ├── linux-libc-headers_5.8.bb + │ │ └── linux-libc-headers.inc + │ └── … + │ └── … + ├── recipes-multimedia/ 用于音频、图像和视频的编解码器和支持程序相关的层。 + │ ├── … + │ └── libtiff/ + │ └── tiff_4.1.0.bb + ├── recipes-… + ├── recipes.txt对所有recipes-*内容的描述。 + └── site/该目录包含各种体系结构的缓存结果列表。由于测试无法在实时系统上运行,因此在交叉编译时无法确定某些“autoconf”测试结果,因此该目录中的信息被传递给各种体系结构的“autoconf”。 + ├── arm-32 + ├── arm-64 + ├── arm-common + ├── armeb-linux + ├── arm-linux + ├── common + ├── common-musl + ├── endian-big + ├── endian-little + ├── mips-common + ├── native + ├── powerpc32-linux + ├── powerpc64-linux + ├── powerpc-common + ├── powerpc-darwin + ├── powerpc-linux + ├── … + └── x86_64-linux + +* meta-poky + +设计在meta/层内容之上,这个目录添加了足够的元数据来定义Poky参考发行版。 + +* meta-selftest + +该目录添加了OpenEmbedded自测试使用的其他配方和附加文件,以验证构建系统的行为。 +除非你想运行自测,否则你不必将此层添加到你的 bblayers.conf文件中。 + +* meta-skeleton + +该目录包含用于BSP和内核开发的模板配方。 + +* meta-yocto-bsp + +该目录包含Yocto项目参考硬件板支持包(BSP)。 + +* scripts + +该目录包含在 Yocto 项目环境中实现额外功能的各种集成脚本(例如 QEMU 脚本)。 oe-init-build-env 脚本将该目录添加到shell的PATH +环境变量中。脚本目录包含有助于回馈Yocto项目的有用脚本,例如create-pull-request和send-pull-request。 + +* oe-init-build-env + +此脚本设置OpenEmbedded构建环境。在shell中使用source命令运行此脚本会更改PATH并根据当前工作目录设置其他核心Bitbake变量。在运行Bitbake命令之前, +你需要运行环境设置脚本。该脚本使用脚本目录中的其他脚本来完成大部分工作。 + +当你运行这个脚本时,你的Yocto项目环境被设置,一个构建目录被创建,你的工作目录成为构建目录,你会看到一些关于下一步做什么的简单建议,包括一些可能目标的 +列表建立。下面是一个例子: + +:: + + $ source oe-init-build-env + + ### Shell environment set up for builds. ### + + 你现在可以执行'bitbake ' + + Common targets are: + core-image-minimal + core-image-sato + meta-toolchain + meta-ide-support + + 你还可以使用“runqemu qemux86-64”之类的命令运行生成的 qemu 镜像 + +oe-init-build-env脚本的默认输出来自conf-notes.txt 文件,该文件位于源码的meta-poky目录中。如果你设计自定义发行版,你可以包含你自己的此配置文件版本, +以提及你的发行版定义的目标。 + +默认情况下,在没有Build Directory参数的情况下运行此脚本会在当前工作目录中创建build/目录。如果你在获取脚本时提供构建目录参数,则你可以指示OpenEmbedded +构建系统创建你选择的构建目录。例如,以下命令创建一个名为mybuilds/的构建目录,该目录位于源目录之外: ``$ source oe-init-build-env ~/mybuilds`` + +OpenEmbedded构建系统使用模板配置文件,这些文件默认位于源目录的meta-poky/conf/目录中。 +OpenEmbedded构建系统不支持包含空格的文件或目录名称。如果你尝试从文件名或目录名中包含空格的源目录运行oe-init-build-env脚本,该脚本将返回一个错误, +指示没有此类文件或目录。确保使用没有包含空格的名称的源目录。 + + +Yocto的基本任务流程及定制 +******************************************* + +Yocto支持的主要任务如下: + +.. image:: ../../image/yocto/yocto_tasks.png + +每个包实际运行的任务可以在编译目录查看到:tmp\*/work/\*/\*/\*/temp/log.task_order + +* do_build + +do_build是配方的默认任务,依赖于构建一个配方的所有其他正常构建任务。因为Yocto默认在meta/classes/base.bbclass中设置了do_build[noexec] = "1", +因此do_build任务并不会真的执行,只是一个虚拟任务,用于串连起各个模块的任务流。构建时,temp目录下不会存在其执行执行脚本及执行日志文件。 + +* do_fetch/do_unpack + +配方必须做的第一件事是指定如何获取源文件。获取主要通过SRC_URI变量进行控制。配方中必须有一个指向代码源所在位置的SRC_URI变量。 + +do_fetch和do_unpack任务获取源文件并将它们解压到构建目录中。默认情况下,一切都在构建目录中完成,该目录具有已定义的结构。在下图中, +存在两个示例层次结构:一个基于包架构(即PACKAGE_ARCH)和一个基于机器(即 MACHINE)。底层结构是相同的。区别在于OpenEmbedded构建系统使用 +什么作为构建目标(例如通用架构、构建主机、SDK 或特定机器)。 + +.. image:: ../../image/yocto/tasks_do_fetch.png + +do_fetch任务使用SRC_URI变量定位源码文件,基于SRC_URI变量值中每个条目的前缀来确定使用哪个提取器来获取源文件。触发提取器的是SRC_URI变量。 +do_patch任务在获取源后使用该变量来应用补丁。OpenEmbedded构建系统使用FILESOVERRIDES来扫描SRC_URI中本地文件的目录位置。 + +配方中的SRC_URI变量必须为源文件定义每个唯一的位置。最好不要在SRC_URI中使用的URL中硬编码版本号。不是对这些值进行硬编码,而是使用${PV}, +这会导致获取过程使用配方文件名中指定的版本。以这种方式指定版本意味着将配方升级到未来版本就像重命名配方以匹配新版本一样简单。 + +当使用Bitbake构建某些东西时,操作的很大一部分是定位和下载所有源码文件。对于image,下载各种包的所有源代码可能需要大量时间。 + +对于作为配方SRC_URI语句一部分的每个本地文件(例如 file://),OpenEmbedded 构建系统获取配方文件的校验和,并将校验和插入到do_fetch任务的签名中。 +如果有任何本地文件被修改,则重新执行do_fetch任务和所有依赖它的任务。 + +Yocto中有两种镜像:前镜像和常规镜像,PREMIRRORS和MIRRORS变量分别指向这两种镜像。Bitbake在查询上游源文件之前会先检查前镜像,当你有一个共享目录, +而且这个目录不是被DL_DIR定义的话,把它作为前镜像的存放地址是比较合适的。PREMIRRORS变量通常指向你们公司或者组这本地的共享目录。Bitbake的镜像查询顺序 +是 :本地目录->前镜像目录->上游源文件->常规镜像目录。常规镜像可以是Internet上的任何站点,如果主站点由于某种原因无法正常运行或用作其他站点,则该站点可以 +用作源代码的替代位置。 + +我们可以把所有源文件都提前下载好,构建时并不做下载动作,do_fetch实际类似校验动作,仅确认文件是否存在。此方案利用yocto提供的 +./meta/classes/own-mirrors.bbclass;设置SOURCE_MIRROR_URL配置本地下载好的路径,或者直接重新设置PREMIRRORS变量。 + +在 local.conf 文件中设置SOURCE_MIRROR_URL示例: + +:: + + SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/" + INHERIT += "own-mirrors" + BB_GENERATE_MIRROR_TARBALLS = "1" + # BB_NO_NETWORK = "1" #不注释则表示关闭网络,不支持网络下载 + +SRC_URI中URL 前缀决定了 Bitbake 使用哪个 fetcher 子模块。每个子模块可以支持不同的 URL 参数。以下介绍3种常用的URL: + + **以 file:// 开头的 URL** + | 可以指定文件的绝对路径或相对路径。如果文件名是相对的,则 FILESPATH 变量的内容的使用方式与 PATH 用于查找可执行文件的方式相同。如果找不到该文件,则假定在调用 download() 方法时该文件在 DL_DIR 中可用。找不到则报错。 + | SRC_URI = file://relativefile.patch #相对路径 ==拷贝不带路径 + | SRC_URI = file:///home/mycode/xxx.patch #绝对路径==拷贝带路径 + | 该路径相对于 FILESPATH 变量并按特定顺序搜索特定目录:${BP}、${BPN} 和文件。假定目录是配方或附加文件所在目录的子目录。 + + **以http://, ftp://, https://开头的URL** + | 使用wget从 Web 和 FTP 服务器获取文件。使用的可执行文件和参数由 FETCHCMD_wget 变量指定,该变量默认为合理值。 fetcher 支持参数“downloadfilename”,允许指定下载文件的名称(部分URL需要指定)。在处理多个同名文件时,指定下载文件的名称对于避免 DL_DIR 中的冲突很有用。 + | SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz" + | SRC_URI = "https://raw.githubusercontent.com/SCons/scons/${PV}/LICENSE;downloadfilename=LICENSE-python3-scons-${PV};name=license" + + **以git://开头的URL** + | 从git仓下载指定commit id的代码。 + | SRC_URI = "git://github.com/vim/vim.git" 指定仓库地址、下载协议、分支等 + | SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44" 指定下载节点 + | SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https" + | SRCREV = "4660a7dca6512b6e658759d00cff7d4ad2a2059d" + + **其它类型参考** + https://www.yoctoproject.org/docs/3.1/bitbake-user-manual/bitbake-user-manual.html#bb-fetchers + +如果指定文件或目录,则直接拷贝到工作目录;如果指定压缩包,则压缩包解压到工作目录。 + +由于URL参数由分号分隔,因此在解析也包含分号的URL 时,会导致歧义,应将分号替换为“&”字符来修改此类 URL(大多数情况下,都是有效的,参考万维网联盟W3C建议)。 + +**标准参数** : + - ``apply`` - 是否应用补丁。默认的操作是应用补丁。 + - ``striplevel`` - 应用时使用哪个条带级别修补。默认级别为 1。 + - ``patchdir`` - 指定补丁所在的目录被应用。默认是${S}。 + +**额外参数** : + - ``unpack`` - 控制是否解压文件。默认操作是解压缩文件。 + - ``destsuffix`` -当使用Git fetcher时,将文件(或解压其内容)放入WORKDIR下的指定目录。 + - ``subdir`` -当 ``file://`` 使用本地fetcher时,将文件(或解压其内容)放入WORKDIR下的指定目录。 + - ``localdir`` -当使用CVS fetcher时,将文件(或解压其内容)放入WORKDIR下的指定目录。 + - ``subpath`` - 使用Git fetcher时,将checkout目录限制为特定的子路径 + - ``downloadfilename`` - 指定存储时使用的文件名下载的文件。 + - ``name`` - 指定用于关联的名称。 + 当 ``SRC_URI`` 中指定了多个文件或 git 存储库时,用于指定 ``SRC_URI`` 校验和或 ``SRCREV`` 。例如: + +:: + + src_URI = "git://example.com/foo.git;name=first \ + git://example.com/bar.git;name=second \ + http://example.com/file.tar.gz;name=third" + SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15" + SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f" + SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de" + +**版本控制系统中特定于配方构建代码的选项** : + - ``mindate`` - 仅在以下情况下应用补丁:`SRCDATE` 等于或大于`mindate` + - ``maxdate`` - 仅当 `SRCDATE` 不晚于`maxdate`时才应用补丁 + - ``minrev`` - 仅当 `SRCREV` 等于或大于`minrev`时才应用补丁 + - ``maxrev`` - 仅当 `SRCREV` 不晚于`maxdate`时才应用补丁 + - ``rev`` - 仅当 ``SRCREV`` 等于`rev`时才应用补丁 + - ``notrev`` - 仅当 `SRCREV` 不等于`rev`时才应用补丁 + +在构建过程中,do_unpack 任务使用${S}指向解压位置来解压源代码。 + +如果你从上游源存档tarball获取源文件,并且tarball的内部结构与名为${BPN}-${PV}的顶级子目录的通用约定相匹配,那么你不需要设置S。但是, +如果SRC_URI指定从不使用此约定的存档中获取源代码,或者从像Git或Subversion这样的SCM中获取源代码,则你的配方需要定义S。 + +如果使用Bitbake处理你的配方成功解压源文件,你需要确保${S}指向的目录与源的结构匹配。 + +* do_prepare_recipe_sysroot + +此任务在${WORKDIR}中设置两个sysroots(即recipe-sysroot和recipe-sysroot-native),以便sysroots包含任务的配方所依赖的配方的 +do_populate_sysroot任务的内容。目标和本机二进制文件都存在一个sysroot, 它们在主机系统上运行。 + +将依赖包do_populate_sysroot任务放到sysroot的文件安装到当前配方特定的sysroot中(即 ${WORKDIR} 下的recipe-sysroot和recipe-sysroot-native, +基于DEPENDS指定的依赖项)。更多信息见staging.bbclass。 + +* do_patch + +有时需要在获取代码后为代码打补丁。do_patch任务使用配方的SRC_URI(源码和补丁列表)和FILESPATH(搜索补丁的目录集)变量来定位适用的补丁文件, +Bitbake在源码目录${S}下按补丁顺序依次打上补丁。 + +SRC_URI中提到的任何名称以 .patch或 .diff结尾的文件或这些后缀的压缩版本(例如 diff.gz被视为补丁),另外增加了“;apply=yes”的任何文件也会当做补丁。 + +与 SRC_URI中使用file://引用的所有本地文件一样,你应该将补丁文件放在配方旁边的目录中,该目录的名称与配方的基本名称(BP和BPN)或“文件”相同。 + +.. image:: ../../image/yocto/tasks_do_patch.png + +:: + + 例如 SRC_URI = " \ + file://path_to_repo/some_package \ + file://file;apply=yes;striplevel=0;name=patch001;patchdir=.. \ + file://path_to_patch_files/a.patch \ + file://path_to_patch_files/b.patch; apply=no \ + " + +以上配置中,非.patch和.diff的文件增加了apply=yes则也会作为补丁打上;本身是补丁,如果设置了apply=no也不会打上此补丁。 +默认是用-p1(即路径中的一个目录级别将被剥离)打补丁。如果补丁需要剥离更多目录级别,则使用striplevel配置。如果补丁需要应用于 +补丁文件中未指定的特定子目录,使用 “patchdir”而配置。 + +打完补丁后,从工作目录日志文件中可以查看到打补丁的日志。日志中会 输出当前补丁是第几个,补丁路径,打补丁的level,补丁md5。 + +.. image:: ../../image/yocto/tasks_do_patch_log.png + +* do_configure/do_compile/do_install + +**do_configure** : + +此任务通过启用和禁用正在构建的软件的任何构建时间和配置选项来配置源码。如果找到makefile(Makefile、makefile 或 GNUmakefile)并且 +CLEANBROKEN 未设置为“1”,则此任务的默认行为是运行oe_runmake clean。如果未找到此类文件或CLEANBROKEN 变量设置为“1”,则 do_configure +任务不执行任何操作。 + +配置可以来自配方本身,也可以来自继承的类。此外,软件本身可能会根据为其构建的目标进行自我配置。如果使用的是autotools类,则可以使用EXTRA_OECONF +或PACKAGECONFIG_CONFARGS变量添加其他配置选项。详见meta/classes/autotools.bbclass文件。 + +**do_compile** : + +此任务在当前工作目录设置为${B}的情况下运行。如果找到构建文件(Makefile、makefile 或 GNUmakefile),则此任务的默认行为是运行oe_runmake 函数。 +如果没有找到这样的文件,do_compile任务什么也不做。 + +**do_install** : + +make install将编译生成的文件安装到保存区${D}。此任务运行时将当前工作目录设置为${B},即编译目录。do_install任务以及其他直接或间接依赖于已安装文件的 +任务(例如 do_package、do_package_write_* 和 do_rootfs),都在 fakeroot 下运行。 + +安装文件时,请注意不要将已安装文件的所有者和组ID设置为计划外的值。某些复制文件的方法,特别是在使用递归cp命令时,可以保留原始文件的UID和GID,这通常不是你想要 +的。受主机用户污染的QA检查检查可能具有错误所有权的文件。 + +安装文件的安全方法包括: + - install程序。此实用程序是首选方法。 + - 带有“--no-preserve=ownership”选项的cp 命令。 + - 带有“--no-same-owner”选项的 tar 命令。示例请参见源目录的 meta/classes 目录中的 bin_package.bbclass 文件。 + +.. image:: ../../image/yocto/tasks_do_compile.png + +* do_package + +do_package和do_packagedata任务结合起来,根据PACKAGES和FILES 变量,分析在${D}目录中找到的文件,并根据可用的包和文件将它们拆分为子集。分析涉及以下以及其他 +项目:拆分调试符号、查看包之间的共享库依赖项以及查看包关系。 + +do_packagedata任务基于分析创建包元数据,包元数据保存在 PKGDATA_DIR 中,使其全局可用,以便构建系统可以生成最终包。do_populate_sysroot任务将do_install任 +务安装的文件的子集(复制)到适当的sysroot中。分析和包拆分过程的工作、阶段和中间结果使用以下几个方面: + +.. image:: ../../image/yocto/tasks_do_package.png + +**PACKAGES** : + + 其默认值为${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}。表示配方创建的包列表。 + 在打包时,do_package 任务会通过 PACKAGES 并使用每个包对应的 FILES 变量将文件分配给包。如果一个文件与 PACKAGES 中多个包的 FILES 变量匹配,它将被分配到 + 最早(最左边)的包。除非通过ALLOW_EMPT 变量强制生成,否则不会生成变量列表中为空的包(即 FILES_pkg 中的任何模式都不匹配do_install任务安装的任何文件)。 + +**FILES** : + + 放置在包中的文件和目录列表。配置FILES变量,需用生成的包的包名称覆盖。其值是以空格分隔的文件或路径列表,用于标识要作为结果包的一部分包含的文件。FILES中配置的 + 路径是相对${D}的相对路径。 + +**FILES_xx** : + + 变量的默认值也在bitbake.conf中。也可以自定义,例如: FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"。FILES中指定文件或路径时,可以 + 使用Python的glob语法进行模式匹配。将路径指定为FILES变量的一部分时,最好使用适当的路径变量(meta/conf/bitbake.conf中查找)。例如,使用${sysconfdir}而 + 不是/etc,或${bindir}而不是 /usr/bin。 + +**PKGD** : + + ${WORKDIR}/包。指向要打包的文件的目标目录,然后再将它们拆分为单个包。 + +**PKGDATA_DIR** : + + ${STAGING_DIR_HOST}/pkgdata。指向一个共享的、全局状态的目录,该目录保存在打包过程中生成的数据。在打包过程中,do_packagedata任务为每个配方打包数据, + 并将其安装到这个临时的共享区域中。 + +**PKGDEST** : + ${WORKDIR}/packages-split。将文件拆分为单独的包后,指向要打包的文件的父目录。该目录是 PACKAGES 中指定的每个包的目录。 +**PKGDESTWORK** : + ${WORKDIR}/pkgdata。指向 do_package 任务保存包元数据的临时工作区。 do_packagedata 任务将包元数据从 PKGDESTWORK 复制到 PKGDATA_DIR 以使其全局可用。 +**STAGING_DIR_HOST** : + 构建组件运行的系统的 sysroot 路径(即 recipe-sysroot)。 +**STAGING_DIR_NATIVE** : + 为构建主机构建组件时使用的 sysroot 路径(即 recipe-sysroot-native)。 +**STAGING_DIR_TARGET** : + 当构建在系统上执行的组件并为另一台机器生成代码(例如跨加拿大配方)时使用的 sysroot 路径。 + +* do_package_write_* + +do_package_write_rpm: + 创建 RPM 包(即*.rpm文件)并将它们放在包源(package feeds)区域${DEPLOY_DIR_RPM} 目录中。 +do_package_write_deb: + 创建 Debian 包(即*.deb文件)并将它们放在包源区域的 ${DEPLOY_DIR_DEB} 目录中。 +do_package_write_ipk: + 创建 IPK 包(即*.ipk文件)并将它们放在包源区域的 ${DEPLOY_DIR_IPK} 目录中。 +do_package_write_tar: + 创建 tar.gz 包并将它们放在包源区域的 ${DEPLOY_DIR_TAR} 目录中。 + +* do_package_qa + +对打包文件运行 QA 检查。具体检查见meta/classes/insane.bbclass +在构建配方时,OpenEmbedded 构建系统会对输出执行各种 QA 检查,以确保检测和报告常见问题。有时,当你创建一个新配方来构建新软件时,它会顺利构建。如果情况并非如此,或者当你在构建任何软件时遇到 QA 问题,则可能需要一些时间来解决这些问题。 +虽然忽略 QA 消息甚至禁用 QA 检查很诱人,但最好尝试解决任何报告的 QA 问题。QA 消息列表和可能遇到的问题说明可参考https://docs.yoctoproject.org/ref-manual/qa-checks.html。 + +* do_populate_sysroot + +配方通常需要使用构建主机上其他配方提供的文件。例如,链接到公共库的应用程序需要访问库本身及其关联的标头。完成这种访问的方式是用文件填充sysroot。每个配方在其工作目录中 +有两个sysroot,一个用于目标文件 (recipe-sysroot),另一个用于构建主机的本地文件(recipe-sysroot-native)。 + +配方永远不应该直接填充sysroot(即将文件写入 sysroot)。相反,文件应该在${D}目录中的do_install任务期间安装到标准位置。这种限制的原因是几乎所有填充sysroot的 +文件都在清单中编目,以确保在修改或删除配方时可以删除这些文件。因此,sysroot能够保持不受陈旧文件的影响。 + +do_install任务安装的文件子集由SYSROOT_DIRS变量定义的do_populate_sysroot任务使用,以自动填充sysroot。可以修改填充sysroot的目录列表。 + +此任务用于将 do_install 任务安装的文件子集($D目录的文件)复制到SYSROOT_DESTDIR 中,默认会对里面的文件进行strip,之后将SYSROOT_DESTDIR下的文件拷贝到"${COMPONENTS_DIR}/${PACKAGE_ARCH}/${PN}"。 + +有关如何从其他配方访问这些文件的信息,见以下STAGING_DIR* 变量。默认情况下不会复制其他配方在构建时通常不需要的目录(例如 /etc)。 + +有关默认复制哪些目录的信息,见以下 SYSROOT_DIRS* 变量。如果你需要在构建时为其他配方提供额外(或更少)的目录,可以在配方中更改这些变量。 + +**SYSROOT_DESTDIR** : + 指向工作目录下的临时目录(默认为“${WORKDIR}/sysroot-destdir”),其中填充到 sysroot 的文件在 do_populate_sysroot 任务期间组装。 +**SYSROOT_DIRS** : + 由 do_populate_sysroot 任务暂存到 sysroot 中的目录。默认情况下,会暂存以下目录: + +:: + + SYSROOT_DIRS = " \ + ${includedir} \ + ${libdir} \ + ${base_libdir} \ + ${nonarch_base_libdir} \ + ${datadir} \ + " + +**SYSROOT_DIRS_BLACKLIST** : + 不通过 do_populate_sysroot 任务暂存到 sysroot 中的目录。可以使用此变量从暂存中排除 SYSROOT_DIRS 中列出的目录的某些子目录。默认情况下,以下目录不会暂存: + +:: + + SYSROOT_DIRS_BLACKLIST = " \ + ${mandir} \ + ${docdir} \ + ${infodir} \ + ${datadir}/locale \ + ${datadir}/applications \ + ${datadir}/fonts \ + ${datadir}/pixmaps \ + " + +**SYSROOT_DIRS_NATIVE** : + 除了在 SYSROOT_DIRS 中指定的目录之外,由 do_populate_sysroot 任务为 -native 配方暂存到 sysroot 中的额外目录。默认情况下,会暂存以下额外目录: + +:: + + SYSROOT_DIRS_NATIVE = " \ + ${bindir} \ + ${sbindir} \ + ${base_bindir} \ + ${base_sbindir} \ + ${libexecdir} \ + ${sysconfdir} \ + ${localstatedir} \ + " + +由 -native recipes 构建的程序直接从 sysroot (STAGING_DIR_NATIVE) 运行,这就是需要暂存包含程序可执行文件和支持文件的其他目录的原因。 + +**SYSROOT_PREPROCESS_FUNCS** : + 在文件暂存到 sysroot 后要执行的函数列表。这些函数通常用于对暂存文件进行附加处理,或暂存其他文件。样例如下: + +:: + + SYSROOT_PREPROCESS_FUNCS += "my_populate_sysroot" + my_populate_sysroot() { + sysroot_stage_dir ${D}/lib ${SYSROOT_DESTDIR}/lib + } + +**COMPONENTS_DIR** : + 即"${STAGING_DIR}-components"= "${TMPDIR}/sysroots-components"。存储每个配方的 sysroot 组件。 OpenEmbedded 构建系统在为其他配方构建特定于配方的系统根时使用 COMPONENTS_DIR。 +**STAGING_DIR** : + 即"${TMPDIR}/sysroots"。 + Recipes 不应直接在 STAGING_DIR 目录下写入文件,因为 OpenEmbedded 构建系统会自动管理该目录。相反,文件应该安装到你配方的 do_install 任务中的 ${D} 中,然后 OpenEmbedded 构建系统会将这些文件的子集暂存到 sysroot 中。 +**STAGING_DIR_HOST** : + 指定运行组件的系统(承载组件的系统)的 sysroot 目录路径。对于大多数配方,此 sysroot 是该配方的 do_populate_sysroot 任务复制文件的那个。例外包括 -native recipes,其中 do_populate_sysroot 任务使用 STAGING_DIR_NATIVE。根据配方的类型和构建目标,STAGING_DIR_HOST 可以具有以下值: + 对于为目标机器构建的配方,该值为“${STAGING_DIR}/${MACHINE}”。 + 对于为构建主机构建的本机配方,假设为构建主机构建时,应使用构建主机自己的目录,该值为空。 +**STAGING_DIR_NATIVE** : + 指定构建在构建主机本身上运行的组件时使用的 sysroot 目录的路径。 + -native recipes 没有安装到主机路径中,比如 /usr。相反,这些配方被安装到 STAGING_DIR_NATIVE 中。编译 -native recipes 时,会设置标准构建环境变量,例如 CPPFLAGS 和 CFLAGS,以便使用例如 GCC 的 -isystem 选项搜索主机路径和 STAGING_DIR_NATIVE 以查找库和标头。 + 因此,重点是 STAGING_DIR* 变量应被 do_configure、do_compile 和 do_install 等任务视为输入变量。让真正的系统根对应于 STAGING_DIR_HOST 对于 -native recipes 具有概念意义,因为它们使用主机头文件和库。 +**STAGING_DIR_TARGET** : + 指定用于组件为其生成代码的系统的 sysroot 的路径。对于大多数不生成代码的组件,STAGING_DIR_TARGET 设置为匹配 STAGING_DIR_HOST。 + 一些配方构建可以在目标系统上运行的二进制文件,但这些二进制文件又为另一个不同的系统生成代码(例如跨加拿大配方)。使用 GNU 的术语,主要系统被称为“HOST”,次要或不同的系统被称为“TARGET”。因此,二进制文件在“HOST”系统上运行并为“TARGET”系统生成二进制文件。 STAGING_DIR_HOST 变量指向用于“HOST”系统的 sysroot,而 STAGING_DIR_TARGET 指向用于“TARGET”系统的 sysroot。 +**STAGING_BASE_LIBDIR_NATIVE** : + 指定构建主机的 sysroot 目录的 /lib 子目录的路径。 +**STAGING_BASELIBDIR** : + 指定正在为其构建当前配方的目标的 sysroot 目录的 /lib 子目录的路径 (STAGING_DIR_HOST)。 +**STAGING_BINDIR** : + 为正在为其构建当前配方的目标 (STAGING_DIR_HOST) 指定 sysroot 目录的 /usr/bin 子目录的路径。 +**STAGING_BINDIR_NATIVE** : + 指定构建主机的 sysroot 目录的 /usr/bin 子目录的路径。 +**STAGING_DATADIR** : + 为正在为其构建当前配方的目标 (STAGING_DIR_HOST) 指定 sysroot 目录的 /usr/share 子目录的路径。 +**STAGING_DATADIR_NATIVE** : + 指定构建主机的 sysroot 目录的 /usr/share 子目录的路径。 +**STAGING_BINDIR** : + 帮助构建在打包期间使用的 recipe-sysroots 目录。 +**STAGING_ETCDIR_NATIVE** : + 指定构建主机的 sysroot 目录的 /etc 子目录的路径。 +**STAGING_EXECPREFIXDIR** : + 指定正在为其构建当前配方的目标的 sysroot 目录的 /usr 子目录的路径 (STAGING_DIR_HOST)。 +**STAGING_INCDIR** : + 指定要为其构建当前配方 (STAGING_DIR_HOST) 的目标的 sysroot 目录的 /usr/include 子目录的路径。 +**STAGING_INCDIR_NATIVE** : + 指定构建主机的 sysroot 目录的 /usr/include 子目录的路径。 +**STAGING_KERNEL_BUILDDIR** : + 指向包含内核构建工件的目录。需要访问内核构建工件的配方构建软件可以在内核构建后在 STAGING_KERNEL_BUILDDIR 变量指定的目录中查找这些工件。 +**STAGING_KERNEL_DIR** : + 包含构建树外模块所需的内核头文件的目录。 +**STAGING_LIBDIR** : + 为正在为其构建当前配方的目标 (STAGING_DIR_HOST) 指定 sysroot 目录的 /usr/lib 子目录的路径。 +**STAGING_LIBDIR_NATIVE** : + 指定构建主机的 sysroot 目录的 /usr/lib 子目录的路径。 + +* do_clean/do_cleansstate + +do_clean删除一个目标的所有输出文件。do_cleansstate相比do_clean多清理共享状态(sstate)缓存。 + +* do_cleanall + +删除一个目标的所有输出文件、共享状态缓存和下载的源码文件 + +* do_listtasks + +列出目标的所有已定义任务。 + +* do_rm_work + +构建完成后删除工作目录的一些工作文件。更多信息见rm_work.bbclass。 + +* do_checkuri + +校验SRC_URI的值 + +* do_rootfs + +* do_image + +.. image:: ../../image/yocto/tasks_do_image.png + +do_image任务在OpenEmbedded构建系统运行do_rootfs任务之后运行,在此期间确定要安装到镜像中的包并创建根文件系统,完成后处理。 + +do_image任务通过IMAGE_PREPROCESS_COMMAND对image进行预处理,并根据需要动态生成支持的do_image_xxx任务。 + +image生成过程由几个阶段组成,取决于几个任务和变量。 do_rootfs 任务为image创建根文件系统(文件和目录结构)。此任务使用几个关键变量来帮助创建要实际安装的软件包列表: + | **IMAGE_INSTALL** :从Package Feeds 区域列出要从中安装的基本软件包集。 + | **PACKAGE_EXCLUDE** :指定不应安装到image中的包。 + | **IMAGE_FEATURES** :指定要包含在image中的特征。这些功能大多数都映射到其他安装包。 + | **PACKAGE_CLASSES** :指定要使用的包后端(例如 RPM、DEB 或 IPK),从而帮助确定在包源区域内的包的位置。这个变量在构建目录的conf文件夹下local.conf文件中定义,这个变量的值可以是package_rpm,package_deb, packageipk, packagetar中的一个或者多个值。 yocto也不建议使用packagetar这个值,因为tar包不能管理包的依赖关系。当你把多个值赋给PACKAGECLASSES时,构建系统只会取第一个值.。下面是使用PACKAGE_CLASSES变量的一个例子,比如PACKAGE_CLASS ?= "PACKAGE_IPK", 构建系统就会只用ipk包管理工具来创建你的镜像或者SDK。 + | **IMAGE_LINGUAS** :确定安装附加语言支持包的语言。 + | **PACKAGE_INSTALL** :传递给包管理器以安装到image中的包的最终列表。 + +使用IMAGE_ROOTFS指向正在构建的文件系统的位置和PACKAGE_INSTALL变量提供要安装的包的最终列表,创建根文件系统。 +无论是否为目标启用了包管理,包安装都在包管理器(例如dnf/rpm、opkg或apt/dpkg)的控制之下。在进程结束时,如果没有为目标启用包管理,则包管理器的数据文件将从根文件 +系统中删除。作为软件包安装最后阶段的一部分,将运行作为软件包一部分的安装后脚本。首次启动目标系统时,任何无法在构建主机上运行的脚本都会在目标上运行。如果你使用只读 +根文件系统,则所有安装后脚本必须在包安装阶段在构建主机上成功,因为目标上的根文件系统是只读的。 + +do_image任务的最后阶段是一些后置处理,包括创建清单文件和优化。 +Image的清单文件(IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest")与根文件系统映像位于同一目录中,此文件逐行列出了构成image的所 +有已安装软件包(包名 packagearch 版本)。清单文件对于testimage类很有用,例如,确定是否运行特定测试。 + +跨image运行的优化进程包括mklibs、prelink和任何其他由ROOTFS_POSTPROCESS_COMMAND变量定义的后处理命令。mklibs进程优化了库的大小,而 prelink 进程优化了共 +享库的动态链接以减少可执行文件的启动时间。 + +构建根文件系统后,通过do_image任务开始对image进行处理。构建系统运行由IMAGE_PREPROCESS_COMMAND变量定义的任何预处理命令。此变量指定在构建系统创建最终图像输出 +文件之前要调用的函数列表。 + +构建系统根据IMAGE_FSTYPES变量中指定的image类型,根据需要动态创建do_image_xxx任务。该过程将所有内容转换为一个映像文件或一组映像文件,并且可以压缩根文件系统映 +像以减小映像的整体大小。用于根文件系统的格式取决于IMAGE_FSTYPES变量。压缩取决于格式是否支持压缩。 + +| 例如,在创建特定图像类型时动态创建的任务将采用以下形式:``do_image_type`` +| 因此,如果 IMAGE_FSTYPES 指定的类型为 ext4,则动态生成的任务则为:``do_image_ext4`` + +image创建涉及的最后一个任务是do_image_complete任务。此任务通过应用通过IMAGE_POSTPROCESS_COMMAND变量定义的任何图像后处理来完成图像。该变量指定构建系统创建 +最终图像输出文件后要调用的函数列表。 + +整个image生成过程在Pseudo下运行。在Pseudo下运行可确保根文件系统中的文件具有正确的所有权。 + +* do_populate_sdk/do_populate_sdk_ext + +* do_deploy + +* do_pkg_postinst_${PN} + +pkg_postinst脚本在构建只读rootfs时执行。但是,必须确保在脚本中调用的命令在构建主机中可用,否则脚本的执行将失败,并且将推迟到设备上的首次启动。 +pkg_postinst脚本在目标上安装软件包后立即运行,或者在image中包含软件包时在image创建期间运行。要将pkg_postinst脚本添加到包中,请将pkg_postinst_${PN}() +函数添加到配方文件(.bb) 并将 ${PN}替换为要附加到postinst脚本的包的名称。 + +在创建根文件系统时调用在pkg_postinst函数中定义的脚本。如果脚本成功,则包被标记为已安装。在目标上运行的任何RPM安装后脚本都应返回0退出代码。 + +有时需要将pkg_postinst脚本的执行延迟到第一次启动。例如,脚本可能需要在设备本身上执行。要将脚本执行延迟到启动时,你必须明确标记后安装以遵循目标。 +你可以使用pkg_postinst_ontarget()或从pkg_postinst()调用postinst_intercept delay_to_first_boot。pkg_postinst()脚本的任何失败(包括退出 1) +都会在do_rootfs任务期间触发错误。 + +如果有使用pkg_postinst函数的配方,并且它们需要使用在rootfs构建期间具有依赖性的非标准本机工具,则需要在配方中使用PACKAGE_WRITE_DEPS变量来列出这些工具。 +如果不使用此变量,则工具可能会丢失,并且安装后脚本的执行会推迟到第一次启动。将脚本推迟到第一次启动是不可取的,对于只读rootfs是不可能的。 + +分别通过pkg_preinst、pkg_prerm和pkg_postrm来支持安装前、卸载前和卸载后脚本。这些脚本的工作方式与pkg_postinst完全相同,只是它们运行的时间不同。此外, +由于它们运行的时间,它们不适用于像pkg_postinst那样在image创建时运行。 + +* 定制或添加自定义任务或函数 + +Yocto的任务实际就是一个shell或者python函数。 +只有Bitbake风格的Python函数可以是任务。这些函数是用Python编写的,并由Bitbake或其他Python函数使用bb.build.exec_func()执行。 +一个示例 Bitbake 函数是: + +:: + + python some_python_function () { + d.setVar("TEXT", "Hello World") + 打印 d.getVar("TEXT") + } + +因为Python 的“bb”和“os”模块已经导入,所以不需要导入这些模块。同样在这些类型的函数中,数据存储(“d”)是一个全局变量,并且始终自动可用。 +变量表达式(例如 ${X})不再在Python函数中扩展。此行为是有意的,以便你可以自由地将变量值设置为可扩展表达式,而不会过早地扩展它们。如果你 +确实希望在Python函数中扩展变量,请使用d.getVar("X")。或者,对于更复杂的表达式,使用d.expand()。 + +定义一个do_xxx函数作为任务,例如添加do_test任务到do_install之后,do_package和do_populate_sysroot之前执行。 + +:: + + do_test(){ + echo "testing" + } + addtask do_test after do_install before do_package do_populate_sysroot + +不使用addtask添加任务,则此函数仅仅作为一个函数,可以被其它函数或任务调用。 + +重写do_install任务,yocto默认的do_install函数失效: + +:: + + do_install () { + } + +修改do_install任务, 在do_install任务的开始增加操作: + +:: + + do_install_prepend() { + } + +修改do_install任务, 在do_install任务最后增加操作: + +:: + + do_install_append() { + } + +修改do_install任务,在arm架构的do_install任务最后增加操作: + +:: + + do_install_append_arm() { + } + +删除编译任务,编译任务不存在,也不会执行: + +:: + + deltask do_compile + +不执行打包任务,但是任务还在: + +:: + + do_package[noexec] = "1" + +在do_unpack后追加一个任务(独立任务,还是追加到原任务): + +:: + + do_unpack[postfuncs] += "do_qa_unpack" + +在do_install之前增加一个任务/函数: + +:: + + do_install[prefuncs] += "autotools_aclocals" + +等号左侧的任务依赖等号右侧指定模块的指定任务: + +:: + + do_image_cpio[depends] += "cpio-native:do_populate_sysroot" + do_install[depends] += "virtual/kernel:do_install" + do_configure[depends] += "virtual/kernel:do_shared_workdir" + +当前模块等号左侧的任务依赖等号右侧的任务: + +:: + + do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot" + do_build[recrdeptask] += "do_deploy" + do_package_qa[rdeptask] = "do_packagedata" + do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}" + do_populate_sdk[rdepends] = "${@' '.join([x + ':do_package_write_${IMAGE_PKGTYPE} ' + x + ':do_packagedata' for x in d.getVar('SDK_RDEPENDS').split()])}" + +配置好之后可以使用bitbake -e recipename查看最终的函数内容 + +* OpenEmbedded内置的一些常用任务/函数 + +基本类里面已经定义了一些很有用的函数,这些函数默认都被所有“配方”所包含。有很多函数既在“配方”里使用也在其他类里被使用。 + +最常用最基本的一些函数包括: + +- oe_runmake: + 这个函数是用来运行make命令的(它实际调用make)。当然这并不像你直接运行make那样,这个函数还给make传递了EXTRA_OEMAKE参数,而且还会在终端中给出一个 + NOTE注意信息,显示关于make命令以及所有调用make所产生的错误等。 + +- oe_runconf(仅对autotools有用): + 这个函数运行一个使用autotools类的软件包的configure脚本(也就是说这个软件包的编译管理是基于autotools的)。这个函数会传递所有正确的参数以便交叉编译 + 和把软件安装到适当的目标目录。同时此函数还会给configure脚本传递变量EXTRA_OECONF的值。对于大多数情况,设置变量EXTAR_OECONF变量就足够了,而不用你自 + 己定义一个configure任务手动运行oe_runconf。如果你需要自己为一个autotools管理的包编写configure任务,你可以在需要的时候手动运行oe_runconf函数。 + +- oe_libinstall: + 这个函数是用来安装.so,.a已经相关的libtool库.la的。这个函数会选择安装合适的库,以及照料.la文件需要的编辑动作。 + + 这个函数支持下列选项: + - -C <目录> : 安装一个库之前把当前目录换为指定的目录。当库在一个包的子目录里的时候使用这个选项。 + - -s : 在安装一个库之前必须确保一个.so库已经存在。 + - -a : 在安装一个库之前必须确保一个.a库已经存在。 + + 下面的gdbm包的例子展示了安装.so,.a(以及相关的.la)库到中间缓冲库目录的情况。 + +:: + + do_stage () { + oe_libinstall -so -a libgdbm ${STAGING_LIBDIR} + install -m 0644 ${S}/gdbm.h ${STAGING_INCDIR}/ + } + +- base_conditional(python): + python基本条件函数用来设置一个或者两个依赖于第三个变量的定义的变量的值。通常的用法是: + + ${@base_conditional('', '', '', ', d)}" + + 其中: + * variable-name 是要检查的变量的名字。 + * value 是要跟变量相比较的值。 + * true-result 如果变量和相比较的值相等就返回这个值。 + * false-result 如果变量和相比较的值不相等就返回这个值。 + + 注意: + ${@...}符号用来在“配方”和类里调用python函数。 + +- 匿名函数: + 有时在解析期间以编程方式设置变量或执行其他操作很有用。为此,你可以定义在解析结束时运行的特殊Python函数,称为匿名Python函数。例如,以下根据另一个变量的 + 值有条件地设置一个变量: + +:: + + python () { + if d.getVar('SOMEVAR') == 'value': + d.setVar('ANOTHERVAR', 'value2') + } + +将函数标记为匿名函数的等效方法是将其命名为“__anonymous”,而不是没有名称。 + +匿名Python函数总是在解析结束时运行,无论它们是在哪里定义的。如果一个配方包含许多匿名函数,它们的运行顺序与它们在配方中定义的顺序相同。例如,考虑以下代码段: + +:: + + python () { + d.setVar('FOO', 'foo 2') + } + + FOO = "foo 1" + + python () { + d.appendVar('BAR', ' bar 2') + } + + BAR = "bar 1" + +前面的示例在概念上等同于以下代码段: + +:: + + FOO = "foo 1" + BAR = "bar 1" + FOO = "foo 2" + BAR += "bar 2" + +FOO以值“foo 2”结束,BAR 以值“bar 1 bar 2”结束。就像在第二个片段中一样,为匿名函数中的变量设置的值对任务可用,这些任务总是在解析后运行。 +在匿名函数运行之前应用覆盖和覆盖样式的运算符,例如“_append”。在以下示例中,FOO 以“来自匿名的 foo”的值结束: + +:: + + FOO = "foo" + FOO_append = " from outside" + + python () { + d.setVar("FOO", "foo from anonymous") + } + +* python函数访问数据存储变量 + +``d.getVar("X", expand)`` : + 返回变量“X”的值。使用“expand=True”扩展值。如果变量“X”不存在,则返回“None”。 +``d.setVar("X", "value")`` + 将变量“X”设置为“value”。 +``d.appendVar("X", "value")`` + 将 "value" 添加到变量 "X" 的末尾。如果变量“X”不存在,则行为类似于 d.setVar("X", "value")。 +``d.prependVar("X", "value")`` + 将 "value" 添加到变量 "X" 的开头。如果变量“X”不存在,则行为类似于 d.setVar("X", "value")。 +``d.delVar("X")`` + 从数据存储中删除变量“X”。如果变量“X”不存在,则不执行任何操作。 +``d.renameVar("X", "Y")`` + 将变量“X”重命名为“Y”。如果变量“X”不存在,则不执行任何操作。 +``d.getVarFlag("X", flag, expand)`` + 返回变量“X”的值。使用“expand=True”扩展值。如果变量“X”或命名标志不存在,则返回“None”。 +``d.setVarFlag("X", flag, "value")`` + 将变量“X”的命名标志设置为“value”。 +``d.appendVarFlag("X", flag, "value")`` + 将“value”附加到变量“X”上的命名标志。如果命名标志不存在,则行为类似于 d.setVarFlag("X", flag, "value")。 +``d.prependVarFlag("X", flag, "value")`` + 将“value”添加到变量“X”上的命名标志。如果命名标志不存在,则行为类似于 d.setVarFlag("X", flag, "value")。 +``d.delVarFlag("X", flag)`` + 从数据存储中删除变量“X”上的命名标志。 +``d.setVarFlags("X", flagsdict)`` + 设置 flagsdict() 参数中指定的标志。 setVarFlags 不会清除以前的标志。将此操作视为 addVarFlags。 +``d.getVarFlags("X")`` + 返回变量“X”的标志的 flagsdict。如果变量“X”不存在,则返回“None”。 +``d.delVarFlags("X")`` + 删除变量“X”的所有标志。如果变量“X”不存在,则不执行任何操作。 +``d.expand(expression)`` + 扩展指定字符串表达式中的变量引用。对不存在的变量的引用保持原样。例如,如果变量 "X" 不存在,d.expand("foo ${X}") 将扩展为文字字符串 "foo ${X}"。 + +你可以使用内联 Python 变量扩展来设置变量。这是一个例子: + +:: + + DATE = "${@time.strftime('%Y%m%d',time.gmtime())}" + +此示例导致将 DATE 变量设置为当前日期。 + +此功能最常见的用途可能是从Bitbake的内部数据字典d中提取变量的值。以下几行分别选择包名称及其版本号的值: + +:: + + PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] 或 'defaultpkgname'}" + PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] 或 '1.0'}" + +就 "=" 和 ":=" 运算符而言,内联Python表达式的工作方式与变量扩展类似。给定以下分配,每次扩展FOO时都会调用foo(): + +:: + + FOO = "${@foo()}" + +将此与以下立即分配进行对比,其中 foo() 仅调用一次,而分配被解析: + +:: + + FOO := "${@foo()}" + +常用变量 +*************** + +.. csv-table:: 常用预定义变量 + :header: "变量名", "描述" + :widths: 15, 20 + + "COREBASE", "Poky顶层目录路径" + "TOPDIR", "编译目录根目录" + "TMPDIR", "工程下的tmp目录${TOPDIR}/tmp*/" + +.. csv-table:: 配方常用变量 + :header: "变量名", "描述", "是否必选" + :widths: 15, 30, 5 + + "DESCRIPTION", "描述", "Y" + "LICENSE", "软件的许可证信息", "Y" + "PROVIDES", "该软件包提供的开发组件,和DEPENDS对应。用来显式的指定这个包在编译时提供了什么.这个通常在两个或者更多包提供相同功能的时候使用.比如在OE里我们有几个不同的libc,然后每个都声明提供'virtual/libc'功能.因此,一个依赖于libc的包可以简单的在DEPENDS里声明'virtual/libc'.这个在发行版级别指定了那个'virtual/libc'的实现会被使用.", "N" + +共享功能 +******************** + +* .bbappend + +* .bbclass + +* .inc + + +常用配置 +*********************** + +* conf/bitbake.conf + +Yocto的核心配置文件,所有其他配置文件都包含在其中。查看bitbake.conf文件末尾的include语句,你会注意到甚至local.conf也是从那里加载的。 +虽然bitbake.conf设置了默认值,但你通常可以使用(local.conf)文件、机器文件或分发配置文件来覆盖这些设置。 + +* conf/layer.conf + +.. image:: ../../image/yocto/conf_layer_conf.png + +定义了特定layer层信息,如bb文件的位置,layer的优先级等。其中所有layer.conf中的以上配置”apple-rtos”部分是此layer的唯一标志,不同 +layer.conf中要配置成不一样的值。最简单的方法是将现有的层配置文件复制到层的conf目录,然后根据需要修改文件。 + + - BBPATH:将 layer 的根目录添加到 Bitbake 的搜索路径中。通过使用 BBPATH 变量,Bitbake可以定位类文件(.bbclass)、配置文件以及包含在 include 和 require 语句中的文件。在这些情况下,Bitbake 会使用第一个与 BBPATH 中找到的文件名相匹配的文件。因此,建议在自定义层中使用唯一的类和配置文件名。 + - BBFILES: 定义 layer 中所有 recipes 的位置。 + - BBFILE_COLLECTIONS:定义了当前层中所有配方的位置。通过独特的标识符建立当前层,该标识符在整个OpenEmbedded构建系统中用于引用该层。在本例中,标识符 “apple-rtos” 是名为 “meta-apple-rtos” 的容器层的表示。 + - BBFILE_PATTERN: 在解析过程中立即展开,提供层的目录。 + - BBFILE_PRIORITY: 建立了一个优先级,当 OpenEmbedded 构建发现不同层中的同名配方时,按优先级使用配方。 + - LAYERSERIES_COMPAT: 列出当前版本兼容的 Yocto 项目版本。这个变量是表明你的层是否是当前版本的好方法。每个层都分配了一个优先级值。如果多个层中存在同名的配方文件,则优先级值控制哪个层优先。对于这些情况,来自具有更高优先级编号的层的配方文件优先。优先级值还会影响应用同一配方的多个 .bbappend 文件的顺序。可以手动指定优先级,也可以让构建系统根据层的依赖关系计算它。层优先级当前不影响 .conf 和.bbclass 文件的优先顺序。 + - LAYERVERSION:为层建立一个版本号,可以在使用 LAYERDEPENDS 变量时使用这个版本号来指定这个层的确切版本作为依赖关系。当使用 LAYERDEPENDS 变量时,可以使用这个版本号来指定这个层的确切版本作为依赖关系。 + - LAYERDEPENDS: 列出这个层所依赖的所有层(如果有的话)。 + - BBFILES_DYNAMIC:动态层目录承载扩展和特定于层的修改。如果冒号前配置的层集合可用,则包含指定的.bbappend 和 .bb 文件,不可用则指定的bb不包含,默认不生效。允许仅在存在其他一些层时激活层内容 - 即允许扩展其他层提供的内容而不创建硬依赖关系。其配置格式是: + +:: + + BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + +当存在已识别的图层时激活内容。你可以通过层定义的集合来识别层。 +例如在meta-A层的layer.conf中配置一下内容: + +:: + + BBFILES_DYNAMIC += " \ + openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ + openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \ + +"当”:”前的层openembedded-layer可用时,则meta-A层的dynamic-layers/openembedded-layer/下的 bb或者bbappend生效,否则默认不生效。这类bb的目录结构必须不在BBFILES指定的目录结构下,否则默认就会被引入,无法达到效果。 + +LAYERDEPENDS_security += "${@bb.utils.contains("DISTRO_FEATURES", "x11", "gnome-layer xfce-layer", "", d)}" + +conf/distro/${DISTRO}.conf + +每个层的顶级的通用策略配置,包含了特定于发行版相关的配置文件;定义了特定发布物的信息(比如:网络如何配置,是否支持usb,使用那种打包方式,使用什么样的libc)、发布者、发布版本、软件版本等。 + +例如openeuler.conf包含许多openeuler发行版的策略配置: meta-openeuler/conf/distro/openeuler.conf + +.. image:: ../../image/yocto/conf_distro_conf.png + +* conf/machine/\*.conf + +conf/machine/目录包含了目标机器的配置信息。每个平台设备都有一个专属的配置文件用来描述诸如:设备的架构体系,硬件特性(该设备有usb吗,有键盘吗等等),以及该机器 +需要什么类型的flash和磁盘镜像,串口设置啊等等信息。如果你要添加一个新的目标板,你应该为这个目标板创建一个单独的配置文件。例如设置MACHINE="qemux86",则OpenEmbedded +构建系统会在该目录中查找qemux86.conf 文件。machine/include/目录则包含多台机器通用的各种数据。 + +machine配置文件将BSP中其他地方包含的所有信息绑定到构建系统可以理解的格式中。每个BSP层至少需要一个机器文件。如果BSP支持多台机器,则可以存在多个机器配置文件。 +这些文件名对应于用户设置MACHINE变量的值。 + +这些文件定义了诸如要使用的内核包(virtual/kernel的 PREFERRED_PROVIDER)、包含在不同类型image中的硬件驱动程序、所需的任何特殊软件组件、任何引导加载程序 +信息以及任何特殊image格式要求等内容。 + +该配置文件还可以包括一个硬件“tuning”文件,该文件通常用于定义包架构和指定优化标志,这些标志经过精心选择以在给定处理器上提供最佳性能。 + +Tuning文件位于源码目录中的meta/conf/machine/include 目录中。例如,许多tune-xxx文件(例如tune-arm1136jf-s.inc、tune-1586-nlp.inc等)位于 +poky/meta/conf/machine/include目录中。 + +要使用tuning文件,你只需将它们包含在machine配置文件中。例如,Raspberry Pi BSP的raspberrypi3.conf包含以下语句: +include conf/machine/include/rpi-base.inc + +* conf/local.conf + +.. image:: ../../image/yocto/conf_local_conf.png + + +此配置文件包含构建环境的所有本地用户配置, 用户需要复制和编辑这个文件,配置各种工作目录,将要使用的机器,还有发行版等等。 + +此处设置的任何变量都会覆盖环境中其他地方设置的任何变量,除非该变量在文件中进行了硬编码(例如,使用“=”代替“?=”)。出于各种原因, +某些变量被硬编码,但此类变量相对较少。至少,通常会编辑此文件以选择目标MACHINE、使用的包类型(PACKAGE_CLASSES)以及下载文件的位置(DL_DIR)。 + +如果在开始构建时local.conf不存在,OpenEmbedded构建系统会在你获取顶级构建环境设置脚本oe-init-build-env时从local.conf.sample创建它。 +使用的源local.conf.sample 文件取决于$TEMPLATECONF变量,Yocto 项目开发环境构建时默认为 meta-poky/conf/。TEMPLATECONF指向 +local.conf.sample文件的源,可以通过在顶级构建环境设置脚本中设置变量来从任何层配置构建环境,如下所示: TEMPLATECONF=your_layer/conf + +构建过程获取示例文件后,它会使用sed将最终的${OEROOT}值替换为所有##OEROOT##值。你可以通过查看源目录中的 scripts/oe-setup-builddir脚本了 +解如何使用TEMPLATECONF变量。 + +- Target Machine Selection(目标机器): 由MACHINE(目标板的架构、型号)控制. +- Download Directory(下载的压缩包存放目录,增量构建则不重新下): 由DL_DIR控制. +- Shared State Directory(共享状态目录):由SSTATE_DIR控制. +- Build Output(构建结果的输出目录): 由TMPDIR控制. +- Distribution Policy(发行版策略): 由DISTRO控制. 指的是一个全局的配置文件,如果DISTRO = "poky"的话,那就是指这个全局的配置文件就是 + meta-poky/conf/distro/下的poky.conf, 如果DISTRO="poky-tiny"的话,就是指poky-tiny.conf。 +- Packaging Format(打包格式,同时控制了包管理器): 由PACKAGE_CLASSES控制. +- SDK Target Architecture(SDK目标架构): 由SDKMACHINE控制. +- Extra Image Packages(额外的image包): 由EXTRA_IMAGE_FEATURES控制. 增加一些额外的工具或者特点,比如说你可以指明这个变量等于tools-debug, + 意思是在最后构建的根文件系统中增加调试工具,比如说gdb或者strace。也可以通过指明"tools-sdk"来添加比如gcc, make, pkgconfig等功能。你可以一次性 + 指明很多额外的特点或者工具,用空格隔开,比如说EXTRA_IMAGE_FEATURES ?= "debug-tweaks" "tool-debug" + +build/conf/local.conf中的配置参数也可以在build/conf/site.conf 和 build/conf/auto.conf中被定义和修改。因为一个变量会在不同文件中被定义和修改, +这里就牵扯到那个文件中的值会被另一个文件覆盖的问题。 + +* conf/bblayer.conf + +bblayers.conf文件告诉bitbake在构建过程中,哪些层会被构建。默认情况下,这个文件中列举的层都是构建系统需要的最小集合(也就是一些必须的层)。 + +在OpenEmbedded构建系统可以使用你的新层之前,你需要启用它。要启用层,只需将层的路径添加到conf/bblayers.conf文件中的BBLAYERS变量,该文件位于Build目录中。 +以下示例显示了如何启用新的meta-mylayer层(注意你的新层如何存在于你之前已检出的官方 poky 存储库之外): + +Bitbake按照conf/bblayers.conf文件中的BBLAYERS变量指定的方式从上到下解析每个conf/layer.conf文件。在处理每个conf/layer.conf文件期间,Bitbake将包含 +在特定层中的配方、类和配置添加到源目录中。 + +这个配置文件定义了层,它们是由 Bitbake 遍历(或遍历)的目录树。bblayers.conf文件使用BBLAYERS变量列出Bitbake在构建期间要启用的层,即指定了bb文件和layer +的位置。 + +如果开始构建时bblayers.conf不存在,OpenEmbedded构建系统会在你获取顶级构建环境设置脚本(即 oe-init-build-env)时从bblayers.conf.sample创建它。 + +与local.conf文件一样,使用的源bblayers.conf.sample文件取决于$TEMPLATECONF脚本变量,当你从Yocto项目开发环境构建时,默认为 meta-poky/conf/,以及 +meta/conf/ 当你从OpenEmbedded-Core环境构建时。因为脚本变量指向bblayers.conf.sample文件的源,这意味着你可以通过在顶级构建环境设置脚本中设置变量来从、 +任何层构建构建,如下所示: ``TEMPLATECONF=your_layer/conf`` + +构建过程获取示例文件后,它会使用 sed 将最终的 ${OEROOT} 值替换为所有 ##OEROOT## 值。 +你可以在源目录中查看TEMPLATECONF变量scripts/oe-setup-builddir脚本。你可以在meta-poky/conf/目录中找到bblayers.conf.sample文件的Yocto项目版本。 + +.. image:: ../../image/yocto/conf_bblayer_conf.png + +* conf配置目录及目录指定 + +conf/目录中包含了针对这个层和发行相关的配置信息(比如说conf/layer.conf)。 + +如果你正在制作自己的定制版本的构建系统供其他用户使用,你可能想要定制安装脚本显示的消息,或者你可能想要更改模板配置文件(即local.conf和bblayers.conf)在 +新的构建目录中创建。 + +OpenEmbedded构建系统使用环境变量TEMPLATECONF来定位它从中收集配置信息的目录,这些信息最终会出现在Build Directory的conf目录中。默认情 +况下,TEMPLATECONF在poky存储库中设置如下:``TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}`` + +这是构建系统用来查找用于构建一些关键配置文件的模板的目录。如果查看该目录,你将看到bblayers.conf.sample、local.conf.sample和conf-notes.txt文件。构建 +系统使用这些文件形成各自的bblayers.conf 文件、local.conf 文件,并在运行设置脚本时显示Bitbake目标列表。 + +要使用你希望在每个新构建目录中使用的配置覆盖这些默认配置文件,只需将TEMPLATECONF变量设置为你的目录。 TEMPLATECONF变量在.templateconf文件中设置,该文件位 +于顶级源目录文件夹(例如poky)中,编辑 .templateconf 以便它可以找到你的目录。 + +最佳实践要求你应该将模板配置目录保留在自定义分发层中。例如,假设你的主目录中有一个名为meta-mylayer的层,并且你希望模板配置目录名为myconf。如下更改.templateconf +会导致OpenEmbedded构建系统在你的目录中查找并将其配置文件基于它找到的*.sample 配置文件。最终的配置文件(即local.conf和bblayers.conf最终仍然在你的构建目录中, +但它们基于你的*.sample 文件。``TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}`` + +这是构建系统用来查找用于构建一些关键配置文件的模板的目录。如果查看该目录,你将看到bblayers.conf.sample、local.conf.sample和conf-notes.txt文件。构建系统使用 +这些文件形成各自的bblayers.conf文件、local.conf 文件,并在运行设置脚本时显示Bitbake目标列表。 + +要使用你希望在每个新构建目录中使用的配置覆盖这些默认配置文件,只需将TEMPLATECONF变量设置为你的目录。 TEMPLATECONF变量在.templateconf 文件中设置,该文件位于顶级 +源目录文件夹(例如poky)中。编辑.templateconf以便它可以找到你的目录。 + +最佳实践要求你应该将模板配置目录保留在自定义分发层中。例如,假设你的主目录中有一个名为meta-mylayer的层,并且你希望模板配置目录名为myconf。如下更改 .templateconf +会导致OpenEmbedded构建系统在你的目录中查找并将其配置文件基于它找到的*.sample配置文件。最终的配置文件(即local.conf和bblayers.conf最终仍然在你的构建目录中,但它们 +基于你的*.sample 文件。``TEMPLATECONF=${TEMPLATECONF:-meta-mylayer/myconf}`` + +除了*.sample配置文件,conf-notes.txt也位于默认的meta-yocto/conf目录中。设置构建环境的脚本(即oe-init-build-env和oe-init-build-env-memres)使用此文件 +将Bitbake目标显示为脚本输出的一部分。自定义此 conf-notes.txt文件是确保自定义目标列表显示为脚本输出的一部分的好方法。 + +更改列出的常见目标就像在自定义模板配置目录中编辑conf-notes.txt版本并确保将TEMPLATECONF设置为目录一样简单。 + +常用class +********************************** + +类文件(.bbclass)用于抽象通用功能并在多个配方(.bb)文件之间共享信息。要使用类文件,只需确保配方继承了类。在大多数情况下,当一个配方继承一个类时,它就可以启用它的 +功能。但是,在某些情况下,可能需要在配方中设置变量或覆盖某些默认行为。 + +通常在配方中找到的任何元数据也可以放在类文件中。类文件由扩展名.bbclass标识,通常放置在源目录中的 meta*/classes/目录中。类文件也可以通过BUILDDIR(例如build/) +以与conf目录中的.conf文件相同的方式指向,在BBPATH中搜索类文件。 + +默认情况下,所有配方都继承base.bbclass类和package.bbclass类,它们启用生成可执行输出的配方所需的功能。 + +* base.bbclass + +base类的特殊之处在于每个.bb文件都隐式继承了该类。此类包含标准基本任务的定义,例如获取、解包、配置(默认为空)、编译(运行任何存在的 Makefile)、安装(默认为空) +和打包(默认为空)。这些类经常被其他类覆盖或扩展,例如autotools类或package类。 + +该类还包含一些常用函数,例如oe_runmake,它使用EXTRA_OEMAKE变量中指定的参数以及直接传递给oe_runmake的参数运行make。 + +* autotools\*.bbclass + + +Yocto编译和调试 +********************************** + +* target编译 + +若要编译单个包,则bitbake 包名(bb文件名称下划线前面的字符串);例如内核bb文件是linux-openeuler_5.10.bb,则 ``bitbake linux-openeuler`` + +bitbake接的包或者特性名可以通过bb文件名称获取,例如hello_1.0.bb第一个下滑线前面的hello则是包名,则``bitbake hello``可以编译这个bb文件控制的 +包或特性 + +若要一次编译多个指定的包,bitbake可以接多个包名,例如``bitbake rsm busybox``会编译rsm特性和busybox这个包以及他们依赖的包 + +如果同时存在32bit和64bit,则: +- 编译64位包,bitbake 包名 (例如bitbake busybox) +- 编译32位包,bitbake lib32-包名(例如bitbake lib32-busybox,若此包只存在64位,则失败,例如内核ko) +- 编译ilp32的包,bitbake ilp32-包名(例如bitbake ilp32-busybox,arm64存在) + +* 单任务编译 + + | 可以单独编译某个或某些target的某个任务,如 + | ``bitbake 包名 -c fetch`` 只抓包,看是否可以找到依赖的包和文件 + | ``bitbake 包名 -c patch`` 只执行到打patch,依赖的任务也会执行 + | ``bitbake 包名 -c compile`` 只编译,并完成编译依赖的前几个任务,但是不会执行之后的do_install等任务 + | ``bitbake 包名 -c cleanall`` 清理<包名>的编译中间目录 + | ``bitbake 包名:do_fetch`` 只抓包; 此方式可支持不同包编译不同任务,例如bitbake rsm:do_unpack audit:do_patch + | ``bitbake target --runall=fetch`` 只fetch所有源码不编译 + +* 配方和任务的依赖关系查询 + +有时可能很难理解为什么Bitbake想要在你指定的配方之前构建其他配方。依赖信息可以帮助你了解为什么要构建配方。 + +查询编译依赖关系树使用 ``bitbake 包名 -g`` 例如: + bitbake apple-image -g打印当前编译平台的所有待编译的包及其依赖关系 + + bitbake busybox -g打印编译busybox需要编译的所有包及包的依赖关系,每个包的任务的依赖关系,也能看到用了那个bb文件 + +.. image:: ../../image/yocto/bitbake_g.png + +输出文件内容说明: + - **recipe-depends.dot** :显示配方之间的依赖关系(即task-depends.dot的折叠版本)。 + - **task-depends.dot** :显示任务之间的依赖关系。这些依赖与Bitbake的内部任务执行列表相匹配。 + - **pn-buildlist** :显示要构建的目标的简单列表。 + +使用“-I”于选项省略指定部分的依赖关系。删除这些信息可以产生更多可读的图表。例如bitbake -g -I virtual/kernel -I eglibc apple-image + +* 编译脚本及日志查看 + +任务的日志在文件${WORKDIR}/temp/log.do_taskname 中,例如, core-image-minimal的do_compile任务的日志可能位于 +tmp*/work/\*/core-image-minimal/1.0-r0/temp/log.do_compile。要查看Bitbake运行生成日志的命令,可查看同一目录中对应的run.do_taskname文件。 + +log.do_taskname和run.do_taskname实际上是log.do_taskname.pid和log.run_taskname.pid的符号链接,其中pid是任务运行时的PID。符号链接始终指向与 +最近运行相对应的文件。 + +* 查看编译时的变量-e + +有时,由于Bitbake的解析步骤,你需要知道变量的值。这可能是因为你的项目中发生了一些意外行为。也许尝试修改变量没有按预期进行。 + +Bitbake的-e选项用于在解析后显示变量值。Bitbake -e命令显示配置文件(即local.conf、bblayers.conf、bitbake.conf 等)解析后的变量值; +bitbake -e recipe显示在解析特定配方后的变量值。当然也包括来自配置文件的变量 + +在bitbake -e的输出中,每个变量前面都有关于变量如何获得其值的描述,包括后来被覆盖的临时值。此描述还包括在变量上设置的变量标志 (varflags)。 +输出在调试过程中非常有用。 + +导出到环境的变量在bitbake -e的输出中以export 开头。请参阅以下示例: +``export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ build/tmp/sysroots/qemux86"`` + +除了变量值,bitbake -e 和 bitbake -e recipe 命令的输出还包括以下信息: + - 输出以一棵树开始,列出全局包含的所有配置文件和类,依次递归列出它们包含或继承的文件。 OpenEmbedded 构建系统的大部分行为(包括普通配方构建任务的行为)在基类及其继承的类中实现,而不是构建到 Bitbake 本身中。 + - 在变量值之后,所有函数都出现在输出中。对于 shell 函数,函数体内引用的变量被扩展。如果使用覆盖或使用覆盖样式的运算符(如 :append 和 :prepend)修改了函数,则最终组装的函数体将出现在输出中。 + +* 查询打包信息 + +* 详细的调试信息输出-vDDD + +* 显示使用的层和配方 + +* Bitbake失败尝试继续执行-k + +* Bitbake指定特定版本或包 + +* 常见报错说明 + +编译目录结构说明 +***************************** \ No newline at end of file diff --git a/docs/source/yocto/index.rst b/docs/source/yocto/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..d7ad0b8d50a852d0fb3b65e6d3acad6e9ef6390f --- /dev/null +++ b/docs/source/yocto/index.rst @@ -0,0 +1,20 @@ +.. _yocto: + +openEuler Embedded构建系统 +============================ + +由于openEuler Embedded是面向嵌入式场景的,其对构建系统的核心诉求是:交叉编译、灵活的定制化与裁剪, +而openEuler现有的OBS构建系统更加适合服务器场景的大型OS构建,无法有效满足嵌入式场景的需求,所以 +openEuler Embeddedd的核心构建系统是基于Yocto,但又根据自身的需求做了很多定制化的开发。 + +本章主要介绍openEuler Embedded构建系统,具体内容如下: + +.. toctree:: + :maxdepth: 1 + + quickbuild/index.rst + overview.rst + meta-openeuler.rst + exploration.rst + development.rst + addpackage_guide.rst diff --git a/docs/source/yocto/meta-openeuler.rst b/docs/source/yocto/meta-openeuler.rst new file mode 100644 index 0000000000000000000000000000000000000000..7ad8006b33c01d3a283b4c2a582f142a88430634 --- /dev/null +++ b/docs/source/yocto/meta-openeuler.rst @@ -0,0 +1,50 @@ +.. _yocto_meta_openeuler: + +openeuler层结构及演进策略 +=================== + +以下是一个openeuler新增层的主要目录结构样例(例如添加了meta-raspberrypi和meta-intel层): + +:: + + yocto-meta-openeuler/ + ├── bsp/ + │   ├── meta-openeuler-bsp/ 定制openeuler补丁 + │   │   ├── conf/ + │   │   │   ├── distro/ + │   │   │   │   └── openeuler-bsp.conf + │   │   │   ├── layer.conf + │   │   │   └── machine/ + │   │   │   └── openeuler-raspberrypi4-64.conf + │   │   ├── intel/ 定制intel的补丁,当meta-intel层生效时才生效 + │   │   └── raspberrypi/ 定制树莓派的补丁,当meta-rapberrypi层生效时才生效 + │   │   ├── recipes-core/ + │   │   └── recipes-kernel/ + │   ├── meta-intel/ 社区原生intel + │   └── meta-raspberrypi/ 社区原生树莓派 + ├── docs/ 对外的openeuler文档目录 + └── meta-openeuler/ 自研openeuler的qemu版本 + + + meta-openeuler/ + ├── classes/ 自研公共类目录 + │   └── …. + ├── conf/ 定制的openeuler配置模板,含local.conf.sample等 + │   └── … + ├── recipes-core/ 核心配方 + │   ├── busybox/ + │   │   └── busybox_1.34.1.bb + │   ├── images/ + │   │   ├── openeuler-image.bb + │   │   ├── qemu-aarch64.inc + │   │   ├── qemu-arm.inc + │   │   └── qemu.inc + │   └── … + │   └── … + ├── recipes-devtools/ 工具类配方,如cmake等 + │   └── … + ├── recipes-kernel/ 内核相关配方 + │   └── linux/ + │   └── linux-openeuler.bb + ├── recipes-labtools/ 实验室工具配方 + └── recipes-support/ 其它配方依赖的配方,不打包到image \ No newline at end of file diff --git a/docs/source/yocto/overview.rst b/docs/source/yocto/overview.rst new file mode 100644 index 0000000000000000000000000000000000000000..76fc5999c1aa35f1372ba262697b920d1c0cbc3c --- /dev/null +++ b/docs/source/yocto/overview.rst @@ -0,0 +1,220 @@ +.. _yocto_overview: + +Yocto介绍 +==================== + +Yocto是什么 +************** + +Yocto项目是Linux Foundation旗下的一个开源协作项目,该项目起源于OpenEmbedded Project,并与之协作,可帮助开发人员 +在各种硬件架构上创建基于Linux的定制系统,这些系统专为嵌入式产品而设计,不区分硬件体系架构。Yocto Project提供了灵活 +的工具集和开发环境,允许全世界的嵌入式设备开发人员通过共享技术、软件堆栈、配置和最佳实践,用于协作创建定制Linux镜像。 + +该项目为构建定制化的嵌入式Linux发行版提供一系列模板、工具和方法来简化定制linux开发,允许更换软件配置和构建,避免重复工作 +以及不必要的维护。Yocto项目鼓励跨各种应用程序和设备类型的创新,支持多种硬件架构,包括X86(32位和64位)、ARM(32w位和64位)、 +、RISC-V、PPC和MIPS等。随着硬件BSP支持的增加和BSP格式的标准化,这个项目创造了巨大的价值。 + +Yocto项目和OpenEmbedded共享一个核心元数据集合,称为openembedded-core。OpenEmbedded为各种体系结构、功能和应用程序 +提供了一套全面的元数据。Yocto项目专注于为一组核心架构和特定单板提供功能强大、易于使用、可互操作、经过良好测试的工具、元数 +据和BSPs。 + +**** + - 广泛应用于整个行业 + - 架构无关 + - 镜像和代码移植容易 + - 灵活 + - 适用于资源受限的嵌入式和物联网设备 + - 全面的工具链支持 + - 执行机制大于策略 + - 支持层模型 + - 支持部分组件构建 + - 按照严格的时间表发布 + - 丰富的个人和组织生态 + - 二进制可再现性 + - 许可证清单 + +Yocto构建流程 +******************** + + +Yocto的构建流程如下图所示,开发者通过指定一些用户配置文件(比如说local.conf),其中包含针对不同软件的配方文件和层, +目标开发板的配置文件,打包策略配置文件。Bitbake(淡蓝色部分)会去读取这些配方和配置文件,然后 + +1. 去配方和配置文件指定的地方(下图深黄色部分)下载源代码(source fetching)。 +#. 下载后,将源码提取到本地工作区(下图绿色部分)中,在工作区中打补丁(patch application)、执行配置和编译等步骤 +#. 使用一些自动工具(比如说使用autoconf生成configure脚本,config.h等文件) +#. 分析各个包之间的依赖关系(analysis for package relationship) +#. 根据打包策略生成deb, rpm或者ipk包 +#. 对软件包进行测试(QA tests),做一些通用的质量检查和健全性检查 +#. 使用这些软件包生成linux镜像和软件开发套件(SDK) + +在使用Yocto项目的过程中,这个工作流将会随着实际使用的组件和工具而改变。 + +.. image:: ../../image/yocto/open_embedded_architecture_workflow.png + +通常,Yocto构建的工作流由几个功能区域组成: + + - User Configuration:可用于控制生成过程的元数据(bblayer.conf/local.conf)。 + - Metadata Layers:提供软件、板子和发行版元数据的各种层。 + - Source Files:构建使用的软件包源码,可以来自上游发布的软件包、本地代码目录或者软件代码仓(例如git,svn)。 + - Build System:在Bitbake控制下的进程。这个模块扩展了Bitbake如何获取源代码、应用补丁、完成编译、分析生成包的输出、创建和测试包、生成镜像 + 以及生成交叉开发工具。 + - Package Feeds:包含输出包(RPM、DEB或IPK)的目录,这些输出包随后用于构建由构建系统生成的镜像或软件开发工具包(SDK)。如果启用了运行时包 + 管理,还可以使用web服务器或其他方式复制和共享这些提要,以便于在运行时扩展或更新设备上的现有镜像。 + - Images:生成的镜像,包括内核镜像、根文件系统镜像等。 + - Application Development SDK:生成的包含交叉编译工具链、头文件和库文件的开发组件。 + +主要组件和工具 +******************** + +Yocto项目在整个Yocto项目源存储库参考系统(Poky)中集成了OE-Core Metadata。Yocto Project Version 1.0之后,Yocto Project和 +OpenEmbedded同意共同工作并共享一个共同的核心元数据集(OE-Core),其中包含以前在Poky中发现的大部分功能。这种合作实现了长期的 +OpenEmbedded目标,拥有更严格控制和质量保证的核心。共享一组核心元数据使Poky成为OE-Core之上的集成层。Yocto项目结合了各种组件,如 +Bitbake,OE-Core,脚本“集合”,以及其构建系统的文档。要使用Yocto Project工具和组件,还要下载(clone)Poky并使用它来引导构建自己的 +发行版。 + + +.. image:: ../../image/yocto/yocto_main_components.png + +Metadata +^^^^^^^^^^^^^^^^ +Metadata元数据是Yocto项目的关键元素,用于构建Linux发行版。元数据包含在一些文件中,当构建镜像时构建系统会去解析它们。通常,元数据包括 +配方、配置文件和其他引用构建指令本身的信息,以及用于控制要构建的事物和影响构建方式的数据。 + +元数据还包括: + | 1). 用于指示被使用软件的版本和来源信息的命令和数据; + | 2). 对软件本身(补丁或辅助文件)进行的更改或添加,用于修复错误或自定义特定情况下使用的软件。 + +OpenEmbedded Core就是一组重要的经过验证的元数据集合。 + + - Configuration Files(配置文件):包含变量的全局定义、用户定义的变量和硬件配置信息的文件,主要是.conf文件。它们告知构建系统需要构 + 建什么,并放入镜像image中以支持特定平台。比如conf/local.conf可以配置机器配置选项,分发配置选项,编译器调整选项,常规通用配置选项 + 和用户配置选项。conf/bblayers.conf中可以添加用到的layer层路径,从而在编译时将他们添加进去。 + + - recipe(配方):元数据(metadata)的最常见形式,主要是.bb、.bbappend、.inc、.bbclass和patches文件。一个recipe包含一个用于构 + 建程序包的设置和任务(说明)列表,食谱描述将从哪里获取源码,以及应用哪些补丁,描述了库和其他食谱的依赖关系,以及配置和编译选项。它们存 + 储在层(layer)中。bbappend和bb的区别主要在于bbappend是基于bb的,功能是对相应的bb文件作补充和覆盖,类似于'重写'的概念。 + .bbclass文件,包含在配方文件之间共享的有用信息。.inc文件包含一个开源软件多版本之间共享的信息。 + + - Layer(层):即各种meta-xxx目录,将Metadata按层进行分类,是一些列相关配方的集合(同一个目标文件的相关配方,配置等文件)。层允许你合 + 并相关的元数据以自定义构建,并隔离多个体系结构构建的信息。例如要定制一套支持特定硬件的系统,可以把与底层相关的单元放在一个layer中,这叫 + 做 Board Support Package(BSP) Layer。层在覆盖先前规范方面具有层次结构。隔离特定于硬件的配置允许通过使用不同的层来共享其他元数据, + 其中元数据可能在多个硬件中是通用的。你可以从Yocto Project中包含任意数量的可用层,并通过在它们之后添加你自己的层来自定义构建。尽管你可 + 能会发现在单个项目中将所有内容都保留在一层中很诱人,但是元数据的模块化程度越高,应对将来的更改就越容易。 + +Bitbake +^^^^^^^^^^^^^^^ +Bitbake一种软件构建自动化工具,是解析指令(食谱)和配置数据的调度程序和执行引擎,像所有的build工具一样(比如make,ant,jam)控制如何去构建 +系统并且解决构建依赖。但是又区别于功能单一的工程管理工具(比如make),Bitbake不是基于把依赖写死了的makefile,而是收集和管理大量之间没有依赖 +关系的描述文件(这里我们称为包的配方),在解析阶段之后,Bitbake 创建一个依赖树来对编译进行排序,调度包含代码的编译,最后构建指定的自定义Image。 + +Bitbake是一个Python程序,它由用户创建的配置驱动,可以为用户指定的目标执行用户创建的任务,即所谓的配方。配置、任务和配方是用一种Bitbake DSL +(领域特定语言)编写的,其中包含变量和可执行的 shell 或 python 代码。它允许shell和Python任务在复杂的任务间依赖性约束下工作时高效并行地运行。 +简而言之,Bitbake是一个构建引擎,它通过以特定格式编写的配方来执行,以执行任务集。 + +Bitbake是作为构建软件的工具而制作的,因此具有一些特殊功能,例如定义依赖项的可能性。Bitbake能够解决依赖关系并将它必须做的工作按正确的顺序排 +列,然后执行这些任务。此外,构建软件包通常包含相同或非常相似的任务。常见任务例如:下载并提取源代码、运行配置、运行make或简单地编写日志消息。 +Bitbake提供了一种以可配置方式抽象、封装和重用此功能的机制。 + +通常,Bitbake项目组织在包含配置和元数据的文件夹(称为层)中,以及一个构建文件夹(文件夹包含Bitbake功能的配置、任务和目标描述)。通常的做法是将 +层文件夹命名为meta-xxx。 + +Bitbake手册:https://docs.yoctoproject.org/bitbake/ + +oe-core +^^^^^^^^^^^^^^^^ +oe-core(OpenEmbedded-Core)是由基础配方,类和关联文件组成的元数据,是一些脚本(shell和Python脚本)和数据构成的自动构建系统。在许多不同的 +OpenEmbedded派生系统(包括Yocto Project)中,它们都是共有的。Yocto项目和OpenEmbedded项目都维护OpenEmbedded-Core。它是OpenEmbedded +社区开发的原始仓库的精选子集,该原始仓库已被精简为一组较小的,经过持续验证的核心配方,从而形成了受到严格控制且质量保证的核心配方集。 + +poky +^^^^^^^^^^^^^^^^ +poky–参考嵌入式发行版OS,实际上是一个有效的构建实例,它包含构建系统(Bitbake、OpenEmbedded Core、meta-poky、meta-yocto-bsp)以及一组 +元数据,可帮助你开始构建自己的发行版。 + +要使用Yocto项目的工具,你可以下载poky,并且用它来引导你自己的发行版。值得注意的是,poky不包含二进制文件–它是一个工作实例,用来告诉你如何从源 +代码构建自己的定制Linux发行版。你可以以任何你需要的方式去更改、拷贝或使用poky构建细节,来创建你的定制嵌入式Linux。 + +poky最强大的特性之一是构建的每个方面都由元数据控制。通过添加扩展功能的元数据层,可以使用元数据来扩充这些基本镜像类型。例如,这些层可以为图像类 +型提供额外的软件堆栈,为其他硬件添加板级支持包(BSP),甚至可以创建新的镜像类型。 + +pseudo +^^^^^^^^^^^^^^^^ +Pseudo是fakeroot的实现, 用于在看似具有root权限的环境中执行命令。在构建软件时,可能需要像系统管理员一样执行操作。例如,你可能需要定义文件的所有权或权限信息。 + +Pseudo是一个程序,可以直接使用,也可以作为LD_PRELOAD使用,这两种方法都实现这些操作,就像用户确实具有系统管理员权限一样,即使他们是普通用户。 + +Pseudo与fakeroot有很多相似之处,但它是一种新的实现,它改进了使用fakeroot所遇到的问题。 Poky现在广泛使用Pseudo作为fakeroot的替代品,但也可以在许多其他用 +例中独立使用。为了跟踪需要root权限的操作产生的“假”文件所有权和权限,Pseudo使用了SQLite3数据库。该数据库存储在 ${WORKDIR}/pseudo/files.db 中,用于单个配 +方。将数据库存储在文件中而不是内存中可以在任务和构建之间提供持久性,这是使用fakeroot无法实现的。 + +当允许执行通常为root用户保留的某些操作(例如do_install、do_package_write*、do_rootfs和do_image*)时,某些任务更容易实现。例如,do_install任务受益于能 +够将已安装文件的UID和GID设置为任意值。 + +允许任务仅执行root操作的一种方法是要求 Bitbake 以root身份运行。但是这种方法比较麻烦,而且存在安全问题。实际使用的方法是在“假”root环境中运行受益于root权限的 +任务。在此环境中,任务及其子进程认为它们以root用户身份运行,并查看文件系统的内部一致视图。只要生成最终输出(例如包或image)不需要root权限,一些早期步骤在假root +环境中运行的事实不会导致问题。 + +如果你添加自己的任务来操作与fakeroot任务相同的文件或目录,那么该任务也需要在fakeroot下运行。否则,该任务无法运行仅限root的操作,也无法看到其他任务设置的虚假文 +件所有权和权限。你还需要添加对virtual/fakeroot-native:do_populate_sysroot的依赖,给出以下内容: + +:: + + fakeroot do_mytask () { + echo do something like root + } + do_mytask[depends] += "virtual/fakeroot-native:do_populate_sysroot" + +| **FAKEROOT** :包含在 fakeroot 环境中运行 shell 脚本时使用的命令。 FAKEROOT 变量已过时,已被其他 FAKEROOT* 变量替换。 +| **FAKEROOTBASEENV** :列出在执行 FAKEROOTCMD 定义的命令时要设置的环境变量,该命令在 fakeroot 环境中启动 bitbake-worker 进程。 +| **FAKEROOTCMD** :包含在 fakeroot 环境中启动 bitbake-worker 进程的命令。 +| **FAKEROOTDIRS** :列出在 fakeroot 环境中运行任务之前要创建的目录。 +| **FAKEROOTENV** :列出在 fakeroot 环境中运行任务时要设置的环境变量。 +| **FAKEROOTNOENV** :列出运行不在 fakeroot 环境中的任务时要设置的环境变量。 + + +为什么使用pseudo,而不是fakeroot:https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot +fakeroot使用:http://man.he.net/man1/fakeroot + +package feeds +^^^^^^^^^^^^^^^^^^^^^^ +当 OpenEmbedded构建系统生成image或SDK时,它会从位于构建目录中的包源区域获取包。如下图所示: + +.. image:: ../../image/yocto/package_feeds.png + +包源是构建过程中的一个中间步骤,用来临时存储包的目录,由变量和正在使用的特定包管理器的组合确定。 OpenEmbedded +构建系统提供了生成不同包类型的类,可以通过 PACKAGE_CLASSES 变量指定要启用的类。在将包放入包源中之前,构建过程 +会通过生成的输出的质量保证检查来验证它们。 + +| **DEPLOY_DIR**\ :在构建目录中定义为 tmp/deploy。 +| **DEPLOY_DIR_xxx**\ :根据使用的包管理器,包类型子文件夹。给定 RPM、IPK 或 DEB 打包和 tarball 创建,分别使用 + DEPLOY_DIR_RPM、DEPLOY_DIR_IPK、DEPLOY_DIR_DEB 或 DEPLOY_DIR_TAR 变量。 +| **PACKAGE_ARCH**\ :定义特定于体系结构的子文件夹。例如,可能存在i586或qemux86架构的包。 + +Bitbake使用do_package_write_*任务生成包并将它们放入包保存区(例如,对于 IPK 包,do_package_write_ipk)。例如, +考虑使用IPK打包管理器并且同时存在对i586和emux86的包架构支持的场景。i586架构的包放在 build/tmp/deploy/ipk/i586, +而qemux86架构的包放在 build/tmp/deploy/ipk/qemux86。 + +层模型 +^^^^^^^^^^^^^^^^^^^^^^ + +层是包含相关元数据(即指令集)的存储库,这些元数据告诉OpenEmbedded构建系统如何构建目标。Yocto项目层模型促进了Yocto项目 +开发环境中的协作、共享、定制和重用。层在逻辑上分离你项目的信息。例如,你可以使用一个层来保存特定硬件的所有配置。隔离特定于 +硬件的配置允许你通过使用不同的层共享其他元数据,其中元数据可能在多个硬件中是通用的。 + +按照惯例,Yocto 项目中的层遵循特定的形式。符合已知结构允许Bitbake在构建期间对在哪里可以找到元数据类型做出假设。 + +层支持包含技术、硬件组件和软件组件。 Yocto Project Compatible 名称提供了最低水平的标准化,这有助于建立强大的生态系统。 +“Yocto Project Compatible”适用于适当的产品和软件组件,例如 BSP、其他 OE 兼容层和相关的开源项目,允许生产者使用 +Yocto Project徽章和品牌资产。有关层和OpenEmbedded层索引的介绍性信息可以在软件概述层部分中找到,或者可以在文档中找到一般 +信息。如果你在此处找不到所需的图层,请查看 OpenEmbedded 图层索引,该索引包含更多层,但内容没有得到普遍验证。 + +OpenEmbedded构建系统支持将元数据组织成多个层。层允许你将不同类型的自定义相互隔离。一个典型的Bitbake项目由不止一层组成。 +通常图层包含特定主题的食谱。像基本系统,图形系统,...等等。 + +在某些项目中,也可能有多个构建目标,每个目标都由不同的层组成。一个典型的例子是构建一个带有和不带有 GUI 组件的 Linux 发行版。 +可以使用、扩展、配置层,也可以部分覆盖现有层的部分。这很有用,因为它允许根据实际需要重用和定制。 + + +**Yocto项目的层** :https://www.yoctoproject.org/software-overview/layers/ +**OpenEmbedded的层** :http://layers.openembedded.org/layerindex/branch/master/layers/ diff --git a/docs/source/yocto/quickbuild/container-build.rst b/docs/source/yocto/quickbuild/container-build.rst new file mode 100644 index 0000000000000000000000000000000000000000..21dffc8a9a538eb85622f5b99a692326bac1901a --- /dev/null +++ b/docs/source/yocto/quickbuild/container-build.rst @@ -0,0 +1,169 @@ +openEuler Embedded容器构建指导 +================================= + +由于openEuler Embedded构建过程需要基于openEuler操作系统,且需要安装较多系统工具和构建工具。 +为方便开发人员快速搭建构建环境,我们将构建过程所依赖的操作系统和工具封装到一个容器中, +这就使得开发人员可以快速搭建一个构建环境,进而投入到代码开发中去,避免在准备环境阶段消耗大量时间。 + +1. 环境准备 +************** + +需要使用docker创建容器环境,为了确保docker成功安装,需满足以下软件硬件要求 + +- 操作系统: 推荐使用Ubuntu、Debian和RHEL(Centos、Fedora等) + +- 内核: 推荐3.8及以上的内核 + +- 驱动: 内核必须支持一种合适的存储驱动,例如: Device Mapper、AUFS、vfs、btrfs、ZFS + +- 架构: 运行64位架构的计算机(x86_64和amd64) + +2. 安装docker +************************ + +1) 检查当前环境是否已安装docker工具 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +运行如下命令,可以看到当前docker版本信息,则说明当前环境已安装docker,无需再次安装 + +.. code-block:: console + + docker version + +2) 如果没有安装,可参考官方链接安装 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +官网地址: http://www.dockerinfo.net/document + +openEuler环境可参考Centos安装Docker + +例: openEuler环境docker安装命令如下 + +.. code-block:: console + + sudo yum install docker + +3. 获取容器镜像 +**************** + +通过docker pull命令拉取华为云中的镜像到宿主机。命令如下: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: console + + docker pull swr.cn-north-4.myhuaweicloud.com/openeuler-embedded/openeuler-container + +4. 准备容器构建环境 +********************* + +1) 启动容器 +^^^^^^^^^^^^^ + +可通过docker run命令启动容器,为了保证容器启动后可以在后台运行,且可以正常访问网络,建议使用如下命令启动: + +.. code-block:: console + + docker run -idt --network host swr.cn-north-4.myhuaweicloud.com/openeuler-embedded/openeuler-container bash + +参数说明: + +- -i 让容器的标准输入保持打开 + +- -d 让 Docker 容器在后台以守护态(Daemonized)形式运行 + +- -t 选项让Docker分配一个伪终端(pseudo-tty)并绑定到容器的标准输入上 + +- --network 将容器连接到(host)网络 + +- swr.cn-north-4.myhuaweicloud.com/openeuler-embedded/openeuler-container 指定镜像名称 + +- bash 进入容器的方式 + +2) 查看已启动的容器id +^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: console + + docker ps + +3) 进入容器 +^^^^^^^^^^^^ + +.. code-block:: console + + docker exec -it 容器id bash + +构建环境已准备完成,下面就可以在容器中进行构建了 + +5. 开始构建 +************ + +1) 下载源码 +^^^^^^^^^^^^ + +- 获取源码下载脚本 + +.. code-block:: console + + git clone https://gitee.com/openeuler/yocto-meta-openeuler.git -b openEuler-22.03-LTS -v /usr1/openeuler/src/yocto-meta-openeuler + +- 通过脚本下载源码 + +.. code-block:: console + + cd /usr1/openeuler/src/yocto-meta-openeuler/scripts + sh download_code.sh /usr1/openeuler/src + +2) 编译构建 +^^^^^^^^^^^^^ + +- 编译架构: aarch64-std、aarch64-pro、arm-std、raspberrypi4-64 + +- 构建目录: /usr1/build + +- 源码目录: /usr1/openeuler/src + +- 编译器所在路径: /usr1/openeuler/gcc/openeuler_gcc_arm64le + +说明: 不同的编译架构使用不同的编译器,aarch64-std、aarch64-pro、raspberrypi4-64使用openeuler_gcc_arm64le编译器, +arm-std使用openeuler_gcc_arm32le编译器,下面以以aarch64-std目标架构编译为例 + +a) 将/usr1目录所属群组改为openeuler,否则切换至openeuler用户构建会存在权限问题 + +.. code-block:: console + + chown -R openeuler:users /usr1 + +b) 切换至openeuler用户 + +.. code-block:: console + + su openeuler + +c) 进入构建脚本所在路径,运行编译脚本 + +.. code-block:: console + + cd /usr1/openeuler/src/yocto-meta-openeuler/scripts + source compile.sh aarch64-std /usr1/build /usr1/openeuler/gcc/openeuler_gcc_arm64le + bitbake openeuler-image + +3) 构建结果说明 +^^^^^^^^^^^^^^^^^ + +结果件默认生成在构建目录下的output目录下,例如上面aarch64-std的构建结果件生成在/usr1/build/output + ++---------------------------------------------+-------------------------------------------------------------+ +| filename | description | ++=============================================+=============================================================+ +| Image-5.10.0 | openEuler Embedded image | ++---------------------------------------------+-------------------------------------------------------------+ +| openeuler-glibc-x86_64-openeuler-image | openEuler Embedded sdk toolchain | +| -aarch64-qemu-aarch64-toolchain-21.09.30.sh | | ++---------------------------------------------+-------------------------------------------------------------+ +| openeuler-image-qemu-aarch64- | openEuler Embedded file system | +| 20220318114250.rootfs.cpio.gz | | ++---------------------------------------------+-------------------------------------------------------------+ +| zImage | openEuler Embedded compressed image | ++---------------------------------------------+-------------------------------------------------------------+ + diff --git a/docs/source/yocto/quickbuild/index.rst b/docs/source/yocto/quickbuild/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..61a190a866679d48d295f5be1554d03658e7a91a --- /dev/null +++ b/docs/source/yocto/quickbuild/index.rst @@ -0,0 +1,12 @@ +.. _quickbuild: + +快速构建 +============================ + +本章主要提供了两种方式准备构建环境,并描述了详细的构建流程,具体内容如下: + +.. toctree:: + :maxdepth: 1 + + quickstart.rst + container-build.rst diff --git a/docs/source/yocto/quickbuild/quickstart.rst b/docs/source/yocto/quickbuild/quickstart.rst new file mode 100644 index 0000000000000000000000000000000000000000..d770b95a05a4d0cb96d6ddddf941b1b6926a3f55 --- /dev/null +++ b/docs/source/yocto/quickbuild/quickstart.rst @@ -0,0 +1,105 @@ +openEuler快速构建指导 +====================== + +构建环境的准备 +********************************************* + +yocto中主机端命令使用 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Yocto或者说Bitbake本质上是一组python程序,其最小运行环境要求如下: + | - Python3 > 3.6.0 + | - Git > 1.8.3.1 + | - Tar > 1.28 + +在构建过程中所需要的其他工具,Yocto都可以根据相应的软件包配方自行构建出来,从而达到自包含的效果。在这个过程中,Yocto还会依据自身需要,对相应的工具打上yocto专属补丁(如dnf, rpm等)。这些主机工具会在第一次的构建中从源码开始构建,因此Yocto第一次构建比较费时。 + +为了加速构建特别是第一次构建,openEuler Embedded采取了“能用原生工具就用原生工具,能不构建就不构建”的策略,尽可能使用主机上预编译的原生的工具。 +这就需要依赖主机上软件包管理工具(apt, dnf, yum, zypper等)实现安装好。 + +Yocto是通过HOSTTOOLS变量来实现主机工具的引入,为会每个在HOSTTOOLS中列出的工具建立相应的软链接。为了避免来自主机对构建环境的污染,Yocto会重新准备不同于主机的环境,例如PATH变量等,因此如果新增依赖主机上的某个命令,需显示在Yocto的HOSTTOOLS变量中增加,否则即使主机上存在,Yocto构建时也会报错找不到相应的工具。相应流程如下图所示: + +.. image:: ../../../image/yocto/hosttools.png + +当前openEuler Embedded所需要主机工具已经默认在local.conf.sample中的HOSTTOOLS定义,主要工具描述如下: + +========= ============= +工具名 用途 +========= ============= +cmake cmake构建工具 +ninjia ninja构建系统 +========= ============= + + +openEuler Embedded所需构建工具 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1)构建os + - `操作系统:openEuler-20.03-LTS-SP2 `_ + +2)安装系统额外工具 + - yum -y install tar cmake gperf sqlite-devel chrpath gcc-c++ patch rpm-build flex autoconf automake m4 bison bc libtool gettext-devel createrepo_c rpcgen texinfo hostname python meson dosfstools mtools parted ninja-build autoconf-archive libmpc-devel gmp-devel + +3)预编译的交叉工具链和库 + | Yocto可以构建出交叉编译所需的交叉工具链和C库,但整个流程复杂且耗时,不亚于内核乃至镜像的构建,而且除了第一次构建,后面很少会再涉及。同时,绝大部分开发者都不会直接与工具链和C库构建打交道。所以为了简化该流程,openEuler Embedded采取的策略是采用预编译的交叉工具链和库,会专门维护和发布相应的带有C库的工具链。 + | 目前我们提供了对arm32位和aarch64位两种架构的工具链支持, 通过下方链接可以获得: + + - `ARM 32位工具链 `_ + - `ARM 64位工具链 `_ + +已安装好工具的构建容器 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +openEuler Embedded的构建过程中会使用到大量的各式各样的主机工具。如前文所述,为了加速构建,openEuler Embedded依赖主机事先安装好相应的工具,但这也会带来一不同主机环境会有不同的工具版本的问题,例如构建需要cmake高于1.9版本,但主机上最高只有cmake 1.8。为了解决这一问题,openEuler Embedded提供了专门的构建容器,提供统一的构建环境。 + +使用者可以通过如下链接获得容器镜像直接用于编译: + + - `openEuler Embedded构建容器的基础镜像 `_ + + +构建代码下载与准备 +********************************************* + +openEuler Embedded整个构建工程的文件布局如下,假设openeuler_embedded为顶层目录: + +:: + + <顶层目录openeuler_embedded> + ├── src 源代码目录,包含所有软件包代码、内核代码和Yocto构建代码 + ├── build openEuler Embedded的构建目录,生成的各种镜像放在此目录下 + +1)下载脚本所在仓库(例如下载到src/yocto-meta-openeuler目录下) + | ``git clone https://gitee.com/openeuler/yocto-meta-openeuler.git -b openEuler-22.03-LTS -v src/yocto-meta-openeuler`` + | 脚本为src/yocto-meta-openeuler/scripts/download_code.sh + | 此脚本有3个参数: + | 参数1:下载的源码路径,默认相对脚本位置下载,例如前面样例,代码仓会下到src/下 + | 参数2:下载的分支,默认值见脚本,不同分支按版本确定 + | 参数3:下代码的xml文件,标准manifest格式,按xml配置下代码 + +2)执行下载脚本 + | 下载最新代码: ``sh src/yocto-meta-openeuler/scripts/download_code.sh`` + | 下载指定版本代码: ``sh src/yocto-meta-openeuler/scripts/download_code.sh "" "" "manifest.xml"`` + + - 指定openEuler Embedded版本的代码的manifest.xml文件从openEuler Embedded发布件目录embedded_img/source-list/下获取 + + +openEuler Embedded版本构建 +***************************** + +一键式构建脚本::file:`src/yocto-meta-openeuler/scripts/compile.sh` , 具体细节可以参考该脚本 + +编译脚本的主要流程: + +1. 设置PATH增加额外工具路径 +#. TEMPLATECONF指定local.conf.sample等配置文件路径 +#. 调用poky仓的oe-init-build-env进行初始化配置 +#. 在编译目录的conf/local.conf中配置MACHINE,按需增加额外新增的层 +#. 在编译目录执行bitbake openeuler-image编译openEuler Embedded的image和sdk +#. 执行完发布件在编译目录的output目录下 + +以编译标准arm架构为例,编译方法如下: + +:: + + source src/yocto-meta-openeuler/scripts/compile.sh arm-std + bitbake openeuler-image #执行第一条source后,会提示出bitbake命令 \ No newline at end of file diff --git a/meta-openeuler/classes/autotools.bbclass b/meta-openeuler/classes/autotools.bbclass new file mode 100644 index 0000000000000000000000000000000000000000..8a0fcb38689cd418149df401745c5f7bc1c768c8 --- /dev/null +++ b/meta-openeuler/classes/autotools.bbclass @@ -0,0 +1,286 @@ +def autotools_xxxx(d): + if d.getVar('INHIBIT_AUTOTOOLS_DEPS'): + return '' + + pn = d.getVar('PN') + deps = '' + + if pn in ['autoconf-native', 'automake-native']: + return deps + deps += 'autoconf-native automake-native ' + + if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"): + if not bb.data.inherits_class('native', d) \ + and not bb.data.inherits_class('nativesdk', d) \ + and not bb.data.inherits_class('cross', d) \ + and not d.getVar('INHIBIT_DEFAULT_DEPS'): + image_name = "%s%s" % (d.getVar('MACHINE_ARCH'), d.getVar('OPENEULER_KERNEL_TAG')) + #if image_name in ['arm32a15eb-4.4', 'arm32a9eb-4.4', 'arm32a9eb-tiny-4.4', 'arm64eb-4.4']: + #deps += ' ' + #else: + #deps += 'libtool-cross ' + + return deps + 'gnu-config-native ' + +DEPENDS_prepend = "${@autotools_xxxx(d)} " + +inherit siteinfo + +# Space separated list of shell scripts with variables defined to supply test +# results for autoconf tests we cannot run at build time. +# The value of this variable is filled in in a prefunc because it depends on +# the contents of the sysroot. +export CONFIG_SITE = "${@siteinfo_get_files(d)}" +acpaths ?= "default" +EXTRA_AUTORECONF_DEFINE = " AUTOPOINT=echo GTKDOCIZE=echo " + +export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}" + +# When building tools for use at build-time it's recommended for the build +# system to use these variables when cross-compiling. +# (http://sources.redhat.com/autobook/autobook/autobook_270.html) +export CPP_FOR_BUILD = "${BUILD_CPP}" +export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}" + +export CC_FOR_BUILD = "${BUILD_CC}" +export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" + +export CXX_FOR_BUILD = "${BUILD_CXX}" +export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" + +export LD_FOR_BUILD = "${BUILD_LD}" +export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}" + +def append_libtool_sysroot(d): + # Only supply libtool sysroot option for non-native packages + return "" + +CONFIGUREOPTS = " --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${oldincludedir} \ + --infodir=${infodir} \ + --mandir=${mandir} \ + --disable-silent-rules \ + ${CONFIGUREOPT_DEPTRACK} \ + ${@append_libtool_sysroot(d)}" +CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking" + +CACHED_CONFIGUREVARS ?= "" + +AUTOTOOLS_SCRIPT_PATH ?= "${S}" +CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure" + +AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}" + +oe_runconf () { + # Use relative path to avoid buildpaths in files + cfgscript_name="`basename ${CONFIGURE_SCRIPT}`" + cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name + if [ -x "$cfgscript" ] ; then + bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@" + if ! CONFIG_SHELL=/bin/bash ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then + bbnote "The following config.log files may provide further information." + bbnote `find ${B} -ignore_readdir_race -type f -name config.log` + bbfatal_log "configure failed" + fi + else + bbfatal "no configure script found at $cfgscript" + fi +} + +CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate" + +autotools_preconfigure() { + if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then + if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then + if [ "${S}" != "${B}" ]; then + echo "Previously configured separate build directory detected, cleaning ${B}" + rm -rf ${B} + mkdir -p ${B} + else + # At least remove the .la files since automake won't automatically + # regenerate them even if CFLAGS/LDFLAGS are different + cd ${S} + if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then + oe_runmake clean + fi + find ${S} -ignore_readdir_race -name \*.la -delete + fi + fi + fi +} + +autotools_postconfigure(){ + if [ -n "${CONFIGURESTAMPFILE}" ]; then + mkdir -p `dirname ${CONFIGURESTAMPFILE}` + echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} + fi +} + +EXTRACONFFUNCS ??= "" + +EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" + +do_configure[prefuncs] += "autotools_preconfigure autotools_aclocals ${EXTRACONFFUNCS}" +#do_compile[prefuncs] += "autotools_aclocals" +#do_install[prefuncs] += "autotools_aclocals" +do_configure[postfuncs] += "autotools_postconfigure" + +ACLOCALDIR = "${STAGING_DATADIR}/aclocal" +ACLOCALEXTRAPATH = "" +ACLOCALEXTRAPATH_class-target = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" +ACLOCALEXTRAPATH_class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" + +python autotools_aclocals () { + d.setVar("CONFIG_SITE", siteinfo_get_files(d, sysrootcache=True)) +} + +CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am" + +autotools_do_configure() { + # WARNING: gross hack follows: + # An autotools built package generally needs these scripts, however only + # automake or libtoolize actually install the current versions of them. + # This is a problem in builds that do not use libtool or automake, in the case + # where we -need- the latest version of these scripts. e.g. running a build + # for a package whose autotools are old, on an x86_64 machine, which the old + # config.sub does not support. Work around this by installing them manually + # regardless. + + PRUNE_M4="" + + for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do + rm -f `dirname $ac`/configure + done + if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then + olddir=`pwd` + cd ${AUTOTOOLS_SCRIPT_PATH} + mkdir -p ${ACLOCALDIR} + if [ x"${acpaths}" = xdefault ]; then + acpaths= + for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ + grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do + acpaths="$acpaths -I $i" + done + else + acpaths="${acpaths}" + fi + acpaths="$acpaths -I ${ACLOCALDIR}" + if [ -d ${STAGING_DATADIR_NATIVE}/aclocal ]; then + acpaths="$acpaths ${ACLOCALEXTRAPATH}" + fi + AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'` + automake --version + echo "AUTOV is $AUTOV" + if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then + ACLOCAL="$ACLOCAL --automake-acdir=${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV" + fi + # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look + # like it was auto-generated. Work around this by blowing it away + # by hand, unless the package specifically asked not to run aclocal. + if ! echo ${EXTRA_AUTORECONF_DEFINE} | grep -q "ACLOCAL"; then + rm -f aclocal.m4 + fi + if [ -e configure.in ]; then + CONFIGURE_AC=configure.in + else + CONFIGURE_AC=configure.ac + fi + sed -i '/AC_CANONICAL_TARGET/atest -n $target_alias && test "$target_alias" = "$host_alias" && test "$program_prefix$program_suffix$program_transform_name" = "${target_alias}-NONEs,x,x," && program_prefix=NONE' ${CONFIGURE_AC} + if grep -q "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC; then + if grep -q "sed.*POTFILES" $CONFIGURE_AC; then + : do nothing -- we still have an old unmodified configure.ac + else + bbnote Executing glib-gettextize --force --copy + echo "no" | glib-gettextize --force --copy + fi + elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then + # We'd call gettextize here if it wasn't so broken... + cp /usr/share/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ + if [ -d ${S}/po/ ]; then + cp -f /usr/share/gettext/po/Makefile.in.in ${S}/po/ + if [ ! -e ${S}/po/remove-potcdate.sin ]; then + cp /usr/share/gettext/po/remove-potcdate.sin ${S}/po/ + fi + fi + PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4" + fi + mkdir -p m4 + if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then + if ! echo "${DEPENDS}" | grep -q intltool-native; then + bbwarn "Missing DEPENDS on intltool-native" + fi + PRUNE_M4="$PRUNE_M4 intltool.m4" + bbnote Executing intltoolize --copy --force --automake + intltoolize --copy --force --automake + fi + + for i in $PRUNE_M4; do + find ${S} -ignore_readdir_race -name $i -delete + done + + tmp_site=`pwd`/tmp.site + rm -f ${tmp_site} + for f in $CONFIG_SITE + do + bbnote Adding script ${f} to site file + cat $f >> ${tmp_site} + done + export CONFIG_SITE=${tmp_site} + + bbnote Executing ACLOCAL=\"$ACLOCAL\" ${EXTRA_AUTORECONF_DEFINE} autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths + ACLOCAL="$ACLOCAL" ${EXTRA_AUTORECONF_DEFINE} autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." + cp -f ${RECIPE_SYSROOT_NATIVE}/usr/share/gnu-config/config.guess . + cp -f ${RECIPE_SYSROOT_NATIVE}/usr/share/gnu-config/config.sub . + cd $olddir + fi + test ! -f ${S}/aclocal.m4 || sed -i "/MSGMERGE_FOR_MSGFMT_OPTION/{s|--for-msgfmt||g}" ${S}/aclocal.m4 + test ! -f ${S}/configure || sed -i "/MSGMERGE_FOR_MSGFMT_OPTION/{s|--for-msgfmt||g}" ${S}/configure + if [ -e ${CONFIGURE_SCRIPT} ]; then + oe_runconf + else + bbnote "nothing to configure" + fi +} + +autotools_do_compile() { + for libtool_file in `find ${B} -ignore_readdir_race -name libtool`; do + sed -i 's/macro_version=2.4.2/macro_version=2.4.6/g' $libtool_file + sed -i 's/macro_revision=1.3337/macro_revision=2.4.6/g' $libtool_file + sed -i 's/VERSION=2.4.2/VERSION=2.4.6/g' $libtool_file + sed -i 's/package_revision=2.4.2/package_revision=2.4.6/g' $libtool_file + sed -i 's/package_revision=1.3337/package_revision=2.4.6/g' $libtool_file + if [ ${BUILD_SYS} != ${TARGET_SYS} ]; then + sed -i 's|lt_sysroot=|lt_sysroot=${RECIPE_SYSROOT}|' $libtool_file + fi + sed -i '/fake/{ n; s/add_dir=-L$libdir/add_dir="-L$lt_sysroot$libdir"/; }' $libtool_file + sed -i '/fake/{ n; s/add_dir="-L$libdir"/add_dir="-L$lt_sysroot$libdir"/; }' $libtool_file + done + oe_runmake +} + +autotools_do_install() { + oe_runmake 'DESTDIR=${D}' install + # Info dir listing isn't interesting at this point so remove it if it exists. + if [ -e "${D}${infodir}/dir" ]; then + rm -f ${D}${infodir}/dir + fi +} + +inherit siteconfig + +EXPORT_FUNCTIONS do_configure do_compile do_install + +B = "${WORKDIR}/build" diff --git a/meta-openeuler/classes/get_rpmdeps.bbclass b/meta-openeuler/classes/get_rpmdeps.bbclass new file mode 100644 index 0000000000000000000000000000000000000000..cd0328156424d419f12fc0d6f4d6ad1d78f861a2 --- /dev/null +++ b/meta-openeuler/classes/get_rpmdeps.bbclass @@ -0,0 +1,12 @@ +python set_rpmdeps() { + import subprocess + rpmdeps = d.getVar('RPMDEPS', True) + if not rpmdeps or rpmdeps == "default": + rpmdeps = subprocess.Popen('rpm --eval="%{_rpmconfigdir}"', shell=True, stdout=subprocess.PIPE) + stdout, stderr = rpmdeps.communicate() + d.setVar('RPMDEPS', os.path.join(str(stdout, "utf-8").strip(), "rpmdeps")) + #bb.warn("xxxxxxxxxxxxxxxxxx xxxxRPMDEPS=%s"%d.getVar('RPMDEPS', True)) +} + +addhandler set_rpmdeps +set_rpmdeps[eventmask] = "bb.event.RecipePreFinalise" diff --git a/meta-openeuler/classes/kernel-version.bbclass b/meta-openeuler/classes/kernel-version.bbclass new file mode 100644 index 0000000000000000000000000000000000000000..188aa130ab7d0daf571da644178f8995909000c7 --- /dev/null +++ b/meta-openeuler/classes/kernel-version.bbclass @@ -0,0 +1,23 @@ +def get_kernelversion_headers(p): + import re + + fn = p + '/include/linux/utsrelease.h' + if not os.path.isfile(fn): + # after 2.6.33-rc1 + fn = p + '/include/generated/utsrelease.h' + if not os.path.isfile(fn): + fn = p + '/include/linux/version.h' + + try: + f = open(fn, 'r') + except IOError: + return None + + l = f.readlines() + f.close() + r = re.compile("#define UTS_RELEASE \"(.*)\"") + for s in l: + m = r.match(s) + if m: + return m.group(1).replace("+", "") + return None diff --git a/meta-openeuler/classes/selinux.bbclass b/meta-openeuler/classes/selinux.bbclass new file mode 100644 index 0000000000000000000000000000000000000000..25009c891d1a211fa5c86e8005b58e468e4736cd --- /dev/null +++ b/meta-openeuler/classes/selinux.bbclass @@ -0,0 +1,12 @@ +def target_selinux(d, truevar = 'selinux', falsevar = ''): + if not bb.utils.contains("DISTRO_FEATURES", "selinux", True, False, d): + return falsevar + + pn = d.getVar("PN", True) + type = pn.replace(d.getVar("BPN", True), "") + if type in ("-native", "nativesdk-", "-cross", "-crosssdk"): + return falsevar + + return truevar + +LIBSELINUX = "${@target_selinux(d, 'libselinux')}" diff --git a/meta-openeuler/conf/bblayers.conf.sample b/meta-openeuler/conf/bblayers.conf.sample new file mode 100644 index 0000000000000000000000000000000000000000..0a2abc077e2c6f624d3ac3a3acca3b18693c7d38 --- /dev/null +++ b/meta-openeuler/conf/bblayers.conf.sample @@ -0,0 +1,14 @@ +# 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##/../yocto-meta-openeuler/meta-openeuler \ + ##OEROOT##/../yocto-meta-openeuler/bsp/meta-openeuler-bsp \ + " diff --git a/meta-openeuler/conf/distro/include/security_flags_openeuler.inc b/meta-openeuler/conf/distro/include/security_flags_openeuler.inc new file mode 100644 index 0000000000000000000000000000000000000000..084fe227f58507a6251e9cd05c05b83cfa607c33 --- /dev/null +++ b/meta-openeuler/conf/distro/include/security_flags_openeuler.inc @@ -0,0 +1 @@ +SECURITY_LDFLAGS =+ "-Wl,-z,noexecstack" diff --git a/meta-openeuler/conf/distro/include/tcmode-gcc-bin.inc b/meta-openeuler/conf/distro/include/tcmode-gcc-bin.inc new file mode 100644 index 0000000000000000000000000000000000000000..bc67dbce44c5b4dd9d8e4a2e24a920f2b5c1c9da --- /dev/null +++ b/meta-openeuler/conf/distro/include/tcmode-gcc-bin.inc @@ -0,0 +1,17 @@ +PREFERRED_PROVIDER_gmp-native = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +PREFERRED_PROVIDER_libmpc-native = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +PREFERRED_PROVIDER_mpfr-native = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-bin-toolchain-compilerlibs-${TARGET_ARCH}" +PREFERRED_PROVIDER_gcc-runtime = "gcc-bin-toolchain-compilerlibs-${TARGET_ARCH}" +PREFERRED_PROVIDER_virtual/libc = "glibc" +PREFERRED_PROVIDER_virtual/libc-headers = "linux-libc-headers" +PREFERRED_PROVIDER_libstdc++ = "gcc-bin-toolchain-compilerlibs-${TARGET_ARCH}" +PREFERRED_PROVIDER_libgcc-initial = "gcc-bin-toolchain-compilerlibs-${TARGET_ARCH}" + +PATH_append = ":${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-bin-toolchain-cross-${TARGET_ARCH}/bin" + +#cannot set with linaro gcc,set it null +DEBUG_PREFIX_MAP = "" diff --git a/meta-openeuler/conf/distro/openeuler.conf b/meta-openeuler/conf/distro/openeuler.conf new file mode 100644 index 0000000000000000000000000000000000000000..95c5cb3232b0fb1948ec20f16f0eabaf3cfeec3b --- /dev/null +++ b/meta-openeuler/conf/distro/openeuler.conf @@ -0,0 +1,97 @@ +DISTRO = "openeuler" +DISTRO_NAME = "openEuler embedded(openEuler Embedded Reference Distro)" +DISTRO_VERSION = "22.03" +DISTRO_CODENAME = "openEuler${@d.getVar('DISTRO_VERSION').replace('.', '_')}" +SDK_VENDOR = "-openeulersdk" +SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" +SDK_VERSION[vardepvalue] = "${SDK_VERSION}" + +MAINTAINER = "openEuler " + +TARGET_VENDOR = "-openeuler" + +LOCALCONF_VERSION = "2" + +# Override these in openeuler embedded based distros +#OPENEULER_DEFAULT_DISTRO_FEATURES = "" +OPENEULER_DEFAULT_DISTRO_FEATURES = "pam" +#OPENEULER_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot" +#OPENEULER_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet" + +DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${OPENEULER_DEFAULT_DISTRO_FEATURES}" + +PREFERRED_VERSION_linux-openeuler ?= "5.10%" + +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}" +# set default sdk install directory +SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" + +DISTRO_EXTRA_RDEPENDS += "${OPENEULER_DEFAULT_EXTRA_RDEPENDS}" +DISTRO_EXTRA_RRECOMMENDS += "${OPENEULER_DEFAULT_EXTRA_RRECOMMENDS}" + +TCLIBCAPPEND = "" +TCLIBC = "glibc" + +# currently, we have no sources mirror for openEuler, so use +# yocto mirror instead +PREMIRRORS ??= "\ +bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n" + +# QA check settings - a little stricter than the OE-Core defaults +# (none currently necessary as we now match OE-Core) +#WARN_TO_ERROR_QA = "X" +#WARN_QA_remove = "${WARN_TO_ERROR_QA}" +#ERROR_QA_append = " ${WARN_TO_ERROR_QA}" + +# for embedded case, the mechanism of update-alternatives is not +# enabled to only allow just one copy of binary, to save memory +# footprint. Therefore, if multiple packages provide the same file, +# conflict error will be reported +INHERIT_remove += "update-alternatives" +# As update-alternatives is disabled, no need to do qa check of +# missing-update-alternatives +WARN_QA_remove += "missing-update-alternatives" + +INHERIT += "uninative" + +INHERIT += "reproducible_build" + +BB_SIGNATURE_HANDLER ?= "OEEquivHash" +BB_HASHSERVE ??= "auto" + + +PREFERRED_PROVIDER_virtual/kernel = "linux-openeuler" +#add by lisimin,delete depends +#UNINATIVE_CHECKSUM[x86_64] = "dead" +#UNINATIVE_URL = "unset" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +# for all .bb file, OPENEULER_SP_DIR will be included +# in file path +FILESEXTRAPATHS_prepend = "${OPENEULER_SP_DIR}:" + + +# PACKAGE_NO_LOCALE is variable in package.bbclass to control +# whether do_split_locales() for pacakges. +# openEuler Embedded is used for scenarios with limit memory, aslo +# in current image, no locale related pacakges are included. +# so we use variable to disable the generation of locale related packages +# it will save some build time, also no extra locale-* packages +PACKAGE_NO_LOCALE ?= "1" + + +export RPMDEPS = "default" +INHERIT += "get_rpmdeps" + +#disable the file checksum of fetch +do_fetch[file-checksums] = "" +SDK_INCLUDE_BUILDTOOLS = "0" +require conf/distro/openeuler-bsp.conf diff --git a/meta-openeuler/conf/layer.conf b/meta-openeuler/conf/layer.conf new file mode 100644 index 0000000000000000000000000000000000000000..aadff51ed8c2590d4d91228ec4c6e8c5da367e2a --- /dev/null +++ b/meta-openeuler/conf/layer.conf @@ -0,0 +1,20 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "openeuler" +BBFILE_PATTERN_openeuler = "^${LAYERDIR}/" +BBFILE_PRIORITY_openeuler = "30" + +LAYERSERIES_COMPAT_openeuler = "hardknott" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_openeuler = "13" + +LAYERDEPENDS_openeuler = "core" + +REQUIRED_POKY_BBLAYERS_CONF_VERSION = "2" diff --git a/meta-openeuler/conf/local.conf.sample b/meta-openeuler/conf/local.conf.sample new file mode 100644 index 0000000000000000000000000000000000000000..a4c33a6031b576ff9db8f0efedbce98540282674 --- /dev/null +++ b/meta-openeuler/conf/local.conf.sample @@ -0,0 +1,362 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "qemu-aarch64" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "openeuler" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686, x86_64, aarch64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "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. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +USER_CLASSES ?= "buildstats" + +# +# Runtime testing of images +# +# 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. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO:qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necessary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can be +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. 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 +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +#PACKAGECONFIG_append:pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append:pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# +# Memory Resident Bitbake +# +# Bitbake's server component can stay in memory after the UI for the current command +# has completed. This means subsequent commands can run faster since there is no need +# for bitbake to reload cache files and so on. Number is in seconds, after which the +# server will shut down. +# +#BB_SERVER_TIMEOUT = "60" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "2" + +HOSTTOOLS += "python rpmbuild" + +#commands for packages built by autotools +HOSTTOOLS += "automake autoreconf aclocal libtoolize m4 autoconf autoheader" + +#commands for create image +HOSTTOOLS_NONFATAL += "createrepo_c dnf ldconfig" + +#commands for openeuler packages +##unpack packages packed by xz +HOSTTOOLS_NONFATAL += "xz" + +##build packages built by cmake/ninja/meson +HOSTTOOLS_NONFATAL += "cmake ninja meson" + +##commands used by kernel +HOSTTOOLS_NONFATAL += "flex bison bc" + +HOSTTOOLS_NONFATAL += "chrpath pkg-config libtool \ + autopoint autoscan autom4te \ + autoupdate libtool pkg-config fmt \ + msgfmt msgmerge rpcgen makeinfo gperf \ + " + +##commands used by raspberrrypi4 specially +HOSTTOOLS_NONFATAL_append_raspberrypi4 += "mkdosfs mcopy mkfs.ext4 debugfs fsck.ext4 dumpe2fs \ + parted mkfs.vfat mmd" + +#some commands added in poky by default do not used now, make it optional +HOSTTOOLS_remove += "diffstat lz4c pzstd" +HOSTTOOLS_NONFATAL += "diffstat lz4c pzstd" + +SANITY_REQUIRED_UTILITIES_remove += "diffstat chrpath" +CONNECTIVITY_CHECK_URIS = "" +ASSUME_PROVIDED += "rpm-native dwarfsrcfiles-native depmodwrapper-cross kmod-native bc-native \ + bison-native make-native gperf-native pigz-native pbzip2-native ldconfig-native \ + xz-native makedevs-native alsa-lib-native perl-native qemu-native chrpath-native \ + kern-tools-native gmp-native libsdl2-native mesa-native virglrenderer-native \ + pixman-native texinfo-dummy-native python3-native python3-setuptools-native gettext-native \ + m4-native flex-native unifdef-native rsync-native init-system-helpers automake-native \ + autoconf-native libtool-native opkg-utils-native patch-native pkgconfig-native \ + init-system-helpers update-rc.d-native run-postinsts cmake-native ninja-native \ + cross-localedef-native nativesdk-glibc-locale nativesdk-qemuwrapper-cross gzip-native \ + parted-native gptfdisk-native dosfstools-native mtools-native meson-native ninja-native \ + bmap-tools-native openssl-native \ + " +PATCHTOOL = "patch" +TCMODE = "gcc-bin" +INHERIT_remove += "uninative" +PATCHDEPENDENCY_remove += "patch-replacement-native:do_populate_sysroot" +PREMIRRORS = "\ +bzr://.*/.* file:///${LOCAL_FILES} \n \ +cvs://.*/.* file:///${LOCAL_FILES} \n \ +git://.*/.* file:///${LOCAL_FILES} \n \ +hg://.*/.* file:///${LOCAL_FILES} \n \ +osc://.*/.* file:///${LOCAL_FILES} \n \ +p4://.*/.* file:///${LOCAL_FILES} \n \ +svn://.*/.* file:///${LOCAL_FILES} \n \ +ftp://.*/.* file:///${LOCAL_FILES} \n \ +http://.*/.* file:///${LOCAL_FILES} \n \ +https://.*/.* file:///${LOCAL_FILES} \n" + +# openEuler software package dir +# all openeEuler software packages will be downloaded by specific tool +# into this dir with the following format: +# +# busybox +# openssh +# ..... +OPENEULER_SP_DIR = "/usr1/openeuler/src/" + +# openEuler cross toolchain dir +# prebuilt toolchain with c library is used to build openEuler embedded +# distribution. The prebuilt toolchain should be downloaded and placed in +# OPENEULER_TOOLCHAIN_DIR with the following format: +# +# openeuler_gcc_arm64le +# openeuler_gcc_arm32le" +OPENEULER_TOOLCHAIN_DIR_aarch64 = "/usr1/openeuler/gcc/openeuler_gcc_arm64le" +OPENEULER_TOOLCHAIN_DIR_arm = "/usr1/openeuler/gcc/openeuler_gcc_arm32le" + +# default openeuler platform +OPENEULER_PLATFORM = "aarch64-std" +MACHINEOVERRIDES =. "${OPENEULER_PLATFORM}:" + +# add openeuler security flags +require conf/distro/include/security_flags.inc +require conf/distro/include/security_flags_openeuler.inc diff --git a/meta-openeuler/conf/machine/qemu-aarch64-common.inc b/meta-openeuler/conf/machine/qemu-aarch64-common.inc new file mode 100644 index 0000000000000000000000000000000000000000..dd032e0c6df4b6ef31bb96c1462eca286408f038 --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-aarch64-common.inc @@ -0,0 +1,23 @@ +# Description: Config for arm64 machine + +MACHINEOVERRIDES =. "march64:" +require conf/machine/qemu-common.inc + +# Different from arm32, here we use armv8a.inc instead +# of conf/machine/include/tune-cortexa53.inc because +# we are not sure our CPU is cortex a53. +require conf/machine/include/arm/arch-armv8a.inc + +# but we are sure in compat32 we should use -mcpu=cortexa9. +# This is may not correct, but to make sure compat32 and arm32 +# give same binary. +# Should not use conf/machine/include/tune-cortexa9.inc directly. +# In case when using compat32, we alert cflags with same way in tune-cortexa9.inc + +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', 'armv7a:', '' ,d)}" + +MACHINEOVERRIDES_remove_virtclass-multilib-lib32 =. "march64:" +MACHINEOVERRIDES_append_virtclass-multilib-lib32 =. "march32:" +TUNE_FEATURES_append_virtclass-multilib-lib32 += " cortexa9" +TUNE_FEATURES_remove_virtclass-multilib-lib32 += " vfp" diff --git a/meta-openeuler/conf/machine/qemu-aarch64.conf b/meta-openeuler/conf/machine/qemu-aarch64.conf new file mode 100644 index 0000000000000000000000000000000000000000..9abe74de24c507c1d93a071c5fe44006e990361f --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-aarch64.conf @@ -0,0 +1,21 @@ +# Description: Machine description for little-endian aarch64 + +MACHINEOVERRIDES =. "march64le:" +DEFAULTTUNE = "aarch64" +require conf/machine/qemu-aarch64-common.inc + +# arm and arm64 both support -mlittle-endian so no +# need to consider compat32. +TUNE_CCARGS .= " -mlittle-endian" + +DEFAULTTUNE_virtclass-multilib-lib32 = "armv7a" +PACKAGE_EXTRA_ARCHS_tune-armv7a += " armv7a" +PACKAGE_EXTRA_ARCHS_virtclass-multilib-lib32 = "armv7a" + +require conf/multilib.conf +# for qemu-aarch64,don't enable multilib lib32 support, +# by default everything is 64 bit +MULTILIBS ?= "" +DEFAULTTUNE_virtclass-multilib-ilp32 =. "aarch64_ilp32:" +export ROOTFS_PACKAGE_ARCH = "aarch64" +export ROOTFS_PACKAGE_ARCH_virtclass-multilib-lib32 = "armv7l" diff --git a/meta-openeuler/conf/machine/qemu-aarch64_be.conf b/meta-openeuler/conf/machine/qemu-aarch64_be.conf new file mode 100644 index 0000000000000000000000000000000000000000..40cbfc2f9e04489694f9fd50124e8bb9cf8399e4 --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-aarch64_be.conf @@ -0,0 +1,21 @@ +# Description: Machine description for little-endian aarch64 + +MACHINEOVERRIDES =. "march64be:bigendian:" +DEFAULTTUNE = "aarch64_be" +require conf/machine/qemu-aarch64-common.inc + +# See comments in qemu-aarch64.conf. No need +# to consider compat32 for -mbig-endian. +TUNE_CCARGS .= " -mbig-endian" + +COMPAT32_MACHINEOVERRIDES_DEL =. "march64be:" +COMPAT32_MACHINEOVERRIDES_ADD =. "march32be:" +COMPAT32_DEFAULTTUNE = "armv7ab" + +# See conf/machine/qemu-arm_be.conf +PACKAGE_EXTRA_ARCHS_tune-armv7ab += " armv7ab" +COMPAT32_PACKAGE_EXTRA_ARCHS = "armv7ab" + +COMPAT32_QA_REMOVE += "arch" + +COMPAT32_TUNE_FEATURES_APPEND += " rruarm" diff --git a/meta-openeuler/conf/machine/qemu-arm-common.inc b/meta-openeuler/conf/machine/qemu-arm-common.inc new file mode 100644 index 0000000000000000000000000000000000000000..41e617d0b25323c71bbaed064ae4b1668da784b9 --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-arm-common.inc @@ -0,0 +1,10 @@ +# Description: Conf for arm + +MACHINEOVERRIDES =. "march32:" +require conf/machine/qemu-common.inc +require conf/machine/include/arm/arch-armv7a.inc + +TUNE_FEATURES_append += " cortexa9" +TUNE_FEATURES_remove += " vfp" + +TUNE_CCARGS .= " -mno-unaligned-access" diff --git a/meta-openeuler/conf/machine/qemu-arm.conf b/meta-openeuler/conf/machine/qemu-arm.conf new file mode 100644 index 0000000000000000000000000000000000000000..0b66963006d056c63dbe422dedaf95c4868304c5 --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-arm.conf @@ -0,0 +1,8 @@ +# Description: Machine description for little-endian aarch64 + +MACHINEOVERRIDES =. "march32le:" +DEFAULTTUNE = "armv7a" +require conf/machine/qemu-arm-common.inc + +TUNE_CCARGS .= " -mlittle-endian" +export ROOTFS_PACKAGE_ARCH = "armv7l" diff --git a/meta-openeuler/conf/machine/qemu-arm_be.conf b/meta-openeuler/conf/machine/qemu-arm_be.conf new file mode 100644 index 0000000000000000000000000000000000000000..88149b3d3ccb9676c5e934af4f7d775c7240de3d --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-arm_be.conf @@ -0,0 +1,15 @@ +# Description: Machine description for little-endian aarch64 + +MACHINEOVERRIDES =. "march32be:bigendian:" +DEFAULTTUNE = "armv7ab" +require conf/machine/qemu-arm-common.inc + +# A bug in yocto misses armv7ab in +# PACKAGE_EXTRA_ARCHS_tune-armv7ab (but armv7ab-vfp is there). +PACKAGE_EXTRA_ARCHS_tune-armv7ab += " armv7ab" +TUNE_CCARGS .= " -mbig-endian" + +TUNE_FEATURES_append += ' rruarm' + +ERROR_QA_remove += 'arch' +WARN_QA_remove += 'arch' diff --git a/meta-openeuler/conf/machine/qemu-common.inc b/meta-openeuler/conf/machine/qemu-common.inc new file mode 100644 index 0000000000000000000000000000000000000000..89943981703a07060bb5dfa243401946accd6ade --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-common.inc @@ -0,0 +1,3 @@ +MACHINEOVERRIDES =. "eulermachine:" +KERNEL_IMAGETYPE ?= "zImage" +KERNEL_IMAGETYPE_FOR_MAKE ?= "zImage" diff --git a/meta-openeuler/conf/templateconf.cfg b/meta-openeuler/conf/templateconf.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7480a55b98705ae1376833b410765eaad11476be --- /dev/null +++ b/meta-openeuler/conf/templateconf.cfg @@ -0,0 +1 @@ +meta-poky/conf diff --git a/meta-openeuler/recipes-core/acl/acl/0001-test-patch-out-failing-bits.patch b/meta-openeuler/recipes-core/acl/acl/0001-test-patch-out-failing-bits.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba2ffee5d277675ed53e8d48439c6c8b9b476892 --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl/0001-test-patch-out-failing-bits.patch @@ -0,0 +1,63 @@ +From 9e08219e0e99ee2589cf35fa8d52cef3515accce Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 12 Dec 2019 15:47:49 +0100 +Subject: [PATCH] test: patch out failing bits + +I have confirmed on the host distro (Ubuntu 18.04) that they +fail as well; upstream probably haven't noticed because the +test is only executed under sudo. + +Upstream-Status: Inappropriate [disabling tests instead of fixing them properly] +Signed-off-by: Alexander Kanavin +--- + test/root/permissions.test | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/test/root/permissions.test b/test/root/permissions.test +index 8f8f825..21e8a95 100644 +--- a/test/root/permissions.test ++++ b/test/root/permissions.test +@@ -50,10 +50,6 @@ User daemon is a member in the owning group, which has only read access. + Verify this. + + $ su daemon +- $ cat f +- > root +- > bin +- + $ echo daemon >> f + >~ .*f: Permission denied$ + +@@ -146,8 +142,6 @@ the owning group, he should still have no write access. + $ setfacl -x g:daemon f + + $ su daemon +- $ echo daemon4 >> f +- >~ .*f: Permission denied$ + + + Change the owning group. The other permissions should now grant user +@@ -158,12 +152,6 @@ daemon write access. + + $ su daemon + $ echo daemon5 >> f +- $ cat f +- > root +- > bin +- > daemon +- > daemon2 +- > daemon5 + + + Verify that permissions in separate matching ACL entries do not +@@ -173,7 +161,6 @@ accumulate. + $ setfacl -m g:bin:r,g:daemon:w f + + $ su daemon +- $ : < f + $ : > f + $ : <> f + >~ .*f: Permission denied$ +-- +2.17.1 + diff --git a/meta-openeuler/recipes-core/acl/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch b/meta-openeuler/recipes-core/acl/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch new file mode 100644 index 0000000000000000000000000000000000000000..57ef0bb728cfdd305795f85f8109727869b49810 --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch @@ -0,0 +1,24 @@ +From 39d332a8801de5d9ef09dacb3dba85c208b7b2ad Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 12 Dec 2019 13:45:52 +0100 +Subject: [PATCH] tests: do not hardcode the build path into a helper library + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + test/Makemodule.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/Makemodule.am b/test/Makemodule.am +index 17d4927..015de7f 100644 +--- a/test/Makemodule.am ++++ b/test/Makemodule.am +@@ -30,7 +30,7 @@ EXTRA_DIST += \ + check_LTLIBRARIES = libtestlookup.la + + libtestlookup_la_SOURCES = test/test_passwd.c test/test_group.c +-libtestlookup_la_CFLAGS = -DBASEDIR=\"$(abs_srcdir)\" ++libtestlookup_la_CFLAGS = -DBASEDIR=\"/tmp/acl-ptest\" + libtestlookup_la_LDFLAGS = -rpath $(abs_builddir) + + AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH"; diff --git a/meta-openeuler/recipes-core/acl/acl/run-ptest b/meta-openeuler/recipes-core/acl/acl/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..43128233654d31b3577877ce21cb4344b3068fa9 --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh +# +#This script is used to run acl test suites + +#umask 077 + +mkdir -p /tmp/acl-ptest/test +cp test/test.* /tmp/acl-ptest/test + +make test-suite.log diff --git a/meta-openeuler/recipes-core/acl/acl_2.3.1.bb b/meta-openeuler/recipes-core/acl/acl_2.3.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..a285af482f69b7d6e0adae35e6a1b0554b8470ff --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl_2.3.1.bb @@ -0,0 +1,78 @@ +SUMMARY = "Utilities for managing POSIX Access Control Lists" +DESCRIPTION = "ACL allows you to provide different levels of access to files \ +and folders for different users." + +HOMEPAGE = "http://savannah.nongnu.org/projects/acl/" +BUGTRACKER = "http://savannah.nongnu.org/bugs/?group=acl" + +SECTION = "libs" + +LICENSE = "LGPLv2.1+ & GPLv2+" +LICENSE_${PN} = "GPLv2+" +LICENSE_lib${BPN} = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \ + file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764" + +DEPENDS = "attr" + +SRC_URI = "file://acl/acl-${PV}.tar.gz \ + file://run-ptest \ + file://0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch \ + file://0001-test-patch-out-failing-bits.patch \ + " + +SRC_URI[sha256sum] = "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af" + +inherit autotools gettext ptest + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" + +PTEST_BUILD_HOST_FILES = "builddefs" +PTEST_BUILD_HOST_PATTERN = "^RPM" + +do_compile_ptest() { + oe_runmake libtestlookup.la +} + +do_install_ptest() { + cp -rf ${S}/test/ ${D}${PTEST_PATH} + cp -rf ${S}/build-aux/ ${D}${PTEST_PATH} + mkdir -p ${D}${PTEST_PATH}/.libs + cp -rf ${B}/.libs/libtestlookup* ${D}${PTEST_PATH}/.libs + cp ${B}/Makefile ${D}${PTEST_PATH} + + sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -i ${D}${PTEST_PATH}/Makefile + + sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile + + rm ${D}${PTEST_PATH}/.libs/libtestlookup.lai +} + +RDEPENDS_${PN}-ptest = "acl \ + bash \ + coreutils \ + perl \ + perl-module-filehandle \ + perl-module-getopt-std \ + perl-module-posix \ + shadow \ + make \ + gawk \ + e2fsprogs-mke2fs \ + perl-module-cwd \ + perl-module-file-basename \ + perl-module-file-path \ + perl-module-file-spec \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/attr/attr.inc b/meta-openeuler/recipes-core/attr/attr.inc new file mode 100644 index 0000000000000000000000000000000000000000..134710da259b0f6a6bd0f809ac8036f25ac40bc1 --- /dev/null +++ b/meta-openeuler/recipes-core/attr/attr.inc @@ -0,0 +1,68 @@ +SUMMARY = "Utilities for manipulating filesystem extended attributes" +DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem." + +HOMEPAGE = "http://savannah.nongnu.org/projects/attr/" +SECTION = "libs" + +DEPENDS = "virtual/libintl" + +LICENSE = "LGPLv2.1+ & GPLv2+" +LICENSE_${PN} = "GPLv2+" +LICENSE_lib${BPN} = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \ + file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \ + file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \ + file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb" + +SRC_URI = "file://attr/attr-${PV}.tar.gz \ + file://attr/0001-bypass-wrong-output-when-enabled-selinux.patch \ + file://attr/0002-dont-skip-security.evm-when-copy-xattr.patch \ + file://run-ptest \ +" + +#inherit ptest update-alternatives autotools gettext +inherit autotools gettext ptest + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "setfattr" +ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr" + +PTEST_BUILD_HOST_FILES = "builddefs" +PTEST_BUILD_HOST_PATTERN = "^RPM" + +do_install_ptest() { + cp ${B}/Makefile ${D}${PTEST_PATH} + sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -i ${D}${PTEST_PATH}/Makefile + + sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile + cp -rf ${S}/build-aux/ ${D}${PTEST_PATH} + cp -rf ${S}/test/ ${D}${PTEST_PATH} +} + +RDEPENDS_${PN}-ptest = "attr \ + coreutils \ + perl-module-filehandle \ + perl-module-getopt-std \ + perl-module-posix \ + make \ + perl \ + gawk \ + perl-module-cwd \ + perl-module-file-basename \ + perl-module-file-path \ + perl-module-file-spec \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/attr/attr/run-ptest b/meta-openeuler/recipes-core/attr/attr/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..f64244f239390dd9a3c3e257ca1523c1a2efbf80 --- /dev/null +++ b/meta-openeuler/recipes-core/attr/attr/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make test-suite.log diff --git a/meta-openeuler/recipes-core/attr/attr_2.5.1.bb b/meta-openeuler/recipes-core/attr/attr_2.5.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..5c5f7bcffb4e40af3fde0f84e7eecb68647fb539 --- /dev/null +++ b/meta-openeuler/recipes-core/attr/attr_2.5.1.bb @@ -0,0 +1,5 @@ +require attr.inc + +SRC_URI[sha256sum] = "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/audit/audit_3.0.1.bb b/meta-openeuler/recipes-core/audit/audit_3.0.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..5bcc11f4e1a4655daf2c94fe406de377b2973863 --- /dev/null +++ b/meta-openeuler/recipes-core/audit/audit_3.0.1.bb @@ -0,0 +1,130 @@ +SUMMARY = "User space tools for kernel auditing" +DESCRIPTION = "The audit package contains the user space utilities for \ +storing and searching the audit records generated by the audit subsystem \ +in the Linux kernel." +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +SECTION = "base" +LICENSE = "GPLv2+ & LGPLv2+" + +#inherit autotools python3native update-rc.d systemd +inherit autotools + +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +SRC_URI = "file://audit/${BP}.tar.gz \ + file://audit/bugfix-audit-support-armv7b.patch \ + file://audit/bugfix-audit-userspace-missing-syscalls-for-aarm64.patch \ + file://audit/bugfix-audit-reload-coredump.patch \ + file://audit/backport-Fix-the-default-location-for-zos-remote.conf-171.patch \ + file://audit/backport-Add-missing-call-to-free_interpretation_list.patch \ + file://audit/backport-fix-2-more-issues-found-by-fuzzing.patch \ + file://audit/backport-Fix-an-auparse-memory-leak-caused-in-recent-glibc.patch \ + file://audit/backport-Fix-double-free-with-corrupted-logs.patch \ + file://audit/backport-Fix-the-closing-timing-of-audit_fd-166.patch \ + file://audit/backport-Fix-some-string-length-issues.patch \ + file://audit/backport-Move-the-free_config-to-success-path.patch \ + file://audit/backport-Check-for-fuzzer-induced-invalid-value.patch \ + file://audit/backport-error-out-if-log-is-mangled.patch \ + file://audit/backport-Dont-run-off-the-end-with-corrupt-logs.patch \ + file://audit/backport-Another-hardening-measure-for-corrupted-logs.patch \ + file://audit/backport-Fix-busy-loop-in-normalizer-when-logs-are-corrupt.patch \ + file://audit/backport-Better-fix-for-busy-loop-in-normalizer-when-logs-are.patch \ + file://audit/backport-flush-uid-gid-caches-when-user-group-added-deleted-m.patch \ + file://audit/backport-In-auditd-check-if-log_file-is-valid-before-closing-.patch \ + file://audit/backport-Check-ctime-return-code.patch \ + file://audit/backport-When-interpreting-if-val-is-NULL-return-an-empty-str.patch \ + file://audit/backport-auditd.service-Restart-on-failure-ignoring-some-exit.patch \ + file://audit/backport-0001-In-auditd-close-the-logging-file-descriptor-when-log.patch \ + file://audit/backport-0002-In-auditd-close-the-logging-file-descriptor-when-log.patch \ + file://auditd.conf \ + file://audit.rules \ +" + +UPDATERCPN = "auditd" +INITSCRIPT_NAME = "auditd" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_PACKAGES = "auditd" +SYSTEMD_SERVICE_auditd = "auditd.service" + +#DEPENDS += "libcap-ng linux-libc-headers libpam" +DEPENDS += "libcap-ng libpam" + +EXTRA_OECONF += " --enable-gssapi-krb5=no \ + --with-libcap-ng=yes \ + --with-python3=no \ + --libdir=${base_libdir} \ + --sbindir=${base_sbindir} \ + --without-python \ + --without-golang \ + --disable-zos-remote \ + --with-arm=yes \ + --with-aarch64=yes \ + " + +EXTRA_OECONF_append += "${@ " --build=x86_64-linux --host=${HOST_ARCH}-euler-linux --target=${HOST_ARCH}-euler-linux " if "${TCLIBC}"=="musl" else "" }" + +EXTRA_OEMAKE += " \ + STDINC='${STAGING_INCDIR}' \ + " + +UPDATERCD = "" + +SUMMARY_audispd-plugins = "Plugins for the audit event dispatcher" +DESCRIPTION_audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ +interface to the audit system, audispd. These plugins can do things \ +like relay events to remote machines or analyze events for suspicious \ +behavior." + +PACKAGES =+ "audispd-plugins" +PACKAGES += "auditd" + +FILES_${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*" +FILES_auditd += "${bindir}/* ${base_sbindir}/* ${sysconfdir}/* ${datadir}/audit/*" +FILES_audispd-plugins += "${sysconfdir}/audit/audisp-remote.conf \ + ${sysconfdir}/audit/plugins.d/au-remote.conf \ + ${sbindir}/audisp-remote ${localstatedir}/spool/audit \ + " +FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" +#FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" +FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la ${base_libdir}/pkgconfig/*" + +CONFFILES_auditd += "${sysconfdir}/audit/audit.rules" + +do_install_append() { + rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a + rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la + + # reuse auditd config + [ ! -e ${D}/etc/default ] && mkdir ${D}/etc/default + mv ${D}/etc/sysconfig/auditd ${D}/etc/default + rmdir ${D}/etc/sysconfig/ + + # replace init.d + install -D -m 0750 ${THISDIR}/files/auditd ${D}/etc/init.d/auditd + rm -rf ${D}/etc/rc.d + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${THISDIR}/files/auditd.service ${D}${systemd_unitdir}/system + + install -d ${D}${sysconfdir}/tmpfiles.d/ + install -m 0644 ${THISDIR}/files/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + fi + + # audit-2.5 doesn't install any rules by default, so we do that here + mkdir -p ${D}/etc/audit ${D}/etc/audit/rules.d + cp ${WORKDIR}/audit.rules ${D}/etc/audit/rules.d/audit.rules + cp ${WORKDIR}/auditd.conf ${D}/etc/audit/auditd.conf + + chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d + chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules + + # Based on the audit.spec "Copy default rules into place on new installation" + cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules + rm -rf ${D}/lib/pkgconfig +} + +do_install_append_arm() { + sed -i "/arch=b64/d" ${D}/etc/audit/audit.rules +} diff --git a/meta-openeuler/recipes-core/audit/files/audit-volatile.conf b/meta-openeuler/recipes-core/audit/files/audit-volatile.conf new file mode 100644 index 0000000000000000000000000000000000000000..9cbe1547a3e0814b875fad9e121b6ac49a3d6b78 --- /dev/null +++ b/meta-openeuler/recipes-core/audit/files/audit-volatile.conf @@ -0,0 +1 @@ +d /var/log/audit 0750 root root - diff --git a/meta-openeuler/recipes-core/audit/files/audit.rules b/meta-openeuler/recipes-core/audit/files/audit.rules new file mode 100644 index 0000000000000000000000000000000000000000..8b8f2e598282cba27c04da7034719dfa634f547e --- /dev/null +++ b/meta-openeuler/recipes-core/audit/files/audit.rules @@ -0,0 +1,65 @@ +### First rule - delete all +-D + +## Increase the buffers to survive stress events. +## Make this bigger for busy systems +-b 8192 + +## This determine how long to wait in burst of events +--backlog_wait_time 60000 + +## Set failure mode to syslog +-f 1 + +-a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change +-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change +-a always,exit -F arch=b32 -S clock_settime -S clock_settime -k time-change +-a always,exit -F arch=b64 -S clock_settime -k time-change +-w /etc/localtime -p wa -k time-change +-w /etc/group -p wa -k identity +-w /etc/passwd -p wa -k identity +-w /etc/gshadow -p wa -k identity +-w /etc/shadow -p wa -k identity +-w /etc/security/opasswd -p wa -k identity +-a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale +-a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale +-w /etc/issue -p wa -k system-locale +-w /etc/issue.net -p wa -k system-locale +-w /etc/hosts -p wa -k system-locale +-w /etc/network -p wa -k system-locale +#-w /etc/sysconfig/network -p wa -k system-locale +#-w /etc/sysconfig/network-scripts -p wa -k system-locale +-w /etc/selinux/ -p wa -k MAC-policy +-w /var/log/lastlog -p wa -k logins +-w /var/log/tallylog -p wa -k logins +-w /var/log/btmp -p wa -k session +-w /var/log/faillog2 -p wa -k logins +-w /var/run/utmp -p wa -k session +-w /var/log/wtmp -p wa -k session +-a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid!=4294967295 -k perm_mod +-a always,exit -F arch=b64 -S fchmod -S fchmodat -F auid!=4294967295 -k perm_mod +-a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -S lchown32 -S fchown32 -S chown32 -F auid!=4294967295 -k perm_mod +-a always,exit -F arch=b64 -S fchown -S fchownat -F auid!=4294967295 -k perm_mod +-a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid!=4294967295 -k perm_mod +-a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid!=4294967295 -k perm_mod +-a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -S truncate64 -F exit=-EACCES -F auid!=4294967295 -k access +-a always,exit -F arch=b64 -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid!=4294967295 -k access +-a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -S truncate64 -F exit=-EPERM -F auid!=4294967295 -k access +-a always,exit -F arch=b64 -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid!=4294967295 -k access +-a always,exit -F path=/sbin/mount.nfs -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/bin/su -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/sbin/ifenslave -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/bin/traceroute6 -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/sbin/unix_chkpwd -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/bin/su -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/bin/passwd -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/bin/crontab -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/libexec/ssh-keysign -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/bin/ping6 -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/usr/bin/lsof -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/bin/mount -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F path=/bin/umount -F perm=x -F auid!=4294967295 -k privileged +-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -S rmdir -F auid!=4294967295 -k delete +-a always,exit -F arch=b64 -S unlinkat -S renameat -S renameat2 -F auid>=500 -F auid!=4294967295 -k delete +-w /etc/sudoers -p wa -k scope +-e 2 diff --git a/meta-openeuler/recipes-core/audit/files/auditd b/meta-openeuler/recipes-core/audit/files/auditd new file mode 100644 index 0000000000000000000000000000000000000000..938dd8892f3664a4a7c65547fd734e48c7171486 --- /dev/null +++ b/meta-openeuler/recipes-core/audit/files/auditd @@ -0,0 +1,158 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: auditd +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Audit Daemon +# Description: Collects audit information from Linux 2.6 Kernels. +### END INIT INFO + +# Author: Philipp Matthias Hahn +# Based on Debians /etc/init.d/skeleton and Auditds init.d/auditd.init + +# June, 2012: Adopted for yocto + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="audit daemon" +NAME=auditd +DAEMON=/sbin/auditd +PIDFILE=/var/run/"$NAME".pid +SCRIPTNAME=/etc/init.d/"$NAME" + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/"$NAME" ] && . /etc/default/"$NAME" + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon -K --quiet --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null \ + && return 1 + start-stop-daemon -S --quiet --pidfile "$PIDFILE" --exec "$DAEMON" -- \ + $EXTRAOPTIONS \ + || return 2 + if [ -f /etc/audit/audit.rules ] + then + /sbin/auditctl -R /etc/audit/audit.rules >/dev/null + fi +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon -K --quiet --pidfile "$PIDFILE" --name "$NAME" + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f "$PIDFILE" + rm -f /var/run/audit_events + # Remove watches so shutdown works cleanly + case "$AUDITD_CLEAN_STOP" in + no|NO) ;; + *) /sbin/auditctl -D >/dev/null ;; + esac + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +if [ ! -e /var/log/audit ]; then + mkdir -p /var/log/audit + [ -x /sbin/restorecon ] && /sbin/restorecon -F $(readlink -f /var/log/audit) +fi + +case "$1" in + start) + [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && echo 0 ;; + 2) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && echo 0 ;; + 2) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + reload|force-reload) + echo "Reloading $DESC" "$NAME" + do_reload + echo $? + ;; + restart) + echo "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + for i in $(seq 1 10) + do + ps aux | grep -w $DAEMON | grep -vw grep > /dev/null + if [ $? -ne 0 ]; then + break + else + sleep 1 + fi + done + do_start + case "$?" in + 0) echo 0 ;; + 1) echo 1 ;; # Old process is still running + *) echo 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + echo 1 + ;; + esac + ;; + rotate) + echo "Rotating $DESC logs" "$NAME" + start-stop-daemon -K --signal USR1 --quiet --pidfile "$PIDFILE" --name "$NAME" + echo $? + ;; + status) + pidofproc "$DAEMON" >/dev/null + status=$? + if [ $status -eq 0 ]; then + echo "$NAME is running." + else + echo "$NAME is not running." + fi + exit $status + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|rotate|status}" >&2 + exit 3 + ;; +esac + +: diff --git a/meta-openeuler/recipes-core/audit/files/auditd.conf b/meta-openeuler/recipes-core/audit/files/auditd.conf new file mode 100644 index 0000000000000000000000000000000000000000..5cf17b868b5beb145939690b3b08a463a99c59f0 --- /dev/null +++ b/meta-openeuler/recipes-core/audit/files/auditd.conf @@ -0,0 +1,40 @@ +# +# This file controls the configuration of the audit daemon +# + +local_events = yes +write_logs = yes +log_file = /var/log/audit/audit.log +log_group = root +log_format = ENRICHED +flush = INCREMENTAL_ASYNC +freq = 50 +max_log_file = 5 +num_logs = 5 +priority_boost = 4 +name_format = NONE +##name = mydomain +max_log_file_action = ROTATE +space_left = 2 +space_left_action = SYSLOG +verify_email = yes +action_mail_acct = root +admin_space_left = 1 +admin_space_left_action = SUSPEND +disk_full_action = SUSPEND +disk_error_action = SUSPEND +use_libwrap = yes +##tcp_listen_port = 60 +tcp_listen_queue = 5 +tcp_max_per_addr = 1 +##tcp_client_ports = 1024-65535 +tcp_client_max_idle = 0 +transport = TCP +krb5_principal = auditd +##krb5_key_file = /etc/audit/audit.key +distribute_network = no +q_depth = 400 +overflow_action = SYSLOG +max_restarts = 10 +plugin_dir = /etc/audit/plugins.d +log_format = RAW diff --git a/meta-openeuler/recipes-core/audit/files/auditd.service b/meta-openeuler/recipes-core/audit/files/auditd.service new file mode 100644 index 0000000000000000000000000000000000000000..10ca9f0f0ee57e65863fa91cc957eda85d8ae187 --- /dev/null +++ b/meta-openeuler/recipes-core/audit/files/auditd.service @@ -0,0 +1,29 @@ +[Unit] +Description=Security Auditing Service +DefaultDependencies=no +After=local-fs.target systemd-tmpfiles-setup.service +Before=sysinit.target shutdown.target +Conflicts=shutdown.target +ConditionKernelCommandLine=!audit=0 + +[Service] +Type=forking +PIDFile=/run/auditd.pid +ExecStart=/sbin/auditd +## To use augenrules, uncomment the next line and comment/delete the auditctl line. +## NOTE: augenrules expect any rules to be added to /etc/audit/rules.d/ +#ExecStartPost=-/sbin/augenrules --load +ExecStartPost=-/sbin/auditctl -R /etc/audit/audit.rules +ExecReload=/bin/kill -HUP $MAINPID +# By default we don't clear the rules on exit. +# To enable this, uncomment the next line. +#ExecStopPost=/sbin/auditctl -R /etc/audit/audit-stop.rules + +### Security Settings ### +MemoryDenyWriteExecute=true +LockPersonality=true +ProtectControlGroups=true +ProtectKernelModules=true + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/bind/bind/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch b/meta-openeuler/recipes-core/bind/bind/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch new file mode 100644 index 0000000000000000000000000000000000000000..b088f54cdf45cc3702188430afbb65207089bc69 --- /dev/null +++ b/meta-openeuler/recipes-core/bind/bind/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch @@ -0,0 +1,37 @@ +From 7278f2529a4f811db8f1d7f5f4e36402986a4470 Mon Sep 17 00:00:00 2001 +From: Mark Andrews +Date: Mon, 23 Dec 2019 07:37:13 +1100 +Subject: [PATCH] revert d10fbdec for lib/dns/gen.c as it is a build platform + executable + +--- + lib/dns/gen.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/dns/gen.c b/lib/dns/gen.c +index 99f0395b3a..6c6e55d4c6 100644 +--- a/lib/dns/gen.c ++++ b/lib/dns/gen.c +@@ -26,8 +26,6 @@ + + #include + +-#include +- + #include + #include + #include +@@ -39,6 +37,10 @@ + #include + #include + ++#ifndef PATH_MAX ++#define PATH_MAX 1024 ++#endif ++ + #ifdef WIN32 + #include "gen-win32.h" + #else +-- +2.12.3 + diff --git a/meta-openeuler/recipes-core/bind/bind/bind9 b/meta-openeuler/recipes-core/bind/bind/bind9 new file mode 100644 index 0000000000000000000000000000000000000000..968679ff7f7adc4b50c17e5d849a0941eae82664 --- /dev/null +++ b/meta-openeuler/recipes-core/bind/bind/bind9 @@ -0,0 +1,2 @@ +# startup options for the server +OPTIONS="-u bind" diff --git a/meta-openeuler/recipes-core/bind/bind/conf.patch b/meta-openeuler/recipes-core/bind/bind/conf.patch new file mode 100644 index 0000000000000000000000000000000000000000..aad345f9fcfdfe000e41189cc14b69b6eb0dd637 --- /dev/null +++ b/meta-openeuler/recipes-core/bind/bind/conf.patch @@ -0,0 +1,330 @@ +Upstream-Status: Inappropriate [configuration] + +the patch is imported from openembedded project + +11/30/2010 - Qing He + +diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0 +--- bind-9.3.1.orig/conf/db.0 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/db.0 2005-07-10 22:14:00.000000000 +0200 +@@ -0,0 +1,12 @@ ++; ++; BIND reverse data file for broadcast zone ++; ++$TTL 604800 ++@ IN SOA localhost. root.localhost. ( ++ 1 ; Serial ++ 604800 ; Refresh ++ 86400 ; Retry ++ 2419200 ; Expire ++ 604800 ) ; Negative Cache TTL ++; ++@ IN NS localhost. +diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127 +--- bind-9.3.1.orig/conf/db.127 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/db.127 2005-07-10 22:14:00.000000000 +0200 +@@ -0,0 +1,13 @@ ++; ++; BIND reverse data file for local loopback interface ++; ++$TTL 604800 ++@ IN SOA localhost. root.localhost. ( ++ 1 ; Serial ++ 604800 ; Refresh ++ 86400 ; Retry ++ 2419200 ; Expire ++ 604800 ) ; Negative Cache TTL ++; ++@ IN NS localhost. ++1.0.0 IN PTR localhost. +diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty +--- bind-9.3.1.orig/conf/db.empty 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/db.empty 2005-07-10 22:14:00.000000000 +0200 +@@ -0,0 +1,14 @@ ++; BIND reverse data file for empty rfc1918 zone ++; ++; DO NOT EDIT THIS FILE - it is used for multiple zones. ++; Instead, copy it, edit named.conf, and use that copy. ++; ++$TTL 86400 ++@ IN SOA localhost. root.localhost. ( ++ 1 ; Serial ++ 604800 ; Refresh ++ 86400 ; Retry ++ 2419200 ; Expire ++ 86400 ) ; Negative Cache TTL ++; ++@ IN NS localhost. +diff -urN bind-9.3.1.orig/conf/db.255 bind-9.3.1/conf/db.255 +--- bind-9.3.1.orig/conf/db.255 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/db.255 2005-07-10 22:14:00.000000000 +0200 +@@ -0,0 +1,12 @@ ++; ++; BIND reserve data file for broadcast zone ++; ++$TTL 604800 ++@ IN SOA localhost. root.localhost. ( ++ 1 ; Serial ++ 604800 ; Refresh ++ 86400 ; Retry ++ 2419200 ; Expire ++ 604800 ) ; Negative Cache TTL ++; ++@ IN NS localhost. +diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local +--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200 +@@ -0,0 +1,13 @@ ++; ++; BIND data file for local loopback interface ++; ++$TTL 604800 ++@ IN SOA localhost. root.localhost. ( ++ 1 ; Serial ++ 604800 ; Refresh ++ 86400 ; Retry ++ 2419200 ; Expire ++ 604800 ) ; Negative Cache TTL ++; ++@ IN NS localhost. ++@ IN A 127.0.0.1 +diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root +--- bind-9.3.1.orig/conf/db.root 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/db.root 2005-07-10 22:14:00.000000000 +0200 +@@ -0,0 +1,45 @@ ++ ++; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net. ++;; global options: printcmd ++;; Got answer: ++;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944 ++;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 ++ ++;; QUESTION SECTION: ++;. IN NS ++ ++;; ANSWER SECTION: ++. 518400 IN NS A.ROOT-SERVERS.NET. ++. 518400 IN NS B.ROOT-SERVERS.NET. ++. 518400 IN NS C.ROOT-SERVERS.NET. ++. 518400 IN NS D.ROOT-SERVERS.NET. ++. 518400 IN NS E.ROOT-SERVERS.NET. ++. 518400 IN NS F.ROOT-SERVERS.NET. ++. 518400 IN NS G.ROOT-SERVERS.NET. ++. 518400 IN NS H.ROOT-SERVERS.NET. ++. 518400 IN NS I.ROOT-SERVERS.NET. ++. 518400 IN NS J.ROOT-SERVERS.NET. ++. 518400 IN NS K.ROOT-SERVERS.NET. ++. 518400 IN NS L.ROOT-SERVERS.NET. ++. 518400 IN NS M.ROOT-SERVERS.NET. ++ ++;; ADDITIONAL SECTION: ++A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4 ++B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201 ++C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12 ++D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90 ++E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10 ++F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241 ++G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4 ++H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53 ++I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17 ++J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30 ++K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129 ++L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12 ++M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33 ++ ++;; Query time: 81 msec ++;; SERVER: 198.41.0.4#53(a.root-servers.net.) ++;; WHEN: Sun Feb 1 11:27:14 2004 ++;; MSG SIZE rcvd: 436 ++ +diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf +--- bind-9.3.1.orig/conf/named.conf 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/named.conf 2005-07-10 22:33:46.000000000 +0200 +@@ -0,0 +1,49 @@ ++// This is the primary configuration file for the BIND DNS server named. ++// ++// If you are just adding zones, please do that in /etc/bind/named.conf.local ++ ++include "/etc/bind/named.conf.options"; ++ ++// prime the server with knowledge of the root servers ++zone "." { ++ type hint; ++ file "/etc/bind/db.root"; ++}; ++ ++// be authoritative for the localhost forward and reverse zones, and for ++// broadcast zones as per RFC 1912 ++ ++zone "localhost" { ++ type master; ++ file "/etc/bind/db.local"; ++}; ++ ++zone "127.in-addr.arpa" { ++ type master; ++ file "/etc/bind/db.127"; ++}; ++ ++zone "0.in-addr.arpa" { ++ type master; ++ file "/etc/bind/db.0"; ++}; ++ ++zone "255.in-addr.arpa" { ++ type master; ++ file "/etc/bind/db.255"; ++}; ++ ++// zone "com" { type delegation-only; }; ++// zone "net" { type delegation-only; }; ++ ++// From the release notes: ++// Because many of our users are uncomfortable receiving undelegated answers ++// from root or top level domains, other than a few for whom that behaviour ++// has been trusted and expected for quite some length of time, we have now ++// introduced the "root-delegations-only" feature which applies delegation-only ++// logic to all top level domains, and to the root domain. An exception list ++// should be specified, including "MUSEUM" and "DE", and any other top level ++// domains from whom undelegated responses are expected and trusted. ++// root-delegation-only exclude { "DE"; "MUSEUM"; }; ++ ++include "/etc/bind/named.conf.local"; +diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local +--- bind-9.3.1.orig/conf/named.conf.local 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/named.conf.local 2005-07-10 22:14:06.000000000 +0200 +@@ -0,0 +1,8 @@ ++// ++// Do any local configuration here ++// ++ ++// Consider adding the 1918 zones here, if they are not used in your ++// organization ++//include "/etc/bind/zones.rfc1918"; ++ +diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.options +--- bind-9.3.1.orig/conf/named.conf.options 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/named.conf.options 2005-07-10 22:14:06.000000000 +0200 +@@ -0,0 +1,24 @@ ++options { ++ directory "/var/cache/bind"; ++ ++ // If there is a firewall between you and nameservers you want ++ // to talk to, you might need to uncomment the query-source ++ // directive below. Previous versions of BIND always asked ++ // questions using port 53, but BIND 8.1 and later use an unprivileged ++ // port by default. ++ ++ // query-source address * port 53; ++ ++ // If your ISP provided one or more IP addresses for stable ++ // nameservers, you probably want to use them as forwarders. ++ // Uncomment the following block, and insert the addresses replacing ++ // the all-0's placeholder. ++ ++ // forwarders { ++ // 0.0.0.0; ++ // }; ++ ++ auth-nxdomain no; # conform to RFC1035 ++ ++}; ++ +diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918 +--- bind-9.3.1.orig/conf/zones.rfc1918 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/conf/zones.rfc1918 2005-07-10 22:14:10.000000000 +0200 +@@ -0,0 +1,20 @@ ++zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++ ++zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; ++ ++zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; +diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d +--- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100 ++++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200 +@@ -0,0 +1,70 @@ ++#!/bin/sh ++ ++PATH=/sbin:/bin:/usr/sbin:/usr/bin ++ ++# for a chrooted server: "-u bind -t /var/lib/named" ++# Don't modify this line, change or create /etc/default/bind9. ++OPTIONS="" ++ ++test -f /etc/default/bind9 && . /etc/default/bind9 ++ ++test -x /usr/sbin/rndc || exit 0 ++ ++case "$1" in ++ start) ++ echo -n "Starting domain name service: named" ++ ++ modprobe capability >/dev/null 2>&1 || true ++ if [ ! -f /etc/bind/rndc.key ]; then ++ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom ++ chmod 0640 /etc/bind/rndc.key ++ fi ++ if [ -f /var/run/named/named.pid ]; then ++ ps `cat /var/run/named/named.pid` > /dev/null && exit 1 ++ fi ++ ++ # dirs under /var/run can go away on reboots. ++ mkdir -p /var/run/named ++ mkdir -p /var/cache/bind ++ chmod 775 /var/run/named ++ chown root:bind /var/run/named >/dev/null 2>&1 || true ++ ++ if [ ! -x /usr/sbin/named ]; then ++ echo "named binary missing - not starting" ++ exit 1 ++ fi ++ if start-stop-daemon --start --quiet --exec /usr/sbin/named \ ++ --pidfile /var/run/named/named.pid -- $OPTIONS; then ++ if [ -x /sbin/resolvconf ] ; then ++ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo ++ fi ++ fi ++ echo "." ++ ;; ++ ++ stop) ++ echo -n "Stopping domain name service: named" ++ if [ -x /sbin/resolvconf ]; then ++ /sbin/resolvconf -d lo ++ fi ++ /usr/sbin/rndc stop >/dev/null 2>&1 ++ echo "." ++ ;; ++ ++ reload) ++ /usr/sbin/rndc reload ++ ;; ++ ++ restart|force-reload) ++ $0 stop ++ sleep 2 ++ $0 start ++ ;; ++ ++ *) ++ echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2 ++ exit 1 ++ ;; ++esac ++ ++exit 0 diff --git a/meta-openeuler/recipes-core/bind/bind/generate-rndc-key.sh b/meta-openeuler/recipes-core/bind/bind/generate-rndc-key.sh new file mode 100644 index 0000000000000000000000000000000000000000..633e29c0e6157f465f22b0c9577b7813ccc6b6b1 --- /dev/null +++ b/meta-openeuler/recipes-core/bind/bind/generate-rndc-key.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ ! -s /etc/bind/rndc.key ]; then + echo -n "Generating /etc/bind/rndc.key:" + /usr/sbin/rndc-confgen -a -b 512 + chown root:bind /etc/bind/rndc.key + chmod 0640 /etc/bind/rndc.key +fi diff --git a/meta-openeuler/recipes-core/bind/bind/named.service b/meta-openeuler/recipes-core/bind/bind/named.service new file mode 100644 index 0000000000000000000000000000000000000000..cda56ef0150c3ecffa65ef212de3ee622fbc8e51 --- /dev/null +++ b/meta-openeuler/recipes-core/bind/bind/named.service @@ -0,0 +1,22 @@ +[Unit] +Description=Berkeley Internet Name Domain (DNS) +Wants=nss-lookup.target +Before=nss-lookup.target +After=network.target + +[Service] +Type=forking +EnvironmentFile=-/etc/default/bind9 +PIDFile=/run/named/named.pid + +ExecStartPre=@SBINDIR@/generate-rndc-key.sh +ExecStart=@SBINDIR@/named $OPTIONS + +ExecReload=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc reload > /dev/null 2>&1 || @BASE_BINDIR@/kill -HUP $MAINPID' + +ExecStop=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc stop > /dev/null 2>&1 || @BASE_BINDIR@/kill -TERM $MAINPID' + +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/bind/bind_9.11.14.bb b/meta-openeuler/recipes-core/bind/bind_9.11.14.bb new file mode 100644 index 0000000000000000000000000000000000000000..027035d6137c8cab6bf0ce369bc3c22474de6f52 --- /dev/null +++ b/meta-openeuler/recipes-core/bind/bind_9.11.14.bb @@ -0,0 +1,132 @@ +SUMMARY = "ISC Internet Domain Name Server" +HOMEPAGE = "https://www.isc.org/bind/" +DESCRIPTION = "BIND 9 provides a full-featured Domain Name Server system" +SECTION = "console/network" + +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e" + +DEPENDS = "openssl libcap zlib" + +SRC_URI = "file://dhcp/dhcp-4.4.2.tar.gz \ + file://0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch \ + file://conf.patch \ + file://named.service \ + file://bind9 \ + file://generate-rndc-key.sh \ + " + +SRC_URI[sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" + +UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" +# stay at 9.16 follow the ESV versions divisible by 4 +UPSTREAM_CHECK_REGEX = "(?P9.(16|20|24|28)(\.\d+)+(-P\d+)*)/" + +inherit autotools systemd pkgconfig multilib_header + +# PACKAGECONFIGs readline and libedit should NOT be set at same time +PACKAGECONFIG ?= "readline" +PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2" +PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" +PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" +PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," +PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native," + +EXTRA_OECONF = " --with-libtool --disable-devpoll --enable-epoll \ + --with-gssapi=no --with-lmdb=no --with-zlib \ + --with-ecdsa=yes --with-eddsa=no --with-gost=no \ + --sysconfdir=${sysconfdir}/bind \ + --with-openssl=${STAGING_DIR_HOST}${prefix} \ + " +LDFLAGS_append = " -lz" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)} + +# dhcp needs .la so keep them +REMOVE_LIBTOOL_LA = "0" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \ + --user-group bind" + +INITSCRIPT_NAME = "bind" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_SERVICE_${PN} = "named.service" + +do_unpak () { + cd ${WORKDIR} + tar -xf dhcp-4.4.2/bind/bind.tar.gz +} + +addtask unpak after do_unpack before do_patch + +do_install_append() { + + rmdir "${D}${localstatedir}/run" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + install -d bind "${D}${localstatedir}/cache/bind" + install -d "${D}${sysconfdir}/bind" + install -d "${D}${sysconfdir}/init.d" + install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" + install -m 750 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" + if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then + sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage \ + ${D}${sbindir}/dnssec-checkds \ + ${D}${sbindir}/dnssec-keymgr + fi + + # Install systemd related files + install -d ${D}${sbindir} + install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_unitdir}/system/named.service + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf + fi + + oe_multilib_header isc/platform.h +} + +CONFFILES_${PN} = " \ + ${sysconfdir}/bind/named.conf \ + ${sysconfdir}/bind/named.conf.local \ + ${sysconfdir}/bind/named.conf.options \ + ${sysconfdir}/bind/db.0 \ + ${sysconfdir}/bind/db.127 \ + ${sysconfdir}/bind/db.empty \ + ${sysconfdir}/bind/db.local \ + ${sysconfdir}/bind/db.root \ + " + +ALTERNATIVE_${PN}-utils = "nslookup" +ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup" +ALTERNATIVE_PRIORITY = "100" + +PACKAGE_BEFORE_PN += "${PN}-utils" +FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate" +FILES_${PN}-dev += "${bindir}/isc-config.h" +FILES_${PN} += "${sbindir}/generate-rndc-key.sh" + +PACKAGE_BEFORE_PN += "${PN}-libs" +# special arrangement below due to +# https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88 +FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so" +FILES_${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so" +FILES_${PN}-staticdev += "${libdir}/*.la" + +PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}" +FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \ + ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}" + +RDEPENDS_${PN}-dev = "" +RDEPENDS_python3-bind = "python3-core python3-ply" diff --git a/meta-openeuler/recipes-core/busybox/busybox_1.34.1.bb b/meta-openeuler/recipes-core/busybox/busybox_1.34.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..2e631d158ce2b8dc5b86d9c085dde75761c2c9b5 --- /dev/null +++ b/meta-openeuler/recipes-core/busybox/busybox_1.34.1.bb @@ -0,0 +1,129 @@ +SUMMARY = "Tiny versions of many common UNIX utilities in a single small executable" +DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete POSIX environment for any small or embedded system." +HOMEPAGE = "https://www.busybox.net" +BUGTRACKER = "https://bugs.busybox.net/" +SECTION = "base" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +INHIBIT_DEFAULT_DEPS = "1" +PR = "r1" + +DEPENDS += "virtual/libc" +DEPENDS += "libtirpc" +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +#get arch info +inherit kernel-arch + +SRC_URI = "file://busybox/${BP}.tar.bz2 \ + file://yocto-embedded-tools/config/arm64/defconfig-busybox \ +" + +S = "${WORKDIR}/${BP}" + +#not split debug files with dwarfsrcfiles,no dwarfsrcfiles +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +# Whether to split the suid apps into a seperate binary +BUSYBOX_SPLIT_SUID ?= "1" + +export EXTRA_CFLAGS = "${CFLAGS}" +export EXTRA_LDFLAGS = "${LDFLAGS}" + +EXTRA_OEMAKE = "CC='${CC}' V=1 ARCH=${ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'" +#use host pkg-config add by openeuler +EXTRA_OECONF += "PKG_CONFIG=pkg-config" +EXTRA_OEMAKE += "PKG_CONFIG=pkg-config" + +PACKAGES =+ "${PN}-linuxrc ${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock \ + ${PN}-less ${PN}-sed ${PN}-pciutils ${PN}-grep ${PN}-cronie ${PN}-gzip ${PN}-kmod ${PN}-procps \ +" +FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" +FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" +FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" +FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" +FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" +FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" +FILES_${PN}-linuxrc = "/linuxrc /init" +PACKAGES =+ "${PN}-bash ${PN}-login ${PN}-groups" +FILES_${PN}-bash = "${base_bindir}/bash" +FILES_${PN}-login = "${base_bindir}/login" +FILES_${PN}-groups = "${bindir}/groups" +FILES_${PN}-less = "${bindir}/less" +FILES_${PN}-sed="${base_bindir}/sed" +FILES_${PN}-pciutils="${bindir}/lspci" +FILES_${PN}-grep="${base_bindir}/*grep" +FILES_${PN}-cronie="${bindir}/crontab ${sbindir}/crond" +FILES_${PN}-gzip="${base_bindir}/gunzip ${base_bindir}/gzip ${base_bindir}/zcat" +FILES_${PN}-kmod="${base_sbindir}/mod* ${base_sbindir}/depmod ${base_sbindir}/insmod ${base_sbindir}/rmmod" +FILES_${PN}-procps = "${base_bindir}/kill ${base_bindir}/ps ${base_bindir}/pidof ${base_sbindir}/sysctl \ + ${bindir}/free ${bindir}/pkill ${bindir}/top ${bindir}/uptime \ +" + +INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock" + +INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" +INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" +INITSCRIPT_NAME_${PN}-mdev = "mdev" +INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ." +INITSCRIPT_NAME_${PN}-syslog = "syslog" +INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" +INITSCRIPT_NAME_${PN}-initrc = "initrc" + +SYSTEMD_PACKAGES = "${PN}-syslog" +SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}" + +RDEPENDS_${PN}-syslog = "busybox" +CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf" +RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng" + +CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" + +RRECOMMENDS_${PN} = "${PN}-udhcpc" + +RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}" + +do_configure() { + cp ../yocto-embedded-tools/config/arm64/defconfig-busybox .config + set +e + grep -E '^CONFIG_FEATURE_MOUNT_NFS=y|^CONFIG_FEATURE_INETD_RPC=y' .config + ret=$? + if [ $ret -eq 0 ]; then + grep -E '^CONFIG_EXTRA_CFLAGS=".*-I/usr/include/tirpc|^CONFIG_EXTRA_LDLIBS=".*tirpc' .config + ret=$? + if [ $ret -ne 0 ]; then + sed -i 's/^CONFIG_EXTRA_CFLAGS="/CONFIG_EXTRA_CFLAGS="-I\/usr\/include\/tirpc /g' .config + sed -i 's/^CONFIG_EXTRA_LDLIBS="/CONFIG_EXTRA_LDLIBS="tirpc /g' .config + fi + fi + set -e + yes '' | oe_runmake oldconfig +} + +do_compile () { + export KCONFIG_NOTIMESTAMP=1 + if [ -e .config.orig ]; then + # Need to guard again an interrupted do_compile - restore any backup + cp .config.orig .config + fi + cp .config .config.orig + + for s in suid nosuid; do + oe_runmake busybox_unstripped + mv busybox_unstripped busybox.$s + oe_runmake busybox.links + sort busybox.links > busybox.links.$s + rm busybox.links + done + cp .config.orig .config +} + +do_install () { + oe_runmake CONFIG_PREFIX="${D}" install + pushd "${D}" + ln -s bin/busybox init + popd +} + +INSANE_SKIP += "already-stripped" diff --git a/meta-openeuler/recipes-core/bzip2/bzip2/Makefile.am b/meta-openeuler/recipes-core/bzip2/bzip2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..7338df03ebe74d5cf47dc67b627fe8bbcf3021cc --- /dev/null +++ b/meta-openeuler/recipes-core/bzip2/bzip2/Makefile.am @@ -0,0 +1,74 @@ + +lib_LTLIBRARIES = libbz2.la +libbz2_la_LDFLAGS = -version-info 1:6:0 + +libbz2_la_SOURCES = blocksort.c \ + huffman.c \ + crctable.c \ + randtable.c \ + compress.c \ + decompress.c \ + bzlib.c + +bin_PROGRAMS = bzip2 bzip2recover + +bzip2_SOURCES = bzip2.c +bzip2_LDADD = libbz2.la +bzip2_DEPENDENCIES = libbz2.la + +include_HEADERS = bzlib.h + +bzip2recover_SOURCES = bzip2recover.c +bzip2recover_LDADD = libbz2.la +bzip2recover_DEPENDENCIES = libbz2.la + +bin_SCRIPTS = bzgrep bzmore bzdiff + +man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 +EXTRA_DIST = $(man_MANS) + +runtest: + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 + ./bzip2 -d < sample1.bz2 > sample1.tst + ./bzip2 -d < sample2.bz2 > sample2.tst + ./bzip2 -ds < sample3.bz2 > sample3.tst + @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\ + else echo "FAIL: sample1 compress"; fi + @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\ + else echo "FAIL: sample2 compress"; fi + @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\ + else echo "FAIL: sample3 compress"; fi + @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\ + else echo "FAIL: sample1 decompress"; fi + @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\ + else echo "FAIL: sample2 decompress"; fi + @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\ + else echo "FAIL: sample3 decompress"; fi + ./bzip2-tests/run-tests.sh --without-valgrind --tests-dir="$(PWD)/bzip2-tests" + +install-ptest: + sed -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \ + $(srcdir)/Makefile.am > $(DESTDIR)/Makefile + cp $(srcdir)/sample1.ref $(DESTDIR)/ + cp $(srcdir)/sample2.ref $(DESTDIR)/ + cp $(srcdir)/sample3.ref $(DESTDIR)/ + cp $(srcdir)/sample1.bz2 $(DESTDIR)/ + cp $(srcdir)/sample2.bz2 $(DESTDIR)/ + cp $(srcdir)/sample3.bz2 $(DESTDIR)/ + ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2 + +install-exec-hook: + ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT) + ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT) + ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT) + ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT) + ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT) + ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT) + +install-data-hook: + echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1 + echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1 + echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1 + echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1 diff --git a/meta-openeuler/recipes-core/bzip2/bzip2/configure.ac b/meta-openeuler/recipes-core/bzip2/bzip2/configure.ac new file mode 100644 index 0000000000000000000000000000000000000000..b8abade2d960fc920bc292b2d4f862a3c74b7c0e --- /dev/null +++ b/meta-openeuler/recipes-core/bzip2/bzip2/configure.ac @@ -0,0 +1,11 @@ +AC_PREREQ([2.57]) + +AC_INIT(bzip2, %BZIP2_VERSION%) +AM_INIT_AUTOMAKE(foreign) +AM_MAINTAINER_MODE + +AC_PROG_CC +AC_PROG_LIBTOOL + +AC_OUTPUT([Makefile]) + diff --git a/meta-openeuler/recipes-core/bzip2/bzip2/run-ptest b/meta-openeuler/recipes-core/bzip2/bzip2/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..3b20fce1ee92d537cd123d33228c3e73c1f38ad7 --- /dev/null +++ b/meta-openeuler/recipes-core/bzip2/bzip2/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +make -k runtest diff --git a/meta-openeuler/recipes-core/bzip2/bzip2_1.0.8.bb b/meta-openeuler/recipes-core/bzip2/bzip2_1.0.8.bb new file mode 100644 index 0000000000000000000000000000000000000000..94a75631b157274369ba7d7ed439af08e11413a4 --- /dev/null +++ b/meta-openeuler/recipes-core/bzip2/bzip2_1.0.8.bb @@ -0,0 +1,60 @@ +SUMMARY = "Very high-quality data compression program" +DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \ +Huffman coding. Compression is generally considerably better than that achieved by more conventional \ +LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors." +HOMEPAGE = "https://sourceware.org/bzip2/" +SECTION = "console/utils" +LICENSE = "bzip2-1.0.6 & GPLv3+ & Apache-2.0 & MS-PL & BSD-3-Clause & Zlib" +LICENSE_${PN} = "bzip2-1.0.6" +LICENSE_${PN}-dev = "bzip2-1.0.6" +LICENSE_${PN}-dbg = "bzip2-1.0.6" +LICENSE_${PN}-doc = "bzip2-1.0.6" +LICENSE_${PN}-src = "bzip2-1.0.6" +LICENSE_libbz2 = "bzip2-1.0.6" +LICENSE_${PN}-ptest = "bzip2-1.0.6 & GPLv3+ & Apache-2.0 & MS-PL & BSD-3-Clause & Zlib" + +LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \ +" +#git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests + +SRC_URI = "file://bzip2/bzip2-${PV}.tar.gz \ + file://bzip2/0001-add-compile-option.patch \ + file://bzip2/0002-CVE-2019-12900.patch \ + file://configure.ac;subdir=${BP} \ + file://Makefile.am;subdir=${BP} \ + file://run-ptest \ + " +SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5" +SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" + +SRCREV_bzip2-tests = "f9061c030a25de5b6829e1abf373057309c734c0" + +UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/" + +PACKAGES =+ "libbz2" + +CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64" + +#inherit autotools update-alternatives ptest relative_symlinks +inherit autotools ptest relative_symlinks + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "bunzip2 bzcat bzip2" + +#install binaries to bzip2-native under sysroot for replacement-native +EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}" + +do_configure_prepend () { + sed -i -e "s|%BZIP2_VERSION%|${PV}|" ${S}/configure.ac +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/bzip2-tests + sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile +} +FILES_libbz2 = "${libdir}/lib*${SOLIBS}" + +RDEPENDS_${PN}-ptest += "make bash" + +PROVIDES_append_class-native = " bzip2-replacement-native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/cifs-utils/cifs-utils_6.14.bb b/meta-openeuler/recipes-core/cifs-utils/cifs-utils_6.14.bb new file mode 100644 index 0000000000000000000000000000000000000000..053dae81a39bd410ff015e0a496593043fe6fba0 --- /dev/null +++ b/meta-openeuler/recipes-core/cifs-utils/cifs-utils_6.14.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "A a package of utilities for doing and managing mounts of the Linux CIFS filesystem." +HOMEPAGE = "http://wiki.samba.org/index.php/LinuxCIFS_utils" +SECTION = "otherosfs" +LICENSE = "GPLv3 & LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "file://cifs-utils/${BP}.tar.bz2" +SRC_URI[sha256sum] = "6609e8074b5421295ff012a31f02ccd9a058415c619c81362ebb788dbf0756b8" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap" +# when enabled, it creates ${bindir}/cifscreds and --ignore-fail-on-non-empty in do_install_append is needed +PACKAGECONFIG[cifscreds] = "--enable-cifscreds,--disable-cifscreds,keyutils" +# when enabled, it creates ${sbindir}/cifs.upcall and --ignore-fail-on-non-empty in do_install_append is needed +PACKAGECONFIG[cifsupcall] = "--enable-cifsupcall,--disable-cifsupcall,krb5 libtalloc keyutils" +PACKAGECONFIG[cifsidmap] = "--enable-cifsidmap,--disable-cifsidmap,keyutils samba" +PACKAGECONFIG[cifsacl] = "--enable-cifsacl,--disable-cifsacl,samba" +PACKAGECONFIG[pam] = "--enable-pam --with-pamdir=${base_libdir}/security,--disable-pam,libpam keyutils" + +inherit autotools pkgconfig + +do_install_append() { + # Remove empty /usr/bin and /usr/sbin directories since the mount helper + # is installed to /sbin + rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir} +} + +do_compile_prepend() { + #fix open source compile error because of the dependency problem + cat Makefile | grep "@\$(MAKE) \$(AM_MAKEFLAGS) install-exec-am install-data-am" || return 1 + sed -i 's/^[[:space:]]@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am/\t\@\$(MAKE) \$(AM_MAKEFLAGS) install-data-am\n\t\@\$(MAKE) \$(AM_MAKEFLAGS) install-exec-am/g' Makefile +} + +FILES_${PN} += "${base_libdir}/security" +FILES_${PN}-dbg += "${base_libdir}/security/.debug" +RRECOMMENDS_${PN} = "kernel-module-cifs" diff --git a/meta-openeuler/recipes-core/clibcni/clibcni_2.0.4.bb b/meta-openeuler/recipes-core/clibcni/clibcni_2.0.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..751f711a9d9b399e9bc13af0c9f384608f1ee5aa --- /dev/null +++ b/meta-openeuler/recipes-core/clibcni/clibcni_2.0.4.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://clibcni/v2.0.4.tar.gz \ + file://clibcni/0001-fix-CNI_ARGS-value-when-there-is-no-args.patch \ + file://clibcni/0002-add-error-info-for-failed-run-cni-plugin.patch \ + " + +S = "${WORKDIR}/${BPN}" + +inherit cmake +OECMAKE_GENERATOR = "Unix Makefiles" + +DEPENDS = "lcr" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + + +FILES_${PN} += "${libdir}/libclibcni.so* " + +do_configure_prepend() { + grep -q CMAKE_SYSROOT ${WORKDIR}/toolchain.cmake || cat >> ${WORKDIR}/toolchain.cmake < +diff --git a/pam/crond b/pam/crond +index 560529d..95a6457 100644 +--- a/pam/crond ++++ b/pam/crond +@@ -4,8 +4,8 @@ + # + # Although no PAM authentication is called, auth modules + # are used for credential setting +-auth include system-auth ++auth include common-auth + account required pam_access.so +-account include system-auth ++account include common-auth + session required pam_loginuid.so +-session include system-auth ++session include common-session-noninteractive diff --git a/meta-openeuler/recipes-core/cronie/cronie/crontab b/meta-openeuler/recipes-core/cronie/cronie/crontab new file mode 100644 index 0000000000000000000000000000000000000000..22c4feb2dc17951b17ae9ebc3304a5c156bc7e7b --- /dev/null +++ b/meta-openeuler/recipes-core/cronie/cronie/crontab @@ -0,0 +1,14 @@ +# /etc/crontab: system-wide crontab +# Unlike any other crontab you don't have to run the `crontab' +# command to install the new version when you edit this file +# and files in /etc/cron.d. These files also have username fields, +# that none of the other crontabs do. + +SHELL=/bin/sh +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +# m h dom mon dow user command +# 1 * * * * root cd / && run-parts /etc/cron.hourly +# 30 7 * * * root cd / && run-parts /etc/cron.daily +# 42 7 * * 7 root cd / && run-parts /etc/cron.weekly +# 55 7 1 * * root cd / && run-parts /etc/cron.monthly diff --git a/meta-openeuler/recipes-core/cronie/cronie_1.5.7.bb b/meta-openeuler/recipes-core/cronie/cronie_1.5.7.bb new file mode 100644 index 0000000000000000000000000000000000000000..d67dc8b09c49048590f47210c8b666882376a34b --- /dev/null +++ b/meta-openeuler/recipes-core/cronie/cronie_1.5.7.bb @@ -0,0 +1,83 @@ +SUMMARY = "Cron daemon for executing programs at set times" +DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \ +specified programs at scheduled times and related tools. It is based on the \ +original cron and has security and configuration enhancements like the \ +ability to use pam and SELinux." +HOMEPAGE = "https://github.com/cronie-crond/cronie/" +BUGTRACKER = "https://bugzilla.redhat.com" + +# Internet Systems Consortium License +LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \ + file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \ + file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9" + +SECTION = "utils" + +UPSTREAM_CHECK_URI = "https://github.com/cronie-crond/${BPN}/releases/" + +SRC_URI = "file://cronie/${BP}.tar.gz \ + file://cronie/bugfix-cronie-systemd-alias.patch \ + file://crond.init \ + file://crontab \ + file://crond.service \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ +" + +PAM_SRC_URI = "file://crond_pam_config.patch" +PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" + +SRC_URI[sha256sum] = "538bcfaf2e986e5ae1edf6d1472a77ea8271d6a9005aee2497a9ed6e13320eb3" + +inherit autotools systemd + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" + +PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}" +PACKAGECONFIG[anacron] = "--enable-anacron,--disable-anacron,anacron" + +INITSCRIPT_NAME = "crond" +INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system crontab" + +SYSTEMD_SERVICE_${PN} = "crond.service" + +do_install_append () { + install -d ${D}${sysconfdir}/sysconfig/ + install -d ${D}${sysconfdir}/init.d/ + install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond + install -m 0750 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond + + # install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_unitdir}/system/crond.service + + # below are necessary for a complete cron environment + install -d ${D}${localstatedir}/spool/cron + install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/ + mkdir -p ${D}${sysconfdir}/cron.d + mkdir -p ${D}${sysconfdir}/cron.hourly + mkdir -p ${D}${sysconfdir}/cron.daily + mkdir -p ${D}${sysconfdir}/cron.weekly + mkdir -p ${D}${sysconfdir}/cron.monthly + touch ${D}${sysconfdir}/cron.deny + + # below setting is necessary to allow normal user using crontab + + # setgid for crontab binary + chmod 2755 ${D}${bindir}/crontab + + # allow 'crontab' group write to /var/spool/cron + chmod 770 ${D}${localstatedir}/spool/cron + + chmod 600 ${D}${sysconfdir}/crontab +} + +FILES_${PN} += "${sysconfdir}/cron*" +CONFFILES_${PN} += "${sysconfdir}/crontab" diff --git a/meta-openeuler/recipes-core/curl/curl_7.79.1.bb b/meta-openeuler/recipes-core/curl/curl_7.79.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..1549575aee7616ace238a67f49b4dec30d2193e1 --- /dev/null +++ b/meta-openeuler/recipes-core/curl/curl_7.79.1.bb @@ -0,0 +1,80 @@ +SUMMARY = "Command line tool and library for client-side URL transfers" +HOMEPAGE = "http://curl.haxx.se/" +BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" +SECTION = "console/network" +LICENSE = "MIT" + + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://curl/${BP}.tar.xz \ + file://curl/backport-0101-curl-7.32.0-multilib.patch \ +" + +S = "${WORKDIR}/${BP}" + +CVE_PRODUCT = "curl libcurl" +inherit autotools + +# Because UI console is removed from vpp's libopenssl, arm64le-preempt-pro does not support OPENSSL UI. + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} proxy ssl threaded-resolver verbose zlib" +PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" +PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" + +# 'ares' and 'threaded-resolver' are mutually exclusive +PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares" +PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" +PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" +PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" +PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," +PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," +PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," +PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" +PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" +PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" +PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" +PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," +PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," +PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" +PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," +PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," +PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" +PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" +PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," +PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," +PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver" +PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" +PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" + +EXTRA_OECONF = " \ + --disable-libcurl-option \ + --disable-ntlm-wb \ + --enable-crypto-auth \ + --without-libpsl \ +" + +do_install_append_class-target() { + # cleanup buildpaths from curl-config + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + ${D}${bindir}/curl-config +} + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*.so.*" + +FILES_${PN} += "${datadir}/zsh" + +#inherit multilib_script +#MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/dhcp/dhcp.inc b/meta-openeuler/recipes-core/dhcp/dhcp.inc new file mode 100644 index 0000000000000000000000000000000000000000..9bc2442a81668e4ade12d4cfd7054f53205e9cc4 --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp.inc @@ -0,0 +1,182 @@ +SECTION = "console/network" +SUMMARY = "Internet Software Consortium DHCP package" +DESCRIPTION = "DHCP (Dynamic Host Configuration Protocol) is a protocol \ +which allows individual devices on an IP network to get their own \ +network configuration information from a server. DHCP helps make it \ +easier to administer devices." + +HOMEPAGE = "http://www.isc.org/" + +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b9c6e660b3d9260de9a342d2fb77540a" + +SRC_URI = "file://dhcp/${BP}.tar.gz \ + file://dhcp/backport-0001-change-bug-url.patch \ + file://dhcp/backport-0002-additional-dhclient-options.patch \ + file://dhcp/backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch \ + file://dhcp/backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch \ + file://dhcp/backport-0005-Change-default-requested-options.patch \ + file://dhcp/backport-0006-Various-man-page-only-fixes.patch \ + file://dhcp/backport-0007-Change-paths-to-conform-to-our-standards.patch \ + file://dhcp/backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch \ + file://dhcp/backport-0009-Fix-garbage-in-format-string-error.patch \ + file://dhcp/backport-0010-Handle-null-timeout.patch \ + file://dhcp/backport-0011-Drop-unnecessary-capabilities.patch \ + file://dhcp/backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch \ + file://dhcp/backport-0013-DHCPv6-over-PPP-support-626514.patch \ + file://dhcp/backport-0014-IPoIB-support-660681.patch \ + file://dhcp/backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch \ + file://dhcp/backport-0016-Turn-on-creating-sending-of-DUID.patch \ + file://dhcp/backport-0017-Send-unicast-request-release-via-correct-interface.patch \ + file://dhcp/backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch \ + file://dhcp/backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch \ + file://dhcp/backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch \ + file://dhcp/backport-0021-Load-leases-DB-in-non-replay-mode-only.patch \ + file://dhcp/backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch \ + file://dhcp/backport-0023-option-97-pxe-client-id.patch \ + file://dhcp/backport-0025-bind-Detect-system-time-changes.patch \ + file://dhcp/backport-0026-Add-dhclient-5-B-option-description.patch \ + file://dhcp/backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch \ + file://dhcp/bugfix-dhcp-4.2.5-check-dhclient-pid.patch \ + file://dhcp/bugfix-reduce-getifaddr-calls.patch \ + file://dhcp/bugfix-dhcpd-2038-problem.patch \ + file://dhcp/dhcpd-coredump-infiniband.patch \ + file://dhcp/bugfix-dhclient-check-if-pid-was-held.patch \ + file://dhcp/bugfix-dhcp-64-bit-lease-parse.patch \ + file://dhcp/backport-CVE-2021-25217.patch \ + file://dhcp/fix-multiple-definition-with-gcc-10-1.patch \ + file://dhcp/fix-multiple-definition-with-gcc-10-2.patch \ + file://dhcp/fix-coredump-when-client-active-is-NULL.patch \ + file://dhcp/bugfix-error-message-display.patch \ + file://dhcp/feature-lease-time-config-ipv6.patch \ + file://dhcp/add-a-test-case-to-parse-code93-in-option_unittest.patch \ + file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \ + file://0013-fixup_use_libbind.patch \ + file://init-server file://default-server \ + file://dhclient.conf file://dhcpd.conf \ + " + +SRC_URI[sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" +DEPENDS = "openssl bind" + +UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/" +UPSTREAM_CHECK_REGEX = "(?P\d+\.\d+\.(\d+?))/" + +inherit autotools-brokensep systemd + +USERADD_PACKAGES = "${PN}-server" +USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}" + +SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay ${PN}-client" +#SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service" +#SYSTEMD_AUTO_ENABLE_${PN}-server = "disable" + +#SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service" +#SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable" + +#SYSTEMD_SERVICE_${PN}-client = "dhclient.service" +#SYSTEMD_AUTO_ENABLE_${PN}-client = "disable" + +INITSCRIPT_PACKAGES = "dhcp-server" +INITSCRIPT_NAME_dhcp-server = "dhcp-server" +INITSCRIPT_PARAMS_dhcp-server = "defaults" + +TARGET_CFLAGS += "-D_GNU_SOURCE" +TARGET_CFLAGS += "-fcommon" +EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \ + --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \ + --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \ + --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \ + --enable-paranoia --enable-static=yes --enable-shared=yes \ + --with-randomdev=/dev/random \ + --with-libbind=${STAGING_DIR_HOST} \ + --enable-libtool \ + " + +do_unpak() { + cd ${WORKDIR}/${BP}/bind + tar -xf bind.tar.gz + mv bind-9.11.14/ bind +} + +addtask unpak after do_unpack before do_patch + +#Enable shared libs per dhcp README +do_configure_prepend () { + cp configure.ac+lt configure.ac +} + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default + install -d ${D}${sysconfdir}/dhcp + install -m 0750 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server + install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server + + rm -f ${D}${sysconfdir}/dhclient.conf* + rm -f ${D}${sysconfdir}/dhcpd.conf* + install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf + install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf + + install -d ${D}${base_sbindir}/ + if [ "${sbindir}" != "${base_sbindir}" ]; then + mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ + fi + install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script + #delete extra rpath + for dhcpFile in $(find ${D} -type f) + do + file ${dhcpFile} | grep ELF || continue + readelf -a ${dhcpFile} | grep rpath || continue + ${RPATH_DELETE} ${dhcpFile} + done +} + +PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" + +FILES_${PN} = "${base_sbindir}/dhclient \ + ${base_sbindir}/dhclient-script \ + ${sysconfdir}/dhcp/dhclient.conf \ + ${bindir}/omshell \ + ${sbindir}/dhcrelay \ + " +RDEPENDS_${PN}-dev = "" +RDEPENDS_${PN}-staticdev = "" +FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0* ${libdir}/libdhcp.so.0*" + +FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" +RRECOMMENDS_${PN}-server = "dhcp-server-config" + +FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf" + +FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay" + +FILES_${PN}-client = "${base_sbindir}/dhclient \ + ${base_sbindir}/dhclient-script \ + ${sysconfdir}/dhcp/dhclient.conf \ + ${base_sbindir}/dhclient-systemd-wrapper \ + " + +FILES_${PN}-omshell = "${bindir}/omshell" + +pkg_postinst_dhcp-client() { + mkdir -p $D/${localstatedir}/lib/dhcp +} + +pkg_postrm_dhcp-server() { + rm -f $D/${localstatedir}/lib/dhcp/dhcpd.leases + rm -f $D/${localstatedir}/lib/dhcp/dhcpd6.leases + + if ! rmdir $D/${localstatedir}/lib/dhcp 2>/dev/null; then + echo "Not removing ${localstatedir}/lib/dhcp as it is non-empty." + fi +} + +pkg_postrm_dhcp-client() { + rm -f $D/${localstatedir}/lib/dhcp/dhclient.leases + rm -f $D/${localstatedir}/lib/dhcp/dhclient6.leases + + if ! rmdir $D/${localstatedir}/lib/dhcp 2>/dev/null; then + echo "Not removing ${localstatedir}/lib/dhcp as it is non-empty." + fi +} diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch b/meta-openeuler/recipes-core/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch new file mode 100644 index 0000000000000000000000000000000000000000..feb0754fff480805543e4169975c59da4a9d1bda --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch @@ -0,0 +1,62 @@ +From 7107511fd209f08f9a96f8938041ae48f3295895 Mon Sep 17 00:00:00 2001 +From: Christopher Larson +Date: Tue, 15 Aug 2017 16:17:49 +0800 +Subject: [PATCH 07/11] Add configure argument to make the libxml2 dependency + explicit and determinisitic. + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson + +Rebase to 4.3.6 + +Signed-off-by: Hongxu Jia +--- + configure.ac | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +Index: dhcp-4.4.1/configure.ac +=================================================================== +--- dhcp-4.4.1.orig/configure.ac ++++ dhcp-4.4.1/configure.ac +@@ -642,6 +642,17 @@ if test "$have_nanosleep" = "rt"; then + LIBS="-lrt $LIBS" + fi + ++AC_ARG_WITH(libxml2, ++ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]), ++ with_libxml2="$withval", with_libxml2="no") ++ ++if test x$with_libxml2 != xno; then ++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2], ++ [if test x$with_libxml2 != xauto; then ++ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested]) ++ fi]) ++fi ++ + # check for /dev/random (declares HAVE_DEV_RANDOM) + AC_MSG_CHECKING(for random device) + AC_ARG_WITH(randomdev, +Index: dhcp-4.4.1/configure.ac+lt +=================================================================== +--- dhcp-4.4.1.orig/configure.ac+lt ++++ dhcp-4.4.1/configure.ac+lt +@@ -909,6 +909,18 @@ elif test "$want_libtool" = "yes" -a "$u + fi + AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes") + ++AC_ARG_WITH(libxml2, ++ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]), ++ with_libxml2="$withval", with_libxml2="no") ++ ++if test x$with_libxml2 != xno; then ++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],, ++ [if test x$with_libxml2 != xauto; then ++ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested]) ++ fi]) ++fi ++ ++ + # OpenLDAP support. + AC_ARG_WITH(ldap, + AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]), diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/0013-fixup_use_libbind.patch b/meta-openeuler/recipes-core/dhcp/dhcp/0013-fixup_use_libbind.patch new file mode 100644 index 0000000000000000000000000000000000000000..fcec010bd01fae0695c7a159319731e34a32f517 --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp/0013-fixup_use_libbind.patch @@ -0,0 +1,64 @@ +lib and include path is hardcoded for use_libbind + +use libdir and includedir vars + +Upstream-Status: Pending +Signed-off-by: Armin Kuster + +Index: dhcp-4.4.1/configure.ac+lt +=================================================================== +--- dhcp-4.4.1.orig/configure.ac+lt ++++ dhcp-4.4.1/configure.ac+lt +@@ -801,22 +801,22 @@ no) + if test ! -d "$use_libbind"; then + AC_MSG_ERROR([Cannot find bind directory at $use_libbind]) + fi +- if test ! -d "$use_libbind/include" -o \ +- ! -f "$use_libbind/include/isc/buffer.h" ++ if test ! -d "$use_libbind/$includedir" -o \ ++ ! -f "$use_libbind/$includedir/isc/buffer.h" + then +- AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include]) ++ AC_MSG_ERROR([Cannot find bind includes at $use_libbind/$includedir]) + fi +- if test ! -d "$use_libbind/lib" -o \ +- \( ! -f "$use_libbind/lib/libisc.a" -a \ +- ! -f "$use_libbind/lib/libisc.la" \) ++ if test ! -d "$use_libbind/$libdir" -o \ ++ \( ! -f "$use_libbind/$libdir/libisc.a" -a \ ++ ! -f "$use_libbind/$libdir/libisc.la" \) + then +- AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib]) ++ AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/$libdir]) + fi + BINDDIR="$use_libbind" +- BINDLIBIRSDIR="$BINDDIR/lib" +- BINDLIBDNSDIR="$BINDDIR/lib" +- BINDLIBISCCFGDIR="$BINDDIR/lib" +- BINDLIBISCDIR="$BINDDIR/lib" ++ BINDLIBIRSDIR="$BINDDIR/$libdir" ++ BINDLIBDNSDIR="$BINDDIR/$libdir" ++ BINDLIBISCCFGDIR="$BINDDIR/$libdir" ++ BINDLIBISCDIR="$BINDDIR/$libdir" + DISTCHECK_LIBBIND_CONFIGURE_FLAG="--with-libbind=$use_libbind" + ;; + esac +@@ -856,14 +856,14 @@ AC_ARG_ENABLE(libtool, + + if test "$use_libbind" != "no"; then + if test "$want_libtool" = "yes" -a \ +- ! -f "$use_libbind/lib/libisc.la" ++ ! -f "$use_libbind/$libdir/libisc.la" + then +- AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib]) ++ AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/$libdir]) + fi + if test "$want_libtool" = "no" -a \ +- ! -f "$use_libbind/lib/libisc.a" ++ ! -f "$use_libbind/$libdir/libisc.a" + then +- AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib]) ++ AC_MSG_ERROR([Cannot find static libraries at $use_libbind/$libdir]) + fi + fi + diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/default-server b/meta-openeuler/recipes-core/dhcp/dhcp/default-server new file mode 100644 index 0000000000000000000000000000000000000000..0385d169922cf68e3db45347db7d44371b93380a --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp/default-server @@ -0,0 +1,7 @@ +# Defaults for dhcp initscript +# sourced by /etc/init.d/dhcp-server +# installed at /etc/default/dhcp-server by the maintainer scripts + +# On what interfaces should the DHCP server (dhcpd) serve DHCP requests? +# Separate multiple interfaces with spaces, e.g. "eth0 eth1". +INTERFACES="" diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/dhclient.conf b/meta-openeuler/recipes-core/dhcp/dhcp/dhclient.conf new file mode 100644 index 0000000000000000000000000000000000000000..0e6dcf96c218ee7d6a7eec85c3be3c59bf9dcd6c --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp/dhclient.conf @@ -0,0 +1,50 @@ +# Configuration file for /sbin/dhclient, which is included in Debian's +# dhcp3-client package. +# +# This is a sample configuration file for dhclient. See dhclient.conf's +# man page for more information about the syntax of this file +# and a more comprehensive list of the parameters understood by +# dhclient. +# +# Normally, if the DHCP server provides reasonable information and does +# not leave anything out (like the domain name, for example), then +# few changes must be made to this file, if any. +# + +#send host-name "andare.fugue.com"; +#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; +#send dhcp-lease-time 3600; +#supersede domain-name "fugue.com home.vix.com"; +#prepend domain-name-servers 127.0.0.1; +request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, host-name, + netbios-name-servers, netbios-scope; +#require subnet-mask, domain-name-servers; +#timeout 60; +#retry 60; +#reboot 10; +#select-timeout 5; +#initial-interval 2; +#script "/etc/dhcp3/dhclient-script"; +#media "-link0 -link1 -link2", "link0 link1"; +#reject 192.33.137.209; + +#alias { +# interface "eth0"; +# fixed-address 192.5.5.213; +# option subnet-mask 255.255.255.255; +#} + +#lease { +# interface "eth0"; +# fixed-address 192.33.137.200; +# medium "link0 link1"; +# option host-name "andare.swiftmedia.com"; +# option subnet-mask 255.255.255.0; +# option broadcast-address 192.33.137.255; +# option routers 192.33.137.250; +# option domain-name-servers 127.0.0.1; +# renew 2 2000/1/12 00:00:01; +# rebind 2 2000/1/12 00:00:01; +# expire 2 2000/1/12 00:00:01; +#} diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/dhcpd.conf b/meta-openeuler/recipes-core/dhcp/dhcp/dhcpd.conf new file mode 100644 index 0000000000000000000000000000000000000000..0001c0f00e206ce7a6a3946e98b9ff71635c99c1 --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp/dhcpd.conf @@ -0,0 +1,108 @@ +# +# Sample configuration file for ISC dhcpd for Debian +# +# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $ +# + +# The ddns-updates-style parameter controls whether or not the server will +# attempt to do a DNS update when a lease is confirmed. We default to the +# behavior of the version 2 packages ('none', since DHCP v2 didn't +# have support for DDNS.) +ddns-update-style none; + +# option definitions common to all supported networks... +option domain-name "example.org"; +option domain-name-servers ns1.example.org, ns2.example.org; + +default-lease-time 600; +max-lease-time 7200; + +# If this DHCP server is the official DHCP server for the local +# network, the authoritative directive should be uncommented. +#authoritative; + +# Use this to send dhcp log messages to a different log file (you also +# have to hack syslog.conf to complete the redirection). +log-facility local7; + +# No service will be given on this subnet, but declaring it helps the +# DHCP server to understand the network topology. + +#subnet 10.152.187.0 netmask 255.255.255.0 { +#} + +# This is a very basic subnet declaration. + +#subnet 10.254.239.0 netmask 255.255.255.224 { +# range 10.254.239.10 10.254.239.20; +# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; +#} + +# This declaration allows BOOTP clients to get dynamic addresses, +# which we don't really recommend. + +#subnet 10.254.239.32 netmask 255.255.255.224 { +# range dynamic-bootp 10.254.239.40 10.254.239.60; +# option broadcast-address 10.254.239.31; +# option routers rtr-239-32-1.example.org; +#} + +# A slightly different configuration for an internal subnet. +#subnet 10.5.5.0 netmask 255.255.255.224 { +# range 10.5.5.26 10.5.5.30; +# option domain-name-servers ns1.internal.example.org; +# option domain-name "internal.example.org"; +# option routers 10.5.5.1; +# option broadcast-address 10.5.5.31; +# default-lease-time 600; +# max-lease-time 7200; +#} + +# Hosts which require special configuration options can be listed in +# host statements. If no address is specified, the address will be +# allocated dynamically (if possible), but the host-specific information +# will still come from the host declaration. + +#host passacaglia { +# hardware ethernet 0:0:c0:5d:bd:95; +# filename "vmunix.passacaglia"; +# server-name "toccata.fugue.com"; +#} + +# Fixed IP addresses can also be specified for hosts. These addresses +# should not also be listed as being available for dynamic assignment. +# Hosts for which fixed IP addresses have been specified can boot using +# BOOTP or DHCP. Hosts for which no fixed address is specified can only +# be booted with DHCP, unless there is an address range on the subnet +# to which a BOOTP client is connected which has the dynamic-bootp flag +# set. +#host fantasia { +# hardware ethernet 08:00:07:26:c0:a5; +# fixed-address fantasia.fugue.com; +#} + +# You can declare a class of clients and then do address allocation +# based on that. The example below shows a case where all clients +# in a certain class get addresses on the 10.17.224/24 subnet, and all +# other clients get addresses on the 10.0.29/24 subnet. + +#class "foo" { +# match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; +#} + +#shared-network 224-29 { +# subnet 10.17.224.0 netmask 255.255.255.0 { +# option routers rtr-224.example.org; +# } +# subnet 10.0.29.0 netmask 255.255.255.0 { +# option routers rtr-29.example.org; +# } +# pool { +# allow members of "foo"; +# range 10.17.224.10 10.17.224.250; +# } +# pool { +# deny members of "foo"; +# range 10.0.29.10 10.0.29.230; +# } +#} diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/init-server b/meta-openeuler/recipes-core/dhcp/dhcp/init-server new file mode 100644 index 0000000000000000000000000000000000000000..5e693adf78559215654fd923c7bfcc8332d9dc4f --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp/init-server @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $ +# + +test -f /usr/sbin/dhcpd || exit 0 + +# It is not safe to start if we don't have a default configuration... +if [ ! -f /etc/default/dhcp-server ]; then + echo "/etc/default/dhcp-server does not exist! - Aborting..." + exit 0 +fi + +# Read init script configuration (so far only interfaces the daemon +# should listen on.) +. /etc/default/dhcp-server + +case "$1" in + start) + echo -n "Starting DHCP server: " + test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ + test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases + start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES -user dhcp -group dhcp + echo "." + ;; + stop) + echo -n "Stopping DHCP server: dhcpd3" + start-stop-daemon -K -x /usr/sbin/dhcpd + echo "." + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + if [ "$?" != "0" ]; then + exit 1 + fi + ;; + *) + echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/meta-openeuler/recipes-core/dhcp/dhcp_4.4.2.bb b/meta-openeuler/recipes-core/dhcp/dhcp_4.4.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..3ae90b51127c95f3ff134c38e74b58db17721846 --- /dev/null +++ b/meta-openeuler/recipes-core/dhcp/dhcp_4.4.2.bb @@ -0,0 +1,8 @@ +require dhcp.inc + +COMPONENT = "isc dhcp" + +LDFLAGS_append = " -pthread" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2" diff --git a/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb b/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..3c26fb9e5ed747261b0d0271bf5d80e684570f1f --- /dev/null +++ b/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb @@ -0,0 +1,26 @@ +# dosfstools OE build file +# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved +# Copyright (C) 2015, Sören Brinkmann All Rights Reserved +# Released under the MIT license (see packages/COPYING) +SUMMARY = "DOS FAT Filesystem Utilities" +HOMEPAGE = "https://github.com/dosfstools/dosfstools" +SECTION = "base" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "file://dosfstools/${BP}.tar.gz" +SRC_URI[sha256sum] = "64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527" + +UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases" + +inherit autotools gettext pkgconfig + +EXTRA_OECONF = "--enable-compat-symlinks --without-iconv" + +CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + +BBCLASSEXTEND = "native nativesdk" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "mkfs.vfat" +ALTERNATIVE_LINK_NAME[mkfs.vfat] = "${sbindir}/mkfs.vfat" diff --git a/meta-openeuler/recipes-core/dsoftbus/dsoftbus_1.0.bb b/meta-openeuler/recipes-core/dsoftbus/dsoftbus_1.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..2c328a9bf07238da52844cc5d6fc20051f62dd9d --- /dev/null +++ b/meta-openeuler/recipes-core/dsoftbus/dsoftbus_1.0.bb @@ -0,0 +1,29 @@ +SUMMARY = "dsoftbus" +DESCRIPTION = "dsoftbus" +PR = "r1" +LICENSE = "CLOSED" + +inherit bin_package + +SRC_URI = "file://dsoftbus_output" + +S = "${WORKDIR}/dsoftbus_output" + +FILES_${PN}-dev = "${includedir}" +FILES_${PN} = "${libdir} ${bindir} /data/" + +INSANE_SKIP_${PN} += "already-stripped" +ALLOW_EMPTY_${PN} = "1" + +do_install() { + #not fail when not exist dsoftbus_output + rm -f ${S}/.xxx + if [ -z "$(ls -A ${S})" ]; then + bbnote bin_package has nothing to install. + return 0 + fi + install -d ${D}/data/data/ + cd ${S} + tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ + | tar --no-same-owner -xpf - -C ${D} +} diff --git a/meta-openeuler/recipes-core/dsoftbus/files/dsoftbus_output/.xxx b/meta-openeuler/recipes-core/dsoftbus/files/dsoftbus_output/.xxx new file mode 100644 index 0000000000000000000000000000000000000000..462d5c93c1a073fdeb31baf697a2e126713e51ac --- /dev/null +++ b/meta-openeuler/recipes-core/dsoftbus/files/dsoftbus_output/.xxx @@ -0,0 +1 @@ +#add empty directory to make it not fail when dsoftbus_output does not exist diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc new file mode 100644 index 0000000000000000000000000000000000000000..b1a15e3a89d9ef4828518156c128b103887525fe --- /dev/null +++ b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc @@ -0,0 +1,37 @@ +SUMMARY = "Ext2 Filesystem Utilities" +DESCRIPTION = "The Ext2 Filesystem Utilities (e2fsprogs) contain all of the standard utilities for creating, \ +fixing, configuring , and debugging ext2 filesystems." +HOMEPAGE = "http://e2fsprogs.sourceforge.net/" + +LICENSE = "GPLv2 & LGPLv2 & BSD & MIT" +LICENSE_e2fsprogs-dumpe2fs = "GPLv2" +LICENSE_e2fsprogs-e2fsck = "GPLv2" +LICENSE_e2fsprogs-mke2fs = "GPLv2" +LICENSE_e2fsprogs-tune2fs = "GPLv2" +LICENSE_e2fsprogs-badblocks = "GPLv2" +LIC_FILES_CHKSUM = "file://NOTICE;md5=d50be0580c0b0a7fbc7a4830bbe6c12b \ + file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \ + file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \ + file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \ + file://lib/uuid/COPYING;md5=58dcd8452651fc8b07d1f65ce07ca8af \ + file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \ + file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6" +SECTION = "base" +DEPENDS = "util-linux attr" + +SRC_URI = "file://e2fsprogs/${BP}.tar.xz \ + file://e2fsprogs/0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch \ + file://e2fsprogs/0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch \ + file://e2fsprogs/0003-tests-update-expect-files-for-f_mmp_garbage.patch \ + file://e2fsprogs/0004-tests-update-expect-files-for-f_large_dir-and-f_larg.patch \ + file://e2fsprogs/0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch \ + file://e2fsprogs/0006-e2fsck-exit-journal-recovery-when-find-EIO-ENOMEM-er.patch \ + file://e2fsprogs/0007-e2fsck-exit-journal-recovery-when-jounral-superblock.patch \ + file://e2fsprogs/0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch \ + file://e2fsprogs/0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch \ + file://run-ptest \ +" + +inherit autotools gettext texinfo pkgconfig multilib_header ptest + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..c97c0377e9c0f08346a5ca83bd819b909333ec2b --- /dev/null +++ b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +cd ./test +SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /' +rm -rf /var/volatile/tmp/*e2fsprogs* +rm -f tmp-* +rm -f *.tmp +rm -f *.ok +rm -f *.failed +rm -f *.log diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..41ee07771ba12dccb365d98478b347291c67e638 --- /dev/null +++ b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb @@ -0,0 +1,124 @@ +require e2fsprogs.inc + +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+\.\d+(\.\d+)*)$" + +EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ + --enable-elf-shlibs --disable-libuuid --disable-uuidd \ + --disable-libblkid --enable-verbose-makecmds \ + --with-crond-dir=no" + +EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse' + +# make locale rules sometimes fire, sometimes don't as git doesn't preserve +# file mktime. Touch the files introducing non-determinism to the build +do_compile_prepend (){ + find ${S}/po -type f -name "*.po" -exec touch {} + +} + +do_install () { + oe_runmake 'DESTDIR=${D}' install + oe_runmake 'DESTDIR=${D}' install-libs + # We use blkid from util-linux now so remove from here + rm -f ${D}${base_libdir}/libblkid* + rm -rf ${D}${includedir}/blkid + rm -f ${D}${base_libdir}/pkgconfig/blkid.pc + rm -f ${D}${base_sbindir}/blkid + rm -f ${D}${base_sbindir}/fsck + rm -f ${D}${base_sbindir}/findfs + + # e2initrd_helper and the pkgconfig files belong in libdir + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then + install -d ${D}${libdir} + mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir} + mv ${D}${base_libdir}/pkgconfig ${D}${libdir} + fi + + oe_multilib_header ext2fs/ext2_types.h + install -d ${D}${base_bindir} + mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs + + install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/ + + # Clean host path (build directory) in compile_et, mk_cmds + sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et + sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds +} + +# Need to find the right mke2fs.conf file +e2fsprogs_conf_fixup () { + for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do + create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf + done +} + +do_install_append_class-native() { + e2fsprogs_conf_fixup +} + +do_install_append_class-nativesdk() { + e2fsprogs_conf_fixup +} + +RDEPENDS_e2fsprogs = "e2fsprogs-badblocks e2fsprogs-dumpe2fs" +RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" + +PACKAGES =+ "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-e2scrub e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs" +PACKAGES =+ "libcomerr libss libe2p libext2fs" + +FILES_e2fsprogs-dumpe2fs = "${base_sbindir}/dumpe2fs" +FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*" +FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*" +FILES_e2fsprogs-e2scrub = "${base_sbindir}/e2scrub*" +FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" +FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label" +FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks" +FILES_libcomerr = "${base_libdir}/libcom_err.so.*" +FILES_libss = "${base_libdir}/libss.so.*" +FILES_libe2p = "${base_libdir}/libe2p.so.*" +FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*" +FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds" + +ALTERNATIVE_${PN} = "chattr" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" +ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" + +ALTERNATIVE_${PN}-doc = "fsck.8" +ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" + +ALTERNATIVE_${PN}-mke2fs = "mke2fs mkfs.ext2" +ALTERNATIVE_LINK_NAME[mke2fs] = "${base_sbindir}/mke2fs" +ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2" + +ALTERNATIVE_${PN}-tune2fs = "tune2fs" +ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs" + +RDEPENDS_e2fsprogs-e2scrub = "bash" +RDEPENDS_e2fsprogs-e2scrub_remove += "bash" +RDEPENDS_${PN}-ptest += "coreutils procps bash bzip2 diffutils perl sed" +RDEPENDS_${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs" + +do_compile_ptest() { + oe_runmake -C ${B}/tests +} + +do_install_ptest() { + # This file's permissions depends on the host umask so be deterministic + chmod 0644 ${B}/tests/test_data.tmp + cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test + cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test + sed -e 's!../e2fsck/e2fsck!e2fsck!g' \ + -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect* + sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script + + # Remove various files + find "${D}${PTEST_PATH}" -type f \ + \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\ + -exec rm -f {} + + + install -d ${D}${PTEST_PATH}/lib + install -m 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/ +} diff --git a/meta-openeuler/recipes-core/ethtool/ethtool/avoid_parallel_tests.patch b/meta-openeuler/recipes-core/ethtool/ethtool/avoid_parallel_tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..c7f907f64875bc31505ba4b7941ab47a4976f78e --- /dev/null +++ b/meta-openeuler/recipes-core/ethtool/ethtool/avoid_parallel_tests.patch @@ -0,0 +1,29 @@ +From 1f9215b845a144e531536709b23cd5fb15e4f206 Mon Sep 17 00:00:00 2001 +From: Tudor Florea +Date: Wed, 28 May 2014 18:59:54 +0200 +Subject: [PATCH] ethtool: use serial-tests config needed by ptest. + +ptest needs buildtest-TESTS and runtest-TESTS targets. +serial-tests is required to generate those targets. + +Signed-off-by: Tudor Florea +Upstream-Status: Inappropriate +(default automake behavior incompatible with ptest) + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d49eda6..c7fa195 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. + AC_INIT(ethtool, 5.15, netdev@vger.kernel.org) + AC_PREREQ(2.52) + AC_CONFIG_SRCDIR([ethtool.c]) +-AM_INIT_AUTOMAKE([gnu subdir-objects]) ++AM_INIT_AUTOMAKE([gnu subdir-objects serial-tests]) + AC_CONFIG_HEADERS([ethtool-config.h]) + + AM_MAINTAINER_MODE diff --git a/meta-openeuler/recipes-core/ethtool/ethtool/run-ptest b/meta-openeuler/recipes-core/ethtool/ethtool/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..1e245da112d3930e662869c5f34d0cde05ad0305 --- /dev/null +++ b/meta-openeuler/recipes-core/ethtool/ethtool/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +make -k runtest-TESTS diff --git a/meta-openeuler/recipes-core/ethtool/ethtool_5.15.bb b/meta-openeuler/recipes-core/ethtool/ethtool_5.15.bb new file mode 100644 index 0000000000000000000000000000000000000000..dc359e95c1dbc18c3fbc2c0a8e725e5408694faf --- /dev/null +++ b/meta-openeuler/recipes-core/ethtool/ethtool_5.15.bb @@ -0,0 +1,37 @@ +SUMMARY = "Display or change ethernet card settings" +DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces." +HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/" +SECTION = "console/network" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216" + +SRC_URI = "file://ethtool/ethtool-${PV}.tar.xz \ + file://run-ptest \ + file://avoid_parallel_tests.patch \ + " + +SRC_URI[sha256sum] = "686fd6110389d49c2a120f00c3cd5dfe43debada8e021e4270d74bbe452a116d" + +UPSTREAM_CHECK_URI = "https://gitee/src-openeuler/ethtool" + +#inherit autotools ptest bash-completion pkgconfig +inherit autotools ptest + +RDEPENDS_${PN}-ptest += "make" + +#PACKAGECONFIG ?= "netlink" +PACKAGECONFIG[netlink] = "--disable-netlink,--disable-netlink,libmnl" +FILES_${PN}-bash-completion += "/usr/share/bash-completion/completions/*" +PACKAGES += "ethtool-bash-completion" + +do_compile_ptest() { + oe_runmake buildtest-TESTS +} + +do_install_ptest () { + cp ${B}/Makefile ${D}${PTEST_PATH} + install ${B}/test-cmdline ${D}${PTEST_PATH} + install ${B}/ethtool ${D}${PTEST_PATH}/ethtool + sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile +} diff --git a/meta-openeuler/recipes-core/expat/expat/libtool-tag.patch b/meta-openeuler/recipes-core/expat/expat/libtool-tag.patch new file mode 100644 index 0000000000000000000000000000000000000000..0a0aed23e5dbe6745fedefe88f3712d8fc3c71d3 --- /dev/null +++ b/meta-openeuler/recipes-core/expat/expat/libtool-tag.patch @@ -0,0 +1,30 @@ +From 10342e6b600858b091bc7771e454d9e06af06410 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 2 Nov 2017 18:20:57 +0800 +Subject: [PATCH] Add CC tag to build + +Add CC tag to build + +Upstream-Status: Pending +Signed-off-by: Khem Raj +Signed-off-by: Dengke Du +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 9560a95..d444bd6 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -319,7 +319,7 @@ LIBCURRENT = @LIBCURRENT@ + LIBOBJS = @LIBOBJS@ + LIBREVISION = @LIBREVISION@ + LIBS = @LIBS@ +-LIBTOOL = @LIBTOOL@ ++LIBTOOL = @LIBTOOL@ --tag CC + LIPO = @LIPO@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ +-- +2.7.4 + diff --git a/meta-openeuler/recipes-core/expat/expat/run-ptest b/meta-openeuler/recipes-core/expat/expat/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..1b39cec8e5eea7a2a6e4f16713ee5c9157cd1f4b --- /dev/null +++ b/meta-openeuler/recipes-core/expat/expat/run-ptest @@ -0,0 +1,23 @@ +#!/bin/bash + +output=${1:-"expat_tests.log"} # default log file + +# logging function +function testCheck() { + testExec="$1" + shift + echo && echo ${testExec} && ./${testExec} "$@" + error=$? + result=$([[ ${error} -eq 0 ]] && echo "PASS" || echo "FAIL") + echo "${result}: ${testExec}" && echo "============================" +} + +export output +export -f testCheck +TIME=$(which time) + +echo "Architecture: $(uname -m)" > ${output} +echo "Image: $(uname -sr)" >> ${output} +${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -vv" |& tee -a ${output} +${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -vv" |& tee -a ${output} +echo diff --git a/meta-openeuler/recipes-core/expat/expat_2.4.1.bb b/meta-openeuler/recipes-core/expat/expat_2.4.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..bed0d95b0f2c285d6861368a1fe4bc4aabe03708 --- /dev/null +++ b/meta-openeuler/recipes-core/expat/expat_2.4.1.bb @@ -0,0 +1,47 @@ +SUMMARY = "A stream-oriented XML parser library" +DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)" +HOMEPAGE = "http://expat.sourceforge.net/" +SECTION = "libs" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9" + +SRC_URI = "file://expat/expat-${PV}.tar.gz \ + file://expat/backport-CVE-2021-45960.patch \ + file://expat/backport-CVE-2021-46143.patch \ + file://expat/backport-CVE-2022-22822-CVE-2022-22823-CVE-2022-22824-CVE-2022-22825-CVE-2022-22826-CVE-2022-22827.patch \ + file://expat/backport-CVE-2022-23852-lib-Detect-and-prevent-integer-overflow-in-XML_GetBu.patch \ + file://expat/backport-CVE-2022-23852-tests-Cover-integer-overflow-in-XML_GetBuffer-CVE-20.patch \ + file://expat/backport-CVE-2022-23990-lib-Prevent-integer-overflow-in-doProlog-CVE-2022-23.patch \ + file://expat/backport-CVE-2022-25235-lib-Add-missing-validation-of-encoding.patch \ + file://expat/backport-tests-Cover-missing-validation-of-encoding.patch \ + file://expat/backport-CVE-2022-25236-lib-Protect-against-malicious-namespace-declarations.patch \ + file://expat/backport-tests-Cover-CVE-2022-25236.patch \ + file://expat/backport-CVE-2022-25313-Prevent-stack-exhaustion-in-build_model.patch \ + file://expat/backport-CVE-2022-25314-Prevent-integer-overflow-in-copyString.patch \ + file://expat/backport-CVE-2022-25315-Prevent-integer-overflow-in-storeRawNames.patch \ + file://expat/backport-Fix-build_model-regression.patch \ + file://expat/backport-tests-Protect-against-nested-element-declaration-mod.patch \ + file://expat/backport-lib-Fix-harmless-use-of-uninitialized-memory.patch \ + file://expat/backport-lib-Drop-unused-macro-UTF8_GET_NAMING.patch \ + file://expat/backport-lib-Relax-fix-to-CVE-2022-25236-with-regard-to-RFC-3.patch \ + file://expat/backport-tests-Cover-relaxed-fix-to-CVE-2022-25236.patch \ + file://libtool-tag.patch \ + file://run-ptest \ + " + +SRC_URI[sha256sum] = "2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40" + +EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF" + +RDEPENDS_${PN}-ptest += "bash" + +inherit cmake lib_package ptest + +do_install_ptest_class-target() { + install -m 755 ${B}/tests/* ${D}${PTEST_PATH} +} + +BBCLASSEXTEND += "native nativesdk" + +CVE_PRODUCT = "expat libexpat" diff --git a/meta-openeuler/recipes-core/gdb/gdb-common.inc b/meta-openeuler/recipes-core/gdb/gdb-common.inc new file mode 100644 index 0000000000000000000000000000000000000000..15702903267240013bcb517bbc0c0fc8c9b60032 --- /dev/null +++ b/meta-openeuler/recipes-core/gdb/gdb-common.inc @@ -0,0 +1,66 @@ +SUMMARY = "GNU debugger" +HOMEPAGE = "http://www.gnu.org/software/gdb/" +DESCRIPTION = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed." +SECTION = "devel" +DEPENDS = "expat gmp zlib ncurses virtual/libiconv bison-native" + +LTTNGUST = "lttng-ust" +LTTNGUST_arc = "" +LTTNGUST_aarch64 = "" +LTTNGUST_mipsarch = "" +LTTNGUST_sh4 = "" + +inherit autotools texinfo + +UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P.+)\-release" + +B = "${WORKDIR}/build-${TARGET_SYS}" + +EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}" + +EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \ + --with-curses --disable-multilib --disable-sim \ + --without-guile \ + ${GDBPROPREFIX} ${EXPAT} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \ + --disable-rpath \ + --disable-gas --disable-binutils \ + --disable-ld --disable-gold \ + --disable-gprof \ + --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ +" + +PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" +# Use --without-system-readline to compile with readline 5. +PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" +PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs" +PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace" +# ncurses is already a hard DEPENDS, but would be added here if it weren't +PACKAGECONFIG[tui] = "--enable-tui,--disable-tui" +PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz" +PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" + +GDBPROPREFIX = "--program-prefix=''" + +DISABLE_STATIC = "" + +do_configure () { + # override this function to avoid the autoconf/automake/aclocal/autoheader + # calls for now + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + oe_runconf +} + +# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the +# right bits installed by binutils. Same for bfd.info -- also from binutils. +do_install_append() { + rm -rf ${D}${libdir} + rm -rf ${D}${includedir} + rm -rf ${D}${datadir}/locale + rm -f ${D}${infodir}/bfd.info +} + +#RRECOMMENDS_gdb_append_linux = " glibc-thread-db " +#RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db " +#RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db " +#RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db " diff --git a/meta-openeuler/recipes-core/gdb/gdb.inc b/meta-openeuler/recipes-core/gdb/gdb.inc new file mode 100644 index 0000000000000000000000000000000000000000..cee884ff193173ae6f53b51959bcd61aa58b0f29 --- /dev/null +++ b/meta-openeuler/recipes-core/gdb/gdb.inc @@ -0,0 +1,9 @@ +LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-2.0-only & LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" + +SRC_URI = "file://gdb/${BP}.tar.xz \ +" +SRC_URI[sha256sum] = "cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94" diff --git a/meta-openeuler/recipes-core/gdb/gdb_11.1.bb b/meta-openeuler/recipes-core/gdb/gdb_11.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..d5f57abe00d4b3979c280e310dc2aa42a538dfec --- /dev/null +++ b/meta-openeuler/recipes-core/gdb/gdb_11.1.bb @@ -0,0 +1,39 @@ +require gdb-common.inc + +inherit gettext pkgconfig + +#LDFLAGS:append = " -s" +#export CFLAGS:append=" -L${STAGING_LIBDIR}" + +# cross-canadian must not see this +PACKAGES =+ "gdbserver" +FILES_gdbserver = "${bindir}/gdbserver" + +require gdb.inc + +inherit python3-dir + +EXTRA_OEMAKE_append_libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + gl_cv_func_working_strerror=yes \ + gl_cv_func_strerror_0_works=yes \ + gl_cv_func_gettimeofday_clobber=no \ + " + +do_configure_prepend() { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + cat > ${WORKDIR}/python << EOF +#!/bin/sh +case "\$2" in + --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; + --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; + --exec-prefix) echo "${exec_prefix}" ;; + *) exit 1 ;; +esac +exit 0 +EOF + chmod +x ${WORKDIR}/python + fi +} + diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common new file mode 100644 index 0000000000000000000000000000000000000000..0d7c5fa3f8cec69e67d217775b04fe56d2da20e8 --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common @@ -0,0 +1,3 @@ +[properties] +# On all known supported architectures the stack grows down +growing_stack = false diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc new file mode 100644 index 0000000000000000000000000000000000000000..c4648f58c78d5400e0052b2047d0f8e7fdb852b6 --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc @@ -0,0 +1,5 @@ +[properties] +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +va_val_copy = true diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux new file mode 100644 index 0000000000000000000000000000000000000000..adad7e62eeb9e8d0f245ba319a9136cb28a3157c --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux @@ -0,0 +1,5 @@ +[properties] +have_proc_self_cmdline = true + +[binaries] +env = '/usr/bin/env' diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw new file mode 100644 index 0000000000000000000000000000000000000000..75f911ba1edcd498e2ce531bd3c5a9e93f1e91aa --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = false +have_c99_snprintf = false +have_unix98_printf = false +va_val_copy = true +have_proc_self_cmdline = false diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl new file mode 100644 index 0000000000000000000000000000000000000000..3049e5116ece7292fa550c29746aba88810b5ea9 --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +va_val_copy = true +have_strlcpy = true diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..7a231b514b423467f7684772a8f83e2de2b085f9 --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/run-ptest @@ -0,0 +1,9 @@ +#! /bin/sh + +set -eux +if id -u glib2-test; then + userdel glib2-test +fi +useradd glib2-test +su glib2-test -c 'gnome-desktop-testing-runner glib' +userdel glib2-test diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0_2.68.1.bb b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_2.68.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..49ac75de97e85f5fa099f579f05227b9c5ff8fd8 --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_2.68.1.bb @@ -0,0 +1,40 @@ +require glib.inc + +SRC_URI = "file://glib2/glib-${PV}.tar.xz \ + file://glib2/backport-correctly-use-3-parameters-for-clise-range.patch \ + file://glib2/backport-fix-a-memory-leak.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "241654b96bd36b88aaa12814efc4843b578e55d47440103727959ac346944333" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + thisdir = os.path.normpath(d.getVar("THISDIR")) + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) + sanitized_path = filename.replace(thisdir, "${THISDIR}") + if sanitized_path == filename: + if os.path.exists(filename): + bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) + continue + files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} diff --git a/meta-openeuler/recipes-core/glib-2.0/glib.inc b/meta-openeuler/recipes-core/glib-2.0/glib.inc new file mode 100644 index 0000000000000000000000000000000000000000..8617001c216e6a5ed049f8cf7a73a39080ed3b5a --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib.inc @@ -0,0 +1,203 @@ +SUMMARY = "A general-purpose utility library" +DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on." +HOMEPAGE = "https://developer.gnome.org/glib/" + +# pcre is under BSD; +# docs/reference/COPYING is with a 'public domain'-like license! +LICENSE = "LGPLv2.1+ & BSD & PD" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ + file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ + file://glib/pcre/pcre.h;beginline=8;endline=36;md5=3e2977dae4ad05217f58c446237298fc \ + file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" +BUGTRACKER = "http://bugzilla.gnome.org" +SECTION = "libs" + +CVE_PRODUCT = "glib" + +BBCLASSEXTEND = "native nativesdk" + +DEPENDS = "glib-2.0-native \ + virtual/libintl \ + virtual/libiconv \ + libffi \ + zlib" + +PACKAGES += "${PN}-codegen ${PN}-utils ${PN}-bash-completion" + +LEAD_SONAME = "libglib-2.0.*" + +#inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages +#inherit meson gettext pkgconfig ptest-gnome upstream-version-is-even gio-module-cache manpages +inherit meson gettext pkgconfig + +DEPENDS_append_class-target = "${@' gtk-doc' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}" + +GTKDOC_MESON_OPTION = "gtk_doc" + +S = "${WORKDIR}/glib-${PV}" + +PACKAGECONFIG ??= "system-pcre libmount \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +# To use the system pcre it must be configured with --enable-unicode-properties +PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre" +PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" +PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" +# libelf is auto-detected without a configuration option +PACKAGECONFIG[libelf] = ",,elfutils" +PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus" + +EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=disabled" + +do_configure_prepend() { + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in +} + +FILES_${PN} = "${libdir}/lib*${SOLIBS} \ + ${libdir}/gio \ + ${libexecdir}/*gio-querymodules \ + ${datadir}/glib-2.0/schemas" + +FILES_${PN}-utils += "${bindir}/glib-genmarshal \ + ${bindir}/glib-gettextize \ + ${bindir}/glib-mkenums \ + ${bindir}/glib-compile-resources" + +FILES_${PN}-dev += "${libdir}/glib-2.0/include \ + ${libdir}/gio/modules/lib*${SOLIBSDEV} \ + ${libdir}/gio/modules/*.la \ + ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ + ${datadir}/glib-2.0/schemas/gschema.dtd \ + ${datadir}/glib-2.0/valgrind/glib.supp \ + ${datadir}/gettext/its" +FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" +FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ + ${bindir}/gdbus-codegen" +FILES_${PN}-utils = "${bindir}/*" +FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions" + +SHAREDMIMEDEP = "shared-mime-info" +SHAREDMIMEDEP_class-native = "" +# When cross compiling for Windows we don't want to include this +SHAREDMIMEDEP_mingw32 = "" + +#RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" +# Valgrind runtime detection works using hand-written assembly, which +# doesn't support mips16e +CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1" + +# GLib generally requires gettext to be present so for USE_NLS to yes. For +# native builds as i18n is disabled globally we have to add a gettext-native dependency. +USE_NLS_class-target = "yes" +USE_NLS_class-nativesdk = "yes" +DEPENDS_append_class-native = " gettext-native" + +EXEEXT = "" +EXEEXT_mingw32 = ".exe" + +do_install_append () { + if [ -f ${D}${bindir}/gtester-report ]; then + sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|' + fi + + # Remove some unpackaged files + rm -rf ${D}${datadir}/glib-2.0/codegen/__pycache__ + rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc + rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo + + if [ -e ${D}${libdir}/charset.alias ]; then + rm -f ${D}${libdir}/charset.alias + fi + + # Make sure gio-querymodules is unique among multilibs + if test "x${MLPREFIX}" != "x"; then + mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT} + fi + # Autotools does this, meson does not + mkdir -p ${D}${libdir}/gio/modules +} + +do_install_append_class-target () { + # Tests are only installed on targets, not native builds. Separating this out + # keeps glib-2.0-native from depending on DISTRO_FEATURES + if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then + if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then + rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test + fi + fi + if [ -f ${D}${datadir}/installed-tests/glib/static-link.test ]; then + if test "x${MLPREFIX}" != "x"; then + mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test + fi + fi +} + +# As we do not build python3 for windows, makes no sense to ship the script that's using it +do_install_append_mingw32() { + rm -f ${D}${bindir}/gtester-report +} + +CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" +CODEGEN_PYTHON_RDEPENDS_mingw32 = "" + +#RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" + +RDEPENDS_${PN}-ptest += "${PN}-utils" + +RDEPENDS_${PN}-ptest += "\ + coreutils \ + libgcc \ + dbus \ + gnome-desktop-testing \ + tzdata \ + tzdata-americas \ + tzdata-asia \ + tzdata-europe \ + tzdata-posix \ + shared-mime-info \ + ${PN}-locale-ja \ + ${PN}-locale-fr \ + ${PN}-locale-el \ + ${PN}-locale-hr \ + ${PN}-locale-lt \ + ${PN}-locale-pl \ + ${PN}-locale-ru \ + ${PN}-locale-th \ + python3-core \ + python3-modules \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \ + ${PN}-codegen \ + " + +RDEPENDS_${PN}-ptest_append_libc-glibc = "\ + glibc-gconv-utf-16 \ + glibc-charmap-utf-8 \ + glibc-gconv-cp1255 \ + glibc-charmap-cp1255 \ + glibc-gconv-utf-32 \ + glibc-gconv-utf-7 \ + glibc-gconv-euc-jp \ + glibc-gconv-iso8859-1 \ + glibc-gconv-iso8859-15 \ + glibc-charmap-invariant \ + glibc-localedata-translit-cjk-variants \ + locale-base-tr-tr \ + locale-base-lt-lt \ + locale-base-ja-jp.euc-jp \ + locale-base-fa-ir \ + locale-base-ru-ru \ + locale-base-de-de \ + locale-base-hr-hr \ + locale-base-el-gr \ + locale-base-fr-fr \ + locale-base-es-es \ + locale-base-en-gb \ + locale-base-en-us \ + locale-base-pl-pl \ + locale-base-pl-pl.iso-8859-2 \ + " +DEPENDS_remove += "meson-native glib-2.0-native" diff --git a/meta-openeuler/recipes-core/glibc/glibc_2.34.bb b/meta-openeuler/recipes-core/glibc/glibc_2.34.bb new file mode 100644 index 0000000000000000000000000000000000000000..c1725d816bcbfd1d42a1c5d14bd7b0756b24c8bb --- /dev/null +++ b/meta-openeuler/recipes-core/glibc/glibc_2.34.bb @@ -0,0 +1,75 @@ +SUMMARY = "GLIBC (GNU C Library)" +DESCRIPTION = "The GNU C Library is used as the system C library in most systems with the Linux kernel. \ + In openEuler, glibc is prebuilt and part of toolchain. This recipe just installs the glibc \ + binary" +HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" +SECTION = "libs" +LICENSE = "GPLv2 & LGPLv2.1" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +PACKAGES = "${PN} ${PN}-dev ${PN}-staticdev" + +#need strip command from compiler when do_package +DEPENDS = "virtual/${TARGET_PREFIX}gcc" +PROVIDES += "virtual/libc virtual/libiconv virtual/libintl" +#RPROVIDES_${PN}-dev += "libc-dev" + + +INHIBIT_DEFAULT_DEPS = "1" + +PR = "r1" + +require ../../recipes-devtools/gcc/gcc-bin-toolchain.inc + +SRC_URI_aarch64 = "file://openeuler_gcc_arm64le" +SRC_URI_arm = "file://openeuler_gcc_arm32le" + +#Not strip toolchain +INHIBIT_SYSROOT_STRIP = "1" +INSANE_SKIP_${PN} += "already-stripped" + +S_aarch64 = "${WORKDIR}/openeuler_gcc_arm64le" +S_arm = "${WORKDIR}/openeuler_gcc_arm32le" + +PSEUDO_DISABLED = "1" + +do_configure() { + : +} + +do_compile () { + : +} + +do_install() { + install -m 0755 -d ${D}/ + install -m 0755 -d ${D}/${base_libdir} + install -m 0755 -d ${D}/${libdir} + cp -pPR ${S}/sysroot/* ${D}/ + chmod -R 755 ${D}/${base_libdir} + chmod -R 755 ${D}/${libdir} + rm -rf ${D}/etc/rpc + rm -rf ${D}${datadir}/info + rm -rf ${D}${base_libdir}/debug + chown root:root ${D}/ -R +} + +FILES_${PN} = " \ + ${base_libdir}/*.so \ + ${base_libdir}/*.so.* \ + ${libdir}/*.so \ + ${libdir}/*.so.* \ + ${base_sbindir}/ldconfig \ +" +FILES_${PN}-staticdev = " \ + ${base_libdir}/*.a \ + ${libdir}/*.a \ +" + +INSANE_SKIP_${PN} += "installed-vs-shipped" +INSANE_SKIP += "dev-elf dev-so" + +SYSROOT_DIRS += "/*" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/gmp/gmp.inc b/meta-openeuler/recipes-core/gmp/gmp.inc new file mode 100644 index 0000000000000000000000000000000000000000..948b89288e05638b039080a47dfa0a948544a53e --- /dev/null +++ b/meta-openeuler/recipes-core/gmp/gmp.inc @@ -0,0 +1,12 @@ +SUMMARY = "GNU multiprecision arithmetic library" +DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers" +HOMEPAGE = "http://gmplib.org/" +SECTION = "devel" + +inherit autotools texinfo multilib_header + +PACKAGECONFIG ??= "" +PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" diff --git a/meta-openeuler/recipes-core/gmp/gmp_6.2.1.bb b/meta-openeuler/recipes-core/gmp/gmp_6.2.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..37245b732ecf2103d9326e851fe73fd2786e2193 --- /dev/null +++ b/meta-openeuler/recipes-core/gmp/gmp_6.2.1.bb @@ -0,0 +1,41 @@ +require gmp.inc + +LICENSE = "GPLv2+ | LGPLv3+" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ +" + +REVISION = "" +SRC_URI = "file://gmp/${BP}.tar.bz2 \ + " +SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea" +SRC_URI[sha256sum] = "eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c" + +acpaths = "" + +EXTRA_OECONF += " --enable-cxx=detect" +EXTRA_OECONF_mipsarchr6_append = " --disable-assembly" + +PACKAGES =+ "libgmpxx" +FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}" + +do_install_append() { + oe_multilib_header gmp.h +} + +do_install_prepend_class-target() { + sed -i \ + -e "s|--sysroot=${STAGING_DIR_HOST}||g" \ + -e "s|${DEBUG_PREFIX_MAP}||g" \ + ${B}/gmp.h +} + +SSTATE_SCAN_FILES += "gmp.h" + +# Doesn't compile in MIPS16e mode due to use of hand-written +# assembly +MIPS_INSTRUCTION_SET = "mips" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/grep/grep_3.7.bb b/meta-openeuler/recipes-core/grep/grep_3.7.bb new file mode 100644 index 0000000000000000000000000000000000000000..ed3dcb511e15b62d22ad30d8671e71fc7464456a --- /dev/null +++ b/meta-openeuler/recipes-core/grep/grep_3.7.bb @@ -0,0 +1,45 @@ +SUMMARY = "GNU grep utility" +HOMEPAGE = "http://savannah.gnu.org/projects/grep/" +DESCRIPTION = "Grep searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines." +BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" +SECTION = "console/utils" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +SRC_URI = "file://grep/grep-${PV}.tar.xz \ + file://grep/backport-grep-avoid-sticky-problem-with-f-f.patch \ +" +SRC_URI[sha256sum] = "5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c" + +inherit autotools gettext texinfo pkgconfig + +# Fix "Argument list too long" error when len(TMPDIR) = 410 +acpaths = "-I ./m4" + +do_configure_prepend () { + sed -i -e '1s,#!@SHELL@,#!/bin/sh,' ${S}/src/egrep.sh + rm -f ${S}/m4/init.m4 +} + +do_install () { + autotools_do_install + if [ "${base_bindir}" != "${bindir}" ]; then + install -d ${D}${base_bindir} + mv ${D}${bindir}/grep ${D}${base_bindir}/grep + mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep + mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep + rmdir ${D}${bindir}/ + fi +} + +PACKAGECONFIG ??= "pcre" +PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre" + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "grep egrep fgrep" +ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" +ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" +ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/gzip/files/run-ptest b/meta-openeuler/recipes-core/gzip/files/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..cf7c64949abd31148f71b2f260b7f5f6d7c7b969 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/files/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh + +cd src/tests + +make check + diff --git a/meta-openeuler/recipes-core/gzip/gzip.inc b/meta-openeuler/recipes-core/gzip/gzip.inc new file mode 100644 index 0000000000000000000000000000000000000000..1a0747dff837e8ab538e9689c891e4f5d603fc19 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/gzip.inc @@ -0,0 +1,33 @@ +SUMMARY = "Standard GNU compressor" +DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ +project. Mark Adler wrote the decompression part" +HOMEPAGE = "http://www.gnu.org/software/gzip/" +SECTION = "console/utils" +# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12 + +inherit autotools texinfo +export DEFS="NO_ASM" + +EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep" +EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes " + +do_install_append () { + if [ "${base_bindir}" != "${bindir}" ]; then + # Rename and move files into /bin (FHS), which is typical place for gzip + install -d ${D}${base_bindir} + mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip + mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip + mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat + mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress + fi +} + +#inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "gunzip gzip zcat" +ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" +ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" +ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" + +export CONFIG_SHELL="/bin/sh" diff --git a/meta-openeuler/recipes-core/gzip/gzip/wrong-path-fix.patch b/meta-openeuler/recipes-core/gzip/gzip/wrong-path-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..7c37bc8d2d9269aaf86c70164aa0ad86c65cae12 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/gzip/wrong-path-fix.patch @@ -0,0 +1,36 @@ +fix MakeMaker issues with using wrong SHELL/GREP + +A set of substitution is being processed to all target scripts with sed by +replacing some key words with the detected values at configure time, this +is exactly not compliant with cross compling, and will cause missing path +errors at run time like: +"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory" + +Fixed by removing unneeded substitution and using real runtime paths +instead. + +Signed-off-by: Ming Liu + +Upstream-Status: Pending + +--- + Makefile.am | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index d4ecc3f..e4657d2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -82,8 +82,7 @@ SUFFIXES = .in + .in: + $(AM_V_GEN)rm -f $@-t $@ \ + && sed \ +- -e 's|/bin/sh|$(SHELL)|g' \ +- -e 's|[@]GREP@|$(GREP)|g' \ ++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \ + -e 's|[@]VERSION@|$(VERSION)|g' \ + $(srcdir)/$@.in >$@-t \ + && chmod a=rx $@-t \ +-- +2.7.4 + diff --git a/meta-openeuler/recipes-core/gzip/gzip_1.11.bb b/meta-openeuler/recipes-core/gzip/gzip_1.11.bb new file mode 100644 index 0000000000000000000000000000000000000000..3e93b0aeb671d5648d44b7072c4503501b5a38bc --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/gzip_1.11.bb @@ -0,0 +1,42 @@ +require gzip.inc + +LICENSE = "GPLv3+" + +SRC_URI = "file://gzip/${BP}.tar.xz \ + file://gzip/fix-verbose-disable.patch \ + file://run-ptest \ + " +#file://gzip/performance-neoncrc32-and-prfm.patch +SRC_URI_append_class-target = " file://wrong-path-fix.patch" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e" + +PROVIDES_append_class-native = " gzip-replacement-native" + +RDEPENDS_${PN}-ptest += "make perl grep diffutils" + +BBCLASSEXTEND = "native nativesdk" + +inherit ptest + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/src/build-aux + cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/ + mkdir -p ${D}${PTEST_PATH}/src/tests + cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests + sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ + -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ + -e 's/^GREP = ..*/GREP = grep/' \ + -e 's/^AWK = ..*/AWK = awk/' \ + -e 's/^srcdir = ..*/srcdir = \./' \ + -e 's/^Makefile: ..*/Makefile: /' \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile +} + +SRC_URI[md5sum] = "d1e93996dba00cab0caa7903cd01d454" +SRC_URI[sha256sum] = "9b9a95d68fdcb936849a4d6fada8bf8686cddf58b9b26c9c4289ed0c92a77907" diff --git a/meta-openeuler/recipes-core/http-parser/http-parser_2.9.4.bb b/meta-openeuler/recipes-core/http-parser/http-parser_2.9.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..76857503b4fd1c88f243b5312929ab6e914a7848 --- /dev/null +++ b/meta-openeuler/recipes-core/http-parser/http-parser_2.9.4.bb @@ -0,0 +1,51 @@ +SUMMARY = "Protocol Buffers - structured data serialisation mechanism" +DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" +SECTION = "console/tools" +LICENSE = "BSD-2-Clause" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://http-parser/http-parser-2.9.4.tar.gz" + +S = "${WORKDIR}/${BPN}-${PV}" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +DEPENDS = "" +#CFLAGS_remove = "-D_FORTIFY_SOURCE=2" +#CPPFLAGS_remove = "-D_FORTIFY_SOURCE=2" +#CXXPFLAGS_remove = "-D_FORTIFY_SOURCE=2" + + +inherit autotools pkgconfig + +PACKAGES = "${PN}-dev ${PN}" +FILES_${PN}-dev = "${includedir}/*" +FILES_${PN} += "${libdir}/*" + +do_package_qa() { + : +} + +do_compile() { + make library +} + +do_install_append () { + [[ "${libdir}" != "/usr/local/lib" ]] || return 0 + if test -d ${D}/usr/local/lib ; then + cd ${D}/usr/local/lib + ln -sf libhttp_parser.so.${PV} libhttp_parser.so + cd - + mv ${D}/usr/local/lib ${D}/${libdir} + fi + if test -d ${D}/usr/local/include ; then + mv ${D}/usr/local/include ${D}/${includedir} + fi + rm -rf ${D}/usr/local +} + +BBCLASSEXTEND = "native nativesdk" +B = "${S}" + + diff --git a/meta-openeuler/recipes-core/iSulad/iSulad_2.0.11.bb b/meta-openeuler/recipes-core/iSulad/iSulad_2.0.11.bb new file mode 100644 index 0000000000000000000000000000000000000000..25c3da73a65bc11f6b76755d86cecfd59ad87cc3 --- /dev/null +++ b/meta-openeuler/recipes-core/iSulad/iSulad_2.0.11.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://iSulad/v${PV}.tar.gz \ + file://iSulad/0001-iSulad-Add-the-function-of-isolating-the-user-namesp.patch \ + file://iSulad/0002-let-isulad-root-path-configable-when-userns-remap.patch \ +" + +S = "${WORKDIR}/${BPN}-v${PV}" +WARN_QA_remove += "uppercase-pn" + +inherit cmake +OECMAKE_GENERATOR = "Unix Makefiles" + +DEPENDS = "yajl zlib libarchive http-parser curl lcr libevent libevhtp openssl libwebsockets" + +EXTRA_OECMAKE = "-DENABLE_GRPC=OFF -DENABLE_SYSTEMD_NOTIFY=OFF -DENABLE_SELINUX=OFF \ + -DENABLE_SHIM_V2=OFF -DENABLE_OPENSSL_VERIFY=OFF \ + -DGRPC_CONNECTOR=OFF -DDISABLE_OCI=ON \ + " + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +FILES_${PN} += "${libdir}/* " +#remove so from ${PN}-dev +FILES_SOLIBSDEV = "" + +do_configure_prepend() { + grep -q CMAKE_SYSROOT ${WORKDIR}/toolchain.cmake || cat >> ${WORKDIR}/toolchain.cmake < +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Tools for managing Linux kernel modules" +DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ + insert, remove, list, check properties, resolve dependencies and aliases." +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/" +LICENSE = "GPL-2.0+ & LGPL-2.1+" +LICENSE_libkmod = "LGPL-2.1+" +SECTION = "base" + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \ + " +inherit autotools pkgconfig manpages + +SRC_URI = "file://kmod/${BP}.tar.xz \ + file://kmod/0001-libkmod-module-check-new_from_name-return-value-in-g.patch \ + file://kmod/0002-Module-replace-the-module-with-new-module.patch \ + file://kmod/0003-Module-suspend-the-module-by-rmmod-r-option.patch \ + file://kmod/0004-don-t-check-module-s-refcnt-when-rmmod-with-r.patch \ + file://depmod-search.conf \ + " +SRC_URI[sha256sum] = "0b80eea7aa184ac6fd20cafa2a1fdf290ffecc70869a797079e2cc5c6225a52a" + +EXTRA_OECONF +=" --enable-tools --with-zlib" + +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" +PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" +PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" + +GTKDOC_DOCDIR = "${S}/libkmod/docs" diff --git a/meta-openeuler/recipes-core/kmod/kmod/depmod-search.conf b/meta-openeuler/recipes-core/kmod/kmod/depmod-search.conf new file mode 100644 index 0000000000000000000000000000000000000000..527c0bb6eeb535bc8ed160b83e2b6f8487ec2c1c --- /dev/null +++ b/meta-openeuler/recipes-core/kmod/kmod/depmod-search.conf @@ -0,0 +1,6 @@ +# +# /etc/depmod.d/depmod.conf +# + +search updates extramodules built-in + diff --git a/meta-openeuler/recipes-core/kmod/kmod/run-ptest b/meta-openeuler/recipes-core/kmod/kmod/run-ptest new file mode 100755 index 0000000000000000000000000000000000000000..598dd2cb5fbad194a135e5d06601847e00df1586 --- /dev/null +++ b/meta-openeuler/recipes-core/kmod/kmod/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh +touch testsuite/stamp-rootfs +tar xf testmodule.tar +make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL +find testsuite -name *.ko -exec rm -f {} \; diff --git a/meta-openeuler/recipes-core/kmod/kmod_29.bb b/meta-openeuler/recipes-core/kmod/kmod_29.bb new file mode 100644 index 0000000000000000000000000000000000000000..5ab65d6e8be576b539c5500d1fee93ef23aae53e --- /dev/null +++ b/meta-openeuler/recipes-core/kmod/kmod_29.bb @@ -0,0 +1,61 @@ +# Copyright (C) 2012 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc + +DEPENDS += "zlib" +PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# to force user to remove old module-init-tools and replace them with kmod variants +RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# autotools set prefix to /usr, however we want them in /bin and /sbin +EXTRA_OECONF += " --bindir=${base_bindir} --sbindir=${base_sbindir}" + +do_install_append () { + install -dm755 ${D}${base_bindir} + install -dm755 ${D}${base_sbindir} + # add symlinks to kmod + lnr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod + for tool in insmod rmmod depmod modinfo modprobe; do + lnr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} + done + # configuration directories + install -dm755 ${D}${base_libdir}/depmod.d + install -dm755 ${D}${base_libdir}/modprobe.d + install -dm755 ${D}${sysconfdir}/depmod.d + install -dm755 ${D}${sysconfdir}/modprobe.d + + # install depmod.d file for search/ dir + install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" +} + +do_compile_prepend() { + sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status +} + +ALTERNATIVE_PRIORITY = "70" + +ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" + +ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" +ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" +ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" +ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" +ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" + +ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" +ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" + +ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" + +PACKAGES =+ "${PN}-bash-completion libkmod" + +FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions" +FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" +FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/lcr/lcr_2.0.7.bb b/meta-openeuler/recipes-core/lcr/lcr_2.0.7.bb new file mode 100644 index 0000000000000000000000000000000000000000..00dedc84583d2c491f7e31174cca4fa4adc31895 --- /dev/null +++ b/meta-openeuler/recipes-core/lcr/lcr_2.0.7.bb @@ -0,0 +1,48 @@ +### Descriptive metadata +SUMMARY = "lcr(Lightweight Container Runtime)" +DESCRIPTION = "lcr`(Lightweight Container Runtime) is CLI tool for spawning and running containers according to \ + OCI specification. It is based on `liblxc` and written by `C`. It can use by container engine: \ + iSulad" +HOMEPAGE = "https://gitee.com/openeuler/lcr" +BUGTRACKER = "https://gitee.com/openeuler/yocto-meta-openeuler" + +### License metadata +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +### Inheritance and includes if needed +inherit cmake + +### Build metadata +SRC_URI = "file://lcr/v${PV}.tar.gz \ + file://lcr/0001-parse-userns-remap-in-daemmon.json.patch \ +" + +S = "${WORKDIR}/${BPN}-v${PV}" + +OECMAKE_GENERATOR = "Unix Makefiles" + +DEPENDS = "yajl lxc" + +### Package metadata +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +#remove so from ${PN}-dev +FILES_SOLIBSDEV = "" +FILES_${PN} += "${libdir}/* " + +### Tasks for package +do_configure_prepend() { + grep -q CMAKE_SYSROOT ${WORKDIR}/toolchain.cmake || cat >> ${WORKDIR}/toolchain.cmake <= 418)) | less +# Including email author giving permissing to use BSD +# +# From: Mark Nudelman +# To: Elizabeth Flanagan ${S}/acinclude.m4 + fi + sed -i -e's,^V_RPATH_OPT=.*$,V_RPATH_OPT=,' ${S}/pcap-config.in +} + +BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-core/libpcre/libpcre/Makefile b/meta-openeuler/recipes-core/libpcre/libpcre/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..708d807d0850e4e8b0294ee027a63710e8eb6955 --- /dev/null +++ b/meta-openeuler/recipes-core/libpcre/libpcre/Makefile @@ -0,0 +1,183 @@ +TESTS = pcre_stringpiece_unittest RunTest RunGrepTest +subdir = . +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +am__sh_e_setup = case $$- in *e*) set +e;; esac +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +MKDIR_P = /bin/mkdir -p +PACKAGE_STRING = PCRE 8.36 +SHELL = /bin/sh +srcdir = . +top_srcdir = . +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done; \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT) + @p='pcre_stringpiece_unittest$(EXEEXT)'; \ + b='pcre_stringpiece_unittest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- "$$tst" +RunTest.log: RunTest + @p='RunTest'; \ + b='RunTest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- "$$tst" +RunGrepTest.log: RunGrepTest + @p='RunGrepTest'; \ + b='RunGrepTest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- "$$tst" diff --git a/meta-openeuler/recipes-core/libpcre/libpcre/run-ptest b/meta-openeuler/recipes-core/libpcre/libpcre/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..990d4a12ad67df8b1492914e80fd0281393469da --- /dev/null +++ b/meta-openeuler/recipes-core/libpcre/libpcre/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make check-TESTS diff --git a/meta-openeuler/recipes-core/libpcre/libpcre_8.45.bb b/meta-openeuler/recipes-core/libpcre/libpcre_8.45.bb new file mode 100644 index 0000000000000000000000000000000000000000..a83d9c6c63fee19525819ce39064b22d9502b02f --- /dev/null +++ b/meta-openeuler/recipes-core/libpcre/libpcre_8.45.bb @@ -0,0 +1,74 @@ +DESCRIPTION = "The PCRE library is a set of functions that implement regular \ +expression pattern matching using the same syntax and semantics as Perl 5. PCRE \ +has its own native API, as well as a set of wrapper functions that correspond \ +to the POSIX regular expression API." +SUMMARY = "Perl Compatible Regular Expressions" +HOMEPAGE = "http://www.pcre.org" +SECTION = "devel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b5d5d1a69a24ea2718263f1ff85a1c58" +SRC_URI = "file://pcre/pcre-${PV}.tar.bz2 \ + file://run-ptest \ + file://Makefile \ + " + +SRC_URI[md5sum] = "4452288e6a0eefb2ab11d36010a1eebb" +SRC_URI[sha256sum] = "4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8" + +CVE_PRODUCT = "pcre" + +S = "${WORKDIR}/pcre-${PV}" + +PROVIDES += "pcre" +DEPENDS += "bzip2 zlib" + +PACKAGECONFIG ??= "pcre8 unicode-properties jit" + +PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8" +PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16" +PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32" +PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," +PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties" +PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit" + +BINCONFIG = "${bindir}/pcre-config" + +inherit autotools binconfig-disabled ptest + +EXTRA_OECONF = "--enable-utf" + +PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" + +SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions" +SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API" +SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes" +SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs" +SUMMARY_pcretest = "program for testing Perl-comatible regular expressions" +SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs" + +FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*" +FILES_libpcreposix = "${libdir}/libpcreposix.so.*" +FILES_pcregrep = "${bindir}/pcregrep" +FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1" +FILES_pcretest = "${bindir}/pcretest" +FILES_pcretest-doc = "${mandir}/man1/pcretest.1" + +BBCLASSEXTEND = "native nativesdk" + +do_install_ptest() { + t=${D}${PTEST_PATH} + cp ${WORKDIR}/Makefile $t + cp -r ${S}/testdata $t + for i in pcre_stringpiece_unittest pcregrep pcretest; \ + do cp ${B}/.libs/$i $t; \ + done + for i in RunTest RunGrepTest test-driver; \ + do cp ${S}/$i $t; \ + done + # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested. + # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8 + # locale so the test fails if fr_FR is UTF-8 locale. + sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest +} + +RDEPENDS_${PN}-ptest += "make" diff --git a/meta-openeuler/recipes-core/libpwquality/libpwquality_1.4.4.bb b/meta-openeuler/recipes-core/libpwquality/libpwquality_1.4.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..71f88f5a16cd41092852d61b04180b23f5033364 --- /dev/null +++ b/meta-openeuler/recipes-core/libpwquality/libpwquality_1.4.4.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Library for password quality checking and generating random passwords" +HOMEPAGE = "https://github.com/libpwquality/libpwquality" +SECTION = "devel/lib" +LICENSE = "GPLv2" + +PARALLEL_MAKE = "-j 1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" + +SRC_URI = "file://libpwquality/${BP}.tar.bz2 \ + file://libpwquality/modify-pwquality_conf.patch \ + file://libpwquality/fix-password-similarity.patch \ +" + +DEPENDS = "cracklib" + +inherit autotools gettext + +export PYTHON_DIR +export BUILD_SYS +export HOST_SYS + +EXTRA_OECONF += "--enable-python-bindings=no \ + --libdir=${base_libdir} \ +" + +do_install_append() { + rm -r ${D}/${base_libdir}/pkgconfig +} + +PACKAGECONFIG ??= "pam" +PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" +FILES_${PN} += "${base_libdir}/security/pam_pwquality.so" +FILES_${PN}-dbg += "${base_libdir}/security/.debug" +FILES_${PN}-staticdev += "${base_libdir}/security/pam_pwquality.a" +FILES_${PN}-dev += "${base_libdir}/security/pam_pwquality.la" + diff --git a/meta-openeuler/recipes-core/libseccomp/libseccomp_2.5.3.bb b/meta-openeuler/recipes-core/libseccomp/libseccomp_2.5.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..d56ae9b369065e2c6f8a1fd1133d44b63781310e --- /dev/null +++ b/meta-openeuler/recipes-core/libseccomp/libseccomp_2.5.3.bb @@ -0,0 +1,21 @@ +SUMMARY = "interface to seccomp filtering mechanism" +DESCRIPTION = "The libseccomp library provides and easy to use, platform independent,interface to the Linux Kernel's syscall filtering mechanism: seccomp." +SECTION = "security" +HOMEPAGE = "https://github.com/seccomp/libseccomp" +BUGTRACKER = "https://github.com/seccomp/libseccomp/issues" +LICENSE = "LGPL-2.1" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://libseccomp/${BP}.tar.gz" + + +S = "${WORKDIR}/${BP}" + +inherit autotools + +FILES_${PN} = "${bindir} ${libdir}/${BPN}.so*" + +do_compile_prepend() { + cp ${B}/include/seccomp.h ${S}/include +} diff --git a/meta-openeuler/recipes-core/libtirpc/libtirpc_1.3.2.bb b/meta-openeuler/recipes-core/libtirpc/libtirpc_1.3.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..c4d06b5055c2c888cca24803a2743013fd4e5dd7 --- /dev/null +++ b/meta-openeuler/recipes-core/libtirpc/libtirpc_1.3.2.bb @@ -0,0 +1,27 @@ +SUMMARY = "Transport-Independent RPC library" +DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux" +SECTION = "libs/network" +HOMEPAGE = "http://sourceforge.net/projects/libtirpc/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ + file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" + +PROVIDES = "virtual/librpc" + +SRC_URI = "file://libtirpc/libtirpc-${PV}.tar.bz2 \ + file://libtirpc/0001-update-libtirpc-to-enable-tcp-port-listening.patch \ +" +UPSTREAM_CHECK_URI = "https://gitee.com/src-openeuler/libtirpc" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)/" +SRC_URI[sha256sum] = "245895caf066bec5e3d4375942c8cb4366adad184c29c618d97f724ea309ee17" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--disable-gssapi" + +do_install_append() { + chown root:root ${D}${sysconfdir}/netconfig +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/libusb/libusb1/run-ptest b/meta-openeuler/recipes-core/libusb/libusb1/run-ptest new file mode 100755 index 0000000000000000000000000000000000000000..eaa47a2bc4f074dc3e68b680b64045e992ff935c --- /dev/null +++ b/meta-openeuler/recipes-core/libusb/libusb1/run-ptest @@ -0,0 +1,29 @@ +#!/bin/sh + +echo +echo "---------------------------- libusb1 tests ---------------------------" +echo + +./stress | { \ +while read -r str +do + echo "$str" + if [ "${str#*Starting test run:}" != "$str" ] + then + name="${str#Starting test run: }" + name="${name%...}" + else + case "$str" in + "Success (0)") + echo "PASS: $name" + ;; + "Failure (1)" | "Error (2)") + echo "FAIL: $name" + ;; + "Skip (3)") + echo "SKIP: $name" + ;; + esac + fi +done +} diff --git a/meta-openeuler/recipes-core/libusb/libusb1_1.0.24.bb b/meta-openeuler/recipes-core/libusb/libusb1_1.0.24.bb new file mode 100644 index 0000000000000000000000000000000000000000..3353b0c7024f7f5897b0c43226d39450b9ff0d11 --- /dev/null +++ b/meta-openeuler/recipes-core/libusb/libusb1_1.0.24.bb @@ -0,0 +1,45 @@ +SUMMARY = "Userspace library to access USB (version 1.0)" +DESCRIPTION = "A cross-platform library to access USB devices from Linux, \ +macOS, Windows, OpenBSD/NetBSD, Haiku and Solaris userspace." +HOMEPAGE = "http://libusb.sf.net" +BUGTRACKER = "http://www.libusb.org/report" +SECTION = "libs" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI = "file://libusbx/libusb-${PV}.tar.bz2 \ + file://run-ptest \ + " + +SRC_URI[sha256sum] = "7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a" + +S = "${WORKDIR}/libusb-${PV}" + +inherit autotools pkgconfig ptest + +PACKAGECONFIG-class-target ??= "" +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" + +EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev" + +do_install_append() { + install -d ${D}${libdir} + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then + mv ${D}${base_libdir}/pkgconfig ${D}${libdir} + fi +} + +do_compile_ptest() { + oe_runmake -C tests stress +} + +do_install_ptest() { + install -m 755 ${B}/tests/.libs/stress ${D}${PTEST_PATH} +} + +FILES_${PN} += "${base_libdir}/*.so.*" + +FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" diff --git a/meta-openeuler/recipes-core/libwebsockets/libwebsockets_4.3.0.bb b/meta-openeuler/recipes-core/libwebsockets/libwebsockets_4.3.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..d8f4e62675d595c2cb9439ef370ab9d17a55f8e0 --- /dev/null +++ b/meta-openeuler/recipes-core/libwebsockets/libwebsockets_4.3.0.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://libwebsockets/${BP}.tar.gz \ + file://libwebsockets/0001-add-secure-compile-option-in-Makefile.patch \ + file://libwebsockets/0002-solve-the-BEP-problem.patch \ +" + +S = "${WORKDIR}/${BP}" + +inherit cmake + +DEPENDS = "zlib openssl" + +EXTRA_OECMAKE = "-DLWS_WITH_HTTP2=ON -DLWS_IPV6=ON -DLWS_WITH_ZIP_FOPS=ON -DLWS_WITH_SOCKS5=ON -DLWS_WITH_RANGES=ON -DLWS_WITH_ACME=ON \ + -DLWS_WITH_LIBUV=OFF -DLWS_WITH_LIBEV=OFF -DLWS_WITH_LIBEVENT=OFF -DLWS_WITH_FTS=ON -DLWS_WITH_THREADPOOL=ON -DLWS_UNIX_SOCK=ON \ + -DLWS_WITH_HTTP_PROXY=ON -DLWS_WITH_DISKCACHE=ON -DLWS_WITH_LWSAC=ON -DLWS_LINK_TESTAPPS_DYNAMIC=ON -DLWS_WITHOUT_BUILTIN_GETIFADDRS=ON -DLWS_USE_BUNDLED_ZLIB=OFF \ + -DLWS_WITHOUT_BUILTIN_SHA1=ON \ + -DLWS_WITH_STATIC=OFF \ + -DLWS_WITHOUT_CLIENT=OFF \ + -DLWS_WITHOUT_SERVER=OFF \ + -DLWS_WITHOUT_TESTAPPS=OFF \ + -DLWS_WITHOUT_TEST_SERVER=ON \ + -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \ + -DLWS_WITHOUT_TEST_PING=ON \ + -DLWS_WITHOUT_TEST_CLIENT=ON \ + " + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +FILES_${PN} += "${libdir}/*" +INSANE_SKIP_${PN} += "already-stripped" +INSANE_SKIP_${PN} += "dev-so" +FILES_SOLIBSDEV = "" + +do_install_append() { + rm -rf ${D}/usr/share + ${STRIP} ${D}/${libdir}/*.so* +} diff --git a/meta-openeuler/recipes-core/libxml/libxml2/run-ptest b/meta-openeuler/recipes-core/libxml/libxml2/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..c313d83263a825640803559dfe97041c1492328b --- /dev/null +++ b/meta-openeuler/recipes-core/libxml/libxml2/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +export LC_ALL=en_US.UTF-8 +make -k runtests diff --git a/meta-openeuler/recipes-core/libxml/libxml2_2.9.12.bb b/meta-openeuler/recipes-core/libxml/libxml2_2.9.12.bb new file mode 100644 index 0000000000000000000000000000000000000000..1664216ec8f0a60399ee4bf0aa4c48f6ad4f7aef --- /dev/null +++ b/meta-openeuler/recipes-core/libxml/libxml2_2.9.12.bb @@ -0,0 +1,104 @@ +SUMMARY = "XML C Parser Library and Toolkit" +DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat." +HOMEPAGE = "http://www.xmlsoft.org/" +BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ + file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ + file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ + file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f \ +" + +DEPENDS = "zlib virtual/libiconv" + +SRC_URI = "file://libxml2/${BP}.tar.gz \ + file://libxml2/libxml2-multilib.patch \ + file://libxml2/Fix-XPath-recursion-limit.patch \ + file://libxml2/Fix-Null-deref-in-xmlSchemaGetComponentTargetNs.patch \ + file://libxml2/Fix-memleaks-in-xmlXIncludeProcessFlags.patch \ + file://libxml2/xmlAddChild-and-xmlAddNextSibling-may-not-attach-the.patch \ + file://libxml2/Work-around-lxml-API-abuse.patch \ + file://libxml2/Fix-regression-in-xmlNodeDumpOutputInternal.patch \ + file://libxml2/Fix-whitespace-when-serializing-empty-HTML-documents.patch \ + file://libxml2/Patch-to-forbid-epsilon-reduction-of-final-states.patch \ + file://libxml2/Fix-buffering-in-xmlOutputBufferWrite.patch \ + file://libxml2/backport-CVE-2022-23308-Use-after-free-of-ID-and-IDREF-attrib.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92" + +BINCONFIG = "${bindir}/xml2-config" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" + +PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +inherit autotools pkgconfig binconfig-disabled ptest python3native + +RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" + +RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" + +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us \ + glibc-gconv-ibm1141 \ + glibc-gconv-iso8859-5 \ + glibc-gconv-euc-jp \ + locale-base-en-us \ + " + +export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}" + +# WARNING: zlib is required for RPM use +EXTRA_OECONF = "--without-debug --without-legacy --without-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions" +EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib" + +python populate_packages_prepend () { + # autonamer would call this libxml2-2, but we don't want that + if d.getVar('DEBIAN_NAMES'): + d.setVar('PKG_libxml2', '${MLPREFIX}libxml2') +} + +PACKAGE_BEFORE_PN += "${PN}-utils" +PACKAGES += "${PN}-python" + +FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" +FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*" +FILES_${PN}-utils = "${bindir}/*" +FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" + +do_compile_ptest() { + oe_runmake check-am +} + +do_install_ptest () { + cp -r ${S}/xmlconf ${D}${PTEST_PATH} + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \ + ${D}${PTEST_PATH}/python/tests/Makefile + grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python | + xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|' + fi + #Remove build host references from various Makefiles + find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -e '/^RELDATE/d' \ + {} + +} + +do_install_append_class-native () { + # Docs are not needed in the native case + rm ${D}${datadir}/gtk-doc -rf +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/logrotate/logrotate_3.18.1.bb b/meta-openeuler/recipes-core/logrotate/logrotate_3.18.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..8258b144b6661bf118c97b6fd4e99572ba9265f2 --- /dev/null +++ b/meta-openeuler/recipes-core/logrotate/logrotate_3.18.1.bb @@ -0,0 +1,85 @@ +SUMMARY = "Rotates, compresses, removes and mails system log files" +SECTION = "console/utils" +HOMEPAGE = "https://github.com/logrotate/logrotate/" +DESCRIPTION = "The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files." +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "popt" + +SRC_URI = "file://${BPN}/${BP}.tar.xz" +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "logrotate-(?P\d+(\.\d+)+).tar" + +# These CVEs are debian, gentoo or SUSE specific on the way logrotate was installed/used +CVE_CHECK_WHITELIST += "CVE-2011-1548 CVE-2011-1549 CVE-2011-1550" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" + +PACKAGECONFIG[acl] = ",,acl" +PACKAGECONFIG[selinux] = ",,libselinux" + +CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ + ${sysconfdir}/logrotate.conf \ + ${sysconfdir}/logrotate.d/btmp \ + ${sysconfdir}/logrotate.d/wtmp" + +# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our +# optimization variables, so use it rather than EXTRA_CFLAGS. +EXTRA_OEMAKE = "\ + LFS= \ + OS_NAME='${OS_NAME}' \ + 'CC=${CC}' \ + 'RPM_OPT_FLAGS=${CFLAGS}' \ + 'EXTRA_LDFLAGS=${LDFLAGS}' \ + ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \ +" + +# OS_NAME in the makefile defaults to `uname -s`. The behavior for +# freebsd/netbsd is questionable, so leave it as Linux, which only sets +# INSTALL=install and BASEDIR=/usr. +OS_NAME = "Linux" + +inherit autotools systemd + +SYSTEMD_SERVICE_${PN} = "\ + ${BPN}.service \ + ${BPN}.timer \ +" + +LOGROTATE_OPTIONS ?= "" + +LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily" +LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h" +LOGROTATE_SYSTEMD_TIMER_PERSISTENT ?= "true" + +do_install(){ + oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} + mkdir -p ${D}${sysconfdir}/logrotate.d + mkdir -p ${D}${localstatedir}/lib + install -p -m 644 ${S}/examples/logrotate.conf ${D}${sysconfdir}/logrotate.conf + install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp + install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp + touch ${D}${localstatedir}/lib/logrotate.status + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service + install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer + [ -z "${LOGROTATE_OPTIONS}" ] || + sed -ri \ + -e 's|(ExecStart=.*/logrotate.*)$|\1 ${LOGROTATE_OPTIONS}|g' \ + ${D}${systemd_system_unitdir}/logrotate.service + sed -ri \ + -e 's|(OnCalendar=).*$|\1${LOGROTATE_SYSTEMD_TIMER_BASIS}|g' \ + -e 's|(AccuracySec=).*$|\1${LOGROTATE_SYSTEMD_TIMER_ACCURACY}|g' \ + -e 's|(Persistent=).*$|\1${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}|g' \ + ${D}${systemd_system_unitdir}/logrotate.timer + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + mkdir -p ${D}${sysconfdir}/cron.daily + install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate + fi +} diff --git a/meta-openeuler/recipes-core/lvm2/lvm2.inc b/meta-openeuler/recipes-core/lvm2/lvm2.inc new file mode 100644 index 0000000000000000000000000000000000000000..65c5609a242be0834951c0d9a8fae2c3ba292599 --- /dev/null +++ b/meta-openeuler/recipes-core/lvm2/lvm2.inc @@ -0,0 +1,64 @@ +HOMEPAGE = "https://www.sourceware.org/lvm2/" +SECTION = "utils" +DESCRIPTION = "LVM2 is a set of utilities to manage logical volumes in Linux." +LICENSE = "GPLv2 & LGPLv2.1 & BSD" + +LIC_FILES_CHKSUM = "file://COPYING;md5=12713b4d9386533feeb07d6e4831765a \ + file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \ + file://COPYING.BSD;md5=d7e19e89ea9f54c1af1aa83c7b7122e7 \ +" + +SRC_URI = "file://lvm2/LVM2.${PV}.tgz \ + file://lvm2/0001-lvm2-set-default-preferred_names.patch \ + file://lvm2/0002-lvm2-default-allow-changes-with-duplicate-pvs.patch \ + file://lvm2/0003-devs-check-for-no-dev-when-dropping-aliases.patch \ + file://lvm2/0004-bugfix-lvm2-add-SSD.patch \ + file://lvm2/0005-bugfix-add-timeout-when-fail-to-wait-udev.patch \ + file://lvm2/0006-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch \ + file://lvm2/0007-enhancement-modify-default-log-level-to-error-level.patch \ + file://lvm2/0008-enhancement-add-dfx-log.patch \ + file://lvm2/0009-enhancement-syslog-more-when-use-libdevmapper-so.patch \ + file://lvm2/0010-enhancement-log-it-when-disk-slow.patch \ + file://lvm2/0011-bugfix-lvm2-fix-the-reuse-of-va_list.patch \ +" + +SRC_URI[sha256sum] = "4a63bc8a084a8ae3c7bc5e6530cac264139d218575c64416c8b99e3fe039a05c" +DEPENDS += "util-linux libaio" + +S = "${WORKDIR}/LVM2.${PV}" + +inherit autotools-brokensep pkgconfig systemd license + +LVM2_PACKAGECONFIG = "dmeventd" +LVM2_PACKAGECONFIG_append_class-target = " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'udev', '', d)} \ +" + +# odirect is always enabled because there currently is a bug in +# lib/device/dev-io.c which prevents compiling without it. It is +# better to stick to configurations that were actually tested by +# upstream... +PACKAGECONFIG ??= "odirect ${LVM2_PACKAGECONFIG}" + +PACKAGECONFIG[dmeventd] = "--enable-dmeventd,--disable-dmeventd" +PACKAGECONFIG[odirect] = "--enable-o_direct,--disable-o_direct" +PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" +PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev" + +# Unset user/group to unbreak install. +EXTRA_OECONF = "--with-user= \ + --with-group= \ + --enable-realtime \ + --enable-cmdlib \ + --enable-pkgconfig \ + --with-usrlibdir=${libdir} \ + --with-systemdsystemunitdir=${systemd_system_unitdir} \ + --disable-thin_check_needs_check \ + --with-thin-check=${sbindir}/thin_check \ + --with-thin-dump=${sbindir}/thin_dump \ + --with-thin-repair=${sbindir}/thin_repair \ + --with-thin-restore=${sbindir}/thin_restore \ +" + diff --git a/meta-openeuler/recipes-core/lvm2/lvm2_2.03.14.bb b/meta-openeuler/recipes-core/lvm2/lvm2_2.03.14.bb new file mode 100644 index 0000000000000000000000000000000000000000..b4f6609fc97bca0487fca545448ccd7082bbd334 --- /dev/null +++ b/meta-openeuler/recipes-core/lvm2/lvm2_2.03.14.bb @@ -0,0 +1,55 @@ +require lvm2.inc + +DEPENDS += "autoconf-archive-native" + +MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf" + +CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe" + +do_install_append() { + # Install machine specific configuration file + install -d ${D}${sysconfdir}/lvm + sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + oe_runmake 'DESTDIR=${D}' install install_systemd_units + sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service + else + oe_runmake 'DESTDIR=${D}' install install_initscripts + mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d + chmod 0750 ${D}${sysconfdir}/init.d/blk-availability + chmod 0750 ${D}${sysconfdir}/init.d/lvm2-monitor + rm -rf ${D}${sysconfdir}/rc.d + fi +} + +PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ + blk-availability.service" +SYSTEMD_AUTO_ENABLE = "disable" + +TARGET_CC_ARCH += "${LDFLAGS}" + +EXTRA_OECONF_append_class-nativesdk = " --with-confdir=${sysconfdir}" + +FILES_${PN} += "${libdir}/device-mapper/*.so" +FILES_${PN}-scripts = " \ + ${sbindir}/blkdeactivate \ + ${sbindir}/fsadm \ + ${sbindir}/lvmconf \ + ${sbindir}/lvmdump \ +" +# Specified explicitly for the udev rules, just in case that it does not get picked +# up automatically: +FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d" +RDEPENDS_${PN}-udevrules = "${PN}" +#RDEPENDS_${PN}_append_class-target = " libdevmapper" +RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" + +RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" +RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" + +CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/lxc/lxc/check_only_rootfs_as_filesystem_type.patch b/meta-openeuler/recipes-core/lxc/lxc/check_only_rootfs_as_filesystem_type.patch new file mode 100644 index 0000000000000000000000000000000000000000..c37318d330883edd0f7ebb75c036d342fd5f2b6e --- /dev/null +++ b/meta-openeuler/recipes-core/lxc/lxc/check_only_rootfs_as_filesystem_type.patch @@ -0,0 +1,21 @@ +commit 4f16f60b4ad67a11da4cf7a38391a28724e49f18 +Author: lisimin +Date: Thu Sep 23 11:10:59 2021 +0800 + + check only rootfs as filesytem type + + Signed-off-by: lisimin + +diff --git a/src/lxc/utils.c b/src/lxc/utils.c +index 95c00cf..46e9d35 100644 +--- a/src/lxc/utils.c ++++ b/src/lxc/utils.c +@@ -730,7 +730,7 @@ bool detect_ramfs_rootfs(void) + if (strcmp(p + 1, "/") == 0) { + /* This is '/'. Is it the ramfs? */ + p = strchr(p2 + 1, '-'); +- if (p && strncmp(p, "- rootfs rootfs ", 16) == 0) ++ if (p && strncmp(p, "- rootfs ", 9) == 0) + return true; + } + } diff --git a/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch b/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch new file mode 100644 index 0000000000000000000000000000000000000000..6b4a9eace2416044a941be3c093096cace5da397 --- /dev/null +++ b/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch @@ -0,0 +1,81 @@ +commit 05f1ae3dac69f1c677d3d8d0fabfb1536b8c2583 +Author: lisimin +Date: Wed Sep 22 09:34:22 2021 +0800 + + support arm32 + + Signed-off-by: lisimin + +diff --git a/configure.ac b/configure.ac +index 9eb6dcb..929d670 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -812,6 +812,7 @@ AM_CONDITIONAL([HAVE_ISULAD], [test "x$adapt_isulad" = "xyes"]) + if test "x$adapt_isulad" = "xyes"; then + AC_DEFINE([HAVE_ISULAD], 1, [adapt to iSulad]) + AC_MSG_RESULT([yes]) ++ AC_SUBST([YAJL_LIBS], [-lyajl]) + else + AC_MSG_RESULT([no]) + fi +diff --git a/src/lxc/confile.c b/src/lxc/confile.c +index e898e23..522fefa 100644 +--- a/src/lxc/confile.c ++++ b/src/lxc/confile.c +@@ -6233,21 +6233,21 @@ static int set_config_init_args(const char *key, const char *value, + struct lxc_conf *lxc_conf, void *data) + { + int ret = 0; +- char *tmp = NULL; ++ char **tmp = NULL; + char *new_value = NULL; + + ret = set_config_string_item(&new_value, value); + if (ret || !new_value) + return ret; + +- tmp = realloc(lxc_conf->init_argv, (lxc_conf->init_argc + 1) * sizeof(char *)); ++ tmp = (char **)realloc(lxc_conf->init_argv, (lxc_conf->init_argc + 1) * sizeof(char *)); + if (!tmp) { + ERROR("Out of memory"); + free(new_value); + return -1; + } + +- lxc_conf->init_argv = (char **)tmp; ++ lxc_conf->init_argv = tmp; + + lxc_conf->init_argv[lxc_conf->init_argc] = new_value; + lxc_conf->init_argc++; +diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c +index ec20c59..87895b0 100755 +--- a/src/lxc/json/json_common.c ++++ b/src/lxc/json/json_common.c +@@ -764,11 +764,11 @@ int append_json_map_int_string(json_map_int_string *map, int key, const char *va + if (map == NULL) { + return -1; + } +- ++#if 0 + if ((SIZE_MAX / sizeof(int) - 1) < map->len || (SIZE_MAX / sizeof(char *) - 1) < map->len) { + return -1; + } +- ++#endif + len = map->len + 1; + keys = safe_malloc(len * sizeof(int)); + vals = safe_malloc(len * sizeof(char *)); +@@ -886,11 +886,11 @@ int append_json_map_string_int(json_map_string_int *map, const char *key, int va + if (map == NULL) { + return -1; + } +- ++#if 0 + if ((SIZE_MAX / sizeof(char *) - 1) < map->len || (SIZE_MAX / sizeof(int) - 1) < map->len) { + return -1; + } +- ++#endif + len = map->len + 1; + keys = safe_malloc(len * sizeof(char *)); + vals = safe_malloc(len * sizeof(int)); diff --git a/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb b/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..a40aa5006153c1979d419b1f308d18b4230f6975 --- /dev/null +++ b/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb @@ -0,0 +1,58 @@ +SUMMARY = "Protocol Buffers - structured data serialisation mechanism" +DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" +SECTION = "console/tools" +LICENSE = "BSD-2-Clause" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://lxc/lxc-4.0.3.tar.gz \ + file://lxc/0001-huawei-adapt-to-huawei-4.0.3.patch \ + file://lxc/0002-add-mount-label-for-rootfs.patch \ + file://lxc/0003-format-code-and-verify-mount-mode.patch \ + file://lxc/0004-Removes-the-definition-of-the-thread-attributes-obje.patch \ + file://lxc/0005-solve-coredump-bug-caused-by-fstype-being-NULL-durin.patch \ + file://lxc/0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch \ + file://lxc/0007-Using-string-type-instead-of-security_context_t-beca.patch \ + file://lxc/0008-hook-pass-correct-mount-dir-as-root-to-hook.patch \ + file://lxc/0009-cgroup-refact-cgroup-manager-to-single-file.patch \ + file://lxc/0010-cgfsng-adjust-log-level-from-error-to-warn.patch \ + file://lxc/0011-rootfs-add-make-private-for-root.path-parent.patch \ + file://lxc/0012-mount-make-possible-to-bind-mount-proc-and-sys-fs.patch \ + file://lxc/0013-use-path-based-unix-domain-sockets-instead-of-abstra.patch \ + file://lxc/0014-api-add-get-container-metrics-api.patch \ + file://lxc/0015-Streaming-IO-solution-optimization-and-enhancement.patch \ + file://lxc/0016-avoid-using-void-pointers-in-caclulation.patch \ + file://lxc/0017-fix-compilation-errors-without-libcap.patch \ + file://lxc/0018-IO-fix-io-data-miss-when-exec-with-pipes.patch \ + file://lxc/0019-metrics-add-total_inactive_file-metric-for-memory.patch \ + file://lxc/0020-support-cgroup-v2.patch \ + file://lxc/0021-support-isula-exec-workdir.patch \ + file://lxc/0022-print-error-message-if-process-workdir-failed.patch \ + file://lxc/0023-log-support-long-syslog-tag.patch \ + file://lxc/0024-log-adjust-log-level-from-error-to-warn.patch \ + file://lxc/0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch \ + file://lxc/0026-coredump-fix-coredump-when-cgroup-get-return-error.patch \ + file://lxc/0027-add-help-for-new-arguments.patch \ + file://lxc/0028-seccomp-init-and-destroy-notifier.cookie.patch \ + file://lxc/0029-just-use-origin-loop-if-do-not-have-io.patch \ + file://lxc/0030-conf-fix-a-memory-leak.patch \ + file://lxc/0031-fix-lsm_se_mount_context-memory-leak.patch \ + file://lxc/0032-disable-lxc_keep-with-oci-image.patch \ + file://lxc/0033-conf-ensure-that-the-idmap-pointer-itself-is-freed.patch \ + file://lxc/0034-cgfsng-fix-cgroup-attach-cgroup-creation.patch \ + file://support_arm32.patch \ + file://check_only_rootfs_as_filesystem_type.patch \ + " + + +DEPENDS = "yajl libseccomp libcap" + +S = "${WORKDIR}/${BPN}-${PV}" + +EXTRA_OECONF = "--disable-static --disable-openssl --with-rootfs-path=/var/lib/lxc/rootfs --with-distro=openeuler" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk" + +CFLAGS_append = "-Wno-error=stringop-overflow -Wno-error=strict-prototypes -Wno-error=old-style-definition" diff --git a/meta-openeuler/recipes-core/meta/files/openeuler_target_env.sh b/meta-openeuler/recipes-core/meta/files/openeuler_target_env.sh new file mode 100644 index 0000000000000000000000000000000000000000..acce687273cd622bdef88276e2fd70a900edf7ec --- /dev/null +++ b/meta-openeuler/recipes-core/meta/files/openeuler_target_env.sh @@ -0,0 +1 @@ +export KERNEL_SRC_DIR="${SDKTARGETSYSROOT}/usr/src/kernel" diff --git a/meta-openeuler/recipes-core/meta/meta-environment.bbappend b/meta-openeuler/recipes-core/meta/meta-environment.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..09f4c84b51f017eb770b64efe6e6e14944869cf3 --- /dev/null +++ b/meta-openeuler/recipes-core/meta/meta-environment.bbappend @@ -0,0 +1,11 @@ +SDKPATHNATIVE = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}/" + +BBAPPENDDIR := "${@os.path.dirname(d.getVar('FILE', False))}" +S = "${BBAPPENDDIR}/files" + +do_install_append() { + #add openeuler env to sdk + local openeuler_env_path="${D}/${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}/environment-setup.d" + install -d ${openeuler_env_path}/ + install ${S}/openeuler_target_env.sh ${openeuler_env_path}/ +} diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-mountd.service b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-mountd.service new file mode 100644 index 0000000000000000000000000000000000000000..c01415de842f6a020f2cbcdf77e9d42f8638d032 --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-mountd.service @@ -0,0 +1,17 @@ +[Unit] +Description=NFS Mount Daemon +DefaultDependencies=no +After=rpcbind.socket +Requires=proc-fs-nfsd.mount +After=proc-fs-nfsd.mount +After=network.target local-fs.target +BindsTo=nfs-server.service +ConditionPathExists=@SYSCONFDIR@/exports + +[Service] +EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf +ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS +LimitNOFILE=@HIGH_RLIMIT_NOFILE@ + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-server.service b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-server.service new file mode 100644 index 0000000000000000000000000000000000000000..5c845b7e82f017660827bd3406687c37fe3269c5 --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-server.service @@ -0,0 +1,23 @@ +[Unit] +Description=NFS server and services +DefaultDependencies=no +Requires=network.target proc-fs-nfsd.mount +Requires=nfs-mountd.service +Wants=rpcbind.service +After=local-fs.target +After=network.target proc-fs-nfsd.mount rpcbind.service nfs-mountd.service +ConditionPathExists=@SYSCONFDIR@/exports + +[Service] +Type=oneshot +EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf +ExecStartPre=@SBINDIR@/exportfs -r +ExecStart=@SBINDIR@/rpc.nfsd $NFSD_OPTS $NFSD_COUNT +ExecStop=@SBINDIR@/rpc.nfsd 0 +ExecStopPost=@SBINDIR@/exportfs -au +ExecStopPost=@SBINDIR@/exportfs -f +ExecReload=@SBINDIR@/exportfs -r +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-statd.service b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-statd.service new file mode 100644 index 0000000000000000000000000000000000000000..4fa64e19980850bbdd17b357e527271817b1f05d --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-statd.service @@ -0,0 +1,14 @@ +[Unit] +Description=NFS status monitor for NFSv2/3 locking. +DefaultDependencies=no +Conflicts=umount.target +Requires=nss-lookup.target rpcbind.service +After=network.target nss-lookup.target rpcbind.service + +[Service] +EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf +ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS +LimitNOFILE=@HIGH_RLIMIT_NOFILE@ + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-utils.conf b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-utils.conf new file mode 100644 index 0000000000000000000000000000000000000000..a1007a7fbf4a37701fa132591b75b5e357594c03 --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-utils.conf @@ -0,0 +1,35 @@ +# Parameters to be passed to nfs-utils (clients & server) service files. +# + +# Options to pass to rpc.nfsd. +NFSD_OPTS="" + +# Number of servers to start up; the default is 8 servers. +NFSD_COUNT="" + +# Where to mount nfsd filesystem; the default is "/proc/fs/nfsd". +PROCNFSD_MOUNTPOINT="" + +# Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid". +PROCNFSD_MOUNTOPTS="" + +# Options for rpc.mountd. +# If you have a port-based firewall, you might want to set up +# a fixed port here using the --port option. +MOUNTD_OPTS="" + +# Parameters to be passed to nfs-common (nfs clients & server) init script. +# + +# If you do not set values for the NEED_ options, they will be attempted +# autodetected; this should be sufficient for most people. Valid alternatives +# for the NEED_ options are "yes" and "no". + +# Do you want to start the statd daemon? It is not needed for NFSv4. +NEED_STATD="" + +# Options to pass to rpc.statd. +# N.B. statd normally runs on both client and server, and run-time +# options should be specified accordingly. +# STATD_OPTS="-p 32765 -o 32766" +STATD_OPTS="" diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfscommon b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfscommon new file mode 100644 index 0000000000000000000000000000000000000000..992267d5a1610214c1aacfb223ed090d89f09438 --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfscommon @@ -0,0 +1,63 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: nfs-common +# Required-Start: $portmap hwclock +# Required-Stop: $portmap hwclock +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: NFS support for both client and server +# Description: NFS is a popular protocol for file sharing across +# TCP/IP networks. This service provides various +# support functions for NFS mounts. +### END INIT INFO +# +# Startup script for nfs-utils +# +# +# Location of executables: + +# Source function library. +. /etc/init.d/functions + +test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd +test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid +# +# The default state directory is /var/lib/nfs +test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs +# +#---------------------------------------------------------------------- +# Startup and shutdown functions. +# Actual startup/shutdown is at the end of this file. + +start_statd(){ + echo -n "starting statd: " + start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID" + echo done +} +stop_statd(){ + echo -n 'stopping statd: ' + start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID" + echo done +} +#---------------------------------------------------------------------- +# +# supported options: +# start +# stop +# restart: stops and starts mountd +#FIXME: need to create the /var/lib/nfs/... directories +case "$1" in + start) + start_statd;; + stop) + stop_statd;; + status) + status $NFS_STATD + exit $?;; + restart) + $0 stop + $0 start;; + *) + echo "Usage: $0 {start|stop|status|restart}" + exit 1;; +esac diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfsserver b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfsserver new file mode 100644 index 0000000000000000000000000000000000000000..0f5747cc6db97d8c14100c170e2fa53f30b6e2b4 --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfsserver @@ -0,0 +1,130 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: nfs-kernel-server +# Required-Start: $remote_fs nfs-common $portmap hwclock +# Required-Stop: $remote_fs nfs-common $portmap hwclock +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Kernel NFS server support +# Description: NFS is a popular protocol for file sharing across +# TCP/IP networks. This service provides NFS server +# functionality, which is configured via the +# /etc/exports file. +### END INIT INFO +# +# Startup script for nfs-utils +# +# Source function library. +. /etc/init.d/functions +# +# The environment variable NFS_SERVERS may be set in /etc/default/nfsd +# Other control variables may be overridden here too +test -r /etc/default/nfsd && . /etc/default/nfsd +# +# Location of executables: +test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd +test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd +# +# The user mode program must also exist (it just starts the kernel +# threads using the kernel module code). +test -x "$NFS_MOUNTD" || exit 0 +test -x "$NFS_NFSD" || exit 0 +# +# Default is 8 threads, value is settable between 1 and the truely +# ridiculous 99 +test "$NFS_SERVERS" != "" && test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8 +# +#---------------------------------------------------------------------- +# Startup and shutdown functions. +# Actual startup/shutdown is at the end of this file. +#mountd +start_mountd(){ + echo -n 'starting mountd: ' + start-stop-daemon --start --exec "$NFS_MOUNTD" -- "$@" + echo done +} +stop_mountd(){ + echo -n 'stopping mountd: ' + start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD" + echo done +} +# +#nfsd +start_nfsd(){ + modprobe -q nfsd + grep -q nfsd /proc/filesystems || { + echo NFS daemon support not enabled in kernel + exit 1 + } + grep -q nfsd /proc/mounts || mount -t nfsd nfsd /proc/fs/nfsd + grep -q nfsd /proc/mounts || { + echo nfsd filesystem could not be mounted at /proc/fs/nfsd + exit 1 + } + + echo -n "starting $1 nfsd kernel threads: " + start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" + echo done +} +delay_nfsd(){ + for delay in 0 1 2 3 4 5 6 7 8 9 + do + if pidof nfsd >/dev/null + then + echo -n . + sleep 1 + else + return 0 + fi + done + return 1 +} +stop_nfsd(){ + # WARNING: this kills any process with the executable + # name 'nfsd'. + echo -n 'stopping nfsd: ' + start-stop-daemon --stop --quiet --signal 1 --name nfsd + if delay_nfsd || { + echo failed + echo ' using signal 9: ' + start-stop-daemon --stop --quiet --signal 9 --name nfsd + delay_nfsd + } + then + echo done + else + echo failed + fi +} + +#---------------------------------------------------------------------- +# +# supported options: +# start +# stop +# reload: reloads the exports file +# restart: stops and starts mountd +#FIXME: need to create the /var/lib/nfs/... directories +case "$1" in + start) + test -r /etc/exports && exportfs -r + start_nfsd "$NFS_SERVERS" + start_mountd + test -r /etc/exports && exportfs -a;; + stop) exportfs -ua + stop_mountd + stop_nfsd;; + status) + status /usr/sbin/rpc.mountd + RETVAL=$? + status nfsd + rval=$? + [ $RETVAL -eq 0 ] && exit $rval + exit $RETVAL;; + reload) test -r /etc/exports && exportfs -r;; + restart) + $0 stop + $0 start;; + *) echo "Usage: $0 {start|stop|status|reload|restart}" + exit 1;; +esac diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/proc-fs-nfsd.mount b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/proc-fs-nfsd.mount new file mode 100644 index 0000000000000000000000000000000000000000..630801b3751be2a9a6077522380eb7f35d82e96e --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/proc-fs-nfsd.mount @@ -0,0 +1,8 @@ +[Unit] +Description=NFSD configuration filesystem +After=systemd-modules-load.service + +[Mount] +What=nfsd +Where=/proc/fs/nfsd +Type=nfsd diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils_2.5.4.bb b/meta-openeuler/recipes-core/nfs-utils/nfs-utils_2.5.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..7b4799e7a1b45bb7694a05977730a2775405a1f7 --- /dev/null +++ b/meta-openeuler/recipes-core/nfs-utils/nfs-utils_2.5.4.bb @@ -0,0 +1,139 @@ +SUMMARY = "userspace utilities for kernel nfs" +DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \ +NFS server and related tools." +HOMEPAGE = "http://nfs.sourceforge.net/" +SECTION = "console/network" + +LICENSE = "MIT & GPLv2+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" + +# util-linux for libblkid +DEPENDS = "libcap libevent util-linux libtirpc" +RDEPENDS_${PN} = "${PN}-client" +RRECOMMENDS_${PN} = "kernel-module-nfsd" + +USERADD_PACKAGES = "${PN}-client" +USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \ + --shell /bin/false --user-group rpcuser" + +SRC_URI = "file://nfs-utils/${BP}.tar.xz \ + file://nfs-utils/0000-systemd-idmapd-require-rpc-pipefs.patch \ + file://nfs-utils/0001-correct-the-statd-path-in-man.patch \ + file://nfs-utils/0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch \ + file://nfs-utils/0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch \ + file://nfs-utils/0004-fix-coredump-in-bl_add_disk.patch \ + file://nfsserver \ + file://nfscommon \ + file://nfs-utils.conf \ + file://nfs-server.service \ + file://nfs-mountd.service \ + file://nfs-statd.service \ + file://proc-fs-nfsd.mount \ + " +SRC_URI[sha256sum] = "51997d94e4c8bcef5456dd36a9ccc38e231207c4e9b6a9a2c108841e6aebe3dd" + +# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will +# pull in the remainder of the dependencies. + +INITSCRIPT_PACKAGES = "${PN} ${PN}-client" +INITSCRIPT_NAME = "nfsserver" +INITSCRIPT_PARAMS = "defaults" +INITSCRIPT_NAME_${PN}-client = "nfscommon" +INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21" + +inherit autotools-brokensep pkgconfig systemd + +SYSTEMD_PACKAGES = "${PN} ${PN}-client" +SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service" +SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service" + +# --enable-uuid is need for cross-compiling +EXTRA_OECONF = "--with-statduser=rpcuser \ + --enable-mountconfig \ + --enable-libmount-mount \ + --enable-uuid \ + --disable-gss \ + --disable-nfsdcltrack \ + --with-statdpath=/var/lib/nfs/statd \ + --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +PACKAGECONFIG_remove_libc-musl = "tcp-wrappers" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +# libdevmapper is available in meta-oe +PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" +# keyutils is available in meta-oe +PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core" + +PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats" + +CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \ + ${localstatedir}/lib/nfs/rmtab \ + ${localstatedir}/lib/nfs/xtab \ + ${localstatedir}/lib/nfs/statd/state \ + ${sysconfdir}/nfsmount.conf" + +FILES_${PN}-client = "${sbindir}/*statd \ + ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ + ${sbindir}/showmount ${sbindir}/nfsstat \ + ${localstatedir}/lib/nfs \ + ${sysconfdir}/nfs-utils.conf \ + ${sysconfdir}/nfsmount.conf \ + ${sysconfdir}/init.d/nfscommon \ + ${systemd_unitdir}/system/nfs-statd.service" +RDEPENDS_${PN}-client = "${PN}-mount" + +FILES_${PN}-mount = "${base_sbindir}/*mount.nfs*" + +FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" + +FILES_${PN}-staticdev += "${libdir}/libnfsidmap/*.a" + +FILES_${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/" + +do_configure_prepend() { + sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ + ${S}/utils/mount/Makefile.am +} + +# Make clean needed because the package comes with +# precompiled 64-bit objects that break the build +do_compile_prepend() { + make clean +} + +# Works on systemd only +HIGH_RLIMIT_NOFILE ??= "4096" + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + install -m 0750 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver + install -m 0750 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon + + install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir} + install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir} + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ + ${D}${systemd_unitdir}/system/*.service + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/ + install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/ + ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount + fi + + # kernel code as of 3.8 hard-codes this path as a default + install -d ${D}/var/lib/nfs/v4recovery + + chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state + + # Make python tools use python 3 + sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat +} diff --git a/meta-openeuler/recipes-core/openssh/openssh/config/common/sshd_check_keys b/meta-openeuler/recipes-core/openssh/openssh/config/common/sshd_check_keys new file mode 100644 index 0000000000000000000000000000000000000000..dbd5074386321f3d83cf437feb588cff709f877c --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/config/common/sshd_check_keys @@ -0,0 +1,79 @@ +#! /bin/sh + +generate_key() { + local FILE=$1 + local TYPE=$2 + local DIR="$(dirname "$FILE")" + + mkdir -p "$DIR" + ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE + + # Atomically rename file public key + mv -f "${FILE}.tmp.pub" "${FILE}.pub" + + # This sync does double duty: Ensuring that the data in the temporary + # private key file is on disk before the rename, and ensuring that the + # public key rename is completed before the private key rename, since we + # switch on the existence of the private key to trigger key generation. + # This does mean it is possible for the public key to exist, but be garbage + # but this is OK because in that case the private key won't exist and the + # keys will be regenerated. + # + # In the event that sync understands arguments that limit what it tries to + # fsync(), we provided them. If it does not, it will simply call sync() + # which is just as well + sync "${FILE}.pub" "$DIR" "${FILE}.tmp" + + mv "${FILE}.tmp" "$FILE" + chmod 400 "$FILE" + + # sync to ensure the atomic rename is committed + sync "$DIR" +} + +# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS +if test -f /etc/default/ssh; then + . /etc/default/ssh +fi + +[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh +mkdir -p $SYSCONFDIR + +# parse sshd options +set -- ${SSHD_OPTS} -- +sshd_config=/etc/ssh/sshd_config +while true ; do + case "$1" in + -f*) if [ "$1" = "-f" ] ; then + sshd_config="$2" + shift + else + sshd_config="${1#-f}" + fi + shift + ;; + --) shift; break;; + *) shift;; + esac +done + +HOST_KEYS=$(sed -n 's/^[ \t]*HostKey[ \t]\+\(.*\)/\1/p' "${sshd_config}") +[ -z "${HOST_KEYS}" ] && HOST_KEYS="$SYSCONFDIR/ssh_host_rsa_key $SYSCONFDIR/ssh_host_ecdsa_key $SYSCONFDIR/ssh_host_ed25519_key" + +for key in ${HOST_KEYS} ; do + [ -f $key ] && continue + case $key in + *_rsa_key) + echo " generating ssh RSA host key..." + generate_key $key rsa + ;; + *_ecdsa_key) + echo " generating ssh ECDSA host key..." + generate_key $key ecdsa + ;; + *_ed25519_key) + echo " generating ssh ED25519 host key..." + generate_key $key ed25519 + ;; + esac +done diff --git a/meta-openeuler/recipes-core/openssh/openssh/init b/meta-openeuler/recipes-core/openssh/openssh/init new file mode 100644 index 0000000000000000000000000000000000000000..837340d84ad5195602ed639990acead64f221eae --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/init @@ -0,0 +1,90 @@ +#! /bin/sh +set -e + +PIDFILE=/var/run/sshd.pid + +# source function library +#. /etc/init.d/functions + +# /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon + +test -x /usr/sbin/sshd || exit 0 +( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 + +# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS +if test -f /etc/default/ssh; then + . /etc/default/ssh +fi + +[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh +mkdir -p $SYSCONFDIR + +check_for_no_start() { + # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists + if [ -e $SYSCONFDIR/sshd_not_to_be_run ]; then + echo "OpenBSD Secure Shell server not in use ($SYSCONFDIR/sshd_not_to_be_run)" + exit 0 + fi +} + +check_privsep_dir() { + # Create the PrivSep empty dir if necessary + if [ ! -d /var/run/sshd ]; then + mkdir /var/run/sshd + chmod 0755 /var/run/sshd + fi +} + +check_config() { + /usr/sbin/sshd $SSHD_OPTS -t || exit 1 +} + +export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" + +case "$1" in + start) + check_for_no_start + echo "Starting OpenBSD Secure Shell server: sshd" + @LIBEXECDIR@/sshd_check_keys + check_privsep_dir + start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS + echo "done." + ;; + stop) + echo -n "Stopping OpenBSD Secure Shell server: sshd" + start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd + echo "." + ;; + + reload|force-reload) + check_for_no_start + @LIBEXECDIR@/sshd_check_keys + check_config + echo -n "Reloading OpenBSD Secure Shell server's configuration" + start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd + echo "." + ;; + + restart) + @LIBEXECDIR@/sshd_check_keys + check_config + echo -n "Restarting OpenBSD Secure Shell server: sshd" + start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd + check_for_no_start + check_privsep_dir + sleep 2 + start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS + echo "." + ;; + + status) + status /usr/sbin/sshd + exit $? + ;; + + *) + echo "Usage: /etc/init.d/ssh {start|stop|status|reload|force-reload|restart}" + exit 1 +esac + +exit 0 diff --git a/meta-openeuler/recipes-core/openssh/openssh/ssh_config b/meta-openeuler/recipes-core/openssh/openssh/ssh_config new file mode 100644 index 0000000000000000000000000000000000000000..b9c6242a7e5f656ddf2051656d0160ea489a7e75 --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/ssh_config @@ -0,0 +1,50 @@ +# $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ + +# This is the ssh client system-wide configuration file. See +# ssh_config(5) for more information. This file provides defaults for +# users, and the values can be changed in per-user configuration files +# or on the command line. + +# Configuration data is parsed as follows: +# 1. command line options +# 2. user-specific file +# 3. system-wide file +# Any configuration value is only changed the first time it is set. +# Thus, host-specific definitions should be at the beginning of the +# configuration file, and defaults at the end. + +# Site-wide defaults for some commonly used options. For a comprehensive +# list of available options, their meanings and defaults, please see the +# ssh_config(5) man page. + +Host * +ForwardAgent no +ForwardX11 no +# RhostsRSAAuthentication no +# RSAAuthentication yes +# PasswordAuthentication yes +# HostbasedAuthentication no +# GSSAPIAuthentication no +# GSSAPIDelegateCredentials no +# BatchMode no +# CheckHostIP yes +# AddressFamily any +# ConnectTimeout 0 +# StrictHostKeyChecking ask +# IdentityFile ~/.ssh/id_rsa +# IdentityFile ~/.ssh/id_dsa +# IdentityFile ~/.ssh/id_ecdsa +# IdentityFile ~/.ssh/id_ed25519 +# Port 22 +Protocol 2 +# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc +# MACs hmac-md5,hmac-sha1,umac-64@openssh.com +# EscapeChar ~ +# Tunnel no +# TunnelDevice any:any +# PermitLocalCommand no +# VisualHostKey no +# ProxyCommand ssh -q -W %h:%p gateway.example.com +# RekeyLimit 1G 1h +StrictHostKeyChecking ask +VerifyHostKeyDNS ask diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd b/meta-openeuler/recipes-core/openssh/openssh/sshd new file mode 100644 index 0000000000000000000000000000000000000000..98750729022417b44a26235a15c7a0c7126faf37 --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/sshd @@ -0,0 +1,24 @@ +#%PAM-1.0 + +auth include common-auth +account required pam_nologin.so + +# SELinux needs to be the first session rule. This ensures that any +# lingering context has been cleared. Without out this it is possible +# that a module could execute code in the wrong domain. +# When the module is present, "required" would be sufficient (When SELinux +# is disabled, this returns success.) +#session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close + +account include common-account +password include common-password +session optional pam_keyinit.so force revoke +session include common-session +session required pam_loginuid.so + +# SELinux needs to intervene at login time to ensure that the process +# starts in the proper default security context. Only sessions which are +# intended to run in the user's context should be run after this. +# When the module is present, "required" would be sufficient (When SELinux +# is disabled, this returns success.) +#session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd.socket b/meta-openeuler/recipes-core/openssh/openssh/sshd.socket new file mode 100644 index 0000000000000000000000000000000000000000..12c39b26b59b2ed4be08e7fbbfd054a2aa811f3a --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/sshd.socket @@ -0,0 +1,10 @@ +[Unit] +Conflicts=sshd.service + +[Socket] +ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd@.service b/meta-openeuler/recipes-core/openssh/openssh/sshd@.service new file mode 100644 index 0000000000000000000000000000000000000000..9d83dfb2bb1cc9b3875eca38b9923fc980c16df5 --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/sshd@.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenSSH Per-Connection Daemon +Wants=sshdgenkeys.service +After=sshdgenkeys.service + +[Service] +Environment="SSHD_OPTS=" +EnvironmentFile=-/etc/default/ssh +ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS +ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID +StandardInput=socket +StandardError=syslog +KillMode=process diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd_config b/meta-openeuler/recipes-core/openssh/openssh/sshd_config new file mode 100644 index 0000000000000000000000000000000000000000..f0a3d2073a4b930c6f716c12a9628d9d3acf4a1d --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/sshd_config @@ -0,0 +1,134 @@ +# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +#Port 22 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +LoginGraceTime 120 +#PermitRootLogin prohibit-password +#StrictModes yes +MaxAuthTries 3 +#MaxSessions 10 + +#PubkeyAuthentication yes + +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +# but this is overridden so installations will only check .ssh/authorized_keys +AuthorizedKeysFile .ssh/authorized_keys + +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +#PasswordAuthentication yes +#PermitEmptyPasswords no + +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PermitTTY yes +#PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +PermitUserEnvironment no +#Compression delayed +ClientAliveInterval 300 +ClientAliveCountMax 0 +#UseDNS no +#PidFile /var/run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp internal-sftp -l INFO + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server +Protocol 2 +PubkeyAuthentication yes +IgnoreRhosts yes +StrictModes yes +Banner /etc/issue.net +SyslogFacility AUTH +LogLevel VERBOSE +PermitEmptyPasswords no +X11Forwarding no +PrintLastLog yes +HostbasedAuthentication no +MaxStartups 10:30:100 +PasswordAuthentication no +AllowTcpForwarding no +AllowAgentForwarding no +IgnoreUserKnownHosts yes +PermitRootLogin no +MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd_config_readonly b/meta-openeuler/recipes-core/openssh/openssh/sshd_config_readonly new file mode 100644 index 0000000000000000000000000000000000000000..5368a2ff5b9f2d5d2b40ef080c71985c2d21d42c --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/sshd_config_readonly @@ -0,0 +1,116 @@ +# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +#Port 22 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +#PermitRootLogin prohibit-password +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#PubkeyAuthentication yes + +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +# but this is overridden so installations will only check .ssh/authorized_keys +AuthorizedKeysFile .ssh/authorized_keys + +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +#PasswordAuthentication yes +#PermitEmptyPasswords no + +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PermitTTY yes +#PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS no +#PidFile /var/run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server +HostKey /var/run/ssh/ssh_host_rsa_key +HostKey /var/run/ssh/ssh_host_ecdsa_key +HostKey /var/run/ssh/ssh_host_ed25519_key diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshdgenkeys.service b/meta-openeuler/recipes-core/openssh/openssh/sshdgenkeys.service new file mode 100644 index 0000000000000000000000000000000000000000..603c33787f1ac5d4a6d9cf4f62d42b53e8530a17 --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/sshdgenkeys.service @@ -0,0 +1,8 @@ +[Unit] +Description=OpenSSH Key Generation +RequiresMountsFor=/var /run + +[Service] +ExecStart=@LIBEXECDIR@/sshd_check_keys +Type=oneshot +RemainAfterExit=yes diff --git a/meta-openeuler/recipes-core/openssh/openssh/volatiles.99_sshd b/meta-openeuler/recipes-core/openssh/openssh/volatiles.99_sshd new file mode 100644 index 0000000000000000000000000000000000000000..a0d2af3c652f5cac737c8c4bfa75b5179235ec23 --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh/volatiles.99_sshd @@ -0,0 +1,2 @@ +d root root 0755 /var/run/sshd none +f root root 0644 /var/log/lastlog none diff --git a/meta-openeuler/recipes-core/openssh/openssh_8.8p1.bb b/meta-openeuler/recipes-core/openssh/openssh_8.8p1.bb new file mode 100644 index 0000000000000000000000000000000000000000..39e97332c9732533575d2198b8225a5f0b123a25 --- /dev/null +++ b/meta-openeuler/recipes-core/openssh/openssh_8.8p1.bb @@ -0,0 +1,170 @@ +SUMMARY = "A suite of security-related network utilities based on \ +the SSH protocol including the ssh client and sshd server" +DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \ +Ssh (Secure Shell) is a program for logging into a remote machine \ +and for executing commands on a remote machine." +HOMEPAGE = "http://www.openssh.com/" +SECTION = "console/network" +LICENSE = "BSD & ISC & MIT" + +DEPENDS = "zlib openssl" +#DEPENDS = "zlib openssl virtual/crypt" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" + +#inherit manpages useradd update-rc.d update-alternatives systemd + +# remove base-passwd from all image +DEPENDS_remove_class-target += "base-passwd" +USERADDSETSCENEDEPS_remove_class-target += "${MLPREFIX}base-passwd:do_populate_sysroot_setscene" + +USERADD_PACKAGES = "${PN}-sshd" +USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd" +INITSCRIPT_PACKAGES = "${PN}-sshd" +INITSCRIPT_NAME_${PN}-sshd = "sshd" +INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" + +SYSTEMD_PACKAGES = "${PN}-sshd" +SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket" + +inherit autotools-brokensep + +LIC_FILES_CHKSUM="file://LICENCE;md5=d9d2753bdef9f19466dc7bc959114b11" +EXTRA_AUTORECONF_DEFINE = " ACLOCAL=echo " + +PACKAGECONFIG ??= "" +PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5" +PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns" +PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" +PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat" + +# login path is hardcoded in sshd +EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ + --without-zlib-version-check \ + --with-privsep-path=${localstatedir}/run/sshd \ + --sysconfdir=${sysconfdir}/ssh \ + --with-xauth=${bindir}/xauth \ + --disable-strip \ + " + +# musl doesn't implement wtmp/utmp +EXTRA_OECONF_append_libc-musl = " --disable-wtmp" + +# Since we do not depend on libbsd, we do not want configure to use it +# just because it finds libutil.h. But, specifying --disable-libutil +# causes compile errors, so... +CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no" + +# passwd path is hardcoded in sshd +CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd" + +# We don't want to depend on libblockfile +CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no" + +# copy SRC_URI files +SRC_URI = "file://openssh/${BP}.tar.gz \ +file://ssh_config \ +file://init \ +file://sshd.socket \ +file://sshd@.service \ +file://sshdgenkeys.service \ +file://volatiles.99_sshd \ +file://config/common/sshd_check_keys \ +file://sshd_config \ +file://sshd_config_readonly \ +file://sshd \ +" + +PAM_SRC_URI = "file://sshd" +SRC_URI_EXTRA = "file://ssh_config \ + file://init \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://sshd.socket \ + file://sshd@.service \ + file://sshdgenkeys.service \ + file://volatiles.99_sshd \ + file://config/common/sshd_check_keys \ + " + +do_configure_prepend () { + export LD="${CC}" + install -m 0644 ${WORKDIR}/ssh_config ${B}/ +} + +do_install_append () { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then +# install -D -m 0644 ${WORKDIR}/openssh-8.2p1/sshd ${D}${sysconfdir}/pam.d/sshd + sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config + fi + + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config + fi + + install -d ${D}${sysconfdir}/init.d + install -m 0750 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd + rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin + rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir} + install -d ${D}/${sysconfdir}/default/volatiles + install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd + install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir} + + # Create config files for read-only rootfs + install -d ${D}${sysconfdir}/ssh + install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly + sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly + echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly + echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly + echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly + + install -d ${D}${systemd_unitdir}/system + install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system + install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system + install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BINDIR@,${bindir},g' \ + -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ + ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service + + sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ + ${D}${sysconfdir}/init.d/sshd + cp ${WORKDIR}/ssh_config ${D}${sysconfdir}/ssh/ssh_config + cp ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config + cp ${WORKDIR}/sshd_config_readonly ${D}${sysconfdir}/ssh/sshd_config_readonly + install -d ${D}${sysconfdir}/pam.d + cp ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd + + install -D -m 0755 ${WORKDIR}/config/common/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys + chmod -s ${D}/usr/libexec/ssh-keysign + chmod 0600 ${D}${sysconfdir}/ssh/sshd_config + rm -rf ${D}/lib/ +} + +ALLOW_EMPTY_${PN} = "0" + +PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" +FILES_${PN}-scp = "${bindir}/scp.${BPN} ${bindir}/scp" +FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" +FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system" +FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" +FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys" +FILES_${PN}-sftp = "${bindir}/sftp" +FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" +FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" +FILES_${PN}-keygen = "${bindir}/ssh-keygen" + +RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" +RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" +#RRECOMMENDS_${PN}-sshd_append_class-target = " rng-tools" + +RPROVIDES_${PN}-ssh = "ssh" +RPROVIDES_${PN}-sshd = "sshd" + +RCONFLICTS_${PN} = "dropbear" +RCONFLICTS_${PN}-sshd = "dropbear" + +CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" +CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" + +BBCLASSEXTEND += "nativesdk" diff --git a/meta-openeuler/recipes-core/openssl/files/environment.d-openssl.sh b/meta-openeuler/recipes-core/openssl/files/environment.d-openssl.sh new file mode 100644 index 0000000000000000000000000000000000000000..d05a93b0f0d9b6ce3a6df333eb22fbebb8208288 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/files/environment.d-openssl.sh @@ -0,0 +1 @@ +export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf" diff --git a/meta-openeuler/recipes-core/openssl/openssl.inc b/meta-openeuler/recipes-core/openssl/openssl.inc new file mode 100644 index 0000000000000000000000000000000000000000..a371265b860b137d498839b3717162b10e8fd9b3 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl.inc @@ -0,0 +1,236 @@ +SUMMARY = "Secure Socket Layer" +DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." +HOMEPAGE = "http://www.openssl.org/" +BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" +SECTION = "libs/network" + +# "openssl | SSLeay" dual license +LICENSE = "openssl" + +DEPENDS = "perl-native-runtime nettle" +DEPENDS_append_class-target = " openssl-native" +#DEPENDS_append_class-target = " linux-libc-headers" + +SRC_URI = "file://openssl/${BP}.tar.gz \ + file://openssl/openssl-1.1.1-build.patch \ + file://openssl/openssl-1.1.1-fips.patch \ + file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ + file://0001-skip-test_symbol_presence.patch \ + file://0003-Add-support-for-io_pgetevents_time64-syscall.patch \ + file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \ + file://afalg.patch \ + file://reproducible.patch \ +" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" + +S = "${WORKDIR}/${BP}" + +PACKAGECONFIG[perl] = ",,," + +#AR_append = " r" +# Avoid binaries being marked as requiring an executable stack since it +# doesn't(which causes and this causes issues with SELinux +inherit utils +CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ + -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack" + +# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom +CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}" +CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}" + +export DIRS = "crypto ssl apps" +export EX_LIBS = "-lgcc -ldl" +export AS = "${CC} -c" + +inherit pkgconfig siteinfo multilib_header ptest + +PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf" +FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}" +FILES_libssl = "${libdir}/libssl.so.*" +FILES_${PN} =+ " ${libdir}/ssl/*" +FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash" +RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" +FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}" + +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration +# file to be installed for both the base openssl package and the libcrypto +# package since the base openssl package depends on the libcrypto package. +FILES_openssl-conf = "${libdir}/ssl/openssl.cnf" +CONFFILES_openssl-conf = "${libdir}/ssl/openssl.cnf" +RRECOMMENDS_libcrypto += "openssl-conf" +RDEPENDS_${PN}-ptest += "${PN}-misc make perl perl-module-filehandle bc" + +# Remove this to enable SSLv3. SSLv3 is defaulted to disabled due to the POODLE +# vulnerability +EXTRA_OECONF = " -no-ssl3" + +do_configure_prepend_darwin () { + sed -i -e '/version-script=openssl\.ld/d' Configure +} + +do_configure () { + cd util + perl perlpath.pl ${STAGING_BINDIR_NATIVE} + cd .. + ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/ + + os=${HOST_OS} + case $os in + linux-uclibc |\ + linux-uclibceabi |\ + linux-gnueabi |\ + linux-uclibcspe |\ + linux-gnuspe |\ + linux-musl*) + os=linux + ;; + *) + ;; + esac + if [ "${libdir}" != "/usr/libilp32" ]; then + target="$os-${HOST_ARCH}" + else + target="${HOST_OS}-${HOST_ARCH}" + fi + case $target in + linux-arm) + target=linux-armv4 + ;; + linux-armeb) + target=linux-elf-armeb + ;; + linux-aarch64*) + target=linux-generic64 + ;; + linux-gnuilp32-aarch64*) + target=linux-aarch64-ilp32 + ;; + linux-sh3) + target=debian-sh3 + ;; + linux-sh4) + target=debian-sh4 + ;; + linux-i486) + target=debian-i386-i486 + ;; + linux-i586 | linux-viac3) + target=debian-i386-i586 + ;; + linux-i686) + target=debian-i386-i686/cmov + ;; + linux-gnux32-x86_64) + target=linux-x32 + ;; + linux-gnu64-x86_64) + target=linux-x86_64 + ;; + linux-mips) + target=debian-mips + ;; + linux-mipsel) + target=debian-mipsel + ;; + linux-*-mips64) + target=linux-mips + ;; + linux-microblaze*) + target=linux-generic32 + ;; + linux-powerpc) + target=linux-ppc + ;; + linux-powerpc64) + target=linux-ppc64 + ;; + linux-supersparc) + target=linux-sparcv8 + ;; + linux-sparc) + target=linux-sparcv8 + ;; + darwin-i386) + target=darwin-i386-cc + ;; + esac + # inject machine-specific flags + sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target +} + +do_compile_prepend_class-target () { + sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile +} + +do_compile () { + oe_runmake +} + +do_compile_ptest () { + oe_runmake buildtest +} + +do_install () { + # Create ${D}/${prefix} to fix parallel issues + mkdir -p ${D}/${prefix}/ + + oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install + + oe_libinstall -so libcrypto ${D}${libdir} + oe_libinstall -so libssl ${D}${libdir} + + # Moving libcrypto to /lib + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then + mkdir -p ${D}/${base_libdir}/ + mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/ + sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc + fi + + install -d ${D}${includedir} + cp --dereference -R include/openssl ${D}${includedir} + + if [ "${libdir}" != "/usr/libilp32" ]; then + oe_multilib_header openssl/opensslconf.h + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then + install -m 0755 ${S}/tools/c_rehash ${D}${bindir} + sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash + sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl + sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget + # The c_rehash utility isn't installed by the normal installation process. + else + rm -f ${D}${bindir}/c_rehash + rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget + fi +} + +do_install_ptest () { + cp -r Makefile test ${D}${PTEST_PATH} + cp -r certs ${D}${PTEST_PATH} + mkdir -p ${D}${PTEST_PATH}/apps + ln -sf /usr/lib/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps + ln -sf /usr/lib/ssl/openssl.cnf ${D}${PTEST_PATH}/apps + ln -sf /usr/bin/openssl ${D}${PTEST_PATH}/apps + cp apps/server2.pem ${D}${PTEST_PATH}/apps + mkdir -p ${D}${PTEST_PATH}/util + install util/opensslwrap.sh ${D}${PTEST_PATH}/util + install util/shlib_wrap.sh ${D}${PTEST_PATH}/util +} + +do_install_append_virtclass-native() { + create_wrapper ${D}${bindir}/openssl \ + OPENSSL_CONF=${libdir}/ssl/openssl.cnf \ + SSL_CERT_DIR=${libdir}/ssl/certs \ + SSL_CERT_FILE=${libdir}/ssl/cert.pem \ + OPENSSL_ENGINES=${libdir}/ssl/engines +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch b/meta-openeuler/recipes-core/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch new file mode 100644 index 0000000000000000000000000000000000000000..1d8821578a3bb11b830555ba69e5e9e3e92a777a --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch @@ -0,0 +1,76 @@ +From 3e1d00481093e10775eaf69d619c45b32a4aa7dc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= +Date: Tue, 6 Nov 2018 14:50:47 +0100 +Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler + info +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The openssl build system generates buildinf.h containing the full +compiler command line used to compile objects. This breaks +reproducibility, as the compile command is baked into libcrypto, where +it is used when running `openssl version -f`. + +Add stripped build variables for the compiler and cflags lines, and use +those when generating buildinfo.h. + +This is based on a similar patch for older openssl versions: +https://patchwork.openembedded.org/patch/147229/ + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Martin Hundeb酶ll + + +Update to fix buildpaths qa issue for '-fmacro-prefix-map'. + +Signed-off-by: Kai Kang +--- + Configurations/unix-Makefile.tmpl | 10 +++++++++- + crypto/build.info | 2 +- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl +index 16af4d2087..54c162784c 100644 +--- a/Configurations/unix-Makefile.tmpl ++++ b/Configurations/unix-Makefile.tmpl +@@ -317,13 +317,22 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (), + '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} + BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) + +-# CPPFLAGS_Q is used for one thing only: to build up buildinf.h ++# *_Q variables are used for one thing only: to build up buildinf.h + CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; + $cppflags2 =~ s|([\\"])|\\$1|g; + $lib_cppflags =~ s|([\\"])|\\$1|g; + join(' ', $lib_cppflags || (), $cppflags2 || (), + $cppflags1 || ()) -} + ++CFLAGS_Q={- for (@{$config{CFLAGS}}) { ++ s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g; ++ s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g; ++ } ++ join(' ', @{$config{CFLAGS}}) -} ++ ++CC_Q={- $config{CC} =~ s|--sysroot=[^ ]+|--sysroot=recipe-sysroot|g; ++ join(' ', $config{CC}) -} ++ + PERLASM_SCHEME= {- $target{perlasm_scheme} -} + + # For x86 assembler: Set PROCESSOR to 386 if you want to support +diff --git a/crypto/build.info b/crypto/build.info +index b515b7318e..8c9cee2a09 100644 +--- a/crypto/build.info ++++ b/crypto/build.info +@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \ + ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl + + DEPEND[cversion.o]=buildinf.h +-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" ++GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)" + DEPEND[buildinf.h]=../configdata.pm + + GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME) +-- +2.19.1 + diff --git a/meta-openeuler/recipes-core/openssl/openssl/0001-skip-test_symbol_presence.patch b/meta-openeuler/recipes-core/openssl/openssl/0001-skip-test_symbol_presence.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6032dca144b168751648d77905d9a3a3d06b310 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/0001-skip-test_symbol_presence.patch @@ -0,0 +1,46 @@ +From a9401b2289656c5a36dd1b0ecebf0d23e291ce70 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 2 Oct 2018 23:58:24 +0800 +Subject: [PATCH] skip test_symbol_presence + +We cannot skip `01-test_symbol_presence.t' by configuring option `no-shared' +as INSTALL told us the shared libraries will not be built. + +[INSTALL snip] + Notes on shared libraries + ------------------------- + + For most systems the OpenSSL Configure script knows what is needed to + build shared libraries for libcrypto and libssl. On these systems + the shared libraries will be created by default. This can be suppressed and + only static libraries created by using the "no-shared" option. On systems + where OpenSSL does not know how to build shared libraries the "no-shared" + option will be forced and only static libraries will be created. +[INSTALL snip] + +Hence directly modification the case to skip it. + +Upstream-Status: Inappropriate [OE Specific] + +Signed-off-by: Hongxu Jia +--- + test/recipes/01-test_symbol_presence.t | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t +index 7f2a2d7..0b93745 100644 +--- a/test/recipes/01-test_symbol_presence.t ++++ b/test/recipes/01-test_symbol_presence.t +@@ -14,8 +14,7 @@ use OpenSSL::Test::Utils; + + setup("test_symbol_presence"); + +-plan skip_all => "Only useful when building shared libraries" +- if disabled("shared"); ++plan skip_all => "The case needs debug symbols then we just disable it"; + + my @libnames = ("crypto", "ssl"); + my $testcount = scalar @libnames; +-- +2.7.4 + diff --git a/meta-openeuler/recipes-core/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch b/meta-openeuler/recipes-core/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch new file mode 100644 index 0000000000000000000000000000000000000000..bfd878a0e23038a30c74cae3598c118e0e86fa30 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch @@ -0,0 +1,62 @@ +From 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Thu, 29 Aug 2019 13:56:21 -0700 +Subject: [PATCH] Add support for io_pgetevents_time64 syscall + +32-bit architectures that are y2038 safe don't include syscalls that use +32-bit time_t. Instead these architectures have suffixed syscalls that +always use a 64-bit time_t. In the case of the io_getevents syscall the +syscall has been replaced with the io_pgetevents_time64 syscall instead. + +This patch changes the io_getevents() function to use the correct +syscall based on the avaliable syscalls and the time_t size. We will +only use the new 64-bit time_t syscall if the architecture is using a +64-bit time_t. This is to avoid having to deal with 32/64-bit +conversions and relying on a 64-bit timespec struct on 32-bit time_t +platforms. As of Linux 5.3 there are no 32-bit time_t architectures +without __NR_io_getevents. In the future if a 32-bit time_t architecture +wants to use the 64-bit syscalls we can handle the conversion. + +This fixes build failures on 32-bit RISC-V. + +Signed-off-by: Alistair Francis + +Reviewed-by: Richard Levitte +Reviewed-by: Paul Dale +(Merged from https://github.com/openssl/openssl/pull/9819) +Upstream-Status: Accepted +--- + engines/e_afalg.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/engines/e_afalg.c b/engines/e_afalg.c +index dacbe358cb..99516cb1bb 100644 +--- a/engines/e_afalg.c ++++ b/engines/e_afalg.c +@@ -125,7 +125,23 @@ static ossl_inline int io_getevents(aio_context_t ctx, long min, long max, + struct io_event *events, + struct timespec *timeout) + { ++#if defined(__NR_io_getevents) + return syscall(__NR_io_getevents, ctx, min, max, events, timeout); ++#elif defined(__NR_io_pgetevents_time64) ++ /* Let's only support the 64 suffix syscalls for 64-bit time_t. ++ * This simplifies the code for us as we don't need to use a 64-bit ++ * version of timespec with a 32-bit time_t and handle converting ++ * between 64-bit and 32-bit times and check for overflows. ++ */ ++ if (sizeof(timeout->tv_sec) == 8) ++ return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL); ++ else { ++ errno = ENOSYS; ++ return -1; ++ } ++#else ++# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64." ++#endif + } + + static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key, +-- +2.30.1 + diff --git a/meta-openeuler/recipes-core/openssl/openssl/0004-Fixup-support-for-io_pgetevents_time64-syscall.patch b/meta-openeuler/recipes-core/openssl/openssl/0004-Fixup-support-for-io_pgetevents_time64-syscall.patch new file mode 100644 index 0000000000000000000000000000000000000000..c16d490aec09578ad807246a042e5880641853a7 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/0004-Fixup-support-for-io_pgetevents_time64-syscall.patch @@ -0,0 +1,99 @@ +From e5499a3cac1e823c3e0697e8667e952317b70cc8 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Thu, 4 Mar 2021 12:10:11 -0500 +Subject: [PATCH] Fixup support for io_pgetevents_time64 syscall + +This is a fixup for the original commit 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc +"Add support for io_pgetevents_time64 syscall" that didn't correctly +work for 32-bit architecutres with a 64-bit time_t that aren't RISC-V. + +For a full discussion of the issue see: +https://github.com/openssl/openssl/commit/5b5e2985f355c8e99c196d9ce5d02c15bebadfbc + +Signed-off-by: Alistair Francis + +Reviewed-by: Tomas Mraz +Reviewed-by: Paul Dale +(Merged from https://github.com/openssl/openssl/pull/14432) +Upstream-Status: Accepted +--- + engines/e_afalg.c | 55 ++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 42 insertions(+), 13 deletions(-) + +diff --git a/engines/e_afalg.c b/engines/e_afalg.c +index 9480d7c24b..4e9d67db2d 100644 +--- a/engines/e_afalg.c ++++ b/engines/e_afalg.c +@@ -124,27 +124,56 @@ static ossl_inline int io_read(aio_context_t ctx, long n, struct iocb **iocb) + return syscall(__NR_io_submit, ctx, n, iocb); + } + ++/* A version of 'struct timespec' with 32-bit time_t and nanoseconds. */ ++struct __timespec32 ++{ ++ __kernel_long_t tv_sec; ++ __kernel_long_t tv_nsec; ++}; ++ + static ossl_inline int io_getevents(aio_context_t ctx, long min, long max, + struct io_event *events, + struct timespec *timeout) + { ++#if defined(__NR_io_pgetevents_time64) ++ /* Check if we are a 32-bit architecture with a 64-bit time_t */ ++ if (sizeof(*timeout) != sizeof(struct __timespec32)) { ++ int ret = syscall(__NR_io_pgetevents_time64, ctx, min, max, events, ++ timeout, NULL); ++ if (ret == 0 || errno != ENOSYS) ++ return ret; ++ } ++#endif ++ + #if defined(__NR_io_getevents) +- return syscall(__NR_io_getevents, ctx, min, max, events, timeout); +-#elif defined(__NR_io_pgetevents_time64) +- /* Let's only support the 64 suffix syscalls for 64-bit time_t. +- * This simplifies the code for us as we don't need to use a 64-bit +- * version of timespec with a 32-bit time_t and handle converting +- * between 64-bit and 32-bit times and check for overflows. +- */ +- if (sizeof(timeout->tv_sec) == 8) +- return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL); ++ if (sizeof(*timeout) == sizeof(struct __timespec32)) ++ /* ++ * time_t matches our architecture length, we can just use ++ * __NR_io_getevents ++ */ ++ return syscall(__NR_io_getevents, ctx, min, max, events, timeout); + else { +- errno = ENOSYS; +- return -1; ++ /* ++ * We don't have __NR_io_pgetevents_time64, but we are using a ++ * 64-bit time_t on a 32-bit architecture. If we can fit the ++ * timeout value in a 32-bit time_t, then let's do that ++ * and then use the __NR_io_getevents syscall. ++ */ ++ if (timeout && timeout->tv_sec == (long)timeout->tv_sec) { ++ struct __timespec32 ts32; ++ ++ ts32.tv_sec = (__kernel_long_t) timeout->tv_sec; ++ ts32.tv_nsec = (__kernel_long_t) timeout->tv_nsec; ++ ++ return syscall(__NR_io_getevents, ctx, min, max, events, ts32); ++ } else { ++ return syscall(__NR_io_getevents, ctx, min, max, events, NULL); ++ } + } +-#else +-# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64." + #endif ++ ++ errno = ENOSYS; ++ return -1; + } + + static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key, +-- +2.30.1 + diff --git a/meta-openeuler/recipes-core/openssl/openssl/afalg.patch b/meta-openeuler/recipes-core/openssl/openssl/afalg.patch new file mode 100644 index 0000000000000000000000000000000000000000..ce816086a4630c1c3a710ec49b475a131cc840ac --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/afalg.patch @@ -0,0 +1,31 @@ +Don't refuse to build afalgeng if cross-compiling or the host kernel is too old. + +Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688] +Signed-off-by: Ross Burton + +diff --git a/Configure b/Configure +index 3baa8ce..9ef52ed 100755 +--- a/Configure ++++ b/Configure +@@ -1550,20 +1550,7 @@ unless ($disabled{"crypto-mdebug-backtrace"}) + unless ($disabled{afalgeng}) { + $config{afalgeng}=""; + if (grep { $_ eq 'afalgeng' } @{$target{enable}}) { +- my $minver = 4*10000 + 1*100 + 0; +- if ($config{CROSS_COMPILE} eq "") { +- my $verstr = `uname -r`; +- my ($ma, $mi1, $mi2) = split("\\.", $verstr); +- ($mi2) = $mi2 =~ /(\d+)/; +- my $ver = $ma*10000 + $mi1*100 + $mi2; +- if ($ver < $minver) { +- disable('too-old-kernel', 'afalgeng'); +- } else { +- push @{$config{engdirs}}, "afalg"; +- } +- } else { +- disable('cross-compiling', 'afalgeng'); +- } ++ push @{$config{engdirs}}, "afalg"; + } else { + disable('not-linux', 'afalgeng'); + } diff --git a/meta-openeuler/recipes-core/openssl/openssl/find.pl b/meta-openeuler/recipes-core/openssl/openssl/find.pl new file mode 100644 index 0000000000000000000000000000000000000000..257d6276c821f0a38e8b9a39a583f5be6154e1c0 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/find.pl @@ -0,0 +1,54 @@ +warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n"; + +# This library is deprecated and unmaintained. It is included for +# compatibility with Perl 4 scripts which may use it, but it will be +# removed in a future version of Perl. Please use the File::Find module +# instead. + +# Usage: +# require "find.pl"; +# +# &find('/foo','/bar'); +# +# sub wanted { ... } +# where wanted does whatever you want. $dir contains the +# current directory name, and $_ the current filename within +# that directory. $name contains "$dir/$_". You are cd'ed +# to $dir when the function is called. The function may +# set $prune to prune the tree. +# +# For example, +# +# find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune +# +# corresponds to this +# +# sub wanted { +# /^\.nfs.*$/ && +# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && +# int(-M _) > 7 && +# unlink($_) +# || +# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && +# $dev < 0 && +# ($prune = 1); +# } +# +# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats. + +use File::Find (); + +*name = *File::Find::name; +*prune = *File::Find::prune; +*dir = *File::Find::dir; +*topdir = *File::Find::topdir; +*topdev = *File::Find::topdev; +*topino = *File::Find::topino; +*topmode = *File::Find::topmode; +*topnlink = *File::Find::topnlink; + +sub find { + &File::Find::find(\&wanted, @_); +} + +1; diff --git a/meta-openeuler/recipes-core/openssl/openssl/reproducible.patch b/meta-openeuler/recipes-core/openssl/openssl/reproducible.patch new file mode 100644 index 0000000000000000000000000000000000000000..35441f304d4dbe70822200443370ad92907c23d9 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/reproducible.patch @@ -0,0 +1,32 @@ +The value for perl_archname can vary depending on the host, e.g. +x86_64-linux-gnu-thread-multi or x86_64-linux-thread-multi which +makes the ptest package non-reproducible. Its unused other than +these references so drop it. + +RP 2020/2/6 + +Upstream-Status: Pending +Signed-off-by: Richard Purdie + +Index: openssl-1.1.1d/Configure +=================================================================== +--- openssl-1.1.1d.orig/Configure ++++ openssl-1.1.1d/Configure +@@ -286,7 +286,7 @@ if (defined env($local_config_envname)) + # Save away perl command information + $config{perl_cmd} = $^X; + $config{perl_version} = $Config{version}; +-$config{perl_archname} = $Config{archname}; ++#$config{perl_archname} = $Config{archname}; + + $config{prefix}=""; + $config{openssldir}=""; +@@ -2517,7 +2517,7 @@ _____ + @{$config{perlargv}}), "\n"; + print "\nPerl information:\n\n"; + print ' ',$config{perl_cmd},"\n"; +- print ' ',$config{perl_version},' for ',$config{perl_archname},"\n"; ++ print ' ',$config{perl_version},"\n"; + } + if ($dump || $options) { + my $longest = 0; diff --git a/meta-openeuler/recipes-core/openssl/openssl/run-ptest b/meta-openeuler/recipes-core/openssl/openssl/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..d62d309ee14a9b3d0e5fcce743131d4c5d6ceb2f --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl/run-ptest @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +# Optional arguments are 'list' to lists all tests, or the test name (base name +# ie test_evp, not 03_test_evp.t). + +export TOP=. +# OPENSSL_ENGINES is relative from the test binaries +export OPENSSL_ENGINES=../engines + +perl ./test/run_tests.pl $* | perl -0pe 's#(.*) \.*.ok#PASS: \1#g; s#(.*) \.*.skipped: (.*)#SKIP: \1 (\2)#g; s#(.*) \.*.\nDubious#FAIL: \1#;' diff --git a/meta-openeuler/recipes-core/openssl/openssl_1.1.1m.bb b/meta-openeuler/recipes-core/openssl/openssl_1.1.1m.bb new file mode 100644 index 0000000000000000000000000000000000000000..a1976e482122a0e46ba4cddb94e3d18ec49ca352 --- /dev/null +++ b/meta-openeuler/recipes-core/openssl/openssl_1.1.1m.bb @@ -0,0 +1,177 @@ +require openssl.inc +SUMMARY = "Secure Socket Layer" +DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." +HOMEPAGE = "http://www.openssl.org/" +BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" +SECTION = "libs/network" + +# "openssl" here actually means both OpenSSL and SSLeay licenses apply +# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) +LICENSE = "openssl" + +DEPENDS = "hostperl-runtime-native" + +inherit lib_package multilib_header +MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" + +PACKAGECONFIG ?= "" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG_class-nativesdk = "" + +PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux" + +#| ./libcrypto.so: undefined reference to `getcontext' +#| ./libcrypto.so: undefined reference to `setcontext' +#| ./libcrypto.so: undefined reference to `makecontext' +EXTRA_OECONF_append_libc-musl = " no-async" +EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" + +# This prevents openssl from using getrandom() which is not available on older glibc versions +# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) +EXTRA_OECONF_class-native = "--with-rand-seed=devrandom" +EXTRA_OECONF_class-nativesdk = "--with-rand-seed=devrandom" + +# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. +CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" +CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" +CFLAGS_append += "${LDFLAGS}" + +EXTRA_OECONF_arm32a15eb += " -no-asm" + +do_configure () { + os=${HOST_OS} + case $os in + linux-gnueabi |\ + linux-gnuspe |\ + linux-musleabi |\ + linux-muslspe |\ + linux-musl ) + os=linux + ;; + *) + ;; + esac + target="$os-${HOST_ARCH}" + case $target in + linux-arm*) + target=linux-armv4 + ;; + linux-aarch64*) + target=linux-aarch64 + ;; + linux-i?86 | linux-viac3) + target=linux-x86 + ;; + linux-gnux32-x86_64 | linux-muslx32-x86_64 ) + target=linux-x32 + ;; + linux-gnu64-x86_64) + target=linux-x86_64 + ;; + linux-mips | linux-mipsel) + # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags + target="linux-mips32 ${TARGET_CC_ARCH}" + ;; + linux-gnun32-mips*) + target=linux-mips64 + ;; + linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) + target=linux64-mips64 + ;; + linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) + target=linux-generic32 + ;; + linux-powerpc) + target=linux-ppc + ;; + linux-powerpc64) + target=linux-ppc64 + ;; + linux-riscv32) + target=linux-generic32 + ;; + linux-riscv64) + target=linux-generic64 + ;; + linux-sparc | linux-supersparc) + target=linux-sparcv9 + ;; + linux-gnu_ilp32*) + target=linux-arm64ilp32 + ;; + esac + + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the + # environment variables set by bitbake. Adjust the environment variables instead. + if [ target = "linux-arm64ilp32" ]; then + perl ./Configure --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target + else + perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target + fi + +} + +do_install () { + oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install + + oe_multilib_header openssl/opensslconf.h + + # Create SSL structure for packages such as ca-certificates which + # contain hard-coded paths to /etc/ssl. Debian does the same. + install -d ${D}${sysconfdir}/ssl + mv ${D}${libdir}/ssl-1.1/certs \ + ${D}${libdir}/ssl-1.1/private \ + ${D}${libdir}/ssl-1.1/openssl.cnf \ + ${D}${sysconfdir}/ssl/ + + # Although absolute symlinks would be OK for the target, they become + # invalid if native or nativesdk are relocated from sstate. + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf +} + +do_install_append_class-native () { + create_wrapper ${D}${bindir}/openssl \ + OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ + SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ + SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ + OPENSSL_ENGINES=${libdir}/ssl-1.1/engines +} + +do_install_append_class-nativesdk () { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh + sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration +# file to be installed for both the openssl-bin package and the libcrypto +# package since the openssl-bin package depends on the libcrypto package. + +FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" +FILES_libssl = "${libdir}/libssl${SOLIBS}" +FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" +FILES_${PN}-engines = "${libdir}/engines-1.1" +FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" +FILES_${PN} += "${libdir}/ssl-1.1/* ${sysconfdir}/ssl/*" +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" +FILES_${PN} += "${libdir}/engines-1.1/*" + +CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" + +RRECOMMENDS_libcrypto += "openssl-conf" +RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" + +# Remove bash dependencies for all image +RDEPENDS_${PN}-ptest_remove += "bash" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "openssl:openssl" + diff --git a/meta-openeuler/recipes-core/os-base/os-base/LICENSE b/meta-openeuler/recipes-core/os-base/os-base/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/LICENSE @@ -0,0 +1 @@ + diff --git a/meta-openeuler/recipes-core/os-base/os-base/bashrc b/meta-openeuler/recipes-core/os-base/os-base/bashrc new file mode 100644 index 0000000000000000000000000000000000000000..619ea72ba08d9f0c2cfd4bfeb3e06ab52e568ae1 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/bashrc @@ -0,0 +1,3 @@ +TMOUT=300 +umask 077 +export TMOUT diff --git a/meta-openeuler/recipes-core/os-base/os-base/fstab b/meta-openeuler/recipes-core/os-base/os-base/fstab new file mode 100644 index 0000000000000000000000000000000000000000..bf3c16e8aa93aa68005d0ad2c71dd59fac1d6ae0 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/fstab @@ -0,0 +1,8 @@ +proc /proc proc defaults 0 0 +sysfs /sys sysfs defaults 0 0 +none /var tmpfs nodev,nosuid,mode=755,noexec 0 0 +none /var/log/audit tmpfs nodev,nosuid,mode=755 0 0 +devtmpfs /dev devtmpfs defaults 0 0 +tmpfs /dev/shm tmpfs nodev,nosuid,mode=1777,noexec 0 0 +devpts /dev/pts devpts mode=620 0 0 +tmpfs /tmp tmpfs nodev,nosuid,noexec 0 0 diff --git a/meta-openeuler/recipes-core/os-base/os-base/group b/meta-openeuler/recipes-core/os-base/os-base/group new file mode 100644 index 0000000000000000000000000000000000000000..007e06d70f44be10167203888e004324588a76a6 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/group @@ -0,0 +1,2 @@ +root:x:0: +sshd:x:502: diff --git a/meta-openeuler/recipes-core/os-base/os-base/inittab b/meta-openeuler/recipes-core/os-base/os-base/inittab new file mode 100644 index 0000000000000000000000000000000000000000..cdc0f97b5c537b70da148165db6eefc297cc6e61 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/inittab @@ -0,0 +1,3 @@ +::sysinit:/etc/rc.d/rc.sysinit +::respawn:/sbin/getty -L 115200 ttyAMA0 vt102 +::ctrlaltdel:/bin/false diff --git a/meta-openeuler/recipes-core/os-base/os-base/issue b/meta-openeuler/recipes-core/os-base/os-base/issue new file mode 100644 index 0000000000000000000000000000000000000000..eb110ba757c91351a720a6fbd1d79fd4694250cc --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/issue @@ -0,0 +1 @@ +Authorized uses only. All activity may be monitored and reported. diff --git a/meta-openeuler/recipes-core/os-base/os-base/issue.net b/meta-openeuler/recipes-core/os-base/os-base/issue.net new file mode 100644 index 0000000000000000000000000000000000000000..eb110ba757c91351a720a6fbd1d79fd4694250cc --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/issue.net @@ -0,0 +1 @@ +Authorized uses only. All activity may be monitored and reported. diff --git a/meta-openeuler/recipes-core/os-base/os-base/modules b/meta-openeuler/recipes-core/os-base/os-base/modules new file mode 100644 index 0000000000000000000000000000000000000000..4072fc4e90af0a5a4784674dec19b203c7947891 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/modules @@ -0,0 +1,30 @@ +llc +stp +garp +8021q +af_packet +libcrc32c +tunnel4 +x_tables +inet_diag +nf_defrag_ipv4 +nf_defrag_ipv6 +nf_conntrack +nf_nat +xt_tcpudp +crc-ccitt +ipv6 +ip6_udp_tunnel +ip6_tables +ip6table_filter +nf_reject_ipv6 +ip_tunnel +ipip +ip_tables +nf_reject_ipv4 +ipt_REJECT +iptable_filter +ip6t_REJECT +xt_nat +iptable_nat +ip6table_nat diff --git a/meta-openeuler/recipes-core/os-base/os-base/motd b/meta-openeuler/recipes-core/os-base/os-base/motd new file mode 100644 index 0000000000000000000000000000000000000000..eb110ba757c91351a720a6fbd1d79fd4694250cc --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/motd @@ -0,0 +1 @@ +Authorized uses only. All activity may be monitored and reported. diff --git a/meta-openeuler/recipes-core/os-base/os-base/passwd b/meta-openeuler/recipes-core/os-base/os-base/passwd new file mode 100644 index 0000000000000000000000000000000000000000..6b34777a4248d8593c1e7e4f409a940427ed76da --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/passwd @@ -0,0 +1,2 @@ +root:x:0:0:root:/root:/bin/bash +sshd:x:502:502:sshd privsep::/bin/false diff --git a/meta-openeuler/recipes-core/os-base/os-base/profile b/meta-openeuler/recipes-core/os-base/os-base/profile new file mode 100644 index 0000000000000000000000000000000000000000..bc66fd1e73e2a547dc20ce53667ebc55ae21f3fc --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/profile @@ -0,0 +1,58 @@ +# /etc/profile +# init bash prompt and enviroment. +# +# + +PS1="\[\033[32m\]\h \w\[\033[m\] \\$ " + +#init PATH +PATH=/usr/local/bin:/usr/bin:/bin +if [ `id -u` -eq 0 ]; then + PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:$PATH +fi + +ulimit -c 0 + +if [ `id -u` -eq 0 ]; then + umask 077 +else + umask 077 +fi + +USER=`id -un` +LOGNAME=$USER + +HOSTNAME=`/bin/hostname` +HISTSIZE=1000 + +TMOUT=300 + +EDITOR=vi +VISUAL=vi + +PAGER=more + +INPUTRC="/etc/inputrc" + +export PATH PS1 USER LOGNAME HOSTNAME HISTSIZE EDITOR VISUAL PAGER INPUTRC TMOUT + + +# Running the local scripts from the user +for i in /etc/profile.d/*.sh ; do + if [ -x $i ]; then + . $i + fi +done +unset i + +alias ls="ls --color=auto" +alias ll="ls -l" +PS1="\[\033[32m\]\h \w\[\033[m\] \\$ " +export PS1 +export TERM=vt200 +PS1="\[\033[32m\]\H \w\[\033[m\] \\$ " +export PS1 +export VERSION=1.0 +export PRODUCT_NAME=openeuler +export HISTSIZE TMOUT +alias su='su -l' diff --git a/meta-openeuler/recipes-core/os-base/os-base/rc.functions b/meta-openeuler/recipes-core/os-base/os-base/rc.functions new file mode 100644 index 0000000000000000000000000000000000000000..feb1bddb48e751fbf5ddac35289dff5bfb2aeed0 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/rc.functions @@ -0,0 +1,59 @@ +# Functions used by init scripts + +title() +{ + echo -en "\033[1m" + echo -en $@ + echo -e "\033[0m" +} + + +broadcastmessage() +{ + for ttys in `who | awk '{print $2}'`; + do + echo $1 > /dev/$ttys + done +} + +mount_a() +{ + FSTAB="/etc/fstab" + TMPDIR="/tmp/var-$RANDOM" + TMPFILE="/tmp/tmp-faillog-$RANDOM" + + mount -t tmpfs tmpfs /tmp + touch ${TMPFILE} + while read line + do + +IFS=" " read device mountdir fstype options dump fsck<< EOF +$line +EOF + if [ "$mountdir" == "/tmp" ] || [ "$mountdir" == "/tmp/" ] ;then + mount $mountdir -o remount,$options + elif [ "$fstype" == "proc" ] || [ "$fstype" == "sysfs" ] ;then + umount $mountdir 2>${TMPFILE} + mount -t $fstype $device $mountdir -o $options + else + if [ -d "$mountdir" ] + then + mkdir ${TMPDIR} + # Copy the contents instead of moving, since this would be done on every boot. + cp -rf $mountdir/. ${TMPDIR}/ 2> ${TMPFILE} + mount -t $fstype $device $mountdir -o $options + cp -rf ${TMPDIR}/. $mountdir 2> ${TMPFILE} + rm -rf ${TMPDIR} 2> ${TMPFILE} + + else + mkdir -p $mountdir + mount -t $fstype $device $mountdir -o $options + fi + fi + done < ${FSTAB} + + rm -f ${TMPFILE} + + [ ! -d /dev/pts ] && mkdir /dev/pts + [ ! -d /dev/pts ] && mkdir /dev/shm +} diff --git a/meta-openeuler/recipes-core/os-base/os-base/rc.local b/meta-openeuler/recipes-core/os-base/os-base/rc.local new file mode 100644 index 0000000000000000000000000000000000000000..401d32680ef215b0e38d970554ad22d3f3fbbda5 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/rc.local @@ -0,0 +1,10 @@ +#!/bin/bash + +. /etc/init.d/auditd start +/usr/sbin/rsyslogd + +chmod 640 /var/log/* +chmod 640 /dev/mem +chmod 600 /var/log/audit/audit.log + +. /etc/init.d/sshd start 1>/dev/null 2>&1 & diff --git a/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit b/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit new file mode 100644 index 0000000000000000000000000000000000000000..a8c226d1e822ed2436ccff07a50fd1a9d57c43a4 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit @@ -0,0 +1,77 @@ +#! /bin/sh + +PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin + +function fs_mount() +{ + echo "mount file system" + mount_a +} + +function loading_module() +{ + echo "Loading the kernel modules: " + depmod + cat /etc/modules | sed -e '/^[ \t]*$/d' | + while read module + do + echo "Loading module: $module" + modprobe $module + done +} + +. /etc/rc.d/rc.functions + +# mount file system + fs_mount + +# load kernel modules + loading_module + +#creating a soft link for /dev/fd to /proc/self/fd + ln -s /proc/self/fd /dev/fd + +# creating device driver instances + echo "Making device instances:" + echo /sbin/mdev > /proc/sys/kernel/hotplug + mdev -s + +# setting up initial hostname + echo "Setting hostname: " + hostname -F /etc/hostname + +# Cleaning up the Directory tmp + echo "Cleaning up tmp :" + rm -rf /tmp/* >/dev/null + +#touch /var/log/wtmp to record user login history + touch /var/log/wtmp + +# setting up the sysctl confgiruaton options + echo "Setting up the sysctl configurations:" + sysctl -p /etc/sysctl.conf > /dev/null + +# setting up localhost loopback interface + echo "Setting up interface lo: " + ifconfig lo up 127.0.0.1 + +# running local startup scripts + echo "Running local startup scripts." + for i in `ls /etc/rc.d/rc.start/* 2>/dev/null` ; do + if [ -x $i ]; then + $i start + fi + done + +#print uptime after finish running rc.start + if [ -r /proc/uptime ] + then + echo -n "System booting cost:" + cat /proc/uptime + fi + +# calling user defined scripts if any + if [ -x /etc/rc.d/rc.local ]; then + /etc/rc.d/rc.local + fi + diff --git a/meta-openeuler/recipes-core/os-base/os-base/rcS b/meta-openeuler/recipes-core/os-base/os-base/rcS new file mode 100644 index 0000000000000000000000000000000000000000..fc699e4723cd15a0ec0dd14b12555d1bd85c5dee --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/rcS @@ -0,0 +1,2 @@ +#!/bin/sh +/bin/mount -a diff --git a/meta-openeuler/recipes-core/os-base/os-base/securetty b/meta-openeuler/recipes-core/os-base/os-base/securetty new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/meta-openeuler/recipes-core/os-base/os-base/shadow b/meta-openeuler/recipes-core/os-base/os-base/shadow new file mode 100644 index 0000000000000000000000000000000000000000..c2935329305663f1bc6792c6c102d97b2d55f843 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/shadow @@ -0,0 +1,2 @@ +root::0:0:99999:7::: +sshd:!:11880:0:90:7:-1:-1:0 diff --git a/meta-openeuler/recipes-core/os-base/os-base/sysctl.conf b/meta-openeuler/recipes-core/os-base/os-base/sysctl.conf new file mode 100644 index 0000000000000000000000000000000000000000..86515a154d33f8596dc89cf8daed0ee5267d6707 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/sysctl.conf @@ -0,0 +1,202 @@ +# see documents in sysctl directory and ip-sysctl.txt for reference + +#arp_ignore - INTEGER +# Define different modes for sending replies in response to +# received ARP requests that resolve local target IP addresses: +# 0 - (default): reply for any local target IP address, configured +# on any interface +# 1 - reply only if the target IP address is local address +# configured on the incoming interface +# 2 - reply only if the target IP address is local address +# configured on the incoming interface and both with the +# sender's IP address are part from same subnet on this interface +# 3 - do not reply for local addresses configured with scope host, +# only resolutions for global and link addresses are replied +# 4-7 - reserved +# 8 - do not reply for all local addresses +# +# The max value from conf/{all,interface}/arp_ignore is used +# when ARP request is received on the {interface} + +net.ipv4.conf.all.arp_ignore = 0 +net.ipv4.conf.default.arp_ignore = 0 + +#arp_filter - BOOLEAN +# 1 - Allows you to have multiple network interfaces on the same +# subnet, and have the ARPs for each interface be answered +# based on whether or not the kernel would route a packet from +# the ARP'd IP out that interface (therefore you must use source +# based routing for this to work). In other words it allows control +# of which cards (usually 1) will respond to an arp request. +# +# 0 - (default) The kernel can respond to arp requests with addresses +# from other interfaces. This may seem wrong but it usually makes +# sense, because it increases the chance of successful communication. +# IP addresses are owned by the complete host on Linux, not by +# particular interfaces. Only for more complex setups like load- +# balancing, does this behaviour cause problems. +# +# arp_filter for the interface will be enabled if at least one of +# conf/{all,interface}/arp_filter is set to TRUE, +# it will be disabled otherwise + +net.ipv4.conf.all.arp_filter = 1 +net.ipv4.conf.default.arp_filter = 1 + +#accept_source_route - INTEGER +# Accept source routing (routing extension header). +# +# >= 0: Accept only routing header type 2. +# < 0: Do not accept routing header. +# +# Default: 0 + +net.ipv4.conf.all.accept_source_route = 0 +net.ipv4.conf.default.accept_source_route = 0 + +#accept_redirects - BOOLEAN +# Accept ICMP redirect messages. +# accept_redirects for the interface will be enabled if: +# - both conf/{all,interface}/accept_redirects are TRUE in the case forwarding +# for the interface is enabled +# or +# - at least one of conf/{all,interface}/accept_redirects is TRUE in the case +# forwarding for the interface is disabled +# accept_redirects for the interface will be disabled otherwise +# default TRUE (host) +# FALSE (router) + +net.ipv4.conf.all.accept_redirects = 0 +net.ipv4.conf.default.accept_redirects = 0 + +#secure_redirects - BOOLEAN +# Accept ICMP redirect messages only for gateways, +# listed in default gateway list. +# secure_redirects for the interface will be enabled if at least one of +# conf/{all,interface}/secure_redirects is set to TRUE, +# it will be disabled otherwise +# default TRUE + +net.ipv4.conf.all.secure_redirects = 0 +net.ipv4.conf.default.secure_redirects = 0 + +#send_redirects - BOOLEAN +# Send redirects, if router. +# send_redirects for the interface will be enabled if at least one of +# conf/{all,interface}/send_redirects is set to TRUE, +# it will be disabled otherwise +# Default: TRUE + +net.ipv4.conf.all.send_redirects = 0 +net.ipv4.conf.default.send_redirects = 0 + +#tcp_fin_timeout - INTEGER +# Time to hold socket in state FIN-WAIT-2, if it was closed +# by our side. Peer can be broken and never close its side, +# or even died unexpectedly. Default value is 60sec. +# Usual value used in 2.2 was 180 seconds, you may restore +# it, but remember that if your machine is even underloaded WEB server, +# you risk to overflow memory with kilotons of dead sockets, +# FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1, +# because they eat maximum 1.5K of memory, but they tend +# to live longer. Cf. tcp_max_orphans. + +net.ipv4.tcp_fin_timeout = 60 + +#tcp_syncookies - BOOLEAN +# Only valid when the kernel was compiled with CONFIG_SYNCOOKIES +# Send out syncookies when the syn backlog queue of a socket +# overflows. This is to prevent against the common 'syn flood attack' +# Default: FALSE +# +# Note, that syncookies is fallback facility. +# It MUST NOT be used to help highly loaded servers to stand +# against legal connection rate. If you see synflood warnings +# in your logs, but investigation shows that they occur +# because of overload with legal connections, you should tune +# another parameters until this warning disappear. +# See: tcp_max_syn_backlog, tcp_synack_retries, tcp_abort_on_overflow. +# +# syncookies seriously violate TCP protocol, do not allow +# to use TCP extensions, can result in serious degradation +# of some services (f.e. SMTP relaying), visible not by you, +# but your clients and relays, contacting you. While you see +# synflood warnings in logs not being really flooded, your server +# is seriously misconfigured. + +#net.ipv4.tcp_syncookies = 1 + +#tcp_syn_retries - INTEGER +# Number of times initial SYNs for an active TCP connection attempt +# will be retransmitted. Should not be higher than 255. Default value +# is 5, which corresponds to ~180seconds. + +net.ipv4.tcp_syn_retries = 1 + +#tcp_synack_retries - INTEGER +# Number of times SYNACKs for a passive TCP connection attempt will +# be retransmitted. Should not be higher than 255. Default value +# is 5, which corresponds to ~180seconds. + +net.ipv4.tcp_synack_retries = 1 + +#tcp_max_syn_backlog - INTEGER +# Maximal number of remembered connection requests, which are +# still did not receive an acknowledgment from connecting client. +# Default value is 1024 for systems with more than 128Mb of memory, +# and 128 for low memory machines. If server suffers of overload, +# try to increase this number. + +net.ipv4.tcp_max_syn_backlog = 4096 + +#icmp_echo_ignore_broadcasts - BOOLEAN +# If set non-zero, then the kernel will ignore all ICMP ECHO and +# TIMESTAMP requests sent to it via broadcast/multicast. +# Default: 1 + +net.ipv4.icmp_echo_ignore_broadcasts = 1 + +#panic_on_oops: +# Controls the kernel's behaviour when an oops or BUG is encountered. +# 0: try to continue operation +# 1: panic immediately. If the `panic' sysctl is also non-zero then the +# machine will be rebooted. + +kernel.panic_on_oops = 1 + +#printk: +# The four values in printk denote: console_loglevel, +# default_message_loglevel, minimum_console_loglevel and +# default_console_loglevel respectively. +# These values influence printk() behavior when printing or +# logging error messages. See 'man 2 syslog' for more info on +# the different loglevels. +# - console_loglevel: messages with a higher priority than +# this will be printed to the console +# - default_message_level: messages without an explicit priority +# will be printed with this priority +# - minimum_console_loglevel: minimum (highest) value to which +# console_loglevel can be set +# - default_console_loglevel: default value for console_loglevel + +kernel.printk = 0 4 0 7 + +net.ipv4.tcp_timestamps = 0 +net.ipv4.icmp_ignore_bogus_error_responses = 1 +net.ipv4.conf.all.rp_filter = 1 +net.ipv4.conf.default.rp_filter = 1 +kernel.sysrq = 0 + +#################### +net.ipv4.conf.all.promote_secondaries=1 +fs.suid_dumpable = 0 +net.ipv4.ip_forward=0 +net.ipv4.conf.default.log_martians=1 +net.ipv4.conf.all.log_martians=1 +net.ipv4.tcp_syncookies=1 +net.ipv4.icmp_echo_ignore_all = 1 + +kernel.randomize_va_space=2 +kernel.perf_event_paranoid = 3 +fs.protected_symlinks=1 +fs.protected_hardlinks=1 diff --git a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..7fe1933bb98d2aab56a4a615196daa2ff5c3cdd7 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb @@ -0,0 +1,81 @@ +SUMMARY = "OS basic configuration files" +DESCRIPTION = "base files" +SECTION = "base" +PR = "r1" +LICENSE = "CLOSED" + +FILESPATH = "${THISDIR}/${BPN}/" +DL_DIR = "${THISDIR}/${BPN}/" +LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=1acb172ffd3d252285dd1b8b8459941e" + +SRC_URI = "file://bashrc \ + file://fstab \ + file://rcS \ + file://group \ + file://inittab \ + file://issue \ + file://issue.net \ + file://LICENSE \ + file://motd \ + file://passwd \ + file://profile \ + file://shadow \ + file://sysctl.conf \ + file://rc.functions \ + file://rc.sysinit \ + file://rc.local \ + file://modules \ +" + +hostname = "openeuler" + +do_install() { + install -d ${D}/etc + cp ${WORKDIR}/bashrc ${D}/etc/ + install -m 0600 ${WORKDIR}/fstab ${D}/etc/ + cp ${WORKDIR}/group ${D}/etc/ + cp ${WORKDIR}/inittab ${D}/etc/ + cp ${WORKDIR}/issue ${D}/etc/ + cp ${WORKDIR}/issue.net ${D}/etc/ + cp ${WORKDIR}/motd ${D}/etc/ + cp ${WORKDIR}/passwd ${D}/etc/ + cp ${WORKDIR}/profile ${D}/etc/ + install -m 0600 ${WORKDIR}/shadow ${D}/etc/ + install -m 0600 ${WORKDIR}/sysctl.conf ${D}/etc/ + install -d ${D}/etc/rc.d + install -m 0744 ${WORKDIR}/rc.functions ${D}/etc/rc.d + install -m 0744 ${WORKDIR}/rc.sysinit ${D}/etc/rc.d + install -m 0744 ${WORKDIR}/rc.local ${D}/etc/rc.d + install -m 0755 -d ${D}/etc/init.d/ + install -m 0750 ${WORKDIR}/rcS ${D}/etc/init.d/ + install -m 0750 ${WORKDIR}/modules ${D}/etc/ + mkdir -p ${D}/var/log/ + touch ${D}/var/log/messages ${D}/var/log/lastlog + mkdir -p ${D}/var/run/faillock ${D}/tmp + mkdir -p ${D}/proc ${D}/sys ${D}/root ${D}/dev ${D}/sys/fs/cgroup + mkdir -p ${D}/var/log/audit ${D}/var/run/sshd ${D}$/lib/modules + if [ "${hostname}" ]; then + echo ${hostname} > ${D}${sysconfdir}/hostname + echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts + fi + mkdir -p ${D}${sysconfdir}/security/ + touch ${D}${sysconfdir}/security/opasswd + chmod 600 ${D}${sysconfdir}/security/opasswd + chmod 750 ${D}$/lib/modules + chmod 700 ${D}/root + +} + +do_install_append_arm() { + echo "unix" >> ${D}/etc/modules +} + +do_install_append_raspberrypi4() { + sed -i 's/ttyAMA0/ttyS0/g' ${D}/etc/inittab + sed -i '/\# load kernel modules/imount -o remount,rw \/' ${D}/etc/rc.d/rc.sysinit +} + +PACKAGES =+ "${PN}-sysctl" +FILES_${PN} = "/" +FILES_${PN}-sysctl = "${sysconfdir}/sysctl.conf" +INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta-openeuler/recipes-core/os-release/os-release.bbappend b/meta-openeuler/recipes-core/os-release/os-release.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..5c30d390ffde0102dce2a3fbb9ff693ba8638725 --- /dev/null +++ b/meta-openeuler/recipes-core/os-release/os-release.bbappend @@ -0,0 +1,7 @@ +BUILDTIME = "${DATETIME}" +BUILDTIME[vardepsexclude] = "DATETIME" +do_install_append () { + if [ "${BUILDTIME}" ]; then + echo ${BUILDTIME} > ${D}${sysconfdir}/os-revision + fi +} diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb new file mode 100644 index 0000000000000000000000000000000000000000..70c795eebe4ff3eab32fb021af4709bad4460e73 --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb @@ -0,0 +1,105 @@ +SUMMARY = "image base utils" +PR = "r1" + +# +# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH +# +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +# PACKAGES is "${PN}" by default +# if you want to add new groups by RDEPENDS_xx, you show add new group to PACKAGES +PACKAGES = "${PN} ${PN}-extended" + +RDEPENDS_packagegroup-base = " \ +packagegroup-core-base-utils \ +acl \ +attr \ +bind-utils \ +cifs-utils \ +cronie \ +curl \ +dosfstools \ +e2fsprogs \ +e2fsprogs-tune2fs \ +ethtool \ +expat \ +gdb \ +gdbserver \ +glib-2.0 \ +grep \ +gzip \ +initscripts \ +iproute2-ip \ +iptables \ +json-c \ +kmod \ +less \ +libaio \ +libasm \ +libbfd \ +libcap \ +libcap-bin \ +libcap-ng \ +libcap-ng-bin \ +libdw \ +libffi \ +libhugetlbfs \ +libnl \ +libnl-cli \ +libnl-xfrm \ +libpcap \ +libpwquality \ +libselinux-bin \ +libsepol-bin \ +libusb1 \ +libxml2 \ +libxml2-utils \ +logrotate \ +lvm2 \ +ncurses \ +ncurses-libform \ +ncurses-libmenu \ +ncurses-libpanel \ +ncurses-terminfo \ +ncurses-terminfo-base \ +nfs-utils \ +nfs-utils-client \ +pciutils \ +policycoreutils \ +policycoreutils-fixfiles \ +policycoreutils-hll \ +policycoreutils-loadpolicy \ +policycoreutils-semodule \ +policycoreutils-sestatus \ +policycoreutils-setfiles \ +procps \ +pstree \ +quota \ +rsyslog \ +sed \ +shadow-base \ +squashfs-tools \ +tzdata-core \ +util-linux-su \ +util-linux-libfdisk \ +xz \ +" + +RDEPENDS_packagegroup-base-extended = " \ +dhcp \ +dhcp-libs \ +dhcp-server \ +dhcp-server-config \ +sysfsutils \ +libmetal \ +openamp \ +" + +RDEPENDS_packagegroup-base_append_raspberrypi4 += " \ +e2fsprogs-resize2fs \ +" +RDEPENDS_packagegroup-base_append_aarch64-std = " \ +dsoftbus \ +" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb new file mode 100644 index 0000000000000000000000000000000000000000..00ed86c1ff8253da661ec1221cbbaf3100fd582e --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "packages to provide base utils" + +# +# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH +# +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = "\ +audit \ +auditd \ +audispd-plugins \ +cracklib \ +libpwquality \ +libpam \ +packagegroup-pam-plugins \ +shadow \ +shadow-securetty \ +bash \ +" + +RDEPENDS_${PN}_append_arm += "kernel-module-unix" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bb new file mode 100644 index 0000000000000000000000000000000000000000..111cd8e80934c687b73e3a800401e7666d39a73b --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bb @@ -0,0 +1,16 @@ +SUMMARY = "A small image just capable of allowing a device to boot." +LICENSE = "MIT" +PR = "r1" + +inherit packagegroup + +RDEPENDS_${PN} = " \ +busybox-linuxrc \ +kernel \ +kernel-img \ +kernel-vmlinux \ +busybox \ +os-base \ +glibc \ +os-release \ +" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-debugtools.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-debugtools.bb new file mode 100644 index 0000000000000000000000000000000000000000..708d0c6b8627dc5778b3b82f46031b76b825e36e --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-debugtools.bb @@ -0,0 +1,10 @@ +SUMMARY = "Debugging tools" +inherit packagegroup + +PR = "r1" + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = "\ + strace \ + " diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb new file mode 100644 index 0000000000000000000000000000000000000000..6d3b21b81a21147219aabad9b8cc954dc0d888a7 --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb @@ -0,0 +1,18 @@ +SUMMARY = "packages for iSulad" +inherit packagegroup + +PR = "r1" + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = "\ +libseccomp \ +libwebsockets \ +yajl \ +lcr \ +lxc \ +libevhtp \ +libarchive \ +libevent \ +iSulad \ + " diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb new file mode 100644 index 0000000000000000000000000000000000000000..0f1477b195817f17be1a12f0d32d0b555a2046e5 --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb @@ -0,0 +1,57 @@ +SUMMARY = "linux kernel modules" +PR = "r1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = " \ +kernel-module-overlay \ +kernel-module-8021q \ +kernel-module-jbd2 \ +kernel-module-mbcache \ +kernel-module-ext2 \ +kernel-module-ext4 \ +kernel-module-inet-diag \ +kernel-module-ip-tables \ +kernel-module-ip-tunnel \ +kernel-module-ip6-tables \ +kernel-module-ip6-udp-tunnel \ +kernel-module-ip6table-filter \ +kernel-module-ipip \ +kernel-module-ipt-reject \ +kernel-module-iptable-filter \ +kernel-module-ipv6 \ +kernel-module-nf-conntrack \ +kernel-module-nf-defrag-ipv4 \ +kernel-module-nf-defrag-ipv6 \ +kernel-module-nf-nat \ +kernel-module-nf-reject-ipv4 \ +kernel-module-nf-reject-ipv6 \ +kernel-module-x-tables \ +kernel-module-xt-tcpudp \ +kernel-module-tunnel4 \ +kernel-module-af-packet \ +kernel-module-nfs-ssc \ +kernel-module-fscache \ +kernel-module-grace \ +kernel-module-sunrpc \ +kernel-module-auth-rpcgss \ +kernel-module-lockd \ +kernel-module-nfs-acl \ +kernel-module-nfs \ +kernel-module-nfsv3 \ +kernel-module-nfsd \ +kernel-module-crc-ccitt \ +kernel-module-ipv6 \ +kernel-module-iptable-nat \ +kernel-module-ip6table-nat \ +kernel-module-ip6t-reject \ +kernel-module-xt-nat \ +" +RDEPENDS_${PN}_raspberrypi4 = " \ +" +RDEPENDS_${PN}_aarch64-pro = " \ +" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-openssh.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-openssh.bb new file mode 100644 index 0000000000000000000000000000000000000000..c2fd3b421febe393c1ec2b9445c6d69d21913374 --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-openssh.bb @@ -0,0 +1,16 @@ +SUMMARY = "OpenSSH SSH client/server" +PR = "r1" + +inherit packagegroup + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = " \ +openssh-ssh \ +openssh-sshd \ +openssh-scp \ +openssh-keygen \ +openssh-misc \ +openssh-sftp \ +openssh-sftp-server \ +" diff --git a/meta-openeuler/recipes-core/pam/libpam/99_pam b/meta-openeuler/recipes-core/pam/libpam/99_pam new file mode 100644 index 0000000000000000000000000000000000000000..47eda03f2c3cebeb8ac3bcaee1c15e9c49085cb5 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/99_pam @@ -0,0 +1 @@ +d root root 0755 /var/run/sepermit none diff --git a/meta-openeuler/recipes-core/pam/libpam/libpam-xtests.patch b/meta-openeuler/recipes-core/pam/libpam/libpam-xtests.patch new file mode 100644 index 0000000000000000000000000000000000000000..3d3a5f57f9adcfca0022e0d9c0f6c2b61e0b6dc6 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/libpam-xtests.patch @@ -0,0 +1,37 @@ +This patch is used to create a new sub package libpam-xtests to do more checks. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai +Index: Linux-PAM-1.3.0/xtests/Makefile.am +=================================================================== +--- Linux-PAM-1.3.0.orig/xtests/Makefile.am ++++ Linux-PAM-1.3.0/xtests/Makefile.am +@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src + LDADD = $(top_builddir)/libpam/libpam.la \ + $(top_builddir)/libpam_misc/libpam_misc.la + +-CLEANFILES = *~ $(XTESTS) ++CLEANFILES = *~ + + EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ + tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \ +@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS) + + xtests: $(XTESTS) run-xtests.sh + "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} ++ ++all: $(XTESTS) ++ ++install: install_xtests ++ ++install_xtests: ++ $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests ++ for file in $(EXTRA_DIST) ; do \ ++ $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ ++ done ++ for file in $(XTESTS); do \ ++ $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ ++ done ++ ++.PHONY: all install_xtests diff --git a/meta-openeuler/recipes-core/pam/libpam/pam-volatiles.conf b/meta-openeuler/recipes-core/pam/libpam/pam-volatiles.conf new file mode 100644 index 0000000000000000000000000000000000000000..1f892b7970b6622549e2f99ce1532037d2b1c4a8 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam-volatiles.conf @@ -0,0 +1 @@ +d /var/run/sepermit 0755 root root - - diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-account b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-account new file mode 100644 index 0000000000000000000000000000000000000000..0a9d30a5d315b2d983a4e469f21e9a412077bce1 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-account @@ -0,0 +1,4 @@ +account required pam_faillock.so +account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so +account requisite pam_deny.so +account required pam_permit.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-auth b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-auth new file mode 100644 index 0000000000000000000000000000000000000000..d77adbe5af2e398d86a37db5f82a16165b9b06e0 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-auth @@ -0,0 +1,7 @@ +auth required pam_faillock.so preauth audit deny=3 even_deny_root unlock_time=300 +auth sufficient pam_unix.so nullok try_first_pass +auth [default=die] pam_faillock.so authfail audit deny=3 even_deny_root unlock_time=300 +auth requisite pam_listfile.so item=user onerr=succeed sense=deny file=/etc/login.user.deny +auth [success=1 default=ignore] pam_unix.so +auth required pam_deny.so +auth required pam_permit.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-password b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-password new file mode 100644 index 0000000000000000000000000000000000000000..06335bf722ef8b71cd88ca6d1821a5e7a5345d1a --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-password @@ -0,0 +1,5 @@ +password requisite pam_pwquality.so try_first_pass minclass=3 minlen=8 lcredit=0 ucredit=0 dcredit=0 ocredit=0 reject_username gecoscheck retry=3 enforce_for_root +password required pam_pwhistory.so remember=5 use_authtok enforce_for_root +password [success=1 default=ignore] pam_unix.so use_authtok nullok sha512 +password requisite pam_deny.so +password required pam_permit.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session new file mode 100644 index 0000000000000000000000000000000000000000..94765c85d4d6be0ef9bd083f59cff79fd980b752 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session @@ -0,0 +1,19 @@ +# +# /etc/pam.d/common-session - session-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive). +# + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session-noninteractive b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session-noninteractive new file mode 100644 index 0000000000000000000000000000000000000000..a9c830d4c9b131f5142477f3d24552d76000d3cc --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session-noninteractive @@ -0,0 +1,19 @@ +# +# /etc/pam.d/common-session-noninteractive - session-related modules +# common to all non-interactive services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of all non-interactive sessions. +# + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/other b/meta-openeuler/recipes-core/pam/libpam/pam.d/other new file mode 100644 index 0000000000000000000000000000000000000000..010d5d11d82279fcfb2112dd45bd25a705ecf87d --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/pam.d/other @@ -0,0 +1,24 @@ +# +# /etc/pam.d/other - specify the PAM fallback behaviour +# +# Note that this file is used for any unspecified service; for example +#if /etc/pam.d/cron specifies no session modules but cron calls +#pam_open_session, the session module out of /etc/pam.d/other is +#used. + +# We use pam_warn.so to generate syslog notes that the 'other' +#fallback rules are being used (as a hint to suggest you should setup +#specific PAM rules for the service and aid to debugging). Then to be +#secure, deny access to all services by default. + +auth required pam_warn.so +auth required pam_deny.so + +account required pam_warn.so +account required pam_deny.so + +password required pam_warn.so +password required pam_deny.so + +session required pam_warn.so +session required pam_deny.so diff --git a/meta-openeuler/recipes-core/pam/libpam/run-ptest b/meta-openeuler/recipes-core/pam/libpam/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..2fb69ba7b19821a78e4d72767d10daa5e71f1b95 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam/run-ptest @@ -0,0 +1,32 @@ +#! /bin/sh + +cd tests + +export srcdir=. + +failed=0 +all=0 +for f in tst-*; do + "./$f" > /dev/null 2>&1 + case "$?" in + 0) + echo "PASS: $f" + all=$((all + 1)) + ;; + 77) + echo "SKIP: $f" + ;; + *) + echo "FAIL: $f" + failed=$((failed + 1)) + all=$((all + 1)) + ;; + esac +done + +if [ "$failed" -eq 0 ] ; then + echo "All $all tests passed" +else + echo "$failed of $all tests failed" +fi +unset srcdir diff --git a/meta-openeuler/recipes-core/pam/libpam_1.5.2.bb b/meta-openeuler/recipes-core/pam/libpam_1.5.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..179eb2efff037d1ddd5a33c1f7bd09853be8c3b4 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/libpam_1.5.2.bb @@ -0,0 +1,188 @@ +DISABLE_STATIC = "" +SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" +DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" +HOMEPAGE = "https://fedorahosted.org/linux-pam/" +BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" +SECTION = "base" +# PAM is dual licensed under GPL and BSD. +# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time +# libpam-runtime-1.0.1 is GPLv2+), by openembedded +LICENSE = "GPLv2+ | BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ + file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ + " + +SRC_URI = "file://pam/Linux-PAM-${PV}.tar.xz \ + file://pam/bugfix-pam-1.1.8-faillock-systemtime.patch \ + file://pam/openEuler-change-ndbm-to-gdbm.patch \ + file://pam/0001-bugfix-cannot-open-database-file.patch \ + file://pam/add-sm3-crypt-support.patch \ + file://99_pam \ + file://pam.d/common-account \ + file://pam.d/common-auth \ + file://pam.d/common-password \ + file://pam.d/common-session \ + file://pam.d/common-session-noninteractive \ + file://pam.d/other \ + file://libpam-xtests.patch \ + file://run-ptest \ + file://pam-volatiles.conf \ +" + +SRC_URI[sha256sum] = "e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d" + +#DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" +DEPENDS = "cracklib" + +EXTRA_OECONF = "--includedir=${includedir}/security \ + --libdir=${base_libdir} \ + --disable-nis \ + --disable-regenerate-docu \ + --disable-doc \ + --disable-prelude" + +CFLAGS_append = " -fPIC " + +S = "${WORKDIR}/Linux-PAM-${PV}" + + +#inherit autotools gettext pkgconfig systemd ptest +inherit autotools gettext + +PACKAGECONFIG ??= "" +PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," +PACKAGECONFIG[userdb] = "--enable-db=db,--enable-db=no,db," + +PACKAGES += "${PN}-runtime ${PN}-xtests ${PN}-pkgconfig ${PN}-service" +FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" +FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" +FILES_${PN}-runtime = "${sysconfdir} ${sbindir} ${systemd_system_unitdir}" +FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" +FILES_${PN}-pkgconfig = "${base_libdir}/pkgconfig" +FILES_${PN}-service = "/usr/lib/systemd/system" + +PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" + +def get_multilib_bit(d): + baselib = d.getVar('baselib') or '' + return baselib.replace('lib', '') + +libpam_suffix = "suffix${@get_multilib_bit(d)}" + +RPROVIDES_${PN} += "${PN}-${libpam_suffix}" +RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" + +RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ + " +#RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ +# ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ +# ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ +# ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ +# ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ +# ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ +# bash coreutils" + +# FIXME: Native suffix breaks here, disable it for now +RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" +RRECOMMENDS_${PN}_class-native = "" + +python populate_packages_prepend () { + def pam_plugin_hook(file, pkg, pattern, format, basename): + pn = d.getVar('PN') + libpam_suffix = d.getVar('libpam_suffix') + + rdeps = d.getVar('RDEPENDS_' + pkg) + if rdeps: + rdeps = rdeps + " " + pn + "-" + libpam_suffix + else: + rdeps = pn + "-" + libpam_suffix + d.setVar('RDEPENDS_' + pkg, rdeps) + + provides = d.getVar('RPROVIDES_' + pkg) + if provides: + provides = provides + " " + pkg + "-" + libpam_suffix + else: + provides = pkg + "-" + libpam_suffix + d.setVar('RPROVIDES_' + pkg, provides) + + mlprefix = d.getVar('MLPREFIX') or '' + dvar = d.expand('${WORKDIR}/package') + pam_libdir = d.expand('${base_libdir}/security') + pam_sbindir = d.expand('${sbindir}') + pam_filterdir = d.expand('${base_libdir}/security/pam_filter') + pam_pkgname = mlprefix + 'pam-plugin%s' + + do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, + 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') + do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') +} + +do_compile_ptest() { + cd tests + sed -i -e 's/$(MAKE) $(AM_MAKEFLAGS) check-TESTS//' Makefile + oe_runmake check-am + cd - +} + +do_install() { + autotools_do_install + + # don't install /var/run when populating rootfs. Do it through volatile + rm -rf ${D}${localstatedir} + + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then + rm -rf ${D}${sysconfdir}/init.d/ + rm -rf ${D}${sysconfdir}/rc* + install -d ${D}${sysconfdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/pam-volatiles.conf \ + ${D}${sysconfdir}/tmpfiles.d/pam.conf + else + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/99_pam \ + ${D}${sysconfdir}/default/volatiles/ + fi + + install -d ${D}${sysconfdir}/pam.d/ + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + + # The lsb requires unix_chkpwd has setuid permission + chmod 4755 ${D}${sbindir}/unix_chkpwd + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session + fi +} + +do_install_ptest() { + if [ ${PTEST_ENABLED} = "1" ]; then + mkdir -p ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests + install -m 0644 ${S}/tests/confdir ${D}${PTEST_PATH}/tests + fi +} + +pkg_postinst_${PN}() { + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then + /etc/init.d/populate-volatile.sh update + fi +} + +inherit features_check +REQUIRED_DISTRO_FEATURES = "pam" + +BBCLASSEXTEND = "nativesdk native" + +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account" +CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf" + +UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases" + +CVE_PRODUCT = "linux-pam" diff --git a/meta-openeuler/recipes-core/pam/packagegroup-pam-plugins.bb b/meta-openeuler/recipes-core/pam/packagegroup-pam-plugins.bb new file mode 100644 index 0000000000000000000000000000000000000000..48f99610d3c83969655ba22c513d64ac62748810 --- /dev/null +++ b/meta-openeuler/recipes-core/pam/packagegroup-pam-plugins.bb @@ -0,0 +1,47 @@ +SUMMARY = "libpam plugins collector" +PR = "r1" + +inherit packagegroup + +RDEPENDS_${PN} = "\ +pam-plugin-access \ +pam-plugin-debug \ +pam-plugin-deny \ +pam-plugin-echo \ +pam-plugin-env \ +pam-plugin-exec \ +pam-plugin-faildelay \ +pam-plugin-faillock \ +pam-plugin-filter \ +pam-plugin-ftp \ +pam-plugin-group \ +pam-plugin-issue \ +pam-plugin-keyinit \ +pam-plugin-lastlog \ +pam-plugin-limits \ +pam-plugin-listfile \ +pam-plugin-localuser \ +pam-plugin-loginuid \ +pam-plugin-mail \ +pam-plugin-mkhomedir \ +pam-plugin-motd \ +pam-plugin-namespace \ +pam-plugin-nologin \ +pam-plugin-permit \ +pam-plugin-pwhistory \ +pam-plugin-rhosts \ +pam-plugin-rootok \ +pam-plugin-securetty \ +pam-plugin-setquota \ +pam-plugin-shells \ +pam-plugin-stress \ +pam-plugin-succeed-if \ +pam-plugin-time \ +pam-plugin-timestamp \ +pam-plugin-umask \ +pam-plugin-unix \ +pam-plugin-usertype \ +pam-plugin-warn \ +pam-plugin-wheel \ +pam-plugin-xauth \ +" diff --git a/meta-openeuler/recipes-core/pciutils/pciutils/configure.patch b/meta-openeuler/recipes-core/pciutils/pciutils/configure.patch new file mode 100644 index 0000000000000000000000000000000000000000..e444c139756d75edd97a4bae679df62d53f7a9f6 --- /dev/null +++ b/meta-openeuler/recipes-core/pciutils/pciutils/configure.patch @@ -0,0 +1,81 @@ +This patch: +* ensures we link correctly +* allows us to optionally pass target information to configure rather than using uname +* select linux as the platform in most cases we care about + +This is a merge of various tweaks to allow us to build pciutils including +work from: + +7/30/2010 - Qing He +1/22/2012 - Shane Wang +Ionut Radu +2017/6/15 - RP - Cleanups and merging patches + +Upstream-Status: Inappropriate [embedded specific] + +Index: pciutils-3.5.6/Makefile +=================================================================== +--- pciutils-3.5.6.orig/Makefile ++++ pciutils-3.5.6/Makefile +@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB) + example.o: example.c $(PCIINC) + + %: %.o +- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ ++ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@ + + %.8 %.7 %.5: %.man + M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#" +Index: pciutils-3.5.6/lib/configure +=================================================================== +--- pciutils-3.5.6.orig/lib/configure ++++ pciutils-3.5.6/lib/configure +@@ -9,6 +9,10 @@ echo_n() { + printf '%s' "$*" + } + ++VERSION=$1 ++IDSDIR=$2 ++DNS=yes ++ + if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then + echo >&2 "Please run the configure script from the top-level Makefile" + exit 1 +@@ -16,8 +20,8 @@ fi + + echo_n "Configuring libpci for your system..." + if [ -z "$HOST" ] ; then +- sys=`uname -s` +- rel=`uname -r` ++ sys=${3:-`uname -s`} ++ rel= + realsys="$sys" + if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ] + then +@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then + proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1` + cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'` + else +- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` ++ cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`} + fi + if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ] + then +@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then + then + sys=cygwin + fi +- HOST=${3:-$cpu-$sys} ++ HOST=$cpu-$sys + fi + [ -n "$RELEASE" ] && rel="${RELEASE}" + # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. +@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo " $host $rel $cpu $sys" + ++{ echo "$host" | grep linux; } && sys=linux ++ + c=config.h + m=config.mk + echo >$c '#define PCI_CONFIG_H' diff --git a/meta-openeuler/recipes-core/pciutils/pciutils_3.7.0.bb b/meta-openeuler/recipes-core/pciutils/pciutils_3.7.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..96c0a91d7a392c263e75db38362d75deb797d26f --- /dev/null +++ b/meta-openeuler/recipes-core/pciutils/pciutils_3.7.0.bb @@ -0,0 +1,62 @@ +SUMMARY = "PCI utilities" +DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ +to PCI bus configuration space and several utilities based on this library.' +HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" +SECTION = "console/utils" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +DEPENDS = "zlib" + +SRC_URI = "file://pciutils/${BP}.tar.gz \ + file://pciutils/0000-pciutils-2.2.1-idpath.patch \ + file://pciutils/0001-pciutils-dir-d.patch \ + file://configure.patch \ +" + +SRC_URI[sha256sum] = "2432e7a2e12000502d36cf769ab6e5a0cf4931e5050ccaf8b02984b2d3cb0948" + +inherit multilib_header pkgconfig + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" +PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" + +PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}" + +# see configure.patch +do_configure () { + ( + cd lib && \ + # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no', + # so we put it before ./configure + ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH} + ) +} + +export PREFIX = "${prefix}" +export SBINDIR = "${sbindir}" +export SHAREDIR = "${datadir}" +export MANDIR = "${mandir}" + +EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}" + +ASNEEDED = "" + +# The configure script breaks if the HOST variable is set +HOST[unexport] = "1" + +do_install () { + oe_runmake DESTDIR=${D} install install-lib + + install -d ${D}${bindir} + ln -s ../sbin/lspci ${D}${bindir}/lspci + + oe_multilib_header pci/config.h +} + +PACKAGES =+ "${PN}-ids libpci" +FILES_${PN}-ids = "${datadir}/hwdata/pci.ids*" +FILES_libpci = "${libdir}/libpci.so.*" +SUMMARY_${PN}-ids = "PCI utilities - device ID database" +DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils." +RDEPENDS_${PN} += "${PN}-ids" diff --git a/meta-openeuler/recipes-core/procps/procps/sysctl.conf b/meta-openeuler/recipes-core/procps/procps/sysctl.conf new file mode 100644 index 0000000000000000000000000000000000000000..253f3701bd39d282dc802b581fae9841520111d0 --- /dev/null +++ b/meta-openeuler/recipes-core/procps/procps/sysctl.conf @@ -0,0 +1,67 @@ +# This configuration taken from procps v3.3.15 +# Commented out kernel/pid_max=10000 line +# +# /etc/sysctl.conf - Configuration file for setting system variables +# See sysctl.conf (5) for information. + +# you can have the CD-ROM close when you use it, and open +# when you are done. +#dev.cdrom.autoeject = 1 +#dev.cdrom.autoclose = 1 + +# protection from the SYN flood attack +net/ipv4/tcp_syncookies=1 + +# see the evil packets in your log files +net/ipv4/conf/all/log_martians=1 + +# makes you vulnerable or not :-) +net/ipv4/conf/all/accept_redirects=0 +net/ipv4/conf/all/accept_source_route=0 +net/ipv4/icmp_echo_ignore_broadcasts =1 + +# needed for routing, including masquerading or NAT +#net/ipv4/ip_forward=1 + +# sets the port range used for outgoing connections +#net.ipv4.ip_local_port_range = 32768 61000 + +# Broken routers and obsolete firewalls will corrupt the window scaling +# and ECN. Set these values to 0 to disable window scaling and ECN. +# This may, rarely, cause some performance loss when running high-speed +# TCP/IP over huge distances or running TCP/IP over connections with high +# packet loss and modern routers. This sure beats dropped connections. +#net.ipv4.tcp_ecn = 0 + +# Swapping too much or not enough? Disks spinning up when you'd +# rather they didn't? Tweak these. +#vm.vfs_cache_pressure = 100 +#vm.laptop_mode = 0 +#vm.swappiness = 60 + +#kernel.printk_ratelimit_burst = 10 +#kernel.printk_ratelimit = 5 +#kernel.panic_on_oops = 0 + +# Reboot 600 seconds after a panic +#kernel.panic = 600 + +# enable SysRq key (note: console security issues) +#kernel.sysrq = 1 + +# Change name of core file to start with the command name +# so you get things like: emacs.core mozilla-bin.core X.core +#kernel.core_pattern = %e.core + +# NIS/YP domain (not always equal to DNS domain) +#kernel.domainname = example.com +#kernel.hostname = darkstar + +# This limits PID values to 4 digits, which allows tools like ps +# to save screen space. +#kernel/pid_max=10000 + +# Protects against creating or following links under certain conditions +# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt +#fs.protected_hardlinks = 1 +#fs.protected_symlinks = 1 diff --git a/meta-openeuler/recipes-core/procps/procps_3.3.17.bb b/meta-openeuler/recipes-core/procps/procps_3.3.17.bb new file mode 100644 index 0000000000000000000000000000000000000000..bdd1a910d618d1a237a6f7e9d9ab7ce75828cdd9 --- /dev/null +++ b/meta-openeuler/recipes-core/procps/procps_3.3.17.bb @@ -0,0 +1,96 @@ +SUMMARY = "System and process monitoring utilities" +DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ +the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." +HOMEPAGE = "https://gitlab.com/procps-ng/procps" +SECTION = "base" +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ + " + +DEPENDS = "ncurses" + +inherit autotools gettext pkgconfig + +SRC_URI = "file://procps-ng/procps-ng-${PV}.tar.xz \ + file://procps-ng/0001-top-fix-two-potential-alternate-display-mode-abends.patch \ + file://procps-ng/0002-top-In-the-bye_bye-function-replace-fputs-with-the-w.patch \ + file://procps-ng/0003-add-options-M-and-N-for-top.patch \ + file://procps-ng/0004-top-exit-with-error-when-pid-overflow.patch \ + file://procps-ng/0005-fix-a-fix-for-the-bye_bye-function.patch \ + file://sysctl.conf \ + " +SRC_URI[sha256sum] = "4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4" + +EXTRA_OECONF = "--enable-skill --disable-modern-top" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" + +do_install_append () { + install -d ${D}${base_bindir} + [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done + install -d ${D}${base_sbindir} + [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done + if [ "${base_sbindir}" != "${sbindir}" ]; then + rmdir ${D}${sbindir} + fi + + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir}/sysctl.d + ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf + fi +} + +CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" + +bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" +base_bindir_progs += "kill pidof ps watch" +base_sbindir_progs += "sysctl" + +ALTERNATIVE_PRIORITY = "200" +ALTERNATIVE_PRIORITY[pidof] = "150" + +ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" + +ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" +ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" +ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" + +python __anonymous() { + for prog in d.getVar('base_bindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) + + for prog in d.getVar('base_sbindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) +} + +# 'ps' isn't suitable for use as a security tool so whitelist this CVE. +# https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3 +CVE_CHECK_WHITELIST += "CVE-2018-1121" + +PROCPS_PACKAGES = "${PN}-lib \ + ${PN}-sysctl" + +PACKAGE_BEFORE_PN = "${PROCPS_PACKAGES}" +RDEPENDS_${PN} += "${PROCPS_PACKAGES}" + +RDEPENDS_${PN}-ps += "${PN}-lib" +RDEPENDS_${PN}-sysctl += "${PN}-lib" + +FILES_${PN}-lib = "${libdir}" +FILES_${PN}-ps = "${base_bindir}/ps.${BPN}" +FILES_${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d" + +ALTERNATIVE_${PN}_remove = "ps" +ALTERNATIVE_${PN}_remove = "sysctl" + +ALTERNATIVE_${PN}-ps = "ps" +ALTERNATIVE_TARGET[ps] = "${base_bindir}/ps" +ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" + +ALTERNATIVE_${PN}-sysctl = "sysctl" +ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" +ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" diff --git a/meta-openeuler/recipes-core/psmisc/psmisc.inc b/meta-openeuler/recipes-core/psmisc/psmisc.inc new file mode 100644 index 0000000000000000000000000000000000000000..3b167d56158fa4663045f4638b9659398c624fa5 --- /dev/null +++ b/meta-openeuler/recipes-core/psmisc/psmisc.inc @@ -0,0 +1,36 @@ +SUMMARY = "Utilities for managing processes on your system" +HOMEPAGE = "http://psmisc.sf.net/" +DESCRIPTION = "The psmisc package contains utilities for managing processes on your \ +system: pstree, killall and fuser. The pstree command displays a tree \ +structure of all of the running processes on your system. The killall \ +command sends a specified signal (SIGTERM if nothing is specified) to \ +processes identified by name. The fuser command identifies the PIDs \ +of processes that are using specified files or filesystems." +SECTION = "base" +DEPENDS = "ncurses virtual/libintl" +LICENSE = "GPLv2" + +inherit autotools gettext + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc" +PACKAGES += "psmisc-extras" + +FILES_${PN} = "" +RDEPENDS_${PN} = "fuser killall pstree" + +FILES_fuser = "${bindir}/fuser.${BPN}" +FILES_fuser-doc = "${mandir}/man1/fuser*" + +FILES_killall = "${bindir}/killall.${BPN}" +FILES_killall-doc = "${mandir}/man1/killall*" + +FILES_pstree = "${bindir}/pstree" +FILES_pstree-doc = "${mandir}/man1/pstree*" + +FILES_psmisc-extras = "${bindir}" +FILES_psmisc-extras-doc = "${mandir}" diff --git a/meta-openeuler/recipes-core/psmisc/psmisc_23.4.bb b/meta-openeuler/recipes-core/psmisc/psmisc_23.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..77389ea510b848616ef658051e0e0d087d159801 --- /dev/null +++ b/meta-openeuler/recipes-core/psmisc/psmisc_23.4.bb @@ -0,0 +1,6 @@ +require psmisc.inc +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +SRC_URI = "file://psmisc/${BP}.tar.xz" +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-core/quota/quota_4.06.bb b/meta-openeuler/recipes-core/quota/quota_4.06.bb new file mode 100644 index 0000000000000000000000000000000000000000..735a33b4b814fc2eb7f607ffee9d50a44840cb7a --- /dev/null +++ b/meta-openeuler/recipes-core/quota/quota_4.06.bb @@ -0,0 +1,35 @@ +SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" +SECTION = "base" +HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" +DESCRIPTION = "Tools and patches for the Linux Diskquota system as part of the Linux kernel" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" +LICENSE = "BSD & GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ + file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" + +SRC_URI = "file://quota/${BP}.tar.gz \ + file://quota/0000-Limit-number-of-comparison-characters-to-4.patch \ + file://quota/0001-Limit-maximum-of-RPC-port.patch \ + file://quota/0002-quotaio_xfs-Warn-when-large-kernel-timestamps-cannot.patch \ +" +SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d" + +CVE_PRODUCT = "linux_diskquota" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/" +UPSTREAM_CHECK_REGEX = "/quota-tools/(?P(\d+[\.\-_]*)+)/" + +DEPENDS = "gettext-native e2fsprogs libnl" + +inherit autotools-brokensep gettext pkgconfig + +CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}" +LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}" +ASNEEDED = "" + +PACKAGECONFIG ??= "rpc bsd" +PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" + +PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" +PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no," +PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap" diff --git a/meta-openeuler/recipes-core/readline/files/inputrc b/meta-openeuler/recipes-core/readline/files/inputrc new file mode 100644 index 0000000000000000000000000000000000000000..b5c4c8af24b001b0596e5080ceed11dd0a0dc602 --- /dev/null +++ b/meta-openeuler/recipes-core/readline/files/inputrc @@ -0,0 +1,61 @@ +# /etc/inputrc - global inputrc for libreadline +# See readline(3readline) and `info rluserman' for more information. + +# Be 8 bit clean. +set input-meta on +set output-meta on + +# To allow the use of 8bit-characters like the german umlauts, comment out +# the line below. However this makes the meta key not work as a meta key, +# which is annoying to those which don't need to type in 8-bit characters. + +# set convert-meta off + +# try to enable the application keypad when it is called. Some systems +# need this to enable the arrow keys. +# set enable-keypad on + +# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys + +# do not bell on tab-completion +# set bell-style none + +# some defaults / modifications for the emacs mode +$if mode=emacs + +# allow the use of the Home/End keys +# "\e[1~": beginning-of-line +# "\e[4~": end-of-line + +# allow the use of the Delete/Insert keys +# "\e[3~": delete-char +# "\e[2~": quoted-insert + +# mappings for "page up" and "page down" to step to the beginning/end +# of the history +# "\e[5~": beginning-of-history +# "\e[6~": end-of-history + +# alternate mappings for "page up" and "page down" to search the history +# "\e[5~": history-search-backward +# "\e[6~": history-search-forward + +# # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving +# "\e[5C": forward-word +# "\e[5D": backward-word +# "\e\e[C": forward-word +# "\e\e[D": backward-word + +# $if term=rxvt +# "\e[8~": end-of-line +# $endif + +# for non RH/Debian xterm, can't hurt for RH/DEbian xterm +# "\eOH": beginning-of-line +# "\eOF": end-of-line + +# for freebsd console +# "\e[H": beginning-of-line +# "\e[F": end-of-line + +$endif diff --git a/meta-openeuler/recipes-core/readline/readline-8.1/configure-fix.patch b/meta-openeuler/recipes-core/readline/readline-8.1/configure-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..ef3104f8a6de965f77193f039aeb373a615633bf --- /dev/null +++ b/meta-openeuler/recipes-core/readline/readline-8.1/configure-fix.patch @@ -0,0 +1,35 @@ +Upstream-Status: Pending + +Without this it fails to link against libtermcap causing various missing +symbols issues. + +RP - 8/10/08 + +Support 6.3 which uses configure.ac rather than configure.in. +Signed-off-by: Hongxu Jia +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cea8f91..9075b8f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -218,10 +218,10 @@ if test -f ${srcdir}/support/shobj-conf; then + AC_MSG_CHECKING(configuration for building shared libraries) + eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` + +-# case "$SHLIB_LIBS" in +-# *curses*|*termcap*|*termlib*) ;; +-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; +-# esac ++ case "$SHLIB_LIBS" in ++ *curses*|*termcap*|*termlib*) ;; ++ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; ++ esac + + AC_SUBST(SHOBJ_CC) + AC_SUBST(SHOBJ_CFLAGS) +-- +1.8.1.2 + diff --git a/meta-openeuler/recipes-core/readline/readline-8.1/rl-native.map b/meta-openeuler/recipes-core/readline/readline-8.1/rl-native.map new file mode 100644 index 0000000000000000000000000000000000000000..5e7d49cdd222154ebe093590cfd9d9c9a0df9459 --- /dev/null +++ b/meta-openeuler/recipes-core/readline/readline-8.1/rl-native.map @@ -0,0 +1,12 @@ +READLINE_6.3 { + rl_change_environment; + rl_clear_history; + rl_executing_key; + rl_executing_keyseq; + rl_filename_stat_hook; + rl_history_substr_search_backward; + rl_history_substr_search_forward; + rl_input_available_hook; + rl_print_last_kbd_macro; + rl_signal_event_hook; +}; diff --git a/meta-openeuler/recipes-core/readline/readline.inc b/meta-openeuler/recipes-core/readline/readline.inc new file mode 100644 index 0000000000000000000000000000000000000000..fa17afed0786831df0398ca5e2d09ba796b74430 --- /dev/null +++ b/meta-openeuler/recipes-core/readline/readline.inc @@ -0,0 +1,54 @@ +SUMMARY = "Library for editing typed command lines" +DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \ +command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \ +additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \ +lines, and perform csh-like history expansion on previous commands." +SECTION = "libs" +HOMEPAGE = "https://tiswww.case.edu/php/chet/readline/rltop.html" + +# GPLv2+ (< 6.0), GPLv3+ (>= 6.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS += "ncurses" + +inherit autotools texinfo + +#EXTRA_AUTORECONF += "--exclude=autoheader" +EXTRA_AUTORECONF_DEFINE += " AUTOHEADER=echo " + +LEAD_SONAME = "libreadline.so" + +do_configure_prepend () { + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +do_install_append () { + # Make install doesn't properly install these + oe_libinstall -so -C shlib libhistory ${D}${libdir} + oe_libinstall -so -C shlib libreadline ${D}${libdir} + + rmdir ${D}${bindir} + rm -rf ${D}${datadir}/${BPN}/*.c + rmdir ${D}${datadir}/${BPN} || true + + install -m 0755 -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc +} + +BBCLASSEXTEND = "native nativesdk" + +CONFFILES_${PN} += "${sysconfdir}/inputrc" + +#inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN}-doc = "history.3" +ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3" + +# OpenSuse injects versions into libreadline leading to conficits between our native one and theirs +# see their spec file for where this is injected. Extra versioning is harmless so we just do the same. +SRC_URI_append_class-native = " file://rl-native.map" +LDFLAGS_append_class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" diff --git a/meta-openeuler/recipes-core/readline/readline_8.1.bb b/meta-openeuler/recipes-core/readline/readline_8.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..b03e75ef48960ae17ba3fbac1e0f7738ae934f76 --- /dev/null +++ b/meta-openeuler/recipes-core/readline/readline_8.1.bb @@ -0,0 +1,10 @@ +require readline.inc + +SRC_URI = "file://readline/${BPN}-${PV}.tar.gz \ + file://readline/readline-8.0-shlib.patch \ + file://inputrc \ + file://configure-fix.patch \ +" + +SRC_URI[archive.md5sum] = "e9557dd5b1409f5d7b37ef717c64518e" +SRC_URI[archive.sha256sum] = "f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" diff --git a/meta-openeuler/recipes-core/rpcbind/rpcbind/init.d b/meta-openeuler/recipes-core/rpcbind/rpcbind/init.d new file mode 100644 index 0000000000000000000000000000000000000000..67499aa828b9626f1ec1b27fd336c6533b186795 --- /dev/null +++ b/meta-openeuler/recipes-core/rpcbind/rpcbind/init.d @@ -0,0 +1,87 @@ +#!/bin/sh +# +# start/stop rpcbind daemon. + +### BEGIN INIT INFO +# Provides: rpcbind +# Required-Start: $network +# Required-Stop: $network +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: RPC portmapper replacement +# Description: rpcbind is a server that converts RPC (Remote +# Procedure Call) program numbers into DARPA +# protocol port numbers. It must be running in +# order to make RPC calls. Services that use +# RPC include NFS and NIS. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +test -f /sbin/rpcbind || exit 0 + +OPTIONS="" +if [ -f /etc/default/rpcbind ] +then + . /etc/default/rpcbind +elif [ -f /etc/rpcbind.conf ] +then + . /etc/rpcbind.conf +fi + +start () +{ + echo -n "Starting rpcbind daemon..." + if pidof /sbin/rpcbind >/dev/null; then + echo "already running." + exit 0 + fi + start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@" + if [ $? -eq 0 ]; then + echo "done." + else + echo "failed." + fi +} + +stop () +{ + echo "Stopping rpcbind daemon..." + if ! pidof /sbin/rpcbind >/dev/null; then + echo "not running." + return 0 + fi + start-stop-daemon --stop --quiet --exec /sbin/rpcbind + if [ $? -eq 0 ]; then + echo "done." + else + echo "failed." + fi +} + +case "$1" in + start) + start $OPTIONS + ;; + stop) + stop + ;; + force-reload) + stop + start $OPTIONS + ;; + restart) + stop + start $OPTIONS + ;; + status) + status /sbin/rpcbind + ;; + *) + echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}" + exit 1 + ;; +esac + +exit $? diff --git a/meta-openeuler/recipes-core/rpcbind/rpcbind/rpcbind.conf b/meta-openeuler/recipes-core/rpcbind/rpcbind/rpcbind.conf new file mode 100644 index 0000000000000000000000000000000000000000..f423ac178894a32ec7f2b8c330034c49865d20b0 --- /dev/null +++ b/meta-openeuler/recipes-core/rpcbind/rpcbind/rpcbind.conf @@ -0,0 +1,3 @@ +# Optional arguments passed to rpcbind. +# +RPCBIND_OPTIONS="" diff --git a/meta-openeuler/recipes-core/rpcbind/rpcbind_1.2.6.bb b/meta-openeuler/recipes-core/rpcbind/rpcbind_1.2.6.bb new file mode 100644 index 0000000000000000000000000000000000000000..347851b9266fefaad6576778abbe9e53b7de0a4e --- /dev/null +++ b/meta-openeuler/recipes-core/rpcbind/rpcbind_1.2.6.bb @@ -0,0 +1,56 @@ +SUMMARY = "Universal Addresses to RPC Program Number Mapper" +DESCRIPTION = "The rpcbind utility is a server that converts RPC \ + program numbers into universal addresses." +SECTION = "console/network" +HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" +DEPENDS = "libtirpc quota" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ + file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" + +SRC_URI = "file://rpcbind/${BP}.tar.bz2 \ + file://rpcbind/rpcbind-0.2.4-runstatdir.patch \ + file://rpcbind/bugfix-rpcbind-GETADDR-return-client-ip.patch \ + file://rpcbind/CVE-2017-8779.patch \ + file://rpcbind/backport-fix-double-free-in-init_transport.patch \ + file://rpcbind/bugfix-listen-tcp-port-111.patch \ + file://init.d \ + file://rpcbind.conf \ +" +SRC_URI[md5sum] = "2d84ebbb7d6fb1fc3566d2d4b37f214b" +SRC_URI[sha256sum] = "5613746489cae5ae23a443bb85c05a11741a5f12c8f55d2bb5e83b9defeee8de" + +inherit autotools systemd pkgconfig + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" + +INITSCRIPT_NAME = "rpcbind" +INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." + +SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ + --shell /bin/false --user-group rpc" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \ + --without-systemdsystemunitdir, \ + systemd \ +" + +EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc --without-systemdsystemunitdir" + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + sed -e 's,/etc/,${sysconfdir}/,g' \ + -e 's,/sbin/,${sbindir}/,g' \ + ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind + chmod 0750 ${D}${sysconfdir}/init.d/rpcbind +} + +ALTERNATIVE_${PN} = "rpcinfo" +ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo" diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript b/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript new file mode 100644 index 0000000000000000000000000000000000000000..96e9d74ca4e25856f8781475788cbbfe1b01eefb --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript @@ -0,0 +1,119 @@ +#! /bin/sh +# +# This is an init script for openembedded +# Copy it to /etc/init.d/rsyslog and type +# > update-rc.d rsyslog defaults 5 +# + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +NAME=rsyslog +RSYSLOGD=rsyslogd +RSYSLOGD_BIN=/usr/sbin/rsyslogd +RSYSLOGD_OPTIONS="" +RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid +SCRIPTNAME=/etc/init.d/$NAME +# Exit if the package is not installed +[ -x "$RSYSLOGD_BIN" ] || exit 0 +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME +# +# Function that starts the daemon/service +# +do_start() +{ + DAEMON=$1 + DAEMON_ARGS=$2 + PIDFILE=$3 + # Return + # 0 if daemon has been started + # 1 if daemon could not be started + # if daemon had already been started, start-stop-daemon will return 1 + # so add -o/--oknodo(if nothing is done, exit 0) + start-stop-daemon -S --quiet --pidfile $PIDFILE --exec $DAEMON \ + --oknodo -- $DAEMON_ARGS || return 1 +} +# +# Function that stops the daemon/service +# +do_stop() +{ + NAME=$1 + PIDFILE=$2 + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + # QUIT/TERM/INT should work here, but they don't ????? + start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME + RETVAL="$?" + rm -f $PIDFILE + return "$RETVAL" +} +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + NAME=$1 + PIDFILE=$2 + start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +do_status() { + NAME=$1 + PIDFILE=$2 + # -t: test only but not stop + start-stop-daemon -K -t --quiet --pidfile $PIDFILE --name $NAME + # exit with status 0 if process is found + if [ "$?" = "0" ]; then + return 0 + else + return 1 + fi +} + +case "$1" in + start) + echo -n "starting $RSYSLOGD ... " + do_start "$RSYSLOGD_BIN" "$RSYSLOGD_OPTIONS" "$RSYSLOGD_PIDFILE" + case "$?" in + 0) echo "done" ;; + 1) echo "failed" ;; + esac + ;; + stop) + echo -n "stopping $RSYSLOGD ... " + do_stop "$RSYSLOGD" "$RSYSLOGD_PIDFILE" + case "$?" in + 0|1) echo "done" ;; + 2) echo "failed" ;; + esac + ;; + reload|force-reload) + echo -n "reloading $RSYSLOGD ... " + do_reload "$RSYSLOGD" "$RSYSLOGD_PIDFILE" + echo "done" + ;; + restart) + $0 stop + $0 start + ;; + status) + echo -n "status $RSYSLOGD ... " + do_status "$RSYSLOGD" "$RSYSLOGD_PIDFILE" + if [ "$?" = "0" ]; then + echo "running" + exit 0 + else + echo "stopped" + exit 1 + fi + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2 + exit 3 + ;; +esac +exit 0 + diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf new file mode 100644 index 0000000000000000000000000000000000000000..3db32f0c1cf1a14a9f5ba0a91998360ff47840fc --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf @@ -0,0 +1,85 @@ +# rsyslog configuration file + +# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html +# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html + +#### MODULES #### + +$ModLoad imuxsock # provides support for local system logging (e.g. via logger command) +$ModLoad imklog # reads kernel messages (the same are read from journald) +$ModLoad immark # provides --MARK-- message capability + +# Provides UDP syslog reception +#$ModLoad imudp +#$UDPServerRun 514 + +# Provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 + + +#### GLOBAL DIRECTIVES #### +$FileGroup root +$FileOwner root +$FileCreateMode 0640 + +# Where to place auxiliary files +$WorkDirectory /var/lib/rsyslog + +# Use default timestamp format +$ActionFileDefaultTemplate RSYSLOG_FileFormat + +# File syncing capability is disabled by default. This feature is usually not required, +# not useful and an extreme performance hit +#$ActionFileEnableSync on + +# Include all config files in /etc/rsyslog.d/ +$IncludeConfig /etc/rsyslog.d/*.conf + + +#### RULES #### + +# Log all kernel messages to the console. +# Logging much else clutters up the screen. +#kern.* /dev/console + +# Log anything (except mail) of level info or higher. +# Don't log private authentication messages! +*.info;mail.none /var/log/messages + +# The authpriv file has restricted access. +authpriv.* /var/log/secure + +# Log all the mail messages in one place. +mail.* -/var/log/maillog + + +# Log cron stuff +cron.* /var/log/cron + +# Everybody gets emergency messages +*.emerg :omusrmsg:* + +# Save news errors of level crit and higher in a special file. +uucp,news.crit /var/log/spooler + +# Save boot messages also to boot.log +local7.* /var/log/boot.log + + +# ### begin forwarding rule ### +# The statement between the begin ... end define a SINGLE forwarding +# rule. They belong together, do NOT split them. If you create multiple +# forwarding rules, duplicate the whole block! +# Remote Logging (we use TCP for reliable delivery) +# +# An on-disk queue is created for this action. If the remote host is +# down, messages are spooled to disk and sent when it is up again. +#$ActionQueueFileName fwdRule1 # unique name prefix for spool files +#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) +#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown +#$ActionQueueType LinkedList # run asynchronously +#$ActionResumeRetryCount -1 # infinite retries if host is down +# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional +#*.* @@remote-host:514 +# ### end of the forwarding rule ### diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate new file mode 100644 index 0000000000000000000000000000000000000000..962794577d75516f553240012520b0a0d3d2ea10 --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate @@ -0,0 +1,40 @@ +# /etc/logrotate.d/rsyslog - Ported from Debian + +/var/log/syslog +{ + rotate 7 + daily + missingok + notifempty + delaycompress + compress + postrotate + @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true + endscript +} + +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ + rotate 4 + weekly + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true + endscript +} + diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2110.0.bb b/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2110.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..446bc332cf4de40b62cac6e1f374300deea297da --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2110.0.bb @@ -0,0 +1,107 @@ +SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" +DESCRIPTION = "\ + Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ + PostgreSQL, failover log destinations, syslog/tcp, fine grain\ + output format control, high precision timestamps, queued operations\ + and the ability to filter on any message part. It is quite\ + compatible to stock sysklogd and can be used as a drop-in replacement.\ + Its advanced features make it suitable for enterprise-class,\ + encryption protected syslog relay chains while at the same time being\ + very easy to setup for the novice user." + +DEPENDS = "zlib libestr libfastjson bison-native" +HOMEPAGE = "http://www.rsyslog.com/" +LICENSE = "GPLv3 & LGPLv3 & Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973" + +SRC_URI = "file://${BPN}/${BP}.tar.gz \ + file://${BPN}/rsyslog-8.24.0-ensure-parent-dir-exists-when-writting-log-file.patch \ + file://${BPN}/bugfix-rsyslog-7.4.7-imjournal-add-monotonic-timestamp.patch \ + file://${BPN}/bugfix-rsyslog-7.4.7-add-configuration-to-avoid-memory-leak.patch \ + file://${BPN}/rsyslog-8.37.0-initialize-variables-and-check-return-value.patch \ + file://initscript \ + file://rsyslog.conf \ + file://rsyslog.logrotate \ +" +UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools pkgconfig + +#not enable --enable-libsystemd configuration options +EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes --enable-libsystemd=no" +EXTRA_OECONF_remove_mipsarch = "ap_cv_atomic_builtins=yes" +EXTRA_OECONF_remove_powerpc = "ap_cv_atomic_builtins=yes" +EXTRA_OECONF_remove_riscv32 = "ap_cv_atomic_builtins=yes" +CFLAGS += " -I${RECIPE_SYSROOT}/usr/include/libfastjson/ " +# first line is default yes in configure +PACKAGECONFIG ??= " \ + rsyslogd rsyslogrt klog inet regexp uuid \ + fmhttp imdiag imfile \ + ${@bb.utils.filter('DISTRO_FEATURES', 'snmp', d)} \ +" +RSYSLOG_IMAGE_NAME = "${MACHINE_ARCH}${RTOS_KERNEL_TAG}" +PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a15eb-5.10', 'fmhttp', '', d)}" +PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a9eb-5.10', 'fmhttp', '', d)}" +PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a9eb-tiny-5.10', 'fmhttp', '', d)}" +PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm64eb-5.10', 'fmhttp', '', d)}" +PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm64el-5.10', 'fmhttp', '', d)}" +PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a7el-preempt-5.10', 'fmhttp', '', d)}" + +# add imfile module to support file monitor function +PACKAGECONFIG_append_arm64el = "${@bb.utils.contains('RTOS_TAG', '-preempt', 'imfile', '', d)}" + +# default yes in configure +PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," +PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," +PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," +PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," +PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," +PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," +PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," +PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," +PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," +PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," + +# default no in configure +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," +PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," +PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," +PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," +PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," +PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," +PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," +PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," +PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," +PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," +PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," +do_install_append() { + install -d "${D}${sysconfdir}/init.d" + install -d "${D}${sysconfdir}/logrotate.d" + install -d "${D}/var/lib/rsyslog" + install -m 750 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf + install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog + sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog + + if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf + fi +} + +FILES_${PN} += "${bindir}" + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "defaults" + +CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" + +RCONFLICTS_${PN} = "busybox-syslog sysklogd syslog-ng" + +RDEPENDS_${PN} += "logrotate" diff --git a/meta-openeuler/recipes-core/sed/sed/run-ptest b/meta-openeuler/recipes-core/sed/sed/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..993d7d5d75e723aee40b544f7df18ab482d32d18 --- /dev/null +++ b/meta-openeuler/recipes-core/sed/sed/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +chown nobody testsuite +chown nobody ../ptest +su nobody -c "make test-suite.log" diff --git a/meta-openeuler/recipes-core/sed/sed_4.8.bb b/meta-openeuler/recipes-core/sed/sed_4.8.bb new file mode 100644 index 0000000000000000000000000000000000000000..7afff2217312e6a9685c68acceb186f4d1e8a2da --- /dev/null +++ b/meta-openeuler/recipes-core/sed/sed_4.8.bb @@ -0,0 +1,72 @@ +SUMMARY = "Stream EDitor (text filtering utility)" +HOMEPAGE = "http://www.gnu.org/software/sed/" +DESCRIPTION = "sed (stream editor) is a non-interactive command-line text editor." +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ + file://sed/sed.h;beginline=1;endline=15;md5=fb3c7e6fbca6f66943859153d4be8efe \ + " +SECTION = "console/utils" + +SRC_URI = "file://sed/sed-${PV}.tar.xz \ + file://sed/backport-sed-c-flag.patch \ + file://sed/backport-sed-handle-very-long-execution-lines-tiny-change.patch \ + file://sed/backport-sed-handle-very-long-input-lines-with-R-tiny-change.patch \ + file://run-ptest \ +" + +SRC_URI[md5sum] = "6d906edfdb3202304059233f51f9a71d" +SRC_URI[sha256sum] = "f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633" + +#inherit autotools texinfo update-alternatives gettext ptest +inherit autotools texinfo gettext + +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" + +RDEPENDS_${PN}-ptest += "make gawk perl perl-module-filehandle perl-module-file-compare perl-module-file-find perl-module-file-temp perl-module-file-stat" +RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru locale-base-en-us locale-base-el-gr.iso-8859-7" + +EXTRA_OECONF = "--disable-acl \ + " + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then + mv ${D}${bindir}/sed ${D}${base_bindir}/sed + rmdir ${D}${bindir}/ + fi +} + +ALTERNATIVE_${PN} = "sed" +ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" +ALTERNATIVE_PRIORITY = "100" + +do_compile_ptest() { + oe_runmake testsuite/get-mb-cur-max testsuite/test-mbrtowc +} + +do_install_ptest() { + cp -rf ${S}/testsuite/ ${D}${PTEST_PATH} + cp -rf ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/ + cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}/ + cp ${B}/Makefile ${D}${PTEST_PATH} + cp ${S}/init.cfg ${D}${PTEST_PATH} + + sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i ${D}${PTEST_PATH}/Makefile + for i in `grep -rl "sed/sed" ${D}${PTEST_PATH}`; do sed -e 's/..\/sed\/sed/sed/' -i $i; done + + sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:abs_top_builddir =.*:abs_top_builddir = ..:g' \ + -e 's:abs_top_srcdir =.*:abs_top_srcdir = ..:g' \ + -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \ + -e 's:top_srcdir =.*:top_srcdir = ..:g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -i ${D}${PTEST_PATH}/Makefile +} + +RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/selinux/libselinux.inc b/meta-openeuler/recipes-core/selinux/libselinux.inc new file mode 100644 index 0000000000000000000000000000000000000000..189bd7e8d3ead9be03eec7b52059606742585fcc --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/libselinux.inc @@ -0,0 +1,22 @@ +SUMMARY = "SELinux library and simple utilities" +DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \ +process and file security contexts and to obtain security policy \ +decisions. Required for any applications that use the SELinux API." +SECTION = "base" +LICENSE = "PD" + +inherit lib_package + +DEPENDS += "libsepol libpcre" + +def get_policyconfigarch(d): + import re + target = d.getVar('TARGET_ARCH', True) + p = re.compile('i.86') + target = p.sub('i386',target) + return "ARCH=%s" % (target) +EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" + +EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre ' CFLAGS=' ${CFLAGS} -DNO_ANDROID_BACKEND'" + +BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-core/selinux/libselinux_3.3.bb b/meta-openeuler/recipes-core/selinux/libselinux_3.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..49fd3cd2da8f60d09f47998d2ea6977edaf38ea1 --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/libselinux_3.3.bb @@ -0,0 +1,8 @@ +require selinux_common.inc +require ${BPN}.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" + +SRC_URI = "file://libselinux/libselinux-${PV}.tar.gz \ + file://libselinux/do-malloc-trim-after-load-policy.patch \ +" diff --git a/meta-openeuler/recipes-core/selinux/libsemanage.inc b/meta-openeuler/recipes-core/selinux/libsemanage.inc new file mode 100644 index 0000000000000000000000000000000000000000..76ea9986596a0aac4bd1fbb482439575b59d78a0 --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/libsemanage.inc @@ -0,0 +1,25 @@ +SUMMARY = "SELinux binary policy manipulation library" +DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ +It is used by checkpolicy (the policy compiler) and similar tools, as well \ +as by programs like load_policy that need to perform specific transformations \ +on binary policies such as customizing policy boolean settings." +SECTION = "base" +LICENSE = "LGPLv2.1+" + +inherit lib_package + +DEPENDS += "libsepol libselinux bzip2 bison-native" +DEPENDS_append_class-target += "audit" + +EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y" + +do_install() { + oe_runmake install \ + DESTDIR="${D}" \ + PREFIX="${prefix}" \ + INCLUDEDIR="${includedir}" \ + LIBDIR="${libdir}" \ + SHLIBDIR="${libdir}" +} + +BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-core/selinux/libsemanage_3.3.bb b/meta-openeuler/recipes-core/selinux/libsemanage_3.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..6d3fd53b5e3beb39607bb253c5a15602bc76966b --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/libsemanage_3.3.bb @@ -0,0 +1,8 @@ +require selinux_common.inc +require ${BPN}.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" + +SRC_URI = "file://libsemanage/libsemanage-${PV}.tar.gz \ + file://libsemanage/fix-test-failure-with-secilc.patch \ +" diff --git a/meta-openeuler/recipes-core/selinux/libsepol.inc b/meta-openeuler/recipes-core/selinux/libsepol.inc new file mode 100644 index 0000000000000000000000000000000000000000..9601fae15b4c62c190eddaafb4e8fcb0c1aec79d --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/libsepol.inc @@ -0,0 +1,16 @@ +SUMMARY = "SELinux binary policy manipulation library" +DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \ +It is used by checkpolicy (the policy compiler) and similar tools, as well \ +as by programs like load_policy that need to perform specific transformations \ +on binary policies such as customizing policy boolean settings." +SECTION = "base" +LICENSE = "LGPLv2+" + +inherit lib_package + +# Change RANLIB for cross compiling, use host-tools $(AR) rather than +# local ranlib. +EXTRA_OEMAKE += "RANLIB='$(AR) s'" + +BBCLASSEXTEND = "native" +DEPENDS += "" diff --git a/meta-openeuler/recipes-core/selinux/libsepol_3.3.bb b/meta-openeuler/recipes-core/selinux/libsepol_3.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..21c06a53148848ffcc25859f7bd44e1ebf144b24 --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/libsepol_3.3.bb @@ -0,0 +1,6 @@ +require selinux_common.inc +require ${BPN}.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" + +SRC_URI += "file://libsepol/${BP}.tar.gz" +CFLAGS += "${@bb.utils.contains('RTOS_KASAN', 'kasan', '-fcommon', '', d)}" diff --git a/meta-openeuler/recipes-core/selinux/policycoreutils.inc b/meta-openeuler/recipes-core/selinux/policycoreutils.inc new file mode 100644 index 0000000000000000000000000000000000000000..29e91b5ea788fee4246577a96fa4a854f9cf8aa4 --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/policycoreutils.inc @@ -0,0 +1,168 @@ +SUMMARY = "SELinux policy core utilities" +DESCRIPTION = "policycoreutils contains the policy core utilities that are required \ +for basic operation of a SELinux system. These utilities include \ +load_policy to load policies, setfiles to label filesystems, newrole \ +to switch roles, and run_init to run /etc/init.d scripts in the proper \ +context." +SECTION = "base" +LICENSE = "GPLv2+" + +DEPENDS += "libsepol libselinux libsemanage libcap gettext-native" +EXTRA_DEPENDS = "libcap-ng" +DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" + +inherit selinux +DEPENDS += "${@target_selinux(d, 'audit')}" + +RDEPENDS_${BPN}-fixfiles += "\ + ${BPN}-setfiles \ +" +RDEPENDS_${BPN}-genhomedircon += "\ + ${BPN}-semodule \ +" +RDEPENDS_${BPN}-loadpolicy += "\ + libselinux \ + libsepol \ +" +RDEPENDS_${BPN}-newrole += "\ + libcap-ng \ + libselinux \ +" +RDEPENDS_${BPN}-runinit += "libselinux" +RDEPENDS_${BPN}-secon += "libselinux" +RDEPENDS_${BPN}-semodule += "\ + libsepol \ + libselinux \ + libsemanage \ +" +RDEPENDS_${BPN}-sestatus += "libselinux" +RDEPENDS_${BPN}-setfiles += "\ + libselinux \ + libsepol \ +" +RDEPENDS_${BPN}-setsebool += "\ + libsepol \ + libselinux \ + libsemanage \ +" + +PACKAGES =+ "\ + ${PN}-fixfiles \ + ${PN}-genhomedircon \ + ${PN}-hll \ + ${PN}-loadpolicy \ + ${PN}-newrole \ + ${PN}-runinit \ + ${PN}-secon \ + ${PN}-semodule \ + ${PN}-sestatus \ + ${PN}-setfiles \ +" +FILES_${PN}-fixfiles += "${base_sbindir}/fixfiles" +FILES_${PN}-genhomedircon += "${base_sbindir}/genhomedircon" +FILES_${PN}-loadpolicy += "\ + ${base_sbindir}/load_policy \ +" +FILES_${PN}-newrole += "\ + ${bindir}/newrole \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \ +" +FILES_${PN}-runinit += "\ + ${base_sbindir}/run_init \ + ${base_sbindir}/open_init_pty \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \ +" +FILES_${PN}-dbg += "${prefix}/libexec/selinux/hll/.debug" +FILES_${PN}-secon += "${bindir}/secon" +FILES_${PN}-semodule += "${base_sbindir}/semodule" +FILES_${PN}-hll += "${prefix}/libexec/selinux/hll/*" +FILES_${PN}-sestatus += "\ + ${base_sbindir}/sestatus \ + ${sysconfdir}/sestatus.conf \ +" +FILES_${PN}-setfiles += "\ + ${base_sbindir}/restorecon \ + ${base_sbindir}/restorecon_xattr \ + ${base_sbindir}/setfiles \ +" +FILES_${PN}-setsebool += "\ + ${base_sbindir}/setsebool \ + ${datadir}/bash-completion/completions/setsebool \ +" + +export STAGING_INCDIR +export STAGING_LIBDIR + +AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `" +EXTRA_OEMAKE += "${@target_selinux(d, 'AUDITH=${AUDITH}', 'AUDITH= ')} INOTIFYH=n" +EXTRA_OEMAKE += "PREFIX=${D}" +EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d" + +BBCLASSEXTEND = "native" + +PCU_NATIVE_CMDS = "setfiles semodule hll" + +do_compile_virtclass-native() { + for PCU_CMD in ${PCU_NATIVE_CMDS} ; do + oe_runmake -C $PCU_CMD \ + INCLUDEDIR='${STAGING_INCDIR}' \ + LIBDIR='${STAGING_LIBDIR}' + done +} + +do_compile_class-native() { + for PCU_CMD in ${PCU_NATIVE_CMDS} ; do + oe_runmake -C $PCU_CMD \ + INCLUDEDIR='${STAGING_INCDIR}' \ + LIBDIR='${STAGING_LIBDIR}' + done +} + +do_compile_prepend() { + export PYTHON=${PYTHON} + export PYLIBVER='python${PYTHON_BASEVERSION}' + export PYTHON_CPPFLAGS="-I${STAGING_INCDIR_NATIVE}/${PYLIBVER}" + export PYTHON_LDFLAGS="${STAGING_INCDIR_NATIVE}/lib${PYLIBVER}.so" + export PYTHON_SITE_PKG="${libdir}/${PYLIBVER}/site-packages" +} + +do_install_prepend() { + export PYTHON=${PYTHON} + export SBINDIR="${base_sbindir}" + export SEMODULE_PATH="${base_sbindir}" SYSTEMDDIR=${systemd_unitdir} +} + +do_install_virtclass-native() { + for PCU_CMD in ${PCU_NATIVE_CMDS} ; do + oe_runmake -C $PCU_CMD install \ + DESTDIR="${D}" \ + PREFIX="${prefix}" \ + SBINDIR="${base_sbindir}" + done +} + +do_install_class-native() { + for PCU_CMD in ${PCU_NATIVE_CMDS} ; do + oe_runmake -C $PCU_CMD install \ + DESTDIR="${D}" \ + PREFIX="${prefix}" \ + SBINDIR="${base_sbindir}" + done +} + +do_install_append_class-target() { + if [ -e ${WORKDIR}/pam.d ]; then + install -d ${D}${sysconfdir}/pam.d/ + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + fi + + # /var/lib/selinux is involved by seobject.py: + # + dirname = "/var/lib/selinux" + # and it's required for running command: + # $ semanage permissive [OPTS] + install -d ${D}${localstatedir}/lib/selinux + rm -rf ${D}/lib/ + rm -r ${D}/usr/share/bash-completion + rm -rf ${D}/usr/lib64/ + rm -rf ${D}/usr/lib/ +} diff --git a/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb b/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..d29390c52e28bbd7481ba04e835fded36f6280cc --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb @@ -0,0 +1,9 @@ +require selinux_common.inc +require ${BPN}.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" + +SRC_URI = "file://policycoreutils/${BP}.tar.gz \ + file://policycoreutils/fix-fixfiles-N-date-function.patch;patchdir=.. \ + file://policycoreutils/fix-fixfiles-N-date-function-two.patch;patchdir=.. \ +" diff --git a/meta-openeuler/recipes-core/selinux/selinux_common.inc b/meta-openeuler/recipes-core/selinux/selinux_common.inc new file mode 100644 index 0000000000000000000000000000000000000000..a94b9ab6b9287647ffc7a4a4ed7e4db16e5f38f6 --- /dev/null +++ b/meta-openeuler/recipes-core/selinux/selinux_common.inc @@ -0,0 +1,30 @@ +HOMEPAGE = "https://github.com/SELinuxProject" + +# EXTRA_OEMAKE is typically: -e MAKEFLAGS= +# "MAKEFLAGS= " causes problems as ENV variables will not pass to subdirs, so +# we redefine EXTRA_OEMAKE here +EXTRA_OEMAKE = "-e" + +# Releases are now from the base of the full tree, necessitating our skipping +# through an extra level of directories. +S = "${WORKDIR}/${BPN}-${PV}" + +SELINUX_NAME = "selinux" + +COMPONENT = "selinux" + +do_compile() { + oe_runmake all \ + LIBDIR="${libdir}" +} + +do_install() { + oe_runmake install \ + DESTDIR="${D}" \ + PREFIX="${prefix}" \ + INCLUDEDIR="${includedir}" \ + LIBDIR="${libdir}" \ + SHLIBDIR="${base_libdir}" \ + INITDIR="/etc/init.d" + rm -rf ${D}${libdir}/golang +} diff --git a/meta-openeuler/recipes-core/shadow/files/login.defs b/meta-openeuler/recipes-core/shadow/files/login.defs new file mode 100644 index 0000000000000000000000000000000000000000..b69058a56729b30e07ec60e0005344b81bdfceb2 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/login.defs @@ -0,0 +1,432 @@ +# +# /etc/login.defs - Configuration control definitions for the shadow package. +# +# $Id$ +# + +# +# Delay in seconds before being allowed another attempt after a login failure +# Note: When PAM is used, some modules may enforce a minimum delay (e.g. +# pam_unix(8) enforces a 2s delay) +# +#FAIL_DELAY 3 + +# +# Enable logging and display of /var/log/faillog2 login(1) failure info. +# +#FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login(1) failures are recorded. +# +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable logging and display of /var/log/lastlog login(1) time info. +# +#LASTLOG_ENAB yes + +# +# Limit the highest user ID number for which the lastlog entries should +# be updated. +# +# No LASTLOG_UID_MAX means that there is no user ID limit for writing +# lastlog entries. +# +#LASTLOG_UID_MAX + +# +# Enable checking and display of mailbox status upon login. +# +# Disable if the shell startup files already check for mail +# ("mailx -e" or equivalent). +# +#MAIL_CHECK_ENAB yes + +# +# Enable additional checks upon password changes. +# +#OBSCURE_CHECKS_ENAB yes + +# +# Enable checking of time restrictions specified in /etc/porttime. +# +#PORTTIME_CHECKS_ENAB yes + +# +# Enable setting of ulimit, umask, and niceness from passwd(5) gecos field. +# +#QUOTAS_ENAB yes + +# +# Enable "syslog" logging of su(1) activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp(1) and sg(1). +# +#SYSLOG_SU_ENAB yes +#SYSLOG_SG_ENAB yes + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# from these devices. +# +#CONSOLE /etc/securetty +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# If defined, all su(1) activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, ":" delimited list of "message of the day" files to +# be displayed upon login. +# +#MOTD_FILE /etc/motd +#MOTD_FILE /etc/motd:/usr/lib/news/news-motd + +# +# If defined, this file will be output before each login(1) prompt. +# +#ISSUE_FILE /etc/issue + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format similar to "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login(1) failures will be logged here in a utmp format. +# last(1), when invoked as lastb(1), will read /var/log/btmp, so... +# +#FTMP_FILE /var/log/btmp + +# +# If defined, name of file whose presence will inhibit non-root +# logins. The content of this file should be a message indicating +# why logins are inhibited. +# +#NOLOGINS_FILE /etc/nologin + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then ps(1) will display the +# command as "-su". If not defined, then ps(1) will display the +# name of the shell actually being run, e.g. something like "-sh". +# +#SU_NAME su + +# +# *REQUIRED* +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define both, #MAIL_DIR takes precedence. +# +MAIL_DIR /var/spool/mail +#MAIL_FILE .mail + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +#HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# If defined, either a TZ environment parameter spec or the +# fully-rooted pathname of a file containing such a spec. +# +#ENV_TZ TZ=CST6CDT +#ENV_TZ /etc/tzname + +# +# If defined, an HZ environment parameter spec. +# +# for Linux/x86 +#ENV_HZ HZ=100 +# For Linux/Alpha... +#ENV_HZ HZ=1024 + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a write(1) program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP as the number of such group +# and TTYPERM as 0620. Otherwise leave TTYGROUP commented out and +# set TTYPERM to either 622 or 600. +# +#TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# ULIMIT Default "ulimit" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# The ULIMIT is used only if the system supports it. +# (now it works with setrlimit too; ulimit is in 512-byte units) +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +#ERASECHAR 0177 +#KILLCHAR 025 +#ULIMIT 2097152 + +# Default initial "umask" value used by login(1) on non-PAM enabled systems. +# Default "umask" value for pam_umask(8) on PAM enabled systems. +# UMASK is also used by useradd(8) and newusers(8) to set the mode for new +# home directories if HOME_MODE is not set. +# 022 is the default value, but 027, or even 077, could be considered +# for increased privacy. There is no One True Answer here: each sysadmin +# must make up their mind. +#UMASK 022 + +# HOME_MODE is used by useradd(8) and newusers(8) to set the mode for new +# home directories. +# If HOME_MODE is not set, the value of UMASK is used to create the mode. +#HOME_MODE 0700 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_MIN_LEN Minimum acceptable password length. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 90 +PASS_MIN_DAYS 7 +#PASS_MIN_LEN 5 +PASS_WARN_AGE 7 + +# +# If "yes", the user must be listed as a member of the first gid 0 group +# in /etc/group (called "root" on most Linux systems) to be able to "su" +# to uid 0 accounts. If the group doesn't exist or is empty, no one +# will be able to "su" to uid 0. +# +#SU_WHEEL_ONLY no + +# +# If compiled with cracklib support, sets the path to the dictionaries +# +#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict + +# +# Min/max values for automatic uid selection in useradd(8) +# +UID_MIN 500 +UID_MAX 60000 +# System accounts +SYS_UID_MIN 101 +#SYS_UID_MAX 999 +# Extra per user uids +SUB_UID_MIN 100000 +SUB_UID_MAX 600100000 +SUB_UID_COUNT 65536 + +# +# Min/max values for automatic gid selection in groupadd(8) +# +GID_MIN 500 +GID_MAX 60000 +# System accounts +SYS_GID_MIN 101 +#SYS_GID_MAX 999 +# Extra per user group ids +SUB_GID_MIN 100000 +SUB_GID_MAX 600100000 +SUB_GID_COUNT 65536 + +# +# Max number of login(1) retries if password is bad +# +#LOGIN_RETRIES 5 + +# +# Max time in seconds for login(1) +# +LOGIN_TIMEOUT 60 + +# +# Maximum number of attempts to change password if rejected (too easy) +# +#PASS_CHANGE_TRIES 5 + +# +# Warn about weak passwords (but still allow them) if you are root. +# +#PASS_ALWAYS_WARN yes + +# +# Number of significant characters in the password for crypt(). +# Default is 8, don't change unless your crypt() is better. +# Ignored if MD5_CRYPT_ENAB set to "yes". +# +#PASS_MAX_LEN 8 + +# +# Require password before chfn(1)/chsh(1) can make any changes. +# +#CHFN_AUTH yes + +# +# Which fields may be changed by regular users using chfn(1) - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +#CHFN_RESTRICT rwh + +# +# Password prompt (%s will be replaced by user name). +# +# XXX - it doesn't work correctly yet, for now leave it commented out +# to use the default which is just "Password: ". +#LOGIN_STRING "%s's Password: " + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# Note: If you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +# This variable is deprecated. You should use ENCRYPT_METHOD instead. +# +#MD5_CRYPT_ENAB no + +# +# Only works if compiled with ENCRYPTMETHOD_SELECT defined: +# If set to MD5, MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to BCRYPT, BCRYPT-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: If you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute-force the password. +# However, more CPU resources will be needed to authenticate users if +# this value is increased. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be within the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +#SHA_CRYPT_MIN_ROUNDS 5000 +#SHA_CRYPT_MAX_ROUNDS 5000 + +# +# Only works if ENCRYPT_METHOD is set to BCRYPT. +# +# Define the number of BCRYPT rounds. +# With a lot of rounds, it is more difficult to brute-force the password. +# However, more CPU resources will be needed to authenticate users if +# this value is increased. +# +# If not specified, 13 rounds will be attempted. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +#BCRYPT_MIN_ROUNDS 13 +#BCRYPT_MAX_ROUNDS 13 + +# +# List of groups to add to the user's supplementary group set +# when logging in from the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in from the console. +# How to do it is left as an exercise for the reader... +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Should login be allowed if we can't cd to the home directory? +# Default is no. +# +DEFAULT_HOME yes + +# +# If this file exists and is readable, login environment will be +# read from it. Every line should be in the form name=value. +# +#ENVIRON_FILE /etc/environment + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# This also enables userdel(8) to remove user groups if no members exist. +# +USERGROUPS_ENAB yes + +# +# If set to a non-zero number, the shadow utilities will make sure that +# groups never have more than this number of users on one line. +# This permits to support split groups (groups split into multiple lines, +# with the same group ID, to avoid limitation of the line length in the +# group file). +# +# 0 is the default value and disables this feature. +# +#MAX_MEMBERS_PER_GROUP 0 + +# +# If useradd(8) should create home directories for users by default (non +# system users only). +# This option is overridden with the -M or -m flags on the useradd(8) +# command-line. +# +CREATE_HOME yes + +# +# Force use shadow, even if shadow passwd & shadow group files are +# missing. +# +#FORCE_SHADOW yes +UMASK 077 +LASTLOG_ENAB yes diff --git a/meta-openeuler/recipes-core/shadow/files/login.defs_shadow-sysroot b/meta-openeuler/recipes-core/shadow/files/login.defs_shadow-sysroot new file mode 100644 index 0000000000000000000000000000000000000000..8a68dd341a61cb1ed972db94e45c8555f6423491 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/login.defs_shadow-sysroot @@ -0,0 +1,386 @@ +# +# /etc/login.defs - Configuration control definitions for the shadow package. +# +# $Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $ +# + +# +# Delay in seconds before being allowed another attempt after a login failure +# Note: When PAM is used, some modules may enfore a minimal delay (e.g. +# pam_unix enforces a 2s delay) +# +FAIL_DELAY 3 + +# +# Enable logging and display of /var/log/faillog login failure info. +# +#FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable logging and display of /var/log/lastlog login time info. +# +#LASTLOG_ENAB yes + +# +# Enable checking and display of mailbox status upon login. +# +# Disable if the shell startup files already check for mail +# ("mailx -e" or equivalent). +# +##MAIL_CHECK_ENAB yes + +# +# Enable additional checks upon password changes. +# +#OBSCURE_CHECKS_ENAB yes + +# +# Enable checking of time restrictions specified in /etc/porttime. +# +#PORTTIME_CHECKS_ENAB yes + +# +# Enable setting of ulimit, umask, and niceness from passwd gecos field. +# +#QUOTAS_ENAB yes + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +CONSOLE /etc/securetty +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, ":" delimited list of "message of the day" files to +# be displayed upon login. +# +#MOTD_FILE /etc/motd +#MOTD_FILE /etc/motd:/usr/lib/news/news-motd + +# +# If defined, this file will be output before each login prompt. +# +#ISSUE_FILE /etc/issue + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format. +# last, when invoked as lastb, will read /var/log/btmp, so... +# +#FTMP_FILE /var/log/btmp + +# +# If defined, name of file whose presence which will inhibit non-root +# logins. The contents of this file should be a message indicating +# why logins are inhibited. +# +#NOLOGINS_FILE /etc/nologin + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# *REQUIRED* +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define both, #MAIL_DIR takes precedence. +# +#MAIL_DIR /var/spool/mail +MAIL_FILE .mail + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# If defined, either a TZ environment parameter spec or the +# fully-rooted pathname of a file containing such a spec. +# +#ENV_TZ TZ=CST6CDT +#ENV_TZ /etc/tzname + +# +# If defined, an HZ environment parameter spec. +# +# for Linux/x86 +#ENV_HZ HZ=100 +# For Linux/Alpha... +#ENV_HZ HZ=1024 + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin +ENV_PATH PATH=/bin:/usr/bin + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# ULIMIT Default "ulimit" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# The ULIMIT is used only if the system supports it. +# (now it works with setrlimit too; ulimit is in 512-byte units) +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +#ULIMIT 2097152 + +# Default initial "umask" value for non-PAM enabled systems. +# UMASK is also used by useradd and newusers to set the mode of new home +# directories. +# 022 is the default value, but 027, or even 077, could be considered +# better for privacy. There is no One True Answer here: each sysadmin +# must make up her mind. +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_MIN_LEN Minimum acceptable password length. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +#PASS_MIN_LEN 5 +PASS_WARN_AGE 7 + +# +# If "yes", the user must be listed as a member of the first gid 0 group +# in /etc/group (called "root" on most Linux systems) to be able to "su" +# to uid 0 accounts. If the group doesn't exist or is empty, no one +# will be able to "su" to uid 0. +# +#SU_WHEEL_ONLY no + +# +# If compiled with cracklib support, where are the dictionaries +# +#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +SYS_UID_MIN 101 +SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +SYS_GID_MIN 101 +SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Maximum number of attempts to change password if rejected (too easy) +# +#PASS_CHANGE_TRIES 5 + +# +# Warn about weak passwords (but still allow them) if you are root. +# +#PASS_ALWAYS_WARN yes + +# +# Number of significant characters in the password for crypt(). +# Default is 8, don't change unless your crypt() is better. +# Ignored if MD5_CRYPT_ENAB set to "yes". +# +#PASS_MAX_LEN 8 + +# +# Require password before chfn/chsh can make any changes. +# +#CHFN_AUTH yes + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Password prompt (%s will be replaced by user name). +# +# XXX - it doesn't work correctly yet, for now leave it commented out +# to use the default which is just "Password: ". +#LOGIN_STRING "%s's Password: " + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# Note: If you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# Only works if compiled with ENCRYPTMETHOD_SELECT defined: +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: If you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If this file exists and is readable, login environment will be +# read from it. Every line should be in the form name=value. +# +#ENVIRON_FILE /etc/environment + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# This also enables userdel to remove user groups if no members exist. +# +USERGROUPS_ENAB yes + +# +# If set to a non-nul number, the shadow utilities will make sure that +# groups never have more than this number of users on one line. +# This permit to support split groups (groups split into multiple lines, +# with the same group ID, to avoid limitation of the line length in the +# group file). +# +# 0 is the default value and disables this feature. +# +#MAX_MEMBERS_PER_GROUP 0 + +# +# If useradd should create home directories for users by default (non +# system users only) +# This option is overridden with the -M or -m flags on the useradd command +# line. +# +CREATE_HOME yes + diff --git a/meta-openeuler/recipes-core/shadow/files/login_defs_pam.sed b/meta-openeuler/recipes-core/shadow/files/login_defs_pam.sed new file mode 100644 index 0000000000000000000000000000000000000000..0a1f3be4afcdadcc82dcff613a8d6f0250ebff6a --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/login_defs_pam.sed @@ -0,0 +1,32 @@ +/^FAILLOG_ENAB/b comment +/^LASTLOG_ENAB/b comment +/^MAIL_CHECK_ENAB/b comment +/^OBSCURE_CHECKS_ENAB/b comment +/^PORTTIME_CHECKS_ENAB/b comment +/^QUOTAS_ENAB/b comment +/^MOTD_FILE/b comment +/^FTMP_FILE/b comment +/^NOLOGINS_FILE/b comment +/^ENV_HZ/b comment +/^ENV_TZ/b comment +/^PASS_MIN_LEN/b comment +/^SU_WHEEL_ONLY/b comment +/^CRACKLIB_DICTPATH/b comment +/^PASS_CHANGE_TRIES/b comment +/^PASS_ALWAYS_WARN/b comment +/^PASS_MAX_LEN/b comment +/^PASS_MIN_LEN/b comment +/^CHFN_AUTH/b comment +/^CHSH_AUTH/b comment +/^ISSUE_FILE/b comment +/^LOGIN_STRING/b comment +/^ULIMIT/b comment +/^ENVIRON_FILE/b comment + +b exit + +: comment + s:^:#: + +: exit + diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/chfn b/meta-openeuler/recipes-core/shadow/files/pam.d/chfn new file mode 100644 index 0000000000000000000000000000000000000000..fd39af331f5842646839950f39a9d35d4c4b411f --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/chfn @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +account required pam_permit.so +password include common-passwd diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/chpasswd b/meta-openeuler/recipes-core/shadow/files/pam.d/chpasswd new file mode 100644 index 0000000000000000000000000000000000000000..b769d92ba4849657d9c7eacd2ff49c8e83dde5e1 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/chpasswd @@ -0,0 +1,6 @@ +# The PAM configuration file for the Shadow 'chpasswd' service +# + +auth sufficient pam_rootok.so +account required pam_permit.so +password include common-password diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/chsh b/meta-openeuler/recipes-core/shadow/files/pam.d/chsh new file mode 100644 index 0000000000000000000000000000000000000000..fd39af331f5842646839950f39a9d35d4c4b411f --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/chsh @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +account required pam_permit.so +password include common-passwd diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/groupmems b/meta-openeuler/recipes-core/shadow/files/pam.d/groupmems new file mode 100644 index 0000000000000000000000000000000000000000..fd39af331f5842646839950f39a9d35d4c4b411f --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/groupmems @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +account required pam_permit.so +password include common-passwd diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/login b/meta-openeuler/recipes-core/shadow/files/pam.d/login new file mode 100644 index 0000000000000000000000000000000000000000..499c8c3d7f0a047dc0dd5cd1824d1c23934b4b30 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/login @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth required pam_securetty.so +auth include common-auth +account required pam_nologin.so +account include common-account +password include common-password +session include common-session +session required pam_loginuid.so +session optional pam_console.so diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/newusers b/meta-openeuler/recipes-core/shadow/files/pam.d/newusers new file mode 100644 index 0000000000000000000000000000000000000000..4c59dfa478a3a8d2b0f3ee0c86ae6a8cb61f23f2 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/newusers @@ -0,0 +1,6 @@ +# The PAM configuration file for the Shadow 'newusers' service +# + +auth sufficient pam_rootok.so +account required pam_permit.so +password include common-password diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/passwd b/meta-openeuler/recipes-core/shadow/files/pam.d/passwd new file mode 100644 index 0000000000000000000000000000000000000000..59cfdfb21b8d9b3216a7f11f5fc872679d7adf3e --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/passwd @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth include common-auth +account include common-account +password include common-password diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/su b/meta-openeuler/recipes-core/shadow/files/pam.d/su new file mode 100644 index 0000000000000000000000000000000000000000..28360f571312ce236bc5a3496e4bc95ebdf6beec --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/pam.d/su @@ -0,0 +1,8 @@ +auth sufficient pam_rootok.so +auth required pam_wheel.so use_uid +session required pam_env.so readenv=1 +auth include common-auth +account sufficient pam_rootok.so +account include common-account +password include common-password +session include common-session diff --git a/meta-openeuler/recipes-core/shadow/files/securetty b/meta-openeuler/recipes-core/shadow/files/securetty new file mode 100644 index 0000000000000000000000000000000000000000..2be341a216bc8f346b7e7d88c4d1bc557bb66063 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/files/securetty @@ -0,0 +1,238 @@ +# /etc/securetty: list of terminals on which root is allowed to login. +# See securetty(5) and login(1). +console + +# Standard serial ports +ttyS0 +ttyS1 +ttyS2 +ttyS3 + +# ARM AMBA SoCs +ttyAM0 +ttyAM1 +ttyAM2 +ttyAM3 +ttyAMA0 +ttyAMA1 +ttyAMA2 +ttyAMA3 + +# QCOM Socs +ttyHSL0 +ttyHSL1 +ttyHSL2 +ttyHSL3 +ttyMSM0 +ttyMSM1 +ttyMSM2 + +# Samsung ARM SoCs +ttySAC0 +ttySAC1 +ttySAC2 +ttySAC3 + +# STM SoCs +ttyAS0 +ttyAS1 +ttyAS2 +ttyAS3 + +# TI OMAP SoCs +ttyO0 +ttyO1 +ttyO2 +ttyO3 + +# Xilinx Zynq SoC +ttyPS0 +ttyPS1 + +# USB dongles +ttyUSB0 +ttyUSB1 +ttyUSB2 + +# USB serial gadget +ttyGS0 + +# PowerMac +ttyPZ0 +ttyPZ1 +ttyPZ2 +ttyPZ3 + +# Embedded MPC platforms +ttyPSC0 +ttyPSC1 +ttyPSC2 +ttyPSC3 +ttyPSC4 +ttyPSC5 + +# PA-RISC mux ports +ttyB0 +ttyB1 + +# Standard hypervisor virtual console +hvc0 + +# Oldstyle Xen console +xvc0 + +# Standard consoles +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +tty7 +tty8 +tty9 +tty10 +tty11 +tty12 +tty13 +tty14 +tty15 +tty16 +tty17 +tty18 +tty19 +tty20 +tty21 +tty22 +tty23 +tty24 +tty25 +tty26 +tty27 +tty28 +tty29 +tty30 +tty31 +tty32 +tty33 +tty34 +tty35 +tty36 +tty37 +tty38 +tty39 +tty40 +tty41 +tty42 +tty43 +tty44 +tty45 +tty46 +tty47 +tty48 +tty49 +tty50 +tty51 +tty52 +tty53 +tty54 +tty55 +tty56 +tty57 +tty58 +tty59 +tty60 +tty61 +tty62 +tty63 + +# Local X displays (allows empty passwords with pam_unix's nullok_secure) +pts/0 +pts/1 +pts/2 +pts/3 + +# Embedded Freescale i.MX ports +ttymxc0 +ttymxc1 +ttymxc2 +ttymxc3 +ttymxc4 +ttymxc5 + +# Freescale lpuart ports +ttyLP0 +ttyLP1 +ttyLP2 +ttyLP3 +ttyLP4 +ttyLP5 + +# Standard serial ports, with devfs +tts/0 +tts/1 + +# Standard consoles, with devfs +vc/1 +vc/2 +vc/3 +vc/4 +vc/5 +vc/6 +vc/7 +vc/8 +vc/9 +vc/10 +vc/11 +vc/12 +vc/13 +vc/14 +vc/15 +vc/16 +vc/17 +vc/18 +vc/19 +vc/20 +vc/21 +vc/22 +vc/23 +vc/24 +vc/25 +vc/26 +vc/27 +vc/28 +vc/29 +vc/30 +vc/31 +vc/32 +vc/33 +vc/34 +vc/35 +vc/36 +vc/37 +vc/38 +vc/39 +vc/40 +vc/41 +vc/42 +vc/43 +vc/44 +vc/45 +vc/46 +vc/47 +vc/48 +vc/49 +vc/50 +vc/51 +vc/52 +vc/53 +vc/54 +vc/55 +vc/56 +vc/57 +vc/58 +vc/59 +vc/60 +vc/61 +vc/62 +vc/63 diff --git a/meta-openeuler/recipes-core/shadow/shadow-securetty_4.8.1.bb b/meta-openeuler/recipes-core/shadow/shadow-securetty_4.8.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..2f06942e8bb1d1207d9c91a4575fa38215f6aa65 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/shadow-securetty_4.8.1.bb @@ -0,0 +1,38 @@ +SUMMARY = "Provider of the machine specific securetty file" +SECTION = "base utils" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" + +PR = "r1" + +SRC_URI = "file://securetty" + +S = "${WORKDIR}" + +# Since SERIAL_CONSOLES is likely to be set from the machine configuration +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install () { + # Ensure we add a suitable securetty file to the package that has + # most common embedded TTYs defined. + install -d ${D}${sysconfdir} + install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty + if [ ! -z "${SERIAL_CONSOLES}" ]; then + # Our SERIAL_CONSOLES contains a baud rate and sometimes extra + # options as well. The following pearl :) takes that and converts + # it into newline-separated tty's and appends them into + # securetty. So if a machine has a weird looking console device + # node (e.g. ttyAMA0) that securetty does not know, it will get + # appended to securetty and root logins will be allowed on that + # console. + tmp="${SERIAL_CONSOLES}" + for entry in $tmp ; do + ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'` + if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then + echo $ttydev >> ${D}${sysconfdir}/securetty + fi + done + fi +} diff --git a/meta-openeuler/recipes-core/shadow/shadow-sysroot_4.8.1.bb b/meta-openeuler/recipes-core/shadow/shadow-sysroot_4.8.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..03fba804f3f704675a9aae73b96173995fdd7a6a --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/shadow-sysroot_4.8.1.bb @@ -0,0 +1,35 @@ +SUMMARY = "Shadow utils requirements for useradd.bbclass" +HOMEPAGE = "http://pkg-shadow.alioth.debian.org" +BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" +SECTION = "base utils" +LICENSE = "BSD | Artistic-1.0" +LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5" + +DEPENDS = "base-passwd" + +# Remove base-passwd for all image +DEPENDS_remove += "base-passwd" + +PR = "r1" + +# The sole purpose of this recipe is to provide the /etc/login.defs +# file for the target sysroot - needed so the shadow-native utilities +# can add custom users/groups for recipes that use inherit useradd. +SRC_URI = "file://login.defs_shadow-sysroot" + +SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" +SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}${sysconfdir} + install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs +} + +SYSROOT_DIRS += "${sysconfdir}" + +# don't create any packages +# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot +# and this has another copy of /etc/login.defs already provided by shadow +PACKAGES = "" diff --git a/meta-openeuler/recipes-core/shadow/shadow.inc b/meta-openeuler/recipes-core/shadow/shadow.inc new file mode 100644 index 0000000000000000000000000000000000000000..ae2c63b73862e99dcc7475bbd348ca547387ff01 --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/shadow.inc @@ -0,0 +1,211 @@ +SUMMARY = "Tools to change and administer password and group data" +HOMEPAGE = "file://pkg-shadow.alioth.debian.org" +BUGTRACKER = "files://alioth.debian.org/tracker/?group_id=30580" +SECTION = "base/utils" +LICENSE = "BSD | Artistic-1.0" + +#DEPENDS = "virtual/crypt" + +UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" + +FILESEXTRAPATHS_prepend .= "${OPEN_SRC_DIR}/shadow-utils:" + +inherit autotools gettext + +export CONFIG_SHELL="/bin/sh" + +EXTRA_OECONF += "--without-audit \ + --without-libcrack \ + --without-selinux \ + --with-group-name-max-length=24 \ + --enable-subordinate-ids=yes \ + ${NSCDOPT}" + +do_configure_prepend() { + #pushd ${S} + #sh autogen.sh + #sed -i 's/faillog/faillog2/g' configure + #sed -i 's/faillog"/faillog2"/g' configure.ac + #popd +} + +NSCDOPT = "" +NSCDOPT_class-native = "--without-nscd" +NSCDOPT_class-nativesdk = "--without-nscd" +NSCDOPT_libc-glibc = "--with-nscd" + +PAM_PLUGINS = "libpam-runtime \ + pam-plugin-faildelay \ + pam-plugin-securetty \ + pam-plugin-nologin \ + pam-plugin-env \ + pam-plugin-group \ + pam-plugin-limits \ + pam-plugin-lastlog \ + pam-plugin-motd \ + pam-plugin-mail \ + pam-plugin-shells \ + pam-plugin-rootok" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}" +PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}" +PACKAGECONFIG_class-nativesdk = "" +PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}" +PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" +PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" + +RDEPENDS_${PN} = "shadow-securetty \ + base-passwd " + +# util-linux-sulogin" + +# Remove base-passwd for all image +RDEPENDS_${PN}_remove += "base-passwd" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" + +SRC_URI = "file://shadow/${BP}.tar.xz \ + file://shadow/shadow-4.8-goodname.patch \ + file://shadow/shadow-4.9-null-tm.patch \ + file://shadow/shadow-4.8-long-entry.patch \ + file://shadow/usermod-unlock.patch \ + file://shadow/useradd-create-directories-after-the-SELinux-user.patch \ + file://shadow/shadow-4.1.5.1-var-lock.patch \ + file://shadow/shadow-utils-fix-lock-file-residue.patch \ + file://shadow/Makefile-include-libeconf-dependency-in-new-idmap.patch \ + file://shadow/usermod-allow-all-group-types-with-G-option.patch \ + file://shadow/useradd-avoid-generating-an-empty-subid-range.patch \ + file://shadow/libmisc-fix-default-value-in-SHA_get_salt_rounds.patch \ + file://shadow/semanage-close-the-selabel-handle.patch \ + file://shadow/Revert-useradd.c-fix-memleaks-of-grp.patch \ + file://shadow/useradd-change-SELinux-labels-for-home-files.patch \ + file://shadow/libsubid-link-to-PAM-libraries.patch \ + file://shadow/Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \ + file://shadow/Respect-enable-static-no-in-libsubid.patch \ + file://shadow/Fixes-the-linking-issues-when-libsubid-is-static-and.patch \ + file://shadow/pwck-fix-segfault-when-calling-fprintf.patch \ + file://shadow/newgrp-fix-segmentation-fault.patch \ + file://shadow/groupdel-fix-SIGSEGV-when-passwd-does-not-exist.patch \ + file://shadow/shadow-add-sm3-crypt-support.patch \ + file://shadow/backport-useradd-modify-check-ID-range-for-system-users.patch \ +" + +LIC_FILES_CHKSUM="file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5" + +#PAM_SRC_URI = "file://pam.d" +SRC_URI += "file://pam.d/chfn \ + file://login_defs_pam.sed \ + file://pam.d/chpasswd \ + file://pam.d/chsh \ + file://pam.d/login \ + file://pam.d/newusers \ + file://pam.d/passwd \ + file://pam.d/su \ + file://pam.d/groupmems \ + file://login.defs \ + " + +do_install() { + oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install + + # Info dir listing isn't interesting at this point so remove it if it exists. + if [ -e "${D}${infodir}/dir" ]; then + rm -f ${D}${infodir}/dir + fi + + # Enable CREATE_HOME by default. + sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs + + # As we are on an embedded system, ensure the users mailbox is in + # ~/ not /var/spool/mail by default, as who knows where or how big + # /var is. The system MDA will set this later anyway. + sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs + sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs + + # Disable checking emails. + sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs + + # Comment out SU_NAME to work correctly with busybox + # See Bug#5359 and Bug#7173 + sed -i 's:^SU_NAME:#SU_NAME:g' ${D}${sysconfdir}/login.defs + + # Use proper encryption for passwords + sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs + + # keep login.defs the same fileds & values as one in the previous init-script rpm + sed -i 's/^CHFN_RESTRICT/#CHFN_RESTRICT/g' ${D}${sysconfdir}/login.defs + sed -i 's/^CONSOLE/#CONSOLE/g' ${D}${sysconfdir}/login.defs + sed -i 's/^ERASECHAR/#ERASECHAR/g' ${D}${sysconfdir}/login.defs + sed -i 's/^FAIL_DELAY/#FAIL_DELAY/g' ${D}${sysconfdir}/login.defs + sed -i 's/^HUSHLOGIN_FILE/#HUSHLOGIN_FILE/g' ${D}${sysconfdir}/login.defs + sed -i 's/^KILLCHAR/#KILLCHAR/g' ${D}${sysconfdir}/login.defs + sed -i 's/^LOGIN_RETRIES/#LOGIN_RETRIES/g' ${D}${sysconfdir}/login.defs + sed -i 's/^MAIL_FILE/#MAIL_FILE/g' ${D}${sysconfdir}/login.defs + sed -i 's/^SYSLOG_SG_ENAB/#SYSLOG_SG_ENAB/g' ${D}${sysconfdir}/login.defs + sed -i 's/^SYSLOG_SU_ENAB/#SYSLOG_SU_ENAB/g' ${D}${sysconfdir}/login.defs + sed -i 's/^SYS_GID_MAX/#SYS_GID_MAX/g' ${D}${sysconfdir}/login.defs + sed -i 's/^SYS_UID_MAX/#SYS_UID_MAX/g' ${D}${sysconfdir}/login.defs + sed -i 's/^TTYGROUP/#TTYGROUP/g' ${D}${sysconfdir}/login.defs + sed -i 's/^UMASK/#UMASK/g' ${D}${sysconfdir}/login.defs + sed -i 's#^ENV_PATH.*$#ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin#' ${D}${sysconfdir}/login.defs + sed -i 's#^ENV_SUPATH.*$#ENV_SUPATH PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin#' ${D}${sysconfdir}/login.defs + sed -i 's#^GID_MIN.*$#GID_MIN 500#' ${D}${sysconfdir}/login.defs + sed -i 's#^UID_MIN.*$#UID_MIN 500#' ${D}${sysconfdir}/login.defs + sed -i 's/^#MAIL_DIR/MAIL_DIR/g' ${D}${sysconfdir}/login.defs + + # Now we don't have a mail system. Disable mail creation for now. + #sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd + #sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd + + # Use users group by default + #sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd +} + +do_install_append() { + # Ensure that the image has as a /var/spool/mail dir so shadow can + # put mailboxes there if the user reconfigures shadow to its + # defaults (see sed below). + install -m 0775 -d ${D}${localstatedir}/spool/mail + chown root:mail ${D}${localstatedir}/spool/mail + + if [ -e ${WORKDIR}/pam.d ]; then + install -d ${D}${sysconfdir}/pam.d/ + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + # Remove defaults that are not used when supporting PAM. + sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs + fi + + install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} + cp ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + + # Move binaries to the locations we want + rm ${D}${sbindir}/vigr + # ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr + if [ "${sbindir}" != "${base_sbindir}" ]; then + mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw + rm -f ${D}${base_sbindir}/nologin + fi + if [ "${bindir}" != "${base_bindir}" ]; then + mv ${D}${bindir}/login ${D}${base_bindir}/login + rm -f ${D}${bindir}/su + fi + + # Handle link properly after rename, otherwise missing files would + # lead rpm failed dependencies. + ln -sf newgrp.${BPN} ${D}${bindir}/sg + cp ${WORKDIR}/login.defs ${D}${sysconfdir}/ +} + +PACKAGES =+ "${PN}-base" +FILES_${PN}-base = "\ + ${bindir}/sg \ + ${bindir}/newgrp.shadow \ + ${bindir}/groups.shadow \ + ${sysconfdir}/pam.d/login \ + ${sysconfdir}/pam.d/su \ + ${sysconfdir}/login.defs \ +" +RDEPENDS_${PN} += "${PN}-base" + +PACKAGE_WRITE_DEPS += "shadow-native" diff --git a/meta-openeuler/recipes-core/shadow/shadow_4.9.bb b/meta-openeuler/recipes-core/shadow/shadow_4.9.bb new file mode 100644 index 0000000000000000000000000000000000000000..d5d644ad814c08ce11c1cb5ef79a0ce43705956c --- /dev/null +++ b/meta-openeuler/recipes-core/shadow/shadow_4.9.bb @@ -0,0 +1,7 @@ +require shadow.inc + +# Build falsely assumes that if --enable-libpam is set, we don't need to link against +# libcrypt. This breaks chsh. +#BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-lcrypt', '', d)}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/sysfsutils/sysfsutils_2.1.1.bb b/meta-openeuler/recipes-core/sysfsutils/sysfsutils_2.1.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..6716b6904638dae8b1c9d9a90535dfd118d453d5 --- /dev/null +++ b/meta-openeuler/recipes-core/sysfsutils/sysfsutils_2.1.1.bb @@ -0,0 +1,36 @@ +### Descriptive metadata: SUMMARY,DESCRITPION, HOMEPAGE, AUTHOR, BUGTRACKER +SUMMARY = "Tools for working with sysfs" +DESCRIPTION = "Tools for working with the sysfs virtual filesystem. The tool 'systool' \ + can query devices by bus, class and topology." +AUTHOR = "" +HOMEPAGE = "http://linux-diag.sourceforge.net/Sysfsutils.html" +BUGTRACKER = "https://gitee.com/openeuler/yocto-meta-openeuler" + +### Package manager metadata: SECTION, PRIOIRTY(only for deb, opkg) +SECTION = "libs" + +### License metadata +LICENSE = "GPLv2 & LGPLv2.1" +LICENSE_${PN} = "GPLv2" +LICENSE_libsysfs = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=dcc19fa9307a50017fca61423a7d9754 \ + file://cmd/GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://lib/LGPL;md5=4fbd65380cdd255951079008b364516c" + +### Inheritance and includes if needed +inherit autotools + +### Build metadata: SRC_URI, SRCDATA, S, B, FILESEXTRAPATHS.... +SRC_URI = "file://sysfsutils/v${PV}.tar.gz " + +S = "${WORKDIR}/${BPN}-${PV}" + +### Runtime metadata + +### Package metadata +PACKAGES =+ "libsysfs" +FILES_libsysfs = "${libdir}/lib*${SOLIBS}" + +export libdir = "${base_libdir}" + +### Tasks for package diff --git a/meta-openeuler/recipes-core/tzdata/timezone.inc b/meta-openeuler/recipes-core/tzdata/timezone.inc new file mode 100644 index 0000000000000000000000000000000000000000..44a6e7abe10212a7fbe202fa078bb8ba39388685 --- /dev/null +++ b/meta-openeuler/recipes-core/tzdata/timezone.inc @@ -0,0 +1,23 @@ +SUMMARY = "Timezone data" +DESCRIPTION = "The Time Zone Database contains code and data that represent \ +the history of local time for many representative locations around the globe." +HOMEPAGE = "http://www.iana.org/time-zones" +SECTION = "base" +LICENSE = "PD & BSD & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" + +SRC_URI = "file://tzdata/tzcode${PV}.tar.gz;name=tzcode \ + file://tzdata/tzdata${PV}.tar.gz;name=tzdata \ + file://tzdata/bugfix-0001-add-Beijing-timezone.patch \ + file://tzdata/remove-country-selection-from-tzselect-steps.patch \ + file://tzdata/remove-ROC-timezone.patch \ + file://tzdata/rename-Macau-to-Macao.patch \ + file://tzdata/remove-El_Aaiun-timezone.patch \ + file://tzdata/remove-Israel-timezone.patch \ + file://tzdata/skip-check_web-testcase.patch \ + " + +UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" + +SRC_URI[tzcode.sha256sum] = "584666393a5424d13d27ec01183da17703273664742e049d4f62f62dab631775" +SRC_URI[tzdata.sha256sum] = "07ec42b737d0d3c6be9c337f8abb5f00554a0f9cc4fcf01a703d69403b6bb2b1" diff --git a/meta-openeuler/recipes-core/tzdata/tzcode-native_2021e.bb b/meta-openeuler/recipes-core/tzdata/tzcode-native_2021e.bb new file mode 100644 index 0000000000000000000000000000000000000000..8a96af199bdc4244d9be4cb1eb5664a8d1334aaf --- /dev/null +++ b/meta-openeuler/recipes-core/tzdata/tzcode-native_2021e.bb @@ -0,0 +1,16 @@ +require timezone.inc + +SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" + +S = "${WORKDIR}" + +inherit native + +EXTRA_OEMAKE += "cc='${CC}'" + +do_install () { + install -d ${D}${bindir}/ + install -m 755 zic ${D}${bindir}/ + install -m 755 zdump ${D}${bindir}/ + install -m 755 tzselect ${D}${bindir}/ +} diff --git a/meta-openeuler/recipes-core/tzdata/tzdata_2021e.bb b/meta-openeuler/recipes-core/tzdata/tzdata_2021e.bb new file mode 100644 index 0000000000000000000000000000000000000000..b580ac4cc6feb8f586aac75fb55b2c670d7e9088 --- /dev/null +++ b/meta-openeuler/recipes-core/tzdata/tzdata_2021e.bb @@ -0,0 +1,210 @@ +require timezone.inc + +DEPENDS = "tzcode-native" + +#inherit allarch + +RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \ + timezone-arctic timezone-asia timezone-atlantic \ + timezone-australia timezone-europe timezone-indian \ + timezone-iso3166.tab timezone-pacific timezone-zone.tab" + +S = "${WORKDIR}" + +DEFAULT_TIMEZONE ?= "Universal" +INSTALL_TIMEZONE_FILE ?= "1" + +TZONES= "africa antarctica asia australasia europe northamerica southamerica \ + factory etcetera backward \ + " +# pacificnew + +do_compile () { + for zone in ${TZONES}; do \ + ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \ + ${S}/${zone} ; \ + ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \ + ${S}/${zone} ; \ + ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \ + ${S}/${zone} ; \ + done +} + +do_install () { + install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo + cp -pPR ${S}/$exec_prefix ${D}/ + # libc is removing zoneinfo files from package + cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo + cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo + cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo + cp -pP "${S}/leapseconds" ${D}${datadir}/zoneinfo + cp -pP "${S}/leap-seconds.list" ${D}${datadir}/zoneinfo + + # Install default timezone + if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then + install -d ${D}${sysconfdir} + if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then + echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone + fi + ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime + else + bberror "DEFAULT_TIMEZONE is set to an invalid value." + exit 1 + fi + + chown -R root:root ${D} +} + +pkg_postinst_${PN} () { + etc_lt="$D${sysconfdir}/localtime" + src="$D${sysconfdir}/timezone" + + if [ -e ${src} ] ; then + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") + fi + + if [ ! -z "${tz}" -a ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then + echo "You have an invalid TIMEZONE setting in ${src}" + echo "Your ${etc_lt} has been reset to Universal; enjoy!" + tz="Universal" + echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}" + if [ -L ${etc_lt} ] ; then + rm -f "${etc_lt}" + fi + ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}" + fi +} + +# Packages primarily organized by directory with a major city +# in most time zones in the base package + +TZ_PACKAGES = " \ + tzdata-core tzdata-misc tzdata-posix tzdata-right tzdata-africa \ + tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \ + tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific" +PACKAGES = "${TZ_PACKAGES} ${PN}" + +FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*" +RPROVIDES_tzdata-africa = "tzdata-africa" + +FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \ + ${datadir}/zoneinfo/US/* \ + ${datadir}/zoneinfo/Brazil/* \ + ${datadir}/zoneinfo/Canada/* \ + ${datadir}/zoneinfo/Mexico/* \ + ${datadir}/zoneinfo/Chile/*" +RPROVIDES_tzdata-americas = "tzdata-americas" + +FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" +RPROVIDES_tzdata-antarctica = "tzdata-antarctica" + +FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" +RPROVIDES_tzdata-arctic = "tzdata-arctic" + +FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \ + ${datadir}/zoneinfo/Indian/* \ + ${datadir}/zoneinfo/Mideast/*" +RPROVIDES_tzdata-asia = "tzdata-asia" + +FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" +RPROVIDES_tzdata-atlantic = "tzdata-atlantic" + +FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*" +RPROVIDES_tzdata-australia = "tzdata-australia" + +FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*" +RPROVIDES_tzdata-europe = "tzdata-europe" + +FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" +RPROVIDES_tzdata-pacific = "tzdata-pacific" + +FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*" +RPROVIDES_tzdata-posix = "tzdata-posix" + +FILES_tzdata-right += "${datadir}/zoneinfo/right/*" +RPROVIDES_tzdata-right = "tzdata-right" + +FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ + ${datadir}/zoneinfo/Egypt \ + ${datadir}/zoneinfo/Eire \ + ${datadir}/zoneinfo/Factory \ + ${datadir}/zoneinfo/GB-Eire \ + ${datadir}/zoneinfo/Hongkong \ + ${datadir}/zoneinfo/Iceland \ + ${datadir}/zoneinfo/Iran \ + ${datadir}/zoneinfo/Israel \ + ${datadir}/zoneinfo/Jamaica \ + ${datadir}/zoneinfo/Japan \ + ${datadir}/zoneinfo/Kwajalein \ + ${datadir}/zoneinfo/Libya \ + ${datadir}/zoneinfo/Navajo \ + ${datadir}/zoneinfo/Poland \ + ${datadir}/zoneinfo/Portugal \ + ${datadir}/zoneinfo/Singapore \ + ${datadir}/zoneinfo/Turkey" +RPROVIDES_tzdata-misc = "tzdata-misc" + +FILES_tzdata-core += " \ + ${sysconfdir}/localtime \ + ${sysconfdir}/timezone \ + ${datadir}/zoneinfo/leapseconds \ + ${datadir}/zoneinfo/leap-seconds.list \ + ${datadir}/zoneinfo/Pacific/Honolulu \ + ${datadir}/zoneinfo/America/Anchorage \ + ${datadir}/zoneinfo/America/Los_Angeles \ + ${datadir}/zoneinfo/America/Denver \ + ${datadir}/zoneinfo/America/Chicago \ + ${datadir}/zoneinfo/America/New_York \ + ${datadir}/zoneinfo/America/Caracas \ + ${datadir}/zoneinfo/America/Sao_Paulo \ + ${datadir}/zoneinfo/Europe/London \ + ${datadir}/zoneinfo/Europe/Paris \ + ${datadir}/zoneinfo/Africa/Cairo \ + ${datadir}/zoneinfo/Europe/Moscow \ + ${datadir}/zoneinfo/Asia/Dubai \ + ${datadir}/zoneinfo/Asia/Karachi \ + ${datadir}/zoneinfo/Asia/Dhaka \ + ${datadir}/zoneinfo/Asia/Bangkok \ + ${datadir}/zoneinfo/Asia/Hong_Kong \ + ${datadir}/zoneinfo/Asia/Tokyo \ + ${datadir}/zoneinfo/Australia/Darwin \ + ${datadir}/zoneinfo/Australia/Adelaide \ + ${datadir}/zoneinfo/Australia/Brisbane \ + ${datadir}/zoneinfo/Australia/Sydney \ + ${datadir}/zoneinfo/Pacific/Noumea \ + ${datadir}/zoneinfo/CET \ + ${datadir}/zoneinfo/CST6CDT \ + ${datadir}/zoneinfo/EET \ + ${datadir}/zoneinfo/EST \ + ${datadir}/zoneinfo/EST5EDT \ + ${datadir}/zoneinfo/GB \ + ${datadir}/zoneinfo/GMT \ + ${datadir}/zoneinfo/GMT+0 \ + ${datadir}/zoneinfo/GMT-0 \ + ${datadir}/zoneinfo/GMT0 \ + ${datadir}/zoneinfo/Greenwich \ + ${datadir}/zoneinfo/HST \ + ${datadir}/zoneinfo/MET \ + ${datadir}/zoneinfo/MST \ + ${datadir}/zoneinfo/MST7MDT \ + ${datadir}/zoneinfo/NZ \ + ${datadir}/zoneinfo/NZ-CHAT \ + ${datadir}/zoneinfo/PRC \ + ${datadir}/zoneinfo/PST8PDT \ + ${datadir}/zoneinfo/ROC \ + ${datadir}/zoneinfo/ROK \ + ${datadir}/zoneinfo/UCT \ + ${datadir}/zoneinfo/UTC \ + ${datadir}/zoneinfo/Universal \ + ${datadir}/zoneinfo/W-SU \ + ${datadir}/zoneinfo/WET \ + ${datadir}/zoneinfo/Zulu \ + ${datadir}/zoneinfo/zone.tab \ + ${datadir}/zoneinfo/zone1970.tab \ + ${datadir}/zoneinfo/iso3166.tab \ + ${datadir}/zoneinfo/Etc/*" + +CONFFILES_tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} = "${TZ_PACKAGES}" diff --git a/meta-openeuler/recipes-core/util-linux/util-linux.inc b/meta-openeuler/recipes-core/util-linux/util-linux.inc new file mode 100644 index 0000000000000000000000000000000000000000..09fe0d8a61d88cc3cb96d8b16d47afe0e80f5a36 --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux.inc @@ -0,0 +1,44 @@ +SUMMARY = "A suite of basic system administration utilities" +HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux" +DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ +commonly found on most Linux systems. Some of the more important utilities include \ +disk partitioning, kernel message management, filesystem creation, and system login." + +SECTION = "base" + +LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause" +LICENSE_${PN}-libblkid = "LGPLv2.1+" +LICENSE_${PN}-libfdisk = "LGPLv2.1+" +LICENSE_${PN}-libmount = "LGPLv2.1+" +LICENSE_${PN}-libsmartcols = "LGPLv2.1+" + +LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ + file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ + file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ + file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ + file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ + file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ + file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ + file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ +" + +FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:" +MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" +SRC_URI = "file://util-linux/util-linux-${PV}.tar.xz \ + file://util-linux/2.36-login-lastlog-create.patch \ + file://util-linux/backport-CVE-2021-3995.patch \ + file://util-linux/backport-CVE-2021-3996.patch \ + file://util-linux/realloc-buffer-when-header-size-changed.patch \ + file://util-linux/fix-size-use-for-stdin.patch \ + file://util-linux/segmentation-fault-on-invalid-unicode-input-passed-to-s-option.patch \ + file://util-linux/backport-fix-by-ignoring-EINVAL-on-remount-of-proc.patch \ + file://util-linux/Add-check-to-resolve-uname26-version-test-failed.patch \ + file://util-linux/SKIPPED-no-root-permissions-test.patch \ + file://runuser.pamd \ + file://runuser-l.pamd \ + " + +SRC_URI[sha256sum] = "6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9 " diff --git a/meta-openeuler/recipes-core/util-linux/util-linux/run-ptest b/meta-openeuler/recipes-core/util-linux/util-linux/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..e135ee583bd31de92d4ff413fbf7293e674298b3 --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux/run-ptest @@ -0,0 +1,43 @@ +#!/bin/sh + + +# When udevd (from eudev) is running most eject/mount tests will fail because +# of automount. We need to stop udevd before executing util-linux's tests. +# The systemd-udevd daemon doesn't change the outcome of util-linux's tests. +UDEV_PID="`pidof "@base_sbindir@/udevd"`" +if [ "x$UDEV_PID" != "x" ]; then + /etc/init.d/udev stop +fi + +current_path=$(readlink -f $0) +export bindir=$(dirname $current_path) +export PATH=$bindir/bin:$PATH + +cd tests || exit 1 + +comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) + + +echo +echo "-------------------- util-linux regression tests --------------------" +echo +echo " For development purpose only. " +echo " Don't execute on production system! " +echo + +res=0 +count=0 +for ts in $comps; +do + $ts | sed -u '{ + s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ + s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ + s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ + }' +done + + +if [ "x$UDEV_PID" != "x" ]; then + /etc/init.d/udev start +fi + diff --git a/meta-openeuler/recipes-core/util-linux/util-linux/runuser-l.pamd b/meta-openeuler/recipes-core/util-linux/util-linux/runuser-l.pamd new file mode 100644 index 0000000000000000000000000000000000000000..4b368ccf5de8f74b42e8177911fed5f03135c8d1 --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux/runuser-l.pamd @@ -0,0 +1,3 @@ +auth include runuser +session optional pam_keyinit.so force revoke +session include runuser diff --git a/meta-openeuler/recipes-core/util-linux/util-linux/runuser.pamd b/meta-openeuler/recipes-core/util-linux/util-linux/runuser.pamd new file mode 100644 index 0000000000000000000000000000000000000000..48d133b9e7e46cea183afe5591f653773176c80c --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux/runuser.pamd @@ -0,0 +1,4 @@ +auth sufficient pam_rootok.so +session optional pam_keyinit.so revoke +session required pam_limits.so +session required pam_unix.so diff --git a/meta-openeuler/recipes-core/util-linux/util-linux_2.37.2.bb b/meta-openeuler/recipes-core/util-linux/util-linux_2.37.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..b2acdf008b36ac7d9c2cdb89e18ceda62b60699f --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux_2.37.2.bb @@ -0,0 +1,323 @@ +require util-linux.inc + +#gtk-doc is not enabled as it requires xmlto which requires util-linux +inherit autotools gettext pkgconfig systemd +DEPENDS = "libcap-ng ncurses zlib" + +PACKAGES =+ "${PN}-swaponoff" +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" + +python util_linux_binpackages () { + def pkg_hook(f, pkg, file_regex, output_pattern, modulename): + pn = d.getVar('PN') + d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) + + if d.getVar('ALTERNATIVE_' + pkg): + return + if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): + d.setVar('ALTERNATIVE_' + pkg, modulename) + + bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split()))) + for dir in bindirs: + do_split_packages(d, root=dir, + file_regex=r'(.*)', output_pattern='${PN}-%s', + description='${PN} %s', + hook=pkg_hook, extra_depends='') + + # There are some symlinks for some binaries which we have ignored + # above. Add them to the package owning the binary they are + # pointing to + extras = {} + dvar = d.getVar('PKGD') + for root in bindirs: + for walkroot, dirs, files in os.walk(dvar + root): + for f in files: + file = os.path.join(walkroot, f) + if not os.path.islink(file): + continue + + pkg = os.path.basename(os.readlink(file)) + extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1) + + pn = d.getVar('PN') + for pkg, links in extras.items(): + of = d.getVar('FILES_' + pn + '-' + pkg) + links = of + links + d.setVar('FILES_' + pn + '-' + pkg, links) +} + +# we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS +PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " + +python util_linux_libpackages() { + do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$', + output_pattern='${PN}-lib%s', + description='${PN} lib%s', + extra_depends='', prepend=True, allow_links=True) +} + +PACKAGESPLITFUNCS =+ "util_linux_libpackages" + +PACKAGES_DYNAMIC = "^${PN}-.*" + +CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" +UTIL_LINUX_LIBDIR = "${libdir}" +UTIL_LINUX_LIBDIR_class-target = "${base_libdir}" +EXTRA_OECONF = "\ + --enable-libuuid --enable-libblkid \ + \ + --enable-fsck --enable-kill --enable-last --enable-mesg \ + --enable-mount --enable-partx --enable-raw --enable-rfkill \ + --enable-unshare --enable-write \ + \ + --disable-bfs --disable-chfn-chsh --disable-login \ + --disable-makeinstall-chown --disable-minix --disable-newgrp \ + --disable-use-tty-group --disable-vipw \ + \ + --without-udev \ + \ + usrsbin_execdir='${sbindir}' \ + --libdir='${UTIL_LINUX_LIBDIR}' \ +" + +EXTRA_OECONF_append_class-target = " --enable-setpriv" +EXTRA_OECONF_append_class-native = " --without-cap-ng --disable-setpriv" +EXTRA_OECONF_append_class-nativesdk = " --without-cap-ng --disable-setpriv" +EXTRA_OECONF_append = " --disable-hwclock-gplv3" + +# enable pcre2 for native/nativesdk to match host distros +# this helps to keep same expectations when using the SDK or +# build host versions during development +# +PACKAGECONFIG ?= "pcre2" +PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +# inherit manpages requires this to be present, however util-linux does not have +# configuration options, and installs manpages always +PACKAGECONFIG[manpages] = "" +PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," +# Respect the systemd feature for uuidd +PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" +# Build python bindings for libmount +PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" +# Readline support +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +# PCRE support in hardlink +PACKAGECONFIG[pcre2] = ",,libpcre2" +PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" + +EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "" +FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" +FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" +FILES_${PN}-mount = "${sysconfdir}/default/mountall" +FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*" +FILES_${PN}-su = "${sysconfdir}/pam.d/su-l" +CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l" +FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ + ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ + ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" +PACKAGES += "${PN}-bash-completion ${PN}-procps" +FILES_${PN}-bash-completion += "${datadir}/bash-completion/*" +FILES_${PN}-procps = "${base_bindir}/kill" +# Util-linux' blkid replaces the e2fsprogs one +RCONFLICTS_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" +RREPLACES_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" + +RRECOMMENDS_${PN}_class-native = "" +RRECOMMENDS_${PN}_class-nativesdk = "" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" + +RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" + +RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" +RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz" +RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug" +RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" +ALLOW_EMPTY_${PN}-swaponoff = "1" + +SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service" +SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable" +SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service" +SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable" + +do_install () { + # with ccache the timestamps on compiled files may + # end up earlier than on their inputs, this allows + # for the resultant compilation in the install step. + oe_runmake 'CC=${CC}' 'LD=${LD}' \ + 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install + + mkdir -p ${D}${base_bindir} + + sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" + sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin" + binprogs_a="dmesg getopt kill more umount mount login su mountpoint" + + if [ "${base_sbindir}" != "${sbindir}" ]; then + mkdir -p ${D}${base_sbindir} + for p in $sbinprogs $sbinprogs_a; do + if [ -f "${D}${sbindir}/$p" ]; then + mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" + fi + done + fi + + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + for p in $binprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" + fi + done + fi + + install -d ${D}${sysconfdir}/default/ + echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall + + rm -f ${D}${bindir}/chkdupexe +} + +do_install_append_class-target () { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then + install -d ${D}${sysconfdir}/pam.d + install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser + install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l + # Required for "su -" aka "su --login" because + # otherwise it uses "other", which has "auth pam_deny.so" + # and thus prevents the operation. + ln -s su ${D}${sysconfdir}/pam.d/su-l + fi +} +# nologin causes a conflict with shadow-native +# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir}) +do_install_append_class-native () { + rm -f ${D}${base_sbindir}/nologin + rm -f ${D}${base_bindir}/kill +} + +ALTERNATIVE_PRIORITY = "80" + +ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" +ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" +ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal" +ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt" +ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" +ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" +ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate" +ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" +ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock" +ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" +ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze" +ALTERNATIVE_LINK_NAME[fstrim] = "${base_sbindir}/fstrim" +ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" +ALTERNATIVE_${PN}-agetty = "getty" +ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" +ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" +ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump" +ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" +ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" +ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" +ALTERNATIVE_${PN}-last = "last lastb" +ALTERNATIVE_LINK_NAME[last] = "${bindir}/last" +ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb" +ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger" +ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" +ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg" +ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" +ALTERNATIVE_LINK_NAME[mcookie] = "${bindir}/mcookie" +ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" +ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" +ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" +ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" +ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter" +ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" +ALTERNATIVE_LINK_NAME[prlimit] = "${bindir}/prlimit" +ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" +ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" +ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" +ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" +ALTERNATIVE_LINK_NAME[rtcwake] = "${sbindir}/rtcwake" +ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" +ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" +ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" +ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" +ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" +ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" +ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" +ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset" +ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" +ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" +ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" +ALTERNATIVE_LINK_NAME[uuidgen] = "${bindir}/uuidgen" +ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" + +ALTERNATIVE_${PN}-doc = "\ +blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ +mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ +" +ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" + +ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" +ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" +ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" +ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" +ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" +ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" +ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" +ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" +ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" +ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" +ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" +ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" +ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" +ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" +ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" +ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" +ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" +ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" +ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" + + +BBCLASSEXTEND = "native nativesdk" + +PTEST_BINDIR = "1" +do_compile_ptest() { + oe_runmake buildtest-TESTS +} + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/tests/ts + find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; + find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; + find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; + + cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ + cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected + cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ + cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} + + # The original paths of executables to be tested point to a local folder containing + # the executables. We want to test the installed executables, not the local copies. + # So strip the paths, the executables will be located via "which" + sed -i \ + -e '/^TS_CMD/ s|$top_builddir/||g' \ + -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \ + ${D}${PTEST_PATH}/tests/commands.sh + + # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]' + sed -i -e \ + '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ + ${D}${PTEST_PATH}/tests/functions.sh + + # Running "kill" without the the complete path would use the shell's built-in kill + sed -i -e \ + '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ + ${D}${PTEST_PATH}/tests/commands.sh + + + sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest + +} diff --git a/meta-openeuler/recipes-core/xz/xz_5.2.5.bb b/meta-openeuler/recipes-core/xz/xz_5.2.5.bb new file mode 100644 index 0000000000000000000000000000000000000000..bdcc1020e1a3c816c488cb6ebd607ab002ef37e8 --- /dev/null +++ b/meta-openeuler/recipes-core/xz/xz_5.2.5.bb @@ -0,0 +1,45 @@ +SUMMARY = "Utilities for managing LZMA compressed files" +HOMEPAGE = "https://tukaani.org/xz/" +DESCRIPTION = "XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils." +SECTION = "base" + +# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file +# which is GPLv3 is an m4 macro which isn't shipped in any of our packages, +# and the LGPL bits are under lib/, which appears to be used for libgnu, which +# appears to be used for DOS builds. So we're left with GPLv2+ and PD. +LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD" +LICENSE_${PN} = "GPLv2+" +LICENSE_${PN}-dev = "GPLv2+" +LICENSE_${PN}-staticdev = "GPLv2+" +LICENSE_${PN}-doc = "GPLv2+" +LICENSE_${PN}-dbg = "GPLv2+" +LICENSE_${PN}-locale = "GPLv2+" +LICENSE_liblzma = "PD" + +LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \ + file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ + file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ + " + +SRC_URI = "file://xz/xz-${PV}.tar.xz" +SRC_URI[md5sum] = "0d270c997aff29708c74d53f599ef717" +SRC_URI[sha256sum] = "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" +UPSTREAM_CHECK_REGEX = "xz-(?P\d+(\.\d+)+)\.tar" + +CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh" + +inherit autotools gettext + +PACKAGES =+ "liblzma" + +FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" + +#inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "xz xzcat unxz \ + lzma lzcat unlzma" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb b/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..5f77805e0972d692c6088eceb28858fe6645182d --- /dev/null +++ b/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://yajl/${PV}.tar.gz \ + file://yajl/yajl-2.1.0-pkgconfig-location.patch \ + file://yajl/yajl-2.1.0-pkgconfig-includedir.patch \ + file://yajl/yajl-2.1.0-test-location.patch \ + file://yajl/yajl-2.1.0-dynlink-binaries.patch \ + file://yajl/yajl-2.1.0-fix-memory-leak.patch \ + file://yajl/backport-fix-memory-leaks.patch \ + " + +S = "${WORKDIR}/${BPN}-${PV}" + +inherit cmake + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INSANE_SKIP_${PN} += "already-stripped" +INSANE_SKIP_${PN} += "dev-so" + +FILES_${PN} += "${libdir}/libyajl.so* " +FILES_SOLIBSDEV = "" + +do_install_append() { + ${STRIP} ${D}/${libdir}/*.so* +} + diff --git a/meta-openeuler/recipes-core/zlib/site_config/headers b/meta-openeuler/recipes-core/zlib/site_config/headers new file mode 100644 index 0000000000000000000000000000000000000000..50268918aa9dc01897a12421c3ca3b5d3bc24fe9 --- /dev/null +++ b/meta-openeuler/recipes-core/zlib/site_config/headers @@ -0,0 +1 @@ +zlib.h diff --git a/meta-openeuler/recipes-core/zlib/zlib/ldflags-tests.patch b/meta-openeuler/recipes-core/zlib/zlib/ldflags-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..286390665f0229c95653ae9aad7dd24f5fc7e0c1 --- /dev/null +++ b/meta-openeuler/recipes-core/zlib/zlib/ldflags-tests.patch @@ -0,0 +1,45 @@ +Obey LDFLAGS for tests + +Upstream-Status: Submitted [https://github.com/madler/zlib/pull/409] +Signed-off-by: Ross Burton + +--- zlib-1.2.8.orig/Makefile.in ++++ zlib-1.2.8/Makefile.in +@@ -26,7 +26,7 @@ CFLAGS=-O + + SFLAGS=-O + LDFLAGS= +-TEST_LDFLAGS=-L. libz.a ++TEST_LDFLAGS=-L. $(LDFLAGS) + LDSHARED=$(CC) + CPP=$(CC) -E + +@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz. + -@rmdir objs + + example$(EXE): example.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB) + + minigzip$(EXE): minigzip.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB) + + examplesh$(EXE): example.o $(SHAREDLIBV) +- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) ++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV) + + minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) +- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) ++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV) + + example64$(EXE): example64.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB) + + minigzip64$(EXE): minigzip64.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB) + + install-libs: $(LIBS) + -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi diff --git a/meta-openeuler/recipes-core/zlib/zlib/run-ptest b/meta-openeuler/recipes-core/zlib/zlib/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..065863ef754f0af6f8494135e487c2ed024488b7 --- /dev/null +++ b/meta-openeuler/recipes-core/zlib/zlib/run-ptest @@ -0,0 +1,7 @@ +#!/bin/sh + +if ./examplesh ; then + echo "PASS: zlib" +else + echo "FAIL: zlib" +fi diff --git a/meta-openeuler/recipes-core/zlib/zlib_1.2.11.bb b/meta-openeuler/recipes-core/zlib/zlib_1.2.11.bb new file mode 100644 index 0000000000000000000000000000000000000000..11e045e70cb3857901417f5f2a498d5f8d2c2153 --- /dev/null +++ b/meta-openeuler/recipes-core/zlib/zlib_1.2.11.bb @@ -0,0 +1,51 @@ +SUMMARY = "Zlib Compression Library" +DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \ +library which is used by many different programs." +HOMEPAGE = "http://zlib.net/" +SECTION = "libs" +LICENSE = "Zlib" +LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0" + +S = "${WORKDIR}/${BPN}-${PV}" +SRC_URI = "file://${BPN}/${BPN}-${PV}.tar.xz \ + " +UPSTREAM_CHECK_URI = "http://zlib.net/" + +SRC_URI[md5sum] = "85adef240c5f370b308da8c938951a68" +SRC_URI[sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066" + +CFLAGS += "-D_REENTRANT" + +RDEPENDS_${PN}-ptest += "make" + +inherit ptest + +do_configure() { + LDCONFIG=true ./configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU +} + +do_compile() { + oe_runmake shared +} + +do_install() { + oe_runmake DESTDIR=${D} install +} + +do_install_ptest() { + install ${B}/examplesh ${D}${PTEST_PATH} +} + +# Move zlib shared libraries for target builds to $base_libdir so the library +# can be used in early boot before $prefix is mounted. +do_install_append_class-target() { + if [ ${base_libdir} != ${libdir} ] + then + mkdir -p ${D}/${base_libdir} + mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir} + libname=`readlink ${D}/${libdir}/libz.so` + ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so + fi +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-devtools/binutils/binutils-2.37.inc b/meta-openeuler/recipes-devtools/binutils/binutils-2.37.inc new file mode 100644 index 0000000000000000000000000000000000000000..bc67ef9a0169a513a431dd50e13f0c49299d8a01 --- /dev/null +++ b/meta-openeuler/recipes-devtools/binutils/binutils-2.37.inc @@ -0,0 +1,37 @@ +LIC_FILES_CHKSUM="\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ + file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ + file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + " + +def binutils_branch_version(d): + pvsplit = d.getVar('PV').split('.') + return pvsplit[0] + "_" + pvsplit[1] + +# When upgrading to 2.37, please make sure there is no trailing .0, so +# that upstream version check can work correctly. +PV = "2.37" +CVE_VERSION = "2.37" + +SRC_URI = "file://binutils/${BP}.tar.xz \ + file://binutils/binutils-2.20.51.0.2-libtool-lib64.patch \ + file://binutils/export-demangle.h-in-devel-package.patch \ + file://binutils/binutils-2.22.52.0.4-no-config-h-check.patch \ + file://binutils/binutils-2.27-aarch64-ifunc.patch \ + file://binutils/CVE-2019-1010204.patch \ + file://binutils/Fix-a-potential-use-of-an-uninitialised-value-in-the.patch \ + file://binutils/backport-CVE-2021-45078.patch \ + file://binutils/backport-0001-CVE-2021-42574.patch \ + file://binutils/backport-0002-CVE-2021-42574.patch \ + file://binutils/backport-0003-CVE-2021-42574.patch \ + file://binutils/bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \ + file://0005-Point-scripts-location-to-libdir.patch \ +" + +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-devtools/binutils/binutils.inc b/meta-openeuler/recipes-devtools/binutils/binutils.inc new file mode 100644 index 0000000000000000000000000000000000000000..5bd1650c5b2cca6763ba9ae8e46fa410fa9d0723 --- /dev/null +++ b/meta-openeuler/recipes-devtools/binutils/binutils.inc @@ -0,0 +1,186 @@ +SUMMARY = "GNU binary utilities" +DESCRIPTION = "The GNU Binutils are a collection of binary tools. \ +The main ones are ld (GNU Linker), and as (GNU Assembler). This \ +package also includes addition tools such as addr2line (Converts \ +addresses into filenames and line numbers), ar (utility for creating, \ +modifying and extracting archives), nm (list symbols in object \ +files), objcopy (copy and translate object files), objdump (Display \ +object information), and other tools and related libraries." +HOMEPAGE = "http://www.gnu.org/software/binutils/" +BUGTRACKER = "http://sourceware.org/bugzilla/" +SECTION = "devel" +LICENSE = "GPLv3" + +DEPENDS = "gnu-config-native autoconf-native" + +inherit autotools gettext multilib_header texinfo + +FILES_${PN} = " \ + ${bindir}/${TARGET_PREFIX}* \ + ${libdir}/lib*.so.* \ + ${libdir}/bfd-plugins/lib*.so \ + ${libdir}/lib*-${PV}*.so \ + ${prefix}/${TARGET_SYS}/bin/* \ + ${bindir}/embedspu" + +RPROVIDES_${PN} += "${PN}-symlinks" + +FILES_${PN}-dev = " \ + ${includedir} \ + ${libdir}/*.la \ + ${libdir}/libbfd.so \ + ${libdir}/libctf.so \ + ${libdir}/libctf-nobfd.so \ + ${libdir}/libopcodes.so" + +# Rather than duplicating multiple entries for these, make one +# list and reuse it. + +LDGOLD_ALTS ?= "ld.gold dwp" +LDGOLD_ALTS_riscv64 = "" +LDGOLD_ALTS_riscv32 = "" +LDGOLD_ALTS_libc-glibc_mipsarch = "" + +USE_ALTERNATIVES_FOR = " \ + addr2line \ + ar \ + as \ + c++filt \ + elfedit \ + gprof \ + ld \ + ld.bfd \ + ${LDGOLD_ALTS} \ + nm \ + objcopy \ + objdump \ + ranlib \ + readelf \ + size \ + strings \ + strip \ +" + +python do_package_prepend() { + make_alts = d.getVar("USE_ALTERNATIVES_FOR") or "" + prefix = d.getVar("TARGET_PREFIX") + bindir = d.getVar("bindir") + for alt in make_alts.split(): + d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt) + d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt) +} + +B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" + +EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ + --disable-werror \ + --enable-deterministic-archives \ + --enable-plugins \ + --disable-gdb \ + --disable-gdbserver \ + --disable-libdecnumber \ + --disable-readline \ + --disable-sim \ + ${LDGOLD} \ + ${EXTRA_TARGETS} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" + +EXTRA_TARGETS = "" +EXTRA_TARGETS_x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " +EXTRA_TARGETS_class-native = "" + +LDGOLD_class-native = "" +LDGOLD_class-crosssdk = "" +LDGOLD_libc-glibc_mipsarch = "" +LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" + + +# This is necessary due to a bug in the binutils Makefiles +# EXTRA_OEMAKE = "configure-build-libiberty all" + +export AR = "${HOST_PREFIX}ar" +export AS = "${HOST_PREFIX}as" +export LD = "${HOST_PREFIX}ld" +export NM = "${HOST_PREFIX}nm" +export RANLIB = "${HOST_PREFIX}ranlib" +export OBJCOPY = "${HOST_PREFIX}objcopy" +export OBJDUMP = "${HOST_PREFIX}objdump" + +export AR_FOR_TARGET = "${TARGET_PREFIX}ar" +export AS_FOR_TARGET = "${TARGET_PREFIX}as" +export LD_FOR_TARGET = "${TARGET_PREFIX}ld" +export NM_FOR_TARGET = "${TARGET_PREFIX}nm" +export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" + +export CC_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" +export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" + +# autotools.bbclass sets the _FOR_BUILD variables, but for some reason we need +# to unset LD_LIBRARY_PATH. +export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}" + +MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}" +do_configure[vardeps] += "MULTIARCH" +do_configure () { + (cd ${S} && gnu-configize) + + oe_runconf +# +# must prime config.cache to ensure the build of libiberty +# + mkdir -p ${B}/build-${BUILD_SYS} + for i in ${CONFIG_SITE}; do + cat $i >> ${B}/build-${BUILD_SYS}/config.cache || true + done +} + +do_install () { + autotools_do_install + + # We don't really need these, so we'll remove them... + rm -rf ${D}${libdir}/ldscripts + + bindir_rel=${@os.path.relpath('${bindir}', '${prefix}/${TARGET_SYS}/bin')} + + # Fix the /usr/${TARGET_SYS}/bin/* links + for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do + rm -f $l + ln -sf $bindir_rel/${TARGET_PREFIX}`basename $l` $l + done + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + # insall pic version of libiberty if available + if [ -e ${B}/libiberty/pic/libiberty.a ]; then + install -Dm 0644 ${B}/libiberty/pic/libiberty.a ${D}${libdir}/libiberty.a + fi + + cd ${D}${bindir} + + # Symlinks for ease of running these on the native target + for p in ${TARGET_PREFIX}* ; do + ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,` + done + + for alt in ${USE_ALTERNATIVES_FOR}; do + rm -f ${D}${bindir}/$alt + done + + oe_multilib_header bfd.h + # bfd_stdint.h encodes the compiler name in the header + # sed -i ${D}${includedir}/bfd_stdint.h -e "s,${TARGET_PREFIX},," +} + +#inherit update-alternatives + +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") +} diff --git a/meta-openeuler/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch b/meta-openeuler/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch new file mode 100644 index 0000000000000000000000000000000000000000..dde0cb5d6d0c683269ba5c267a8fdcee4f2294ff --- /dev/null +++ b/meta-openeuler/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch @@ -0,0 +1,39 @@ +From 6a67d277941228d997b527990960413f8444fb81 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Mar 2015 01:09:58 +0000 +Subject: [PATCH] Point scripts location to libdir + +Upstream-Status: Inappropriate [debian patch] + +Signed-off-by: Khem Raj +--- + ld/Makefile.am | 2 +- + ld/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ld/Makefile.am b/ld/Makefile.am +index 3b01357b651..b7a1f7491b0 100644 +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff --git a/ld/Makefile.in b/ld/Makefile.in +index a6382bf2a45..5ee3a4971be 100644 +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -562,7 +562,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/meta-openeuler/recipes-devtools/binutils/binutils_2.37.bb b/meta-openeuler/recipes-devtools/binutils/binutils_2.37.bb new file mode 100644 index 0000000000000000000000000000000000000000..e01dd4254417ae627365c1c23a1cbe85af514fcc --- /dev/null +++ b/meta-openeuler/recipes-devtools/binutils/binutils_2.37.bb @@ -0,0 +1,65 @@ +require binutils.inc +require binutils-${PV}.inc + +DEPENDS += "zlib" +EXTRA_OECONF += "--with-sysroot=/ \ + --enable-install-libbfd \ + --enable-install-libiberty \ + --enable-shared \ + --with-system-zlib \ + " + +EXTRA_OEMAKE_append_libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + " +EXTRA_OECONF_class-native = "--enable-targets=all \ + --enable-64-bit-bfd \ + --enable-install-libiberty \ + --enable-install-libbfd \ + --disable-gdb \ + --disable-gdbserver \ + --disable-libdecnumber \ + --disable-readline \ + --disable-sim \ + --disable-werror" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" +# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target +# So remove -O2 and use -Os as workaround +SELECTED_OPTIMIZATION_remove_mipsarch = "-O2" +SELECTED_OPTIMIZATION_append_mipsarch = " -Os" + +do_install_class-native () { + autotools_do_install + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + # We only want libiberty, libbfd and libopcodes + rm -rf ${D}${bindir} + rm -rf ${D}${prefix}/${TARGET_SYS} + rm -rf ${D}${prefix}/lib/ldscripts + rm -rf ${D}${prefix}/share/info + rm -rf ${D}${prefix}/share/locale + rm -rf ${D}${prefix}/share/man + rmdir ${D}${prefix}/share || : + rmdir ${D}/${libdir}/gcc-lib || : + rmdir ${D}/${libdir}64/gcc-lib || : + rmdir ${D}/${libdir} || : + rmdir ${D}/${libdir}64 || : +} + +# libctf races with libbfd +PARALLEL_MAKEINST_class-target = "" + +# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include +# extra stuff +PACKAGE_BEFORE_PN += "libbfd libopcodes" +FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so" +FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-devtools/elfutils/elfutils_0.185.bb b/meta-openeuler/recipes-devtools/elfutils/elfutils_0.185.bb new file mode 100644 index 0000000000000000000000000000000000000000..9a4ab39a415609195f0720da5c46093690a3894f --- /dev/null +++ b/meta-openeuler/recipes-devtools/elfutils/elfutils_0.185.bb @@ -0,0 +1,148 @@ +SUMMARY = "Utilities and libraries for handling compiled object files" +HOMEPAGE = "https://sourceware.org/elfutils" +DESCRIPTION = "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux." +SECTION = "base" +LICENSE = "GPLv2 & GPLv2+ & LGPLv3+ & GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://debuginfod/debuginfod-client.c;endline=27;md5=f8e9d171c401c493ec45a0b2992ea2ed \ + " +DEPENDS = "zlib virtual/libintl" +DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " +# The Debian patches below are from: +# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz +SRC_URI = "file://elfutils/${BP}.tar.bz2 \ + file://elfutils/eu-elfclassify-no-stdin-should-use-classify_flag_no_stdin.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6" + +inherit autotools gettext ptest pkgconfig + +EXTRA_OECONF = "--program-prefix=eu-" + +DEPENDS_BZIP2 = "bzip2-replacement-native" +DEPENDS_BZIP2_class-target = "bzip2" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" +PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl" +PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd" + +RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils" + +EXTRA_OECONF_append_class-target = " --disable-tests-rpath" + +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" + +do_compile_ptest() { + cd ${B}/tests + oe_runmake buildtest-TESTS oecheck +} + +do_install_ptest() { + if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + install -d -m 755 ${D}${PTEST_PATH}/libdwfl + install -d -m 755 ${D}${PTEST_PATH}/libdwelf + install -d -m 755 ${D}${PTEST_PATH}/libasm + install -d -m 755 ${D}${PTEST_PATH}/libcpu + install -d -m 755 ${D}${PTEST_PATH}/libebl + for test_file in ${TEST_FILES}; do + if [ -f ${B}/src/${test_file} ]; then + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + fi + done + cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so + cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so + cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so + cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/ + cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/ + cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/ + cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/ + cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/ + cp ${S}/libdwelf/*.h ${D}${PTEST_PATH}/libdwelf/ + cp ${S}/libasm/*.h ${D}${PTEST_PATH}/libasm/ + cp -r ${S}/tests/ ${D}${PTEST_PATH} + cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests + cp -r ${B}/config.h ${D}${PTEST_PATH} + cp -r ${B}/backends ${D}${PTEST_PATH} + sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile + find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} + fi +} + +EXTRA_OEMAKE_class-native = "" +EXTRA_OEMAKE_class-nativesdk = "" + +BBCLASSEXTEND = "native nativesdk" + +# Package utilities separately +PACKAGES =+ "${PN}-binutils libelf libasm libdw libdebuginfod" + +# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+ +# according to NEWS file: +# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone +# programs. There is now also a formal CONTRIBUTING document describing how to +# submit patches." +LICENSE_${PN}-binutils = "GPLv3+" +LICENSE_${PN} = "GPLv3+" +LICENSE_libelf = "GPLv2 | LGPLv3+" +LICENSE_libasm = "GPLv2 | LGPLv3+" +LICENSE_libdw = "GPLv2 | LGPLv3+" +LICENSE_libdebuginfod = "GPLv2+ | LGPLv3+" + +FILES_${PN}-binutils = "\ + ${bindir}/eu-addr2line \ + ${bindir}/eu-ld \ + ${bindir}/eu-nm \ + ${bindir}/eu-readelf \ + ${bindir}/eu-size \ + ${bindir}/eu-strip" + +FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" +FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" +FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" +FILES_libdebuginfod = "${libdir}/libdebuginfod-${PV}.so ${libdir}/libdebuginfod.so.*" +# Some packages have the version preceeding the .so instead properly +# versioned .so., so we need to reorder and repackage. +#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" +#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" + +# The package contains symlinks that trip up insane +INSANE_SKIP_${MLPREFIX}libdw = "dev-so" +# The nlist binary in the tests uses explicitly minimal compiler flags +INSANE_SKIP_${PN}-ptest += "ldflags" + +# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, +# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${PTEST_PATH}/src/elfclassify \ + ${PKGD}${PTEST_PATH}/src/stack \ + ${PKGD}${PTEST_PATH}/src/unstrip \ + ${PKGD}${PTEST_PATH}/libelf/libelf.so \ + ${PKGD}${PTEST_PATH}/libdw/libdw.so \ + ${PKGD}${PTEST_PATH}/libasm/libasm.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +" + +PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1" diff --git a/meta-openeuler/recipes-devtools/elfutils/files/run-ptest b/meta-openeuler/recipes-devtools/elfutils/files/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..d5776fdb5386698990c2a143dda8ed63334109d5 --- /dev/null +++ b/meta-openeuler/recipes-devtools/elfutils/files/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh +# +#This script is used to run elfutils test suites +cd tests + +make -k installcheck-local CC=gcc abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-, diff --git a/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-compilerlibs.bb b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-compilerlibs.bb new file mode 100644 index 0000000000000000000000000000000000000000..e6524e36c11dea4553a54d45e0dfe0e33fe16afd --- /dev/null +++ b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-compilerlibs.bb @@ -0,0 +1,105 @@ +# Description: Extract libgcc and compiler-rt from toolchain + +require gcc-bin-toolchain.inc + +PN = "gcc-bin-toolchain-compilerlibs-${TARGET_ARCH}" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "virtual/${TARGET_PREFIX}gcc \ + virtual/${TARGET_PREFIX}g++" +PROVIDES = "gcc-runtime libstdc++ libgcc-initial virtual/${TARGET_PREFIX}compilerlibs" + +do_install () { + bbnote "Installing libgcc/libclang from Compiler CPU binary toolchain" + install -m 0755 -d ${D}${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER} + + finddirs='' + test -d ${B}/${TOOLCHAIN_PREFIX}/lib && finddirs="$finddirs ${B}/${TOOLCHAIN_PREFIX}/lib" + test -d ${B}/${TOOLCHAIN_PREFIX}/lib64 && finddirs="$finddirs ${B}/${TOOLCHAIN_PREFIX}/lib64" + test -d ${B}/lib/${EULER_TOOLCHAIN_GCC_PATH} && finddirs="$finddirs ${B}/lib/${EULER_TOOLCHAIN_GCC_PATH}" + test -d ${B}/lib64/${EULER_TOOLCHAIN_GCC_PATH} && finddirs="$finddirs ${B}/lib64/${EULER_TOOLCHAIN_GCC_PATH}" + + find $finddirs \ + -name '*.o' \ + -o -name 'libgcc*.a' \ + -o -name 'libc++*.a' \ + -o -name 'libstdc++*.a' \ + -o -name 'libclang_rt*.a' \ + -o -name 'libunwind*.a*' \ + -o -name 'libgcc*.so*' \ + -o -name 'libc++*.so*' \ + -o -name 'libstdc++*.so*' \ + -o -name 'libclang_rt*.so*' \ + -o -name 'libunwind*.so*' | + xargs sh -c 'cp -P --preserve=mode,timestamps,links -v $@ ${D}${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}' sh + + # Remove executable permission for crt*.o to avoid being stripped + for f in ${D}${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.o + do + chmod 644 $f + done + for f in ${D}${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.so* + do + chmod 644 $f + done + + mkdir -p ${D}${base_libdir} + mkdir -p ${D}${libdir} + for f in ${D}${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.so* + do + destdir=${libdir} + if echo $f | grep 'libgcc\|libclang_rt\|libunwind_s' + then + destdir=${base_libdir} + fi + + bn=$(basename $f) + mv $f ${D}$destdir + rel=$(realpath --relative-to=$(dirname $f) ${D}$destdir) + ln -s $rel/$bn $(dirname $f) + done + rm -r ${D}${libdir_native}/${TOOLCHAIN_PREFIX} +} + +# Package will be called as libgcc-s1. Don't know why. +# This makes ldconfig triggered. We need to remove +# ldconfig from our DISTRO_FEATURES. +FILES_${PN} = " \ + ${base_libdir}/*.so \ + ${base_libdir}/*.so.*[0-9] \ + ${libdir}/*.so \ + ${libdir}/*.so.*[0-9] \ +" + +FILES_${PN}-dev = " \ + ${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.so.* \ + ${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.so \ + ${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.py \ + ${base_libdir}/*.py \ + ${libdir}/*.py \ +" +FILES_${PN}-staticdev = " \ + ${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.o \ + ${libdir_native}/${EULER_TOOLCHAIN_GCC_PATH_INNER}/*.a \ +" + +INSANE_SKIP = "file-rdeps ldflags arch" +# POPULATESYSROOTDEPS contains cross toolchain, which +# is different from real toolchain this compilerlib belongs to, +# in case when we are aarch64 and needs arm compilerlib for compat +# building. See staging.bbclass. +POPULATESYSROOTDEPS_class-target = "" +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +ERROR_QA_remove += "dev-elf dev-so" +WARN_QA_remove += "libdir" + +INSANE_SKIP += "installed-vs-shipped" +do_package_qa[noexec] = "1" + +SYSROOT_DIRS_append =" \ + ${sublibdir} \ + ${subincludedir} \ +" +SYSROOT_DIRS_NATIVE_append = "${subbindir}" +INSANE_SKIP_${PN} += "installed-vs-shipped" diff --git a/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-cross-canadian.bb b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-cross-canadian.bb new file mode 100644 index 0000000000000000000000000000000000000000..9a3abc8140a10f8b5744a753042de1ec36f75251 --- /dev/null +++ b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-cross-canadian.bb @@ -0,0 +1,38 @@ +inherit cross-canadian +require gcc-bin-toolchain.inc + +# not depends to chrpath-native, use chrpath command at host +DEPENDS_remove += " chrpath-replacement-native" + +PN = "gcc-bin-toolchain-cross-canadian-${TARGET_ARCH}" +INHIBIT_DEFAULT_DEPS = "1" +INHIBIT_PACKAGE_STRIP = "1" + +# Ignore how TARGET_ARCH is computed +TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}" + +REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" +SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" + +do_install() { + install -m 0755 -d ${D}/${SDKTARGETSYSROOT}/ + #some files are under sysroot in compiler, need to copy to new sysroot + cp -pPR ${B}/sysroot/* ${D}/${SDKTARGETSYSROOT}/ + cp -pPR ${B}/* ${D}/${SDKTARGETSYSROOT}/ + if [ ${TOOLCHAIN_PREFIX}- == ${TARGET_PREFIX} ]; then + chown -R root:root ${D} + return 0 + fi + for f in ${D}/${SDKTARGETSYSROOT}/bin/${TOOLCHAIN_PREFIX}-*; do + bin=$(basename ${f}) + lnk=$(basename ${f} | sed "s/^${TOOLCHAIN_PREFIX}-/${TARGET_PREFIX}/g") + ln -svf ${bin} ${D}/${SDKTARGETSYSROOT}/bin/${lnk} + done + chown -R root:root ${D} +} + +SYSROOT_DIRS = "" + +INSANE_SKIP_${PN} += " already-stripped libdir staticdev dev-so infodir" +FILES_${PN} = "/" +PACKAGES = "${PN}" diff --git a/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-cross.bb b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-cross.bb new file mode 100644 index 0000000000000000000000000000000000000000..b561bdbb42bdc442d224d023f90665de8556b0ee --- /dev/null +++ b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain-cross.bb @@ -0,0 +1,48 @@ +inherit cross +require gcc-bin-toolchain.inc + +PN = "gcc-bin-toolchain-cross-${TARGET_ARCH}" +INHIBIT_DEFAULT_DEPS = "1" +INHIBIT_SYSROOT_STRIP = "1" + +# Ignore how TARGET_ARCH is computed +TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}" + +PROVIDES = "\ + virtual/${TARGET_PREFIX}binutils \ + virtual/${TARGET_PREFIX}gcc \ + virtual/${TARGET_PREFIX}g++ \ +" + +# Inherit cross but keep bindir/libdir/...: +bindir = "${STAGING_DIR_NATIVE}/${prefix_native}/bin/" +libdir = "${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir}/" +libexecdir = "${STAGING_DIR_NATIVE}/${prefix_native}/libexec/" + +do_install_class-cross() { + install -m 0755 -d ${D}/${STAGING_DIR_NATIVE} + cp -pPR ${B}/* ${D}/${STAGING_DIR_NATIVE} + if [ ${TOOLCHAIN_PREFIX}- == ${TARGET_PREFIX} ]; then + return + fi + for f in ${D}/${STAGING_DIR_NATIVE}/bin/${TOOLCHAIN_PREFIX}-*; do + bin=$(basename ${f}) + lnk=$(basename ${f} | sed "s/^${TOOLCHAIN_PREFIX}-/${TARGET_PREFIX}/g") + ln -svf ${bin} ${D}/${STAGING_DIR_NATIVE}/bin/${lnk} + done +} + +SYSROOT_DIRS += "/*" + +do_gcc_stash_builddir () { + : +} +addtask do_gcc_stash_builddir + +#depends by libgcc +do_packagedata () { + : +} +addtask do_packagedata + +INSANE_SKIP_${PN} += " already-stripped " diff --git a/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc new file mode 100644 index 0000000000000000000000000000000000000000..df091a1fd24ae844eef9e495d1d34ed8874ea08a --- /dev/null +++ b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc @@ -0,0 +1,29 @@ +TOOLCHAIN_GCC_VERSION = "10.3.1" +LICENSE = "CLOSED" +SECTION = "toolchain" + +TOOLCHAIN_PREFIX_arm = "arm-openeuler-linux-gnueabi" +TOOLCHAIN_PREFIX_aarch64 = "aarch64-openeuler-linux-gnu" +EULER_TOOLCHAIN_GCC_PATH_INNER = "${TOOLCHAIN_PREFIX}/${TOOLCHAIN_GCC_VERSION}" +EULER_TOOLCHAIN_GCC_PATH = "/gcc/${EULER_TOOLCHAIN_GCC_PATH_INNER}" + +python () { + import os + + local_toolchain = str(d.getVar('OPENEULER_TOOLCHAIN_DIR', True)) + #nativesdk no arch, nativesdk-glibc cannot get specific toolchain + if bb.data.inherits_class('nativesdk', d): + return True + if not os.path.exists(local_toolchain): + bb.fatal("%s is not a directory [%s]!" % (local_toolchain, d.getVar('PN', True))) + if os.path.exists(local_toolchain): + if "glibc" == d.getVar('BPN', True): + gcctopdir = os.path.abspath(os.path.dirname(local_toolchain)) + d.setVar("DL_DIR", gcctopdir) + return True + d.setVar("S", local_toolchain) + d.setVarFlag("do_fetch", "noexec", "1") + d.setVarFlag("do_unpack", "noexec", "1") + d.setVarFlag("do_patch", "noexec", "1") + d.setVarFlag("do_configure", "noexec", "1") +} diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.guess b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.guess new file mode 100644 index 0000000000000000000000000000000000000000..18f8edc0ff54405d81247b07a34a647675a29b2e --- /dev/null +++ b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.guess @@ -0,0 +1,1486 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-08-29' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.sub b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.sub new file mode 100644 index 0000000000000000000000000000000000000000..69eb4bc1e2fefb829ed2bbad8859a8b066a40412 --- /dev/null +++ b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.sub @@ -0,0 +1,1788 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-08-29' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $os in + irix*) + ;; + *) + os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $os in + nextstep* ) + ;; + ns2*) + os=nextstep2 + ;; + *) + os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + IFS="-" read -r cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x$os != x ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux + ;; + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + solaris) + os=solaris2 + ;; + unixware*) + os=sysv4.2uw + ;; + gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + qnx*) + case $cpu in + x86 | i*86) + ;; + *) + os=nto-$os + ;; + esac + ;; + hiux*) + os=hiuxwe2 + ;; + nto-qnx*) + ;; + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + wince*) + os=wince + ;; + utek*) + os=bsd + ;; + dynix*) + os=bsd + ;; + acis*) + os=aos + ;; + atheos*) + os=atheos + ;; + syllable*) + os=syllable + ;; + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + nsk*) + os=nsk + ;; + # Preserve the version number of sinix5. + sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + sinix*) + os=sysv4 + ;; + tpf*) + os=tpf + ;; + triton*) + os=sysv3 + ;; + oss*) + os=sysv3 + ;; + svr4*) + os=sysv4 + ;; + svr3) + os=sysv3 + ;; + sysvr4) + os=sysv4 + ;; + # This must come after sysvr4. + sysv*) + ;; + ose*) + os=ose + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint + ;; + zvmoe) + os=zvmoe + ;; + dicos*) + os=dicos + ;; + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac + ;; + nacl*) + ;; + ios) + ;; + none) + ;; + *-eabi) + ;; + *) + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $cpu-$vendor in + score-*) + os=elf + ;; + spu-*) + os=elf + ;; + *-acorn) + os=riscix1.2 + ;; + arm*-rebel) + os=linux + ;; + arm*-semi) + os=aout + ;; + c4x-* | tic4x-*) + os=coff + ;; + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf + ;; + tic54x-*) + os=coff + ;; + tic55x-*) + os=coff + ;; + tic6x-*) + os=coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=tops20 + ;; + pdp11-*) + os=none + ;; + *-dec | vax-*) + os=ultrix4.2 + ;; + m68*-apollo) + os=domain + ;; + i386-sun) + os=sunos4.0.2 + ;; + m68000-sun) + os=sunos3 + ;; + m68*-cisco) + os=aout + ;; + mep-*) + os=elf + ;; + mips*-cisco) + os=elf + ;; + mips*-*) + os=elf + ;; + or32-*) + os=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 + ;; + sparc-* | *-sun) + os=sunos4.1.1 + ;; + pru-*) + os=elf + ;; + *-be) + os=beos + ;; + *-ibm) + os=aix + ;; + *-knuth) + os=mmixware + ;; + *-wec) + os=proelf + ;; + *-winbond) + os=proelf + ;; + *-oki) + os=proelf + ;; + *-hp) + os=hpux + ;; + *-hitachi) + os=hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=sysv + ;; + *-cbm) + os=amigaos + ;; + *-dg) + os=dgux + ;; + *-dolphin) + os=sysv3 + ;; + m68k-ccur) + os=rtu + ;; + m88k-omron*) + os=luna + ;; + *-next) + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs + ;; + *-gould) + os=sysv + ;; + *-highlevel) + os=bsd + ;; + *-encore) + os=bsd + ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; + *-masscomp) + os=rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=uxpv + ;; + *-rom68k) + os=coff + ;; + *-*bug) + os=coff + ;; + *-apple) + os=macos + ;; + *-atari*) + os=mint + ;; + *-wrs) + os=vxworks + ;; + *) + os=none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $os in + riscix*) + vendor=acorn + ;; + sunos*) + vendor=sun + ;; + cnk*|-aix*) + vendor=ibm + ;; + beos*) + vendor=be + ;; + hpux*) + vendor=hp + ;; + mpeix*) + vendor=hp + ;; + hiux*) + vendor=hitachi + ;; + unos*) + vendor=crds + ;; + dgux*) + vendor=dg + ;; + luna*) + vendor=omron + ;; + genix*) + vendor=ns + ;; + clix*) + vendor=intergraph + ;; + mvs* | opened*) + vendor=ibm + ;; + os400*) + vendor=ibm + ;; + ptx*) + vendor=sequent + ;; + tpf*) + vendor=ibm + ;; + vxsim* | vxworks* | windiss*) + vendor=wrs + ;; + aux*) + vendor=apple + ;; + hms*) + vendor=hitachi + ;; + mpw* | macos*) + vendor=apple + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + vendor=atari + ;; + vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/gnu-configize.in b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/gnu-configize.in new file mode 100644 index 0000000000000000000000000000000000000000..d4908fc4f9d7f08d4aa116e1d0ef400f1f52ad2d --- /dev/null +++ b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/gnu-configize.in @@ -0,0 +1,267 @@ +#! /usr/bin/env perl +# -*- perl -*- + +eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac' + if 0; + +# gnu-configize - install the GNU config.guess / config.sub in a directory tree +# Based on autoreconf: +# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +BEGIN +{ + my $datadir = $ENV{'autom4te_perllibdir'} || '@autom4te_perllibdir@'; +# '/home/kergoth/code/build-arm/tmp/staging/share/autoconf'; + unshift @INC, $datadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos'); +} + +use Autom4te::ChannelDefs; +use Autom4te::Channels; +use Autom4te::Configure_ac; +use Autom4te::FileUtils; +use Autom4te::General; +use Autom4te::XFile; +# Do not use Cwd::chdir, since it might hang. +use Cwd 'cwd'; +use strict; + +## ----------- ## +## Variables. ## +## ----------- ## + +# $HELP +# ----- +$help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ... + +Install the GNU config.sub and config.guess scripts in the +DIRECTORIES or the directory trees driven by CONFIGURE-AC +(defaulting to `.'). + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -f, --force consider all files obsolete + -s, --symlink install symbolic links instead of copies + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] + +" . Autom4te::ChannelDefs::usage . " + +The environment variable \`WARNINGS\' is honored. Some subtools might +support other warning types, using \`all' is encouraged. +"; + +# $VERSION +# -------- +$version = "gnu-configize 1.0 + +Copyright (C) 2004 Chris Larson +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +"; + +my $configdir = '@gnu-configdir@'; +#'/home/kergoth/code/build-arm/tmp/staging/i686-linux/share/gnu-config'; +my $autoconf = $ENV{'AUTOCONF'} || 'autoconf'; + +# use symlinks instead. +my $symlink = 0; + +my $configure_ac; + +my $rm = "rm -f"; +my $ln_s = "ln -sf"; +my $cp = "cp -f"; +my $mkdir = "mkdir"; +my $chmod = "chmod"; + +## ---------- ## +## Routines. ## +## ---------- ## + + +# parse_args () +# ------------- +# Process any command line arguments. +sub parse_args () +{ + my $srcdir; + + getopt ('s|symlink' => \$symlink); + + # Even if the user specified a configure.ac, trim to get the + # directory, and look for configure.ac again. Because (i) the code + # is simpler, and (ii) we are still able to diagnose simultaneous + # presence of configure.ac and configure.in. + @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV; + push @ARGV, '.' unless @ARGV; +} + + +# &gnu_configize_current_directory +# ----------------------------- +sub gnu_configize_current_directory () +{ + my $configure_ac = require_configure_ac; + + # ---------------------- # + # Is it using Autoconf? # + # ---------------------- # + + my $uses_autoconf; + my $uses_gettext; + my $configure_ac_file = new Autom4te::XFile $configure_ac; + while ($_ = $configure_ac_file->getline) + { + s/#.*//; + s/dnl.*//; + $uses_autoconf = 1 if /AC_INIT/; + } + + if (!$uses_autoconf) + { + verb "$configure_ac: not using Autoconf"; + return; + } + + my $aux_dir; + my @subdir; + my $cmd; + my $dest; + + verb "$configure_ac: tracing"; + my $traces = new Autom4te::XFile + ("$autoconf" + . join (' --trace=', '', + # If you change this list, update the + # `Autoreconf-preselections' section of autom4te.in. + 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1', + 'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1', + 'AC_INIT', + ) + . ' |'); + while ($_ = $traces->getline) + { + $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/; + $uses_autoconf = 1 if /AC_INIT/; + push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/; + } + + # The subdirs are *optional*, they may not exist. + foreach (@subdir) + { + if (-d) + { + verb "$configure_ac: subdirectory $_ to gnu-configize"; + gnu_configize ($_); + } + else + { + verb "$configure_ac: subdirectory $_ not present"; + } + } + + $dest = "."; + + if (defined $aux_dir) + { + $dest = $aux_dir; + if (! -d $aux_dir) + { + verb "$configure_ac: creating directory $aux_dir"; + mkdir $aux_dir + or error "cannot create $aux_dir: $!"; + } + } + + if (!$symlink) + { + $cmd = $cp; + } + else + { + $cmd = $ln_s; + } + + xsystem ("$cmd $configdir/config.guess $dest/"); + xsystem ("$chmod u+x $dest/config.guess"); + xsystem ("$cmd $configdir/config.sub $dest/"); + xsystem ("$chmod u+x $dest/config.sub"); +} + + +# &gnu_configize ($DIRECTORY) +# ------------------------ +# Reconf the $DIRECTORY. +sub gnu_configize ($) +{ + my ($directory) = @_; + my $cwd = cwd; + + # The format for this message is not free: taken from Emacs, itself + # using GNU Make's format. + verb "Entering directory `$directory'"; + chdir $directory + or error "cannot chdir to $directory: $!"; + + gnu_configize_current_directory; + + # The format is not free: taken from Emacs, itself using GNU Make's + # format. + verb "Leaving directory `$directory'"; + chdir $cwd + or error "cannot chdir to $cwd: $!"; +} + + +## ------ ## +## Main. ## +## ------ ## + +parse_args; + +# Autoreconf all the given configure.ac. A while loop, not a for, +# since the list can change at runtime because of AC_CONFIG_SUBDIRS. +for my $directory (@ARGV) + { + gnu_configize ($directory); + } + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config_20120814.bb b/meta-openeuler/recipes-devtools/gnu-config/gnu-config_20120814.bb new file mode 100644 index 0000000000000000000000000000000000000000..c046c114ea720c1f43121e3a16008bbd136ecdd1 --- /dev/null +++ b/meta-openeuler/recipes-devtools/gnu-config/gnu-config_20120814.bb @@ -0,0 +1,48 @@ +SUMMARY = "gnu-configize" +DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree" +SECTION = "devel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +DEPENDS_class-native = "hostperl-runtime-native" + +INHIBIT_DEFAULT_DEPS = "1" + +PR = "r0" + +SRC_URI = " \ + file://gnu-configize.in \ + file://config.guess \ + file://config.sub \ + " + +SRC_URI[md5sum] = "cdb56e9968c9a3674fe4ad8880665f78" +SRC_URI[sha256sum] = "b48543f72d717a8c07cf3b995175b3293c24dac9c9efad01b312321c0c809f07" + +do_compile() { + : +} + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install () { + install -d ${D}${datadir}/gnu-config \ + ${D}${bindir} + cat ${WORKDIR}/gnu-configize.in | \ + sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \ + -e 's,@autom4te_perllibdir@,/usr/share/autoconf,g' > ${D}${bindir}/gnu-configize + # In the native case we want the system perl as perl-native can't have built yet + if [ "${PN}" != "gnu-config-native" -a "${PN}" != "nativesdk-gnu-config" ]; then + sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize + fi + chmod 500 ${D}${bindir}/gnu-configize + install -m 0644 "${WORKDIR}/config.guess" ${D}${datadir}/gnu-config/ + install -m 0644 "${WORKDIR}/config.sub" ${D}${datadir}/gnu-config/ + +} + +PACKAGES = "${PN}" +FILES_${PN} = "${bindir} ${datadir}/gnu-config" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config_git.bb b/meta-openeuler/recipes-devtools/gnu-config/gnu-config_git.bb new file mode 100644 index 0000000000000000000000000000000000000000..394a34a80f7946ee8ad12d7ef74498903ea66c13 --- /dev/null +++ b/meta-openeuler/recipes-devtools/gnu-config/gnu-config_git.bb @@ -0,0 +1,41 @@ +SUMMARY = "gnu-configize" +DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree" +SECTION = "devel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://config.guess;endline=39;md5=0e6ca0501b27177f3bc640f7225e3ead" + +DEPENDS_class-native = "perl-native-runtime" + +INHIBIT_DEFAULT_DEPS = "1" + +SRCREV = "a47f842264fc19837f8a00eb1d2d254a4c527334" +PV = "1.0+git${SRCPV}" +PR = "r0" + +SRC_URI = "git://git.sv.gnu.org/config.git \ + file://gnu-configize.in" + +S = "${WORKDIR}/git" + +do_compile() { + : +} + +do_install () { + install -d ${D}${datadir}/gnu-config \ + ${D}${bindir} + cat ${WORKDIR}/gnu-configize.in | \ + sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \ + -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize + # In the native case we want the system perl as perl-native can't have built yet + if [ "${PN}" != "gnu-config-native" -a "${PN}" != "nativesdk-gnu-config" ]; then + sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize + fi + chmod 500 ${D}${bindir}/gnu-configize + install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/ +} + +PACKAGES = "${PN}" +FILES_${PN} = "${bindir} ${datadir}/gnu-config" + +BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-devtools/pseudo/pseudo_git.bbappend b/meta-openeuler/recipes-devtools/pseudo/pseudo_git.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3c69fe8918419668f806c6b69ed87a5b8f059438 --- /dev/null +++ b/meta-openeuler/recipes-devtools/pseudo/pseudo_git.bbappend @@ -0,0 +1,49 @@ +DEPENDS_remove += "sqlite3 attr" +XSRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \ + file://0001-configure-Prune-PIE-flags.patch \ + file://fallback-passwd \ + file://fallback-group \ + " + +SRC_URI_remove_class-native = " \ + http://downloads.yoctoproject.org/mirror/sources/pseudo-prebuilt-2.33.tar.xz;subdir=git/prebuilt;name=prebuilt \ + file://older-glibc-symbols.patch" +SRC_URI_class-native = "file://yocto-pseudo/pseudo-df1d1321fb093283485c387e3c933d2d264e509c.tar.gz \ + file://fallback-passwd \ + file://fallback-group \ + " +#BB_STRICT_CHECKSUM = "0" +PV = "1.9.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad" +LIC_FILES_CHKSUM = "file://COPYING;md5=a1d8023a6f953ac6ea4af765ff62d574" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" +S = "${WORKDIR}/${BPN}-df1d1321fb093283485c387e3c933d2d264e509c" +PSEUDO_EXTRA_OPTS_remove = "--enable-xattr" + +#set --with-sqlite to system host,use system headers +do_compile () { + if [ "${SITEINFO_BITS}" = "64" ]; then + ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=/usr/lib --with-sqlite=/usr --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath + else + ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=/usr/lib --with-sqlite=/usr --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath + fi + oe_runmake ${MAKEOPTS} +} + +#do install使用了chrpath,需新增 +xxdo_install_append_class-native () { + xchrpath ${D}${bindir}/pseudo -r `chrpath ${D}${bindir}/pseudo | cut -d = -f 2 | sed s/XORIGIN/\\$ORIGIN/` + install -d ${D}${sysconfdir} + # The fallback files should never be modified + install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd + install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group + + # Two native/nativesdk entries below are the same + # If necessary install for the alternative machine arch. This is only + # necessary in a native build. + maybe_make32 + if $make32; then + mkdir -p ${D}${prefix}/lib/pseudo/lib + cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/. + fi +} diff --git a/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools/0001-Avoid-use-of-INSTALL_DIR-for-symlink-targets.patch b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools/0001-Avoid-use-of-INSTALL_DIR-for-symlink-targets.patch new file mode 100644 index 0000000000000000000000000000000000000000..bb3f6960554368ed2d85e8b80ce52450a150ea1e --- /dev/null +++ b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools/0001-Avoid-use-of-INSTALL_DIR-for-symlink-targets.patch @@ -0,0 +1,35 @@ +From f5c908e92d4c055859be2fddbda266d9e3bfd415 Mon Sep 17 00:00:00 2001 +From: Patrick McCarty +Date: Mon, 26 Jul 2021 11:38:43 -0700 +Subject: [PATCH] Avoid use of INSTALL_DIR for symlink targets + +In case INSTALL_DIR is overridden with a staged install location, using +INSTALL_DIR for the symlink target path prefix will yield an incorrect location +for the final installation. + +Because the symlink itself is already installed to INSTALL_DIR, simply removing +the INSTALL_DIR prefix suffices as a fix. + +Note that using $DESTDIR/$INSTALL_DIR where appropriate can avoid this type of +issue, but that can be considered a future enhancement. + +Signed-off-by: Patrick McCarty +--- + squashfs-tools/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/squashfs-tools/Makefile b/squashfs-tools/Makefile +index f5a55f1..7262a2e 100755 +--- a/squashfs-tools/Makefile ++++ b/squashfs-tools/Makefile +@@ -406,5 +406,5 @@ install: mksquashfs unsquashfs + mkdir -p $(INSTALL_DIR) + cp mksquashfs $(INSTALL_DIR) + cp unsquashfs $(INSTALL_DIR) +- ln -fs $(INSTALL_DIR)/unsquashfs $(INSTALL_DIR)/sqfscat +- ln -fs $(INSTALL_DIR)/mksquashfs $(INSTALL_DIR)/sqfstar ++ ln -fs unsquashfs $(INSTALL_DIR)/sqfscat ++ ln -fs mksquashfs $(INSTALL_DIR)/sqfstar +-- +2.30.0 + diff --git a/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_4.5.bb b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_4.5.bb new file mode 100644 index 0000000000000000000000000000000000000000..2b6a1cd25a5f9726a813e971f87fdd4e168c0d42 --- /dev/null +++ b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_4.5.bb @@ -0,0 +1,43 @@ +# Note, we can probably remove the lzma option as it has be replaced with xz, +# and I don't think the kernel supports it any more. +SUMMARY = "Tools for manipulating SquashFS filesystems" +HOMEPAGE = "https://github.com/plougher/squashfs-tools" +DESCRIPTION = "Tools to create and extract Squashfs filesystems." +SECTION = "base" +LICENSE = "GPL-2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "file://squashfs-tools/squashfs4.5.tar.gz \ + file://squashfs-tools/0001-CVE-2021-41072.patch \ + file://squashfs-tools/0002-CVE-2021-41072.patch \ + file://squashfs-tools/0003-CVE-2021-41072.patch \ + file://squashfs-tools/0004-CVE-2021-41072.patch \ + file://squashfs-tools/0005-CVE-2021-41072.patch \ + file://0001-Avoid-use-of-INSTALL_DIR-for-symlink-targets.patch \ +" + +S = "${WORKDIR}/${BP}" +B = "${S}/${PN}" + +EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}" + +PACKAGECONFIG ??= "gzip xz xattr" +PACKAGECONFIG[gzip] = "GZIP_SUPPORT=1,GZIP_SUPPORT=0,zlib" +PACKAGECONFIG[xz] = "XZ_SUPPORT=1,XZ_SUPPORT=0,xz" +PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr" + +do_compile() { + oe_runmake all +} + +do_install() { + oe_runmake install INSTALL_DIR=${D}${sbindir} +} + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET_armv6 = "arm" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "squashfs" diff --git a/meta-openeuler/recipes-devtools/strace/strace/run-ptest b/meta-openeuler/recipes-devtools/strace/strace/run-ptest new file mode 100755 index 0000000000000000000000000000000000000000..3a51fb0be9d8b844cd4b285d8da4ac0da4aa53a4 --- /dev/null +++ b/meta-openeuler/recipes-devtools/strace/strace/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh +export TIMEOUT_DURATION=240 +chown nobody tests +chown nobody tests/* +chown nobody ../ptest +su nobody -c "make -B -C tests -k test-suite.log" diff --git a/meta-openeuler/recipes-devtools/strace/strace_5.14.bb b/meta-openeuler/recipes-devtools/strace/strace_5.14.bb new file mode 100644 index 0000000000000000000000000000000000000000..7125c0ef9e100afe1523cf7663fdb08e0b813c73 --- /dev/null +++ b/meta-openeuler/recipes-devtools/strace/strace_5.14.bb @@ -0,0 +1,49 @@ +SUMMARY = "System call tracing tool" +HOMEPAGE = "http://strace.io" +DESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state." +SECTION = "console/utils" +LICENSE = "LGPL-2.1+ & GPL-2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=318cfc887fc8723f4e9d4709b55e065b" + +SRC_URI = "file://strace/strace-${PV}.tar.xz \ + file://run-ptest \ + " +SRC_URI[sha256sum] = "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73" + +inherit autotools ptest + +#PACKAGECONFIG_class-target ??= "\ +# ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ +#" + +#PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" + +EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror" + +CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext" + +TESTDIR = "tests" +PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" + +do_compile_ptest() { + oe_runmake ${PARALLEL_MAKE} -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} + mkdir -p ${D}${PTEST_PATH}/build-aux + mkdir -p ${D}${PTEST_PATH}/src + install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ + install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/ + sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile +} + +RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" + +RDEPENDS_${PN}-ptest_append_libc-glibc = "\ + locale-base-en-us.iso-8859-1 \ +" + +BBCLASSEXTEND = "native" +TOOLCHAIN = "gcc" diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump new file mode 100755 index 0000000000000000000000000000000000000000..69e3cafe5cfa7a37b5964d9dcdf67b9525fbf65d --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump @@ -0,0 +1,145 @@ +#! /bin/sh +# +# kdump +# +# Description: The kdump script provides the support: +# 1. Load a kdump kernel image into memory; +# 2. Copy away vmcore when system panic. +# + +#default +KEXEC=/usr/sbin/kexec +KEXEC_ARGS="-p" + +MAKEDUMPFILE=/usr/bin/makedumpfile +MAKEDUMPFILE_ARGS="-E -d 1" + +LOGGER="logger -p info -t kdump" + +if [ -f /etc/sysconfig/kdump.conf ]; then + . /etc/sysconfig/kdump.conf +else + echo "no /etc/sysconfig/kdump.conf" + exit 1; +fi + +do_check() +{ + #check makedumpfile + if [ ! -e ${MAKEDUMPFILE} -o ! -x ${MAKEDUMPFILE} ] ;then + echo "No makedumpfile found." + exit 0 + fi + + #check kexec + if [ ! -e ${KEXEC} -o ! -x ${KEXEC} ] ;then + echo "No kexec found." + exit 0 + fi + + #check whether kdump kernel image exists on the system + if [ -z "${KDUMP_KIMAGE}" -o ! -f "${KDUMP_KIMAGE}" ]; then + echo "No kdump kernel image found." + exit 0 + fi + + if [ "${KDUMP_CMDLINE}"x = "x" ] ; then + echo "KDUMP_CMDLINE is not configured" + exit 0 + fi +} + +do_save_vmcore() +{ + if [ ${KDUMP_VMCORE_PATH}x = x ]; then + KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" + fi + + mkdir -p ${KDUMP_VMCORE_PATH} + echo "Saving a vmcore to ${KDUMP_VMCORE_PATH}." + + ${MAKEDUMPFILE} ${MAKEDUMPFILE_ARGS} /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`" +# cp --sparse=always /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`" + rc=$? + if [ ${rc} == 0 ]; then + ${LOGGER} "Saved a vmcore to ${KDUMP_VMCORE_PATH}." + else + ${LOGGER} "Failed to save vmcore!" + fi + return ${rc} +} + +do_start() +{ + #check file + do_check + + #check whether the running kernel supports kdump. + if [ ! -e /sys/kernel/kexec_crash_loaded ]; then + echo "Kdump isn't supported on the running kernel!!!" + ${LOGGER} "Kdump isn't supported on the running kernel!!!" + return 1 + fi + + #check whether kdump kernel image has been loaded + rc=`cat /sys/kernel/kexec_crash_loaded` + if [ ${rc} != 0 ]; then + echo "Kdump is already running."; + ${LOGGER} "Kdump is already running." + return 0 + fi + + #check the running kernel cmdline option,insure "crashkernel=" always set. + grep -q crashkernel= /proc/cmdline + if [ $? != 0 ]; then + echo "Kdump isn't supported on the running kernel,please check boot option!!!" + ${LOGGER} "Kdump isn't supported on the running kernel,please check boot option!!!" + return 1 + fi + + #Load the kdump kernel image + ${KEXEC} ${KEXEC_ARGS} "${KDUMP_KIMAGE}" --append="${KDUMP_CMDLINE}" + if [ $? != 0 ]; then + echo "Failed to load kdump kernel!" + ${LOGGER} "Failed to load kdump kernel!" + return 1 + fi + + echo "Kdump started up." + ${LOGGER} "Kdump started up." +} + +do_stop() +{ + ${KEXEC} -p -u 2>/dev/null + if [ $? == 0 ]; then + echo "Kdump has been stopped." + ${LOGGER} "Kdump has been stopped." + else + echo "Failed to stop kdump!" + ${LOGGER} "Failed to stop kdump!" + fi +} + +case "$1" in + start) + if [ -s /proc/vmcore ]; then + do_save_vmcore + reboot + else + do_start + fi + ;; + restart) + do_stop + do_start + ;; + stop) + do_stop + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.conf b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.conf new file mode 100644 index 0000000000000000000000000000000000000000..38190d207a1b4b478c6b37e2fedaed395af72ce7 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.conf @@ -0,0 +1,14 @@ +#the kdump kernel version string. +#KDUMP_KVER="`uname -r`" + +#this will be passed to the kdump kernel as kdump kernel command line +#KDUMP_CMDLINE="`cat /proc/cmdline`" + +#the kernel image for kdump +#KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}" + +#Where to save the vmcore +#KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" + +#the arguments to makedumpfile +MAKEDUMPFILE_ARGS="--dump-dmesg -x /boot/vmlinux-`uname -r`" diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.service b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.service new file mode 100644 index 0000000000000000000000000000000000000000..b4a2c0611d30173c593ae277c0b63fda793022c3 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.service @@ -0,0 +1,14 @@ +[Unit] +Description=Reboot and dump vmcore via kexec +DefaultDependencies=no +Requires=sysinit.target +After=sysinit.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@LIBEXECDIR@/kdump-helper start +ExecStop=@LIBEXECDIR@/kdump-helper stop + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools_2.0.23.bb b/meta-openeuler/recipes-kernel/kexec/kexec-tools_2.0.23.bb new file mode 100644 index 0000000000000000000000000000000000000000..922514a497c7931e89d4c80cdec0796e61d0cec1 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools_2.0.23.bb @@ -0,0 +1,83 @@ +SUMMARY = "Kexec fast reboot tools" +DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" +AUTHOR = "Eric Biederman" +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" +SECTION = "kernel/userland" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" +DEPENDS = "zlib" + +SRC_URI = "file://kexec-tools/kexec-tools-${PV}.tar.xz \ + file://kexec-tools/arm64-support-more-than-one-crash-kernel-regions.patch \ + file://kexec-tools/kexec-Add-quick-kexec-support.patch \ + file://kexec-tools/kexec-Quick-kexec-implementation-for-arm64.patch \ + file://kexec-tools/arm64-crashdump-deduce-paddr-of-_text-based-on-kerne.patch \ + file://kdump \ + file://kdump.conf \ + file://kdump.service \ +" +SRC_URI[sha256sum] = "aa63cd6c7dd95b06ceba6240a7fdc6792789cada75a655e6714987175224241b" + +inherit autotools + +export LDFLAGS = "-L${STAGING_LIBDIR}" +EXTRA_OECONF = " --with-zlib=yes" + +do_compile_prepend() { + # Remove the prepackaged config.h from the source tree as it overrides + # the same file generated by configure and placed in the build tree + rm -f ${S}/include/config.h + + # Remove the '*.d' file to make sure the recompile is OK + for dep in `find ${B} -type f -name '*.d'`; do + dep_no_d="`echo $dep | sed 's#.d$##'`" + # Remove file.d when there is a file.o + if [ -f "$dep_no_d.o" ]; then + rm -f $dep + fi + done +} + +do_install_append () { + install -d ${D}${sysconfdir}/sysconfig + install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper + install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service + sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service + fi +} + +PACKAGES =+ "kexec kdump vmcore-dmesg" + +ALLOW_EMPTY_${PN} = "1" +RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" + +FILES_kexec = "${sbindir}/kexec" +FILES_kdump = "${sbindir}/kdump \ + ${sysconfdir}/sysconfig/kdump.conf \ + ${sysconfdir}/init.d/kdump \ + ${libexecdir}/kdump-helper \ + ${systemd_unitdir}/system/kdump.service \ +" + +FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" + +INITSCRIPT_PACKAGES = "kdump" +INITSCRIPT_NAME_kdump = "kdump" +INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." + +SYSTEMD_PACKAGES = "kdump" +SYSTEMD_SERVICE_kdump = "kdump.service" + +SECURITY_PIE_CFLAGS_remove = "-fPIE -pie" + +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' + +INSANE_SKIP_${PN} = "arch" diff --git a/meta-openeuler/recipes-kernel/linux/kernel-devsrc.bbappend b/meta-openeuler/recipes-kernel/linux/kernel-devsrc.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..d5779c0a7e4f5370da23c9376583b8572d619235 --- /dev/null +++ b/meta-openeuler/recipes-kernel/linux/kernel-devsrc.bbappend @@ -0,0 +1,28 @@ +RDEPENDS_${PN} = "" +RDEPENDS_${PN}_remove_aarch64 = " gawk" + +# not strip, host tools under scripts arch is different, cannot strip +# and cannot check arch in do_package_qa +INHIBIT_PACKAGE_STRIP = "1" +INSANE_SKIP_${PN} += "arch" + +do_install_append() { + # copy the entie source tree. copy source from build dir and then copy source dir + # copy in parts from the build that we'll need later + ( + cd ${B} + find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./.*" -print0 | cpio --null -pdu $kerneldir/build/ + cp .config $kerneldir/build/ + cp -a --parents arch/${ARCH}/include/generated/uapi/asm/ $kerneldir/build/ + rm -f $(find $kerneldir/build/ -name "*\.dbg") + ) + if [ "${S}" != "${B}" ];then + ( + cd ${S} + find . -depth -not -path "./.*" -print0 | cpio --null -pdu $kerneldir/build/ + ) + fi + find $kerneldir/build/ -path $kerneldir/build/lib -prune -o -path $kerneldir/build/tools -prune -o -path $kerneldir/build/scripts -prune -o -name "*.[cs]" -exec rm '{}' \; + rm -rf $kerneldir/build/Documentation + chown -R root:root ${D} +} diff --git a/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb b/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb new file mode 100644 index 0000000000000000000000000000000000000000..77d8717c811e6cea449dfd574205cb39a911fd83 --- /dev/null +++ b/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb @@ -0,0 +1,66 @@ +SUMMARY = "Linux kernel" +SECTION = "kernel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM ?= "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit kernel + +SRC_URI = "file://kernel-5.10 \ + file://yocto-embedded-tools/config/${ARCH}/defconfig-kernel \ +" +# add patches only for aarch64 +SRC_URI_append_aarch64 += " \ + file://yocto-embedded-tools/patches/${ARCH}/0001-arm64-add-zImage-support-for-arm64.patch \ +" + +# add patches for OPENEULER_PLATFROM such as aarch64-pro +SRC_URI_append_aarch64-pro += " \ + file://src-kernel-5.10/0000-raspberrypi-kernel.patch \ + file://src-kernel-5.10/0001-add-preemptRT-patch.patch \ + file://src-kernel-5.10/0002-modifty-bcm2711_defconfig-for-rt-rpi-kernel.patch \ +" + +S = "${WORKDIR}/kernel-5.10" + +LINUX_VERSION ?= "5.10" +LINUX_VERSION_EXTENSION_append = "-openeuler" +#delete v8 in kernel module name, such as kernel-module-xxx-5.10.0-v8 +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +PV = "${LINUX_VERSION}" + +COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemu-aarch64|qemu-arm|raspberrypi4-64" + +PACKAGES += "${KERNEL_PACKAGE_NAME}-img" +FILES_${KERNEL_PACKAGE_NAME}-img = "/boot/Image-${KERNEL_VERSION}" + + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required +# by the use of AUTOREV SRCREVs, which are the default for this recipe. +python () { + if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"): + d.delVar("BB_DONT_CACHE") + raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN"))) +} + +KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" + +OPENEULER_KERNEL_CONFIG = "../yocto-embedded-tools/config/${ARCH}/defconfig-kernel" +OPENEULER_KERNEL_CONFIG_aarch64-pro = "${S}/arch/${ARCH}/configs/bcm2711_defconfig" +do_configure_prepend() { + if [[ ${OPENEULER_PLATFORM} == "aarch64-pro" ]]; then + sed -i '$a CONFIG_ACPI=y' ${OPENEULER_KERNEL_CONFIG} + fi + cp -f "${OPENEULER_KERNEL_CONFIG}" .config +} + +do_install_append(){ + install -m 0644 ${KERNEL_OUTPUT_DIR}/Image ${D}/${KERNEL_IMAGEDEST}/Image-${KERNEL_VERSION} +} + +#not found depmodwrapper, not run postinst now +pkg_postinst_${KERNEL_PACKAGE_NAME}-base () { + : +} diff --git a/meta-openeuler/recipes-labtools/bash/bash.inc b/meta-openeuler/recipes-labtools/bash/bash.inc new file mode 100644 index 0000000000000000000000000000000000000000..10ce3b25d7c104e84efa62e4e4647b9e6a20e7a1 --- /dev/null +++ b/meta-openeuler/recipes-labtools/bash/bash.inc @@ -0,0 +1,57 @@ +DESCRIPTION = "An sh-compatible command language interpreter." +HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html" +SECTION = "base/shell" + +DEPENDS = "ncurses bison-native" + +inherit autotools gettext + +EXTRA_OECONF = "--enable-job-control" + +ALTERNATIVE_${PN} = "sh" +ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" +ALTERNATIVE_PRIORITY = "100" + +export AUTOHEADER = "true" + +RDEPENDS_${PN}-ptest += "make" + +PARALLEL_MAKE = "" + +do_configure () { + oe_runconf +} + +do_configure_prepend () { + rm -f ${S}/y.tab.c + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +do_compile_ptest () { + oe_runmake buildtest +} + +do_install_append () { + # Move /usr/bin/bash to /bin/bash, if need + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + mv ${D}${bindir}/bash ${D}${base_bindir} + fi +} + +do_install_ptest () { + make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test + cp ${B}/Makefile ${D}${PTEST_PATH} + sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile +} + +pkg_postinst_${PN} () { + mkdir -p ${sysconfdir}/ || echo "" + touch ${sysconfdir}/shells + grep -q "bin/bash" ${sysconfdir}/shells || echo /bin/bash >> ${sysconfdir}/shells + grep -q "bin/sh" ${sysconfdir}/shells || echo /bin/sh >> ${sysconfdir}/shells +} +FILES_${PN}-dev += "${libdir}/bash/*" diff --git a/meta-openeuler/recipes-labtools/bash/bash_5.1.8.bb b/meta-openeuler/recipes-labtools/bash/bash_5.1.8.bb new file mode 100644 index 0000000000000000000000000000000000000000..23a69ac5f9190f923f0b9f91d03b02417155f933 --- /dev/null +++ b/meta-openeuler/recipes-labtools/bash/bash_5.1.8.bb @@ -0,0 +1,20 @@ +require bash.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "file://bash/${BP}.tar.gz \ + file://bash/bash-2.05a-interpreter.patch \ + file://bash/bash-2.05b-pgrp_sync.patch \ + file://bash/bash-4.0-nobits.patch \ + file://bash/bash-4.2-coverity.patch \ + file://bash/bash-4.3-noecho.patch \ + file://bash/bash-4.3-memleak-lc_all.patch \ + file://bash/bugfix-Forbidden-non-root-user-to-clear-history.patch \ + file://bash/enable-dot-logout-and-source-bashrc-through-ssh.patch \ +" + +# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) +LICENSE = "GPLv3+" + + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-labtools/ncurses/ncurses.inc b/meta-openeuler/recipes-labtools/ncurses/ncurses.inc new file mode 100644 index 0000000000000000000000000000000000000000..d83134b72d3abdea77f7ba68b7c781619ee27fa3 --- /dev/null +++ b/meta-openeuler/recipes-labtools/ncurses/ncurses.inc @@ -0,0 +1,322 @@ +SUMMARY = "The New Curses library" +DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library." +HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" +LICENSE = "MIT" +SECTION = "libs" +DEPENDS = "ncurses-native" +DEPENDS_class-native = "" + +BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \ + ${bindir}/ncurses6-config ${bindir}/ncursesw6-config" + +inherit autotools binconfig-disabled multilib_header pkgconfig + +#SRC_URI = "" + +EXTRA_AUTORECONF = "-I m4" +CONFIG_SITE =+ "${WORKDIR}/config.cache" + +EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'" + +# Whether to enable separate widec libraries; must be 'true' or 'false' +# +# TODO: remove this variable when widec is supported in every setup? +ENABLE_WIDEC ?= "true" + +# _GNU_SOURCE is required for widec stuff and is detected automatically +# for target objects. But it must be set manually for native and sdk +# builds. +BUILD_CPPFLAGS += "-D_GNU_SOURCE" + +# natives don't generally look in base_libdir +base_libdir_class-native = "${libdir}" + +# Display corruption occurs on 64 bit hosts without these settings +# This was derrived from the upstream debian ncurses which uses +# these settings for 32 and 64 bit hosts. +EXCONFIG_ARGS = "" +EXCONFIG_ARGS_class-native = " \ + --disable-lp64 \ + --with-chtype='long' \ + --with-mmask-t='long'" +EXCONFIG_ARGS_class-nativesdk = " \ + --disable-lp64 \ + --with-chtype='long' \ + --with-mmask-t='long'" + +PACKAGES_DYNAMIC = "^${PN}-lib.*" + + +# Fall back to the host termcap / terminfo for -nativesdk and -native +# The reality is a work around for strange problems with things like +# "bitbake -c menuconfig busybox" where it cannot find the terminfo +# because the sstate had a hard coded search path. Until this is fixed +# another way this is deemed good enough. +EX_TERMCAP = "" +EX_TERMCAP_class-native = ":/etc/termcap:/usr/share/misc/termcap" +EX_TERMCAP_class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap" +EX_TERMINFO = "" +EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" +EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" +EX_TERMLIB ?= "tinfo" + +# Helper function for do_configure to allow multiple configurations +# $1 the directory to run configure in +# $@ the arguments to pass to configure +ncurses_configure() { + mkdir -p $1 + cd $1 + shift + oe_runconf \ + --without-debug \ + --without-ada \ + --without-gpm \ + --enable-hard-tabs \ + --enable-xmc-glitch \ + --enable-colorfgbg \ + --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap${EX_TERMCAP}' \ + --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo${EX_TERMINFO}' \ + --with-shared \ + --disable-big-core \ + --program-prefix= \ + --with-ticlib \ + --with-termlib=${EX_TERMLIB} \ + --enable-sigwinch \ + --enable-pc-files \ + --disable-rpath-hack \ + ${EXCONFIG_ARGS} \ + --with-manpage-format=normal \ + --disable-stripping \ + "$@" || return 1 + cd .. +} + +# Override the function from the autotools class; ncurses requires a +# patched autoconf213 to generate the configure script. This autoconf +# is not available so that the shipped script will be used. +do_configure() { + +# rm -rf ${S}/../ncurses-6.2 +# mv ${S}/../ncurses-6.2-20200411 ${S}/../ncurses-6.2 + + # check does not work with cross-compiling and is generally + # broken because it requires stdin to be pollable (which is + # not the case for /dev/null redirections) + export cf_cv_working_poll=yes + #Remove ${includedir} from CPPFLAGS, need for cross compile + sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS" + + # The --enable-pc-files requires PKG_CONFIG_LIBDIR existed + mkdir -p ${PKG_CONFIG_LIBDIR} + ( cd ${S}; gnu-configize --force ) + ncurses_configure "narrowc" || \ + return 1 + ! ${ENABLE_WIDEC} || \ + ncurses_configure "widec" "--enable-widec" "--without-progs" + +} + +do_compile() { + oe_runmake -C narrowc libs + oe_runmake -C narrowc/progs + + ! ${ENABLE_WIDEC} || \ + oe_runmake -C widec libs +} + +# set of expected differences between narrowc and widec header +# +# TODO: the NCURSES_CH_T difference can cause real problems :( +_unifdef_cleanup = " \ + -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \ + -e '/^#define NCURSES_CH_T /d' \ + -e '/^#include /d' \ + -e '\!^/\* .* \*/!d' \ +" + +do_test[depends] = "unifdef-native:do_populate_sysroot" +do_test[dirs] = "${S}" +do_test() { + ${ENABLE_WIDEC} || return 0 + + # make sure that the narrow and widec header are compatible + # and differ only in minor details. + unifdef -k narrowc/include/curses.h | \ + sed ${_unifdef_cleanup} > curses-narrowc.h + unifdef -k widec/include/curses.h | \ + sed ${_unifdef_cleanup} > curses-widec.h + + diff curses-narrowc.h curses-widec.h +} + +# Split original _install_opts to two parts. +# One is the options to install contents, the other is the parameters \ +# when running command "make install" +# Note that install.libs will also implicitly install header files, +# so we do not need to explicitly specify install.includes. +# Doing so could in fact result in a race condition, as both targets +# (install.libs and install.includes) would install the same headers +# at the same time + +_install_opts = " install.libs install.man " + +_install_cfgs = "\ + DESTDIR='${D}' \ + PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ +" + +do_install() { + # Order of installation is important; widec installs a 'curses.h' + # header with more definitions and must be installed last hence. + # Compatibility of these headers will be checked in 'do_test()'. + oe_runmake -C narrowc ${_install_cfgs} ${_install_opts} \ + install.progs + + # The install.data should run after install.libs, otherwise + # there would be a race issue in a very critical conditon, since + # tic will be run by install.data, and tic needs libtinfo.so + # which would be regenerated by install.libs. + oe_runmake -C narrowc ${_install_cfgs} \ + install.data + + + ! ${ENABLE_WIDEC} || \ + oe_runmake -C widec ${_install_cfgs} ${_install_opts} + + cd narrowc + + # include some basic terminfo files + # stolen ;) from gentoo and modified a bit + for x in ansi console dumb linux rxvt screen screen-256color sun vt52 vt100 vt102 vt200 vt220 xterm-color xterm-xfree86 xterm-256color + do + local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" + local basedir="$(basename $(dirname "${termfile}"))" + + if [ -n "${termfile}" ] + then + install -d ${D}${sysconfdir}/terminfo/${basedir} + mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/ + ln -s /etc/terminfo/${basedir}/${x} \ + ${D}${datadir}/terminfo/${basedir}/${x} + fi + done + # i think we can use xterm-color as default xterm + if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] + then + ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm + fi + + # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses + # still installs '/usr/lib/terminfo', so try to rm both + # the proper path and a slightly hardcoded one + rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo + + # create linker scripts for libcurses.so and libncurses to + # link against -ltinfo when needed. Some builds might break + # else when '-Wl,--no-copy-dt-needed-entries' has been set in + # linker flags. + for i in libncurses libncursesw; do + f=${D}${libdir}/$i.so + test -h $f || continue + rm -f $f + echo '/* GNU ld script */' >$f + echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f + done + + # Make sure that libcurses is linked so that it get -ltinfo + # also, this should be addressed upstream really. + ln -sf libncurses.so ${D}${libdir}/libcurses.so + + # create libtermcap.so linker script for backward compatibility + f=${D}${libdir}/libtermcap.so + echo '/* GNU ld script */' >$f + echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f + + if [ ! -d "${D}${base_libdir}" ]; then + # Setting base_libdir to libdir as is done in the -native + # case will skip this code + mkdir -p ${D}${base_libdir} + mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir} + ! ${ENABLE_WIDEC} || \ + mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir} + + mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} + rm ${D}${libdir}/libtinfo.so + + # Use lnr to ensure this is a relative link despite absolute paths + # (as we can't know the relationship between base_libdir and libdir). + # At some point we can rely on coreutils 8.16 which has ln -r. + lnr ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so + fi + if [ -d "${D}${includedir}/ncurses" ]; then + for f in `find ${D}${includedir}/ncurses -name "*.h"` + do + f=`basename $f` + test -e ${D}${includedir}/$f && continue + ln -sf ncurses/$f ${D}${includedir}/$f + done + fi + oe_multilib_header curses.h +} + +python populate_packages_prepend () { + libdir = d.expand("${libdir}") + base_libdir = d.expand("${base_libdir}") + pnbase = d.expand("${PN}-lib%s") + do_split_packages(d, libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) + if libdir is not base_libdir: + do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) +} + + +#inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_ncurses-tools_class-target = "clear reset" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGES += " \ + ${PN}-tools \ + ${PN}-terminfo-base \ + ${PN}-terminfo \ +" + +FILES_${PN} = "\ + ${bindir}/tput \ + ${bindir}/tset \ + ${bindir}/ncurses5-config \ + ${bindir}/ncursesw5-config \ + ${bindir}/ncurses6-config \ + ${bindir}/ncursesw6-config \ + ${datadir}/tabset \ +" + +# This keeps only tput/tset in ncurses +# clear/reset are in already busybox +FILES_${PN}-tools = "\ + ${bindir}/tic \ + ${bindir}/toe \ + ${bindir}/infotocap \ + ${bindir}/captoinfo \ + ${bindir}/infocmp \ + ${bindir}/clear \ + ${bindir}/reset \ + ${bindir}/tack \ + ${bindir}/tabs \ +" + +# 'reset' is a symlink to 'tset' which is in the 'ncurses' package +RDEPENDS_${PN}-tools = "${PN}" + +FILES_${PN}-terminfo = "\ + ${datadir}/terminfo \ +" + +FILES_${PN}-terminfo-base = "\ + ${sysconfdir}/terminfo \ +" + +RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" +RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" diff --git a/meta-openeuler/recipes-labtools/ncurses/ncurses_6.3.bb b/meta-openeuler/recipes-labtools/ncurses/ncurses_6.3.bb new file mode 100644 index 0000000000000000000000000000000000000000..873557a4c8eb578cd3dccd614f12884a22c92fdd --- /dev/null +++ b/meta-openeuler/recipes-labtools/ncurses/ncurses_6.3.bb @@ -0,0 +1,18 @@ +require ncurses.inc +FILESEXTRAPATHS_append := "${THISDIR}/../../../../meta/recipes-core/ncurses/files/:" +LIC_FILES_CHKSUM="file://COPYING;md5=f852913c5d988a5f5a2f1df7ba7ee893" +SRC_URI = "file://ncurses/${BP}.tar.gz \ + file://ncurses/ncurses-config.patch \ + file://ncurses/ncurses-libs.patch \ + file://ncurses/ncurses-urxvt.patch \ + file://ncurses/ncurses-kbs.patch \ +" + +CFLAGS_remove_arm64eb += "-O2" +CXXFLAGS_remove_arm64eb += "-O2" +CPPFLAGS_remove_arm64eb += "-O2" +CPPFLAGS_append_arm64eb += "-Os" + +EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)" + diff --git a/meta-openeuler/recipes-openamp/libmetal/libmetal.inc b/meta-openeuler/recipes-openamp/libmetal/libmetal.inc new file mode 100644 index 0000000000000000000000000000000000000000..d6677028b3ae9c1c99b5694c9c51926818178e12 --- /dev/null +++ b/meta-openeuler/recipes-openamp/libmetal/libmetal.inc @@ -0,0 +1,59 @@ +### Descriptive metadata: SUMMARY,DESCRITPION, HOMEPAGE, AUTHOR, BUGTRACKER +SUMMARY = "Libmetal: Libmetal implements an abstraction layer across user-space Linux, baremetal, and RTOS environments" +DESCRITPION = "Libmetal provides common user APIs to access devices, handle device interrupts and request memory across \ + the following operating environments: \ + - Linux user space (based on UIO and VFIO support in the kernel) \ + - RTOS (with and without virtual memory) \ + - Bare-metal environments" +AUTHOR = "" +HOMEPAGE = "https://github.com/OpenAMP/libmetal/" +BUGTRACKER = "https://gitee.com/openeuler/yocto-meta-openeuler" +### Package manager metadata: SECTION, PRIOIRTY(only for deb, opkg) +SECTION = "libs" + +### License metadata +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c" + +### Inheritance and includes if needed +inherit cmake + +### Build metadata: SRC_URI, SRCDATA, S, B, FILESEXTRAPATHS.... +SRC_URI = "file://libmetal/${BPN}-${PV}.tar.gz" + +S = "${WORKDIR}/${BPN}-${PV}" + +# the software packages required in build +# if user want to enable hugetlbfs support, please +# add "DEPENDS_append_pn-libmetal = " libhugetlbfs "" to your local.conf +# udev/mdev(provided by busybox) is required, may need to add it into DEPENDS +DEPENDS = "sysfsutils" + +# alias package name +PROVIDES = "libmetal" + +# extra cmake options +EXTRA_OECMAKE = " \ + -DWITH_EXAMPLES=ON \ + -DWITH_DOC=OFF \ + " + +### Runtime metadata +#RDEPENDS_${PN} += "libudev" + +### Package metadata +FILES_${PN} = " \ + ${libdir}/*.so* \ + ${bindir}/test-* \ +" +### Tasks for package + +do_install_append () { + # Only install the shared lib binaries + rm -rf ${D}/${bindir}/*-static + + for f in `find ${D}/${bindir}/ -type f -regex ".*-shared*"`; do + newf="`echo ${f} | sed 's/-shared*$//g'`" + mv "${f}" "${newf}" + done +} diff --git a/meta-openeuler/recipes-openamp/libmetal/libmetal_2021.10.0.bb b/meta-openeuler/recipes-openamp/libmetal/libmetal_2021.10.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..47cba270d4592d19cfce0ef1f0c73ff3965d6c71 --- /dev/null +++ b/meta-openeuler/recipes-openamp/libmetal/libmetal_2021.10.0.bb @@ -0,0 +1 @@ +require libmetal.inc \ No newline at end of file diff --git a/meta-openeuler/recipes-openamp/openamp/openamp.inc b/meta-openeuler/recipes-openamp/openamp/openamp.inc new file mode 100644 index 0000000000000000000000000000000000000000..fc12bbeb4edda1885627435e3d38588d011b321d --- /dev/null +++ b/meta-openeuler/recipes-openamp/openamp/openamp.inc @@ -0,0 +1,60 @@ +### Descriptive metadata: SUMMARY,DESCRITPION, HOMEPAGE, AUTHOR, BUGTRACKER +SUMMARY = "Open Asymmetric Multi Processing (OpenAMP) framework" +DESCRITPION = "The OpenAMP framework provides software components that enable \ + development of software applications for Asymmetric Multiprocessing \ + (AMP) systems" +AUTHOR = "" +HOMEPAGE = "https://github.com/OpenAMP/open-amp/" +BUGTRACKER = "https://gitee.com/openeuler/yocto-meta-openeuler" + +### Package manager metadata: SECTION, PRIOIRTY(only for deb, opkg) +SECTION = "libs" + +### License metadata +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8d8cf662ef6bf9936a1e1413585ecbf" + +### Inheritance and includes if needed +inherit cmake + +### Build metadata: SRC_URI, SRCDATA, S, B, FILESEXTRAPATHS.... +SRC_URI = "file://OpenAMP/${BPN}-${PV}.tar.gz" + +S = "${WORKDIR}/${BPN}-${PV}" + +# the software packages required in build +DEPENDS = "libmetal" + +# alias package name +PROVIDES = "openamp" + +# extra cmake options +EXTRA_OECMAKE = " \ + -DLIB_INSTALL_DIR=${libdir} \ + -DLIBEXEC_INSTALL_DIR=${libexecdir} \ + -DMACHINE=generic \ + -DWITH_PROXY=ON \ + -DWITH_APPS=ON \ + " + +### Runtime metadata + + +### Package metadata +ALLOW_EMPTY_${PN}-demos = "1" +PACKAGES_append += "${PN}-demos" + +FILES_${PN} = " \ + ${libdir}/*.so* \ +" + +FILES_${PN}-demos = " \ + ${bindir}/*-shared \ +" +### Tasks for package + +do_install_append () { + # Only install echo test client, matrix multiplication client, + # and proxy app server for ZynqMP + rm -rf ${D}/${bindir}/*-static +} diff --git a/meta-openeuler/recipes-openamp/openamp/openamp_2021.10.0.bb b/meta-openeuler/recipes-openamp/openamp/openamp_2021.10.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..b531d8fd77e9fb9e2dec499f1bf1ed62640764ac --- /dev/null +++ b/meta-openeuler/recipes-openamp/openamp/openamp_2021.10.0.bb @@ -0,0 +1 @@ +require openamp.inc \ No newline at end of file diff --git a/meta-openeuler/recipes-support/libffi/libffi_3.4.2.bb b/meta-openeuler/recipes-support/libffi/libffi_3.4.2.bb new file mode 100644 index 0000000000000000000000000000000000000000..b360720068d767d5d6a71b666c442e88436051a4 --- /dev/null +++ b/meta-openeuler/recipes-support/libffi/libffi_3.4.2.bb @@ -0,0 +1,33 @@ +SUMMARY = "A portable foreign function interface library" +HOMEPAGE = "http://sourceware.org/libffi/" +DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \ +conventions. This allows a programmer to call any function specified by a call interface description at run \ +time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \ +interface that allows code written in one language to call code written in another language. The `libffi' \ +library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. \ +A layer must exist above `libffi' that handles type conversions for values passed between the two languages." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=679b5c9bdc79a2b93ee574e193e7a7bc" + +SRC_URI = "file://libffi/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "294b921e6cf9ab0fbaea4b639f8fdbe8" +SRC_URI[sha256sum] = "540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620" + +EXTRA_OECONF += "--disable-builddir" +EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" +inherit autotools texinfo multilib_header + +do_install_append() { + oe_multilib_header ffi.h ffitarget.h +} + +FILES_${PN}-dev += "${libdir}/libffi-${PV}" + +# Doesn't compile in MIPS16e mode due to use of hand-written +# assembly +MIPS_INSTRUCTION_SET = "mips" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-openeuler/recipes-support/popt/popt_1.18.bb b/meta-openeuler/recipes-support/popt/popt_1.18.bb new file mode 100644 index 0000000000000000000000000000000000000000..f88c821e95c161f1f776dd8a90549f02973f6092 --- /dev/null +++ b/meta-openeuler/recipes-support/popt/popt_1.18.bb @@ -0,0 +1,21 @@ +SUMMARY = "Library for parsing command line options" +DESCRIPTION = "Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions, but it improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments." +HOMEPAGE = "https://www.rpm.org/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d" + +DEPENDS = "virtual/libiconv" + +SRC_URI = "file://popt/${BP}.tar.gz \ + file://popt/fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch \ + file://popt/fix-handle-newly-added-asset-.-call-like-elsewhere.patch \ + file://popt/fix-obscure-iconv-mis-call-error-path-could-lead-to-.patch \ + file://popt/fix-permit-reading-aliases-remove-left-over-goto-exi.patch \ +" +SRC_URI[sha256sum] = "5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1" + +inherit autotools gettext + +BBCLASSEXTEND = "native nativesdk" diff --git a/rtos/meta-openeuler-rtos/README.md b/rtos/meta-openeuler-rtos/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/rtos/meta-openeuler-rtos/conf/layer.conf b/rtos/meta-openeuler-rtos/conf/layer.conf new file mode 100644 index 0000000000000000000000000000000000000000..1a3de1c871d0c3e9648d4cca136a9bee4b7aae43 --- /dev/null +++ b/rtos/meta-openeuler-rtos/conf/layer.conf @@ -0,0 +1,28 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "openeuler-rtos" +BBFILE_PATTERN_openeuler-rtos = "^${LAYERDIR}/" +BBFILE_PRIORITY_openeuler-rtos = "25" + +LAYERSERIES_COMPAT_openeuler-rtos = "hardknott" +#no bb file under meta-openeuler-rtos, set it to 1 to ignore "No bb files" warning +BBFILE_PATTERN_IGNORE_EMPTY_openeuler-rtos = "1" + + +#enable RTOS specific .bb +BBFILES_DYNAMIC += " \ +rtthread:${LAYERDIR}/rtthread/*.bb \ +rtthread:${LAYERDIR}/rtthread/*.bbappend \ +" +# Most rtos can't be built directly with xxx-linux-gcc toolchain, because of C library +# A baremetal gcc toolchain is needed. The following variables are used to +# describe the baremetal gcc toolchain. By default, Zephyr Project's toolchain +# is used and can be downloaded from Zephyr Project's github repo. +OPENEULER_RTOS_TOOLCHAIN_DIR_aarch64 ?= "/opt/zephyr-sdk/aarch64-zephyr-elf/bin" +OPENEULER_RTOS_TOOLCHAIN_PREFIX_aarch64 ?= "aarch64-zephyr-elf-" + diff --git a/rtos/meta-rtthread/README.md b/rtos/meta-rtthread/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c9f2232e51daa4cb9380555c7339685eda165e79 --- /dev/null +++ b/rtos/meta-rtthread/README.md @@ -0,0 +1,31 @@ +# RT-Thread 构建支持 + +本元构建层(meta-layer)包含了在openEuler Yocto构建环境下集成构建RT-Thread的相关配置和配方。 + +## 使用 + +1. RT-Thread代码包的准备: 应事先将RT-Thread的[代码包](https://github.com/RT-Thread/rt-thread/archive/refs/tags/v4.0.5.tar.gz)下载放于OPENEULER_SP_DIR中,目录和文件名格式为rtthread/rtthread-${PV}.tar.gz.当前支持的最新版本是4.0.5 + +2. 在Yocto构建目录的bblayers.conf中添加相应的元构建层 + +``` + BBLAYERS ?= "\ + ...... + xxxxx/yocto-meta-openeuler/rtos/meta-openeuler-rtos \ + xxxxx/yocto-meta-openeuler/rtos/meta-rtthread \ + " +``` + +3. 构建rt-thread所需工具。构建rt-thread需要在构建主机上安装好scons构建工具,并在meta-openeuler-rtos/conf/layer.conf中填好构建RT-Thread所需工具链的路径和前缀。目前构建RT-Thread不能使用构建Linux的GCC工具链,例如xxx-linux-glibc-gcc,需要集成newlibc的工具链。一个例子如下所示: + +``` +OPENEULER_RTOS_TOOLCHAIN_DIR_aarch64 ?= "/opt/zephyr-sdk/aarch64-zephyr-elf/bin" +OPENEULER_RTOS_TOOLCHAIN_PREFIX_aarch64 +``` + +4. 构建rt-thread. +``` + bitbake rtthread +``` + +rtthread构建的结果文件会安装在/lib/rtthread目录,并打包成rpm文件。 \ No newline at end of file diff --git a/rtos/meta-rtthread/conf/layer.conf b/rtos/meta-rtthread/conf/layer.conf new file mode 100644 index 0000000000000000000000000000000000000000..b2b64650fd42cafae4b3e98fad7583381f044173 --- /dev/null +++ b/rtos/meta-rtthread/conf/layer.conf @@ -0,0 +1,19 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*.bb \ + ${LAYERDIR}/recipes-*/*.bbappend" + +BBFILE_COLLECTIONS += "rtthread" +BBFILE_PATTERN_rtthread = "^${LAYERDIR}/" +BBFILE_PRIORITY_rtthread = "24" + +LAYERVERSION_rtthread = "1" + +LAYERDEPENDS_rtthread = "core" + +LAYERSERIES_COMPAT_rtthread = "hardknott" + +# rtthread is built with scons +HOSTTOOLS_append = " scons" diff --git a/rtos/meta-rtthread/recipes-kernel/files/0001-bsp-modify-the-rtconfig.py-for-openeuler.patch b/rtos/meta-rtthread/recipes-kernel/files/0001-bsp-modify-the-rtconfig.py-for-openeuler.patch new file mode 100644 index 0000000000000000000000000000000000000000..c0ff5d7c91f1c923539f6051fb629f946886e618 --- /dev/null +++ b/rtos/meta-rtthread/recipes-kernel/files/0001-bsp-modify-the-rtconfig.py-for-openeuler.patch @@ -0,0 +1,44 @@ +From 9a2252f77d2beadc68ba6cdc03b3019f48db8220 Mon Sep 17 00:00:00 2001 +From: Wayne Ren +Date: Fri, 18 Feb 2022 21:32:59 +0800 +Subject: [PATCH] bsp: modify the rtconfig.py for openeuler + +- change toolchain prefix +- openeuler supports cortex-a57 + +Signed-off-by: Wayne Ren +--- + bsp/qemu-virt64-aarch64/rtconfig.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/bsp/qemu-virt64-aarch64/rtconfig.py b/bsp/qemu-virt64-aarch64/rtconfig.py +index e46a4374a..ebcc4b03e 100644 +--- a/bsp/qemu-virt64-aarch64/rtconfig.py ++++ b/bsp/qemu-virt64-aarch64/rtconfig.py +@@ -27,7 +27,13 @@ BUILD = 'debug' + + if PLATFORM == 'gcc': + # toolchains +- PREFIX = 'aarch64-elf-' ++ if os.getenv('OPENEULER_RTT_GCC_PREFIX'): ++ PREFIX = os.getenv('OPENEULER_RTT_GCC_PREFIX') ++ TARGET_TUNE = ' -g -march=armv8-a -mtune=cortex-a57' ++ else: ++ PREFIX = 'aarch64-elf-' ++ TARGET_TUNE = ' -g -march=armv8-a -mtune=cortex-a53' ++ + CC = PREFIX + 'gcc' + CXX = PREFIX + 'g++' + AS = PREFIX + 'gcc' +@@ -38,7 +44,7 @@ if PLATFORM == 'gcc': + OBJDUMP = PREFIX + 'objdump' + OBJCPY = PREFIX + 'objcopy' + +- DEVICE = ' -g -march=armv8-a -mtune=cortex-a53' ++ DEVICE = TARGET_TUNE + CFLAGS = DEVICE + ' -Wall' + AFLAGS = ' -c' + ' -x assembler-with-cpp -D__ASSEMBLY__' + LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T link.lds' +-- +2.30.2 + diff --git a/rtos/meta-rtthread/recipes-kernel/rtthread.inc b/rtos/meta-rtthread/recipes-kernel/rtthread.inc new file mode 100644 index 0000000000000000000000000000000000000000..dbcf499f332a007a2d1329a133f36eead7591540 --- /dev/null +++ b/rtos/meta-rtthread/recipes-kernel/rtthread.inc @@ -0,0 +1,98 @@ +### Descriptive metadata: SUMMARY,DESCRITPION, HOMEPAGE, AUTHOR, BUGTRACKER +SUMMARY = "RT-Thread " +DESCRITPION = "A well-known open source RTOS from China" +AUTHOR = "" +HOMEPAGE = "https://github.com/RT-Thread/rt-thread" +BUGTRACKER = "https://gitee.com/openeuler/yocto-meta-openeuler" +### Package manager metadata: SECTION, PRIOIRTY(only for deb, opkg) +SECTION = "RTOS" + +### License metadata +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +### Inheritance and includes if needed +## rtthread is built by scons, so we need to inherit scons.bbclass +#inherit scons + +### Build metadata: SRC_URI, SRCDATA, S, B, FILESEXTRAPATHS.... +SRC_URI = "file://rtthread/rtthread-${PV}.tar.gz \ + file://0001-bsp-modify-the-rtconfig.py-for-openeuler.patch" + +S = "${WORKDIR}/${BPN}-${PV}" + +# the software packages required in build +# rtthread needs to be built with gcc toolchain with newlibc +# it's better to use pre-built toolchain, e.g. aarch64-elf-xxx +# DEPENDS = + +# according to yocto's parameters, e.g., MACHINE, ARCH, to get +# rtthread's parameters + +export RTT_EXEC_PATH = "${OPENEULER_RTOS_TOOLCHAIN_DIR}" +export RTT_CC = "gcc" +export OPENEULER_RTT_GCC_PREFIX = "${OPENEULER_RTOS_TOOLCHAIN_PREFIX}" + + +def get_rtthread_bsp(d): + + supported_machine = { + "qemu_aarch64": "qemu-virt64-aarch64", + } + + machine = d.getVar("MACHINE_ARCH",True) + + if not machine in supported_machine: + bb.error("unsupported target arch:%s" % machine) + return "" + + return "bsp/" + supported_machine[machine] + +RTTHREAD_BSPDIR = "${@get_rtthread_bsp(d)}" + +# alias package name +PROVIDES += "rtthread" + +### Runtime metadata +#HOSTOOLS += "scons" +PACKAGES = "${PN}" +### Package metadata +FILES_${PN} = " \ + ${libdir}/rtthread/rtthread.elf \ + ${libdir}/rtthread/rtthread.bin \ + ${libdir}/rtthread/rtthread.map \ +" +### Tasks for package +python () { + d.delVar('CFLAGS') + d.delVar('CXXFLAGS') + d.delVar('LDFLAGS') + d.delVar('CC') + d.delVar('AR') + d.delVar('LD') + d.delVar('NM') + d.delVar('OBJCOPY') +} + +#bypass package_qa as the deleted LDFLAGS will cause error +do_package_qa() { + echo "do package qa" +} + +#bypass configure as RTT has no configure phase +do_configure() { + : +} + +#call host's scons to compile rtt. You need to install the +#host tools required by rtt +do_compile() { + pushd ${S}/${RTTHREAD_BSPDIR} + scons + popd +} + +do_install() { + install -d ${D}${libdir}/rtthread + install -m 644 -D ${S}/${RTTHREAD_BSPDIR}/rtthread.* ${D}${libdir}/rtthread/ +} diff --git a/rtos/meta-rtthread/recipes-kernel/rtthread_4.0.5.bb b/rtos/meta-rtthread/recipes-kernel/rtthread_4.0.5.bb new file mode 100644 index 0000000000000000000000000000000000000000..9c474d820e61183c4e7b988c903b2d1e66cbafde --- /dev/null +++ b/rtos/meta-rtthread/recipes-kernel/rtthread_4.0.5.bb @@ -0,0 +1 @@ +require rtthread.inc \ No newline at end of file diff --git a/scripts/compile.sh b/scripts/compile.sh new file mode 100644 index 0000000000000000000000000000000000000000..cc58a20869b43b8b2d0093d97394ad370fbdcfda --- /dev/null +++ b/scripts/compile.sh @@ -0,0 +1,184 @@ +#!/bin/bash +# this script is used to setup the yocto build envrionment of openEuler Embedded + +usage() +{ + echo "Tip: " + echo " to build dsoftbu:" + echo " # sh $(basename "${BASH_SOURCE[0]}") \"dsoftbus\"" + echo " to build openEuler Embedded packages:" + echo " # . $(basename "${BASH_SOURCE[0]}") [BUILD_DIR] [TOOLCHAIN_DIR]" + echo " Supportted PLATFORM:" + echo " aarch64-std (default)" + echo " aarch64-pro" + echo " arm-std" + echo " raspberrypi4-64" + echo " Build dir: /build (defaut)" + echo " External toolchain dir(absoulte path):" + echo " /usr1/openeuler/gcc/openeuler_gcc_arm64le (default)" + return 1 +} + +get_build_info() +{ + PLATFORM="$1" + BUILD_DIR="$2" + TOOLCHAIN_DIR="$3" + OPENEULER_TOOLCHAIN_DIR="OPENEULER_TOOLCHAIN_DIR_aarch64" + + if [ -n "$BASH_SOURCE" ]; then + THIS_SCRIPT="$BASH_SOURCE" + elif [ -n "$ZSH_NAME" ]; then + THIS_SCRIPT="$0" + else + THIS_SCRIPT="$(pwd)/compile.sh" + if [ ! -e "$THIS_SCRIPT" ]; then + echo "Error: $THIS_SCRIPT doesn't exist!" + return 1 + fi + fi + + if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then + echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" >&2 + usage || return 1 + fi + + # show help message if no arguments + if [ $# -eq 0 ]; then + usage || return 1 + fi + + # get the src dir which contains all src code packages, include yocto repos, linux kernel + # busybox etc.. + SRC_DIR="$(cd $(dirname "${BASH_SOURCE[0]}")/../../;pwd)" + [[ -z "${BUILD_DIR}" ]] && BUILD_DIR="${SRC_DIR}/build" + BUILD_DIR="$(realpath ${BUILD_DIR})" + + # set MACHINE and bitbake option + BITBAKE_OPT="openeuler-image" + case $PLATFORM in + "raspberrypi4-64") + MACHINE="raspberrypi4-64" + ;; + "aarch64-std") + MACHINE="qemu-aarch64" + BITBAKE_OPT="openeuler-image openeuler-image-tiny" + ;; + "aarch64-pro") + MACHINE="qemu-aarch64" + ;; + "arm-std") + MACHINE="qemu-arm" + ;; + *) + echo "unknown platform, use aarch64-std as default" + PLATFORM="aarch64-std" + MACHINE="qemu-aarch64" + esac + + # set toolchain path + case $MACHINE in + "qemu-aarch64" | "raspberrypi4-64") + OPENEULER_TOOLCHAIN_DIR="OPENEULER_TOOLCHAIN_DIR_aarch64";; + "qemu-arm") + OPENEULER_TOOLCHAIN_DIR="OPENEULER_TOOLCHAIN_DIR_arm";; + *) + echo "unknown machine" + usage || return 1 + esac +} + +# this function sets up the yocto build environment +set_env() +{ + # as tools like ldconfig will be used, add /usr/sbin in $PATH + export PATH="/usr/sbin/:$PATH" + + # set the TEMPLATECONF of yocto, make build dir and init the yocto build + # environment + TEMPLATECONF="${SRC_DIR}/yocto-meta-openeuler/meta-openeuler/conf" + mkdir -p "${BUILD_DIR}" + source "${SRC_DIR}"/yocto-poky/oe-init-build-env "${BUILD_DIR}" + set +x + + # after oe-init-build-env, will be in ${BUILD_DIR} + # set the MACHINE variable in local.conf through sed cmd + sed -i "s|^MACHINE .*|MACHINE = \"${MACHINE}\"|g" conf/local.conf + sed -i "s|^OPENEULER_PLATFORM .*|OPENEULER_PLATFORM = \"${PLATFORM}\"|g" conf/local.conf + + # set the OPENUERL_SP_DIR variable + sed -i "s|^OPENEULER_SP_DIR .*|OPENEULER_SP_DIR = \"${SRC_DIR}\"|g" conf/local.conf + + # set the OPENEULER_TOOLCHAIN_DIR_xxx variable + if [[ -n ${TOOLCHAIN_DIR} ]];then + sed -i "s|^${OPENEULER_TOOLCHAIN_DIR}.*|${OPENEULER_TOOLCHAIN_DIR} = \"${TOOLCHAIN_DIR}\"|g" conf/local.conf + fi + + # if raspberrypi is selected, add the layer of meta-raspberry pi + if echo "$MACHINE" | grep -q "^raspberrypi";then + grep "meta-raspberrypi" conf/bblayers.conf |grep -qv "^[[:space:]]*#" || sed -i "/\/meta-openeuler /a \ "${SRC_DIR}"/yocto-meta-openeuler/bsp/meta-raspberrypi \\\\" conf/bblayers.conf + fi + # set the correct automake command and add it into HOSTTOOLS + # if automake-1.* is not in HOSTOOLS, append it + local automake_v=$(ls /usr/bin/automake-1.* |awk -F "/" '{print $4}') + grep -q "HOSTTOOLS .*$automake_v" conf/local.conf || echo "HOSTTOOLS += \"$automake_v\"" >> conf/local.conf + + # set DATETIME in conf/local.conf + # you can set DATETIME from environment variable or get time by date + # not reset DATETIME when rebuilt in the same directory + if [[ -z "${DATETIME}" ]];then + DATETIME="$(date +%Y%m%d%H%M%S)" + fi + grep -q "DATETIME" conf/local.conf || echo "DATETIME = \"${DATETIME}\"" >> conf/local.conf +} + +main() +{ + get_build_info "$@" || return 1 + set_env + echo -e "Tip: You can now run 'bitbake ${BITBAKE_OPT}'.\n" +} + +do_dsoftbus_compile() +{ + rm -rf ${SRC_DIR}/dsoftbus_build/out + cd ${SRC_DIR}/dsoftbus_build + ./build.sh --product-name openEuler +} + +do_dsoftbus_package() +{ + rm -rf ${SRC_DIR}/dsoftbus_output + mkdir ${SRC_DIR}/dsoftbus_output + install -d ${SRC_DIR}/dsoftbus_output/usr/include/dsoftbus + install -d ${SRC_DIR}/dsoftbus_output/usr/lib64/ + install -d ${SRC_DIR}/dsoftbus_output/usr/bin + + # prepare so + cp ${SRC_DIR}/dsoftbus_build/out/ohos-arm64-release/common/common/*.so ${SRC_DIR}/dsoftbus_output/usr/lib64/ + cp ${SRC_DIR}/dsoftbus_build/out/ohos-arm64-release/communication/dsoftbus_standard/*.so ${SRC_DIR}/dsoftbus_output/usr/lib64/ + + # prepare bin + cp ${SRC_DIR}/dsoftbus_build/out/ohos-arm64-release/communication/dsoftbus_standard/softbus_server_main ${SRC_DIR}/dsoftbus_output/usr/bin + + # prepare head files + cp \ + ${SRC_DIR}/dsoftbus_build/foundation/communication/dsoftbus/interfaces/kits/discovery/*.h \ + ${SRC_DIR}/dsoftbus_build/foundation/communication/dsoftbus/interfaces/kits/common/*.h \ + ${SRC_DIR}/dsoftbus_build/foundation/communication/dsoftbus/interfaces/kits/bus_center/*.h \ + ${SRC_DIR}/dsoftbus_build/foundation/communication/dsoftbus/interfaces/kits/transport/*.h \ + ${SRC_DIR}/dsoftbus_build/foundation/communication/dsoftbus/core/common/include/softbus_errcode.h \ + ${SRC_DIR}/dsoftbus_output/usr/include/dsoftbus +} + +if [ "$1" == "dsoftbus" ];then + SRC_DIR=$2 + if [ -z "${SRC_DIR}" ];then + SRC_DIR="$(cd $(dirname $0)/../../;pwd)" + fi + + do_dsoftbus_compile + do_dsoftbus_package +else + main "$@" +fi diff --git a/scripts/download_code.sh b/scripts/download_code.sh new file mode 100644 index 0000000000000000000000000000000000000000..1dc0b75f79d14331cc2f6b7bde0d87dbccdf4809 --- /dev/null +++ b/scripts/download_code.sh @@ -0,0 +1,371 @@ +#!/bin/bash + +create_manifest() +{ + cat > "${SRC_DIR}"/manifest.xml < + + + +EOF + + #add info for yocto-meta-openeuler + pushd "${SRC_DIR}"/yocto-meta-openeuler/ >/dev/null + #add info for yocto-meta-openeuler + mycommitid="$(git log --pretty=oneline -n1 | awk '{print $1}')" + myrepo="openeuler/yocto-meta-openeuler" + mybranch="$(git branch | grep "^* " | awk '{print $NF}')" + git branch -a | grep "/${mybranch}$" || { mybranch="${mycommitid}"; } + echo "${myrepo} yocto-meta-openeuler ${mycommitid} ${mybranch}" >> "${SRC_DIR}"/code.list + popd >/dev/null + + cat "${SRC_DIR}"/code.list | sort | uniq > "${SRC_DIR}"/code.list.sort + while read line + do + local repo="$(echo $line| awk '{print $1}')" + local localpath="$(echo $line| awk '{print $2}')" + local revision="$(echo $line| awk '{print $3}')" + local branchname="$(echo $line| awk '{print $4}')" + echo " " >> "${SRC_DIR}"/manifest.xml + done < "${SRC_DIR}"/code.list.sort + echo "" >> "${SRC_DIR}"/manifest.xml + rm -f "${SRC_DIR}"/code.list.sort +} + +update_code_repo() +{ + local repo="$1" + local branch="-b $2" + local realdir="$3" + local commitid="$4" + local pkg="$(basename ${repo} | sed "s|\.git$||g")" + local branchname="$2" + [[ -z "$branchname" ]] && exit 1 + [[ -z "$pkg" ]] && exit 1 + #branch is also commitid,cannot clone -b + [[ "$branchname" == "$commitid" ]] && branch="" + #change dir name if required + [[ -z "${realdir}" ]] || pkg="$(basename ${realdir})" + #shallow clone for linux kernel as it's too large + [[ "${pkg}" == "kernel-5.10" ]] && local git_param="--depth 1" + test -d "${SRC_DIR}" || mkdir -p "${SRC_DIR}" + pushd "${SRC_DIR}" >/dev/null + # if git repo exits, continue, or clone the package repo + test -d ./"${pkg}"/.git || { rm -rf ./"${pkg}";git clone "${URL_PREFIX}/${repo}" ${branch} ${git_param} -v "${pkg}"; } + + pushd ./"${pkg}" >/dev/null + # checkout to branch, or report failure + git pull + git checkout ${branchname} || { echo "ERROR: checkout ${repo} ${branchname} to ${pkg} failed";exit 1; } + if git branch -a | grep -q "/${branchname}$";then + git branch | grep "^*" | grep -q " ${branchname}$" || exit 1 + # pull from orgin + git config pull.ff only + git pull || echo "git pull failure, please check ${pkg}" + git status | grep -Eq "is up to date with|is up-to-date with" || exit 1 + fi + + #check if checkout tag successfully + local newest_commitid="$(git log --pretty=oneline -n1 | awk '{print $1}')" + if git tag -l | grep "^${branchname}$";then + branchname="refs/tags/${branchname}" + tagcommit=$(git show "${branchname}" | grep "^commit " | awk '{print $NF}') + if [[ "${tagcommit}" != "${newest_commitid}" ]];then + echo "${repo} ${branchname} checkout failed" + exit 1 + fi + fi + + if [ ! -z "$commitid" ];then + git reset --hard "$commitid" + fi + #update the code list + echo "${repo} ${pkg} ${newest_commitid} ${branchname}" >> "${SRC_DIR}"/code.list + echo -e "===== Successfully download ${repo} ${branchname} ${newest_commitid} -> ${pkg} ...\n" + popd >/dev/null + popd >/dev/null +} + + +download_by_manifest() +{ + while read line + do + echo "$line" | grep -q "\n" +} + +check_use() +{ + if [ -n "$BASH_SOURCE" ]; then + THIS_SCRIPT="$BASH_SOURCE" + elif [ -n "$ZSH_NAME" ]; then + THIS_SCRIPT="$0" + else + THIS_SCRIPT="$(pwd)/compile.sh" + if [ ! -e "$THIS_SCRIPT" ]; then + echo "Error: $THIS_SCRIPT doesn't exist!" + return 1 + fi + fi + + if [ "$0" != "$THIS_SCRIPT" ]; then + echo "Error: This script cannot be sourced. Please run as 'sh $THIS_SCRIPT'" >&2 + usage + return 1 + fi +} + +main() +{ + SRC_DIR="$1" + # the git branch to sync, you can set branch/tag/commitid + SRC_BRANCH="$2" + # manifest file include the git url, revision, path info + MANIFEST="$3" + KERNEL_BRANCH="5.10.0-60.18.0" + + check_use || return 1 + set -e + + if [[ -z "${SRC_DIR}" ]];then + SRC_DIR="$(cd $(dirname $0)/../../;pwd)" + fi + SRC_DIR="$(realpath ${SRC_DIR})" + + if [[ -z "${SRC_BRANCH}" ]];then + # the latest release branch + SRC_BRANCH="openEuler-22.03-LTS" + fi + [[ -z "${KERNEL_BRANCH}" ]] && KERNEL_BRANCH="${SRC_BRANCH}" + + URL_PREFIX="https://gitee.com/" + if [ -f "${MANIFEST}" ];then + download_by_manifest + elif [ "$1" == "dsoftbus" ];then + SRC_DIR="$(cd $(dirname $0)/../../;pwd)" + download_dsoftbus_code + else + download_code + download_iSulad_code + download_dsoftbus_code + create_manifest + fi +} + +main "$@" diff --git a/scripts/requirements-doc.txt b/scripts/requirements-doc.txt new file mode 100644 index 0000000000000000000000000000000000000000..88aec3d9346f1aeaf975b5fa011a53622e08803e --- /dev/null +++ b/scripts/requirements-doc.txt @@ -0,0 +1,9 @@ +# DOC: used to generate docs + +breathe~=4.23,!=4.29.0 +sphinx~=3.3 +sphinx_rtd_theme>=0.5.2,<1.0 +sphinx-tabs +sphinxcontrib-svg2pdfconverter +pygments~=2.9 +sphinx-notfound-page>=0.6 \ No newline at end of file