From bfcb44c332ff157985357212c20b386b95d923bd Mon Sep 17 00:00:00 2001 From: yafen Date: Mon, 31 Aug 2020 18:14:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 21 +-- README.md | 21 +-- ...67\345\206\231\351\225\234\345\203\217.md" | 4 +- .../{build-img.sh => build-image-common.sh} | 17 +-- ...ld-img-docker.sh => build-image-docker.sh} | 4 +- .../{build-img-quick.sh => build-image.sh} | 19 ++- .../Dockerfile_makeraspi | 6 +- .../License/LICENCE.COPYING.linux | 0 .../License/LICENCE.bluez-firmware | 0 .../License/LICENCE.broadcom | 0 .../License/LICENCE.broadcom_bcm43xx | 0 .../License/LICENCE.pi-bluetooth | 0 .../License/LICENCE.wireless-regdb | 0 .../{config-quick => config-common}/chroot.sh | 0 .../config.txt | 0 scripts/config-common/hosts | 1 + .../{config-quick => config-common}/ifup-eth0 | 0 .../openEuler-20.03-LTS.repo | 0 .../{config-quick => config-common}/rpmlist | 3 - scripts/config-quick/hosts | 1 - scripts/{config-quick => config}/99-com.rules | 0 .../LICENCE.raspberrypi-sys-mods | 0 scripts/config/chroot.sh | 1 - scripts/config/config.txt | 130 +++++++++--------- .../openEuler-20.09.repo | 0 scripts/config/rpmlist | 3 + 26 files changed, 112 insertions(+), 119 deletions(-) rename scripts/{build-img.sh => build-image-common.sh} (97%) rename scripts/{build-img-docker.sh => build-image-docker.sh} (96%) rename scripts/{build-img-quick.sh => build-image.sh} (96%) rename scripts/{config => config-common}/Dockerfile_makeraspi (58%) rename scripts/{config => config-common}/License/LICENCE.COPYING.linux (100%) rename scripts/{config => config-common}/License/LICENCE.bluez-firmware (100%) rename scripts/{config => config-common}/License/LICENCE.broadcom (100%) rename scripts/{config => config-common}/License/LICENCE.broadcom_bcm43xx (100%) rename scripts/{config => config-common}/License/LICENCE.pi-bluetooth (100%) rename scripts/{config => config-common}/License/LICENCE.wireless-regdb (100%) rename scripts/{config-quick => config-common}/chroot.sh (100%) rename scripts/{config-quick => config-common}/config.txt (100%) create mode 120000 scripts/config-common/hosts rename scripts/{config-quick => config-common}/ifup-eth0 (100%) rename scripts/{config => config-common}/openEuler-20.03-LTS.repo (100%) rename scripts/{config-quick => config-common}/rpmlist (71%) delete mode 120000 scripts/config-quick/hosts rename scripts/{config-quick => config}/99-com.rules (100%) rename scripts/{config-quick => config}/LICENCE.raspberrypi-sys-mods (100%) rename scripts/{config-quick => config}/openEuler-20.09.repo (100%) diff --git a/README.en.md b/README.en.md index 49ee80a..5c8950f 100644 --- a/README.en.md +++ b/README.en.md @@ -21,8 +21,9 @@ You can get introduction of openEuler RaspberryPi SIG from [sig-RaspberryPi](htt ## Files and Directories - [scripts](./scripts): Script for building openEuler image for Raspberry Pi - - [Build on host](scripts/build-img.sh) - - [Build in a Docker container](scripts/build-img-docker.sh) + - [Quickly Build(without kernel compilation)](scripts/build-image.sh) + - [Build on host(with kernel compilation)](scripts/build-image-common.sh) + - [Build in a Docker container(with kernel compilation)](scripts/build-image-docker.sh) - [documents](./documents/): - [Building openEuler image for Raspberry Pi](documents/openEuler镜像的构建.md) - [Cross-compile the kernel](documents/交叉编译内核.md) @@ -43,7 +44,7 @@ Basic information of the above image: - Kernel version: 4.19.90-2005.2.0.0002 - Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) - Repository of rootfs: [openEuler-20.03-LTS](http://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/) -- Repository inside the image: [openEuler 20.03 LTS repository](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config/openEuler-20.03-LTS.repo) +- Repository inside the image: [openEuler 20.03 LTS repository](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config-common/openEuler-20.03-LTS.repo) ## How to Use image @@ -70,7 +71,7 @@ Build images with packages of raspberrypi-kernel, raspberrypi-firmware, and rasp Run the following command to build an image: -`sudo bash build-img-quick.sh -d DIR -r REPO -n IMAGE_NAME` +`sudo bash build-image.sh -d DIR -r REPO -n IMAGE_NAME` The meaning of each parameter: @@ -84,10 +85,10 @@ The meaning of each parameter: The URL/path of target repo file, or the list of repositories' baseurls. Note that, the baseurls should be separated by space and enclosed in double quotes. - By default, the parameter is the path of the repo file which should be in the `openEuler` directory. Examples are as follows: + By default, the parameter is the path of the repo file which should be in the `config` directory. Examples are as follows: - The URL of target repo file: `https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - The path of target repo file: `/opt/raspi-image-build/openEuler/openEuler-20.03-LTS.repo` + - The path of target repo file: `./config/openEuler-20.09.repo` - List of repo's baseurls: `"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` 3. -n, --name IMAGE_NAME @@ -108,7 +109,7 @@ Here, we provide two approaches to build an image, which both include compiling Run the following command to build an image: -`sudo bash build-img.sh -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` +`sudo bash build-image-common.sh -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` The meaning of each parameter: @@ -134,10 +135,10 @@ The meaning of each parameter: The URL/path of target repo file, or the list of repositories' baseurls. Note that, the baseurls should be separated by space and enclosed in double quotes. - By default, the parameter is the path of the repo file which should be in the `openEuler` directory. Examples are as follows: + By default, the parameter is the path of the repo file which should be in the `config-common` directory. Examples are as follows: - The URL of target repo file: `https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - The path of target repo file: `/opt/raspi-image-build/openEuler/openEuler-20.03-LTS.repo` + - The path of target repo file: `./config-common/openEuler-20.03-LTS.repo` - List of repo's baseurls: `"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` 6. --cores N @@ -148,7 +149,7 @@ The meaning of each parameter: Run the following command to build an image: -`sudo bash build-img-docker.sh -d DOCKER_FILE -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` +`sudo bash build-image-docker.sh -d DOCKER_FILE -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` Caution, before running the script, you need to install Docker. The script will automatically import the Docker image into the local system according to the script's parameter: DOCKER_FILE. diff --git a/README.md b/README.md index caf37ef..d6ce1a1 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ SIG 组基本信息位于 [sig-RaspberryPi](https://gitee.com/jianminw/community ## 仓库目录 - [scripts](./scripts): 构建 openEuler 树莓派镜像的脚本 - - [主机上构建](scripts/build-img.sh) - - [Docker 容器中构建](scripts/build-img-docker.sh) + - [快速构建(不编译内核)](scripts/build-image.sh) + - [主机上构建(编译内核)](scripts/build-image-common.sh) + - [Docker 容器中构建(编译内核)](scripts/build-image-docker.sh) - [documents](./documents/): 使用文档 - [openEuler 镜像的构建](documents/openEuler镜像的构建.md) - [交叉编译内核](documents/交叉编译内核.md) @@ -42,7 +43,7 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu - 内核版本:4.19.90-2005.2.0.0002 - 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) - 构建文件系统的源仓库:[openEuler-20.03-LTS](http://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/) -- 镜像内置源仓库:[openEuler 20.03 LTS 源仓库](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config/openEuler-20.03-LTS.repo) +- 镜像内置源仓库:[openEuler 20.03 LTS 源仓库](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config-common/openEuler-20.03-LTS.repo) ## 使用镜像 @@ -72,7 +73,7 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 构建镜像需执行命令: -`sudo bash build-img-quick.sh -d DIR -r REPO -n IMAGE_NAME` +`sudo bash build-image.sh -d DIR -r REPO -n IMAGE_NAME` 各个参数意义: @@ -86,9 +87,9 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。 - 默认使用脚本所在目录的 openEuler 文件夹下的 repo 文件。下面分别举例: + 默认使用脚本所在目录的 config 文件夹下的 repo 文件。下面分别举例: - 开发源 repo 文件的 URL:`https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - 开发源的 repo 文件路径:`/opt/raspi-image-build/openEuler/openEuler-20.03-LTS.repo` + - 开发源的 repo 文件路径:`./config/openEuler-20.09.repo` - 资源库的 baseurl 列表:`"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` 3. -n, --name IMAGE_NAME @@ -111,7 +112,7 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 构建镜像需执行命令: -`sudo bash build-img.sh -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` +`sudo bash build-image-common.sh -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` 各个参数意义: @@ -137,9 +138,9 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。 - 默认使用脚本所在目录的 openEuler 文件夹下的 repo 文件。下面分别举例: + 默认使用脚本所在目录的 config-common 文件夹下的 repo 文件。下面分别举例: - 开发源 repo 文件的 URL:`https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - 开发源的 repo 文件路径:`/opt/raspi-image-build/openEuler/openEuler-20.03-LTS.repo` + - 开发源的 repo 文件路径:`./config-common/openEuler-20.03-LTS.repo` - 资源库的 baseurl 列表:`"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` 6. --cores N @@ -150,7 +151,7 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 构建镜像需执行命令: -`sudo bash build-img-docker.sh -d DOCKER_FILE -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` +`sudo bash build-image-docker.sh -d DOCKER_FILE -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N` 注意!!!运行该脚本前,需安装 Docker 运行环境。该脚本会自动将 DOCKER_FILE 参数对应的 Docker 镜像导入本机系统中。 diff --git "a/documents/\345\210\267\345\206\231\351\225\234\345\203\217.md" "b/documents/\345\210\267\345\206\231\351\225\234\345\203\217.md" index 39c65c2..b50ad7b 100644 --- "a/documents/\345\210\267\345\206\231\351\225\234\345\203\217.md" +++ "b/documents/\345\210\267\345\206\231\351\225\234\345\203\217.md" @@ -64,8 +64,8 @@ 1. 下载并安装刷写镜像的工具,以下操作以 Win32 Disk Imager 工具为例。 2. 右键选择“以管理员身份运行”,打开 Win32 Disk Imager。 -3. 选择镜像 img 文件。 -4. 选择待写入的 SD 卡盘符。 +3. 在“映像文件”中选择 img 格式的镜像文件路径。 +4. 在“设备”中选择待写入的 SD 卡盘符。 5. 单击“写入”。如下图所示,界面通过任务进度条显示写入 SD 卡的进度。 ![](images/写入SD.png) diff --git a/scripts/build-img.sh b/scripts/build-image-common.sh similarity index 97% rename from scripts/build-img.sh rename to scripts/build-image-common.sh index b9b55c2..10276d6 100644 --- a/scripts/build-img.sh +++ b/scripts/build-image-common.sh @@ -2,7 +2,7 @@ set -e __usage=" -Usage: build-img [OPTIONS] +Usage: build-image-common [OPTIONS] Build raspberrypi image. Options: @@ -142,16 +142,9 @@ prepare(){ mkdir ${cur_dir}/log fi LOG "prepare begin..." - rmp_names=("bison" "flex" "parted" "wget" "multipath-tools") - rmp_install_names=("bison" "flex" "parted" "wget" "kpartx") - rmp_len=${#rmp_names[@]} - for (( i=0; i<${rmp_len}; i++ )) - do - rpm -qa | grep ${rmp_names[i]} &> /dev/null - [ $? -eq 0 ] || yum install -y ${rmp_install_names[i]} &> /dev/null - [ $? -ne 0 ] && ERROR "yum install ${rmp_install_names[i]} failed." && yum_right=3 - done - [ $yum_right ] && exit 3 + dnf makecache + dnf install -y git bison flex wget dnf-plugins-core tar parted dosfstools grep bash xz kpartx + if [ ! -d ${run_dir}/img ]; then mkdir ${run_dir}/img fi @@ -605,7 +598,7 @@ output_dir=${run_dir}/output rootfs_dir=${run_dir}/rootfs_${builddate} root_mnt=${run_dir}/root boot_mnt=${run_dir}/boot -euler_dir=${cur_dir}/config +euler_dir=${cur_dir}/config-common CONFIG_RPM_LIST=${euler_dir}/rpmlist prepare diff --git a/scripts/build-img-docker.sh b/scripts/build-image-docker.sh similarity index 96% rename from scripts/build-img-docker.sh rename to scripts/build-image-docker.sh index d77ccd8..816b226 100644 --- a/scripts/build-img-docker.sh +++ b/scripts/build-image-docker.sh @@ -3,7 +3,7 @@ set -e __usage=" -Usage: build-img-docker [OPTIONS] +Usage: build-image-docker [OPTIONS] Build raspberrypi image. Options: @@ -136,7 +136,7 @@ docker_file_name=${docker_file##*/} docker_img_name=`docker load --input ${cur_dir}/tmp/${docker_file_name}` docker_img_name=${docker_img_name##*: } -(echo "FROM $docker_img_name" && grep -v FROM ${cur_dir}/config/Dockerfile_makeraspi) | docker build -t ${docker_img_name}-${buildid} --no-cache -f- . +(echo "FROM $docker_img_name" && grep -v FROM ${cur_dir}/config-common/Dockerfile_makeraspi) | docker build -t ${docker_img_name}-${buildid} --no-cache -f- . echo docker run --rm --privileged=true -v ${cur_dir}:/work ${docker_img_name}-${buildid} ${params} docker run --rm --privileged=true -v ${cur_dir}:/work ${docker_img_name}-${buildid} ${params} chmod -R a+r ${cur_dir}/img diff --git a/scripts/build-img-quick.sh b/scripts/build-image.sh similarity index 96% rename from scripts/build-img-quick.sh rename to scripts/build-image.sh index 5e95c3a..8c03bbf 100644 --- a/scripts/build-img-quick.sh +++ b/scripts/build-image.sh @@ -3,11 +3,11 @@ set -e __usage=" -Usage: build-img-quick [OPTIONS] +Usage: build-image [OPTIONS] Build raspberrypi image. Options: - -d, --dir DIR The directory for storing the image and other temporary files. If the DIR does not exist, it will be created automatically. + -d, --dir DIR The directory for storing the image and other temporary files, which defaults to be the directory in which the script resides. If the DIR does not exist, it will be created automatically. -r, --repo REPO_INFO The URL/path of target repo file or list of repo's baseurls which should be a space separated list. -n, --name IMAGE_NAME The raspberrypi image name to be built. -h, --help Show command help. @@ -114,8 +114,8 @@ prepare(){ mkdir -p ${log_dir} fi LOG "prepare begin..." - # dnf makecache - # dnf install -y dnf-plugins-core tar parted dosfstools + dnf makecache + dnf install -y dnf-plugins-core tar parted dosfstools grep bash xz kpartx if [ -d ${rootfs_dir} ]; then rm -rf ${rootfs_dir} @@ -320,14 +320,15 @@ if [ "$EUID" -ne 0 ]; then exit fi -workdir=$(cd $(dirname $0);pwd) +cur_dir=$(cd $(dirname $0);pwd) +workdir=${cur_dir} parseargs "$@" || help $? -if [ "x$workdir" == "x" ] ; then +if [ "x$workdir" == "x" ]; then echo `date` - ERROR, \"-d DIR or --dir DIR\" missing. help 2 -elif [ ! -d ${workdir} ] ; then +elif [ ! -d ${workdir} ]; then echo `date` - INFO, output dir ${workdir} does not exists. mkdir -p ${workdir} echo `date` - INFO, output dir: ${workdir} created. @@ -335,7 +336,6 @@ fi OS_NAME=openEuler -cur_dir=$(cd $(dirname $0);pwd) workdir=$(cd "$(dirname $workdir)"; pwd)/$(basename $workdir) rootfs_dir=${workdir}/raspi_output/rootfs root_mnt=${workdir}/raspi_output/root @@ -343,10 +343,9 @@ boot_mnt=${workdir}/raspi_output/boot tmp_dir=${workdir}/raspi_output/tmp log_dir=${workdir}/raspi_output/log img_dir=${workdir}/raspi_output/img -euler_dir=${cur_dir}/config-quick +euler_dir=${cur_dir}/config CONFIG_RPM_LIST=${euler_dir}/rpmlist - builddate=$(date +%Y%m%d) prepare diff --git a/scripts/config/Dockerfile_makeraspi b/scripts/config-common/Dockerfile_makeraspi similarity index 58% rename from scripts/config/Dockerfile_makeraspi rename to scripts/config-common/Dockerfile_makeraspi index 345449e..7fee3d9 100644 --- a/scripts/config/Dockerfile_makeraspi +++ b/scripts/config-common/Dockerfile_makeraspi @@ -2,15 +2,15 @@ FROM openeuler-20.03-lts:latest RUN dnf clean expire-cache -COPY config/openEuler-20.03-LTS.repo /etc/yum.repos.d/openEuler-20.03-LTS.repo +COPY config-common/openEuler-20.03-LTS.repo /etc/yum.repos.d/openEuler-20.03-LTS.repo RUN dnf -y install cmake gdb gcc gcc-c++ libstdc++-static ncurses ncurses-devel make python bash coreutils && \ dnf -y clean all -RUN dnf -y install module-init-tools git openssl-devel bc bison flex dosfstools parted wget device-mapper-multipath +RUN dnf -y install module-init-tools git openssl-devel bc bison flex dnf-plugins-core dosfstools parted wget device-mapper-multipath grep xz kpartx RUN dnf -y install tar passwd diffutils ENV SHELL=/bin/bash -ENTRYPOINT ["/bin/bash", "/work/build-img.sh"] +ENTRYPOINT ["/bin/bash", "/work/build-image-common.sh"] diff --git a/scripts/config/License/LICENCE.COPYING.linux b/scripts/config-common/License/LICENCE.COPYING.linux similarity index 100% rename from scripts/config/License/LICENCE.COPYING.linux rename to scripts/config-common/License/LICENCE.COPYING.linux diff --git a/scripts/config/License/LICENCE.bluez-firmware b/scripts/config-common/License/LICENCE.bluez-firmware similarity index 100% rename from scripts/config/License/LICENCE.bluez-firmware rename to scripts/config-common/License/LICENCE.bluez-firmware diff --git a/scripts/config/License/LICENCE.broadcom b/scripts/config-common/License/LICENCE.broadcom similarity index 100% rename from scripts/config/License/LICENCE.broadcom rename to scripts/config-common/License/LICENCE.broadcom diff --git a/scripts/config/License/LICENCE.broadcom_bcm43xx b/scripts/config-common/License/LICENCE.broadcom_bcm43xx similarity index 100% rename from scripts/config/License/LICENCE.broadcom_bcm43xx rename to scripts/config-common/License/LICENCE.broadcom_bcm43xx diff --git a/scripts/config/License/LICENCE.pi-bluetooth b/scripts/config-common/License/LICENCE.pi-bluetooth similarity index 100% rename from scripts/config/License/LICENCE.pi-bluetooth rename to scripts/config-common/License/LICENCE.pi-bluetooth diff --git a/scripts/config/License/LICENCE.wireless-regdb b/scripts/config-common/License/LICENCE.wireless-regdb similarity index 100% rename from scripts/config/License/LICENCE.wireless-regdb rename to scripts/config-common/License/LICENCE.wireless-regdb diff --git a/scripts/config-quick/chroot.sh b/scripts/config-common/chroot.sh similarity index 100% rename from scripts/config-quick/chroot.sh rename to scripts/config-common/chroot.sh diff --git a/scripts/config-quick/config.txt b/scripts/config-common/config.txt similarity index 100% rename from scripts/config-quick/config.txt rename to scripts/config-common/config.txt diff --git a/scripts/config-common/hosts b/scripts/config-common/hosts new file mode 120000 index 0000000..6f4bd48 --- /dev/null +++ b/scripts/config-common/hosts @@ -0,0 +1 @@ +../config/hosts \ No newline at end of file diff --git a/scripts/config-quick/ifup-eth0 b/scripts/config-common/ifup-eth0 similarity index 100% rename from scripts/config-quick/ifup-eth0 rename to scripts/config-common/ifup-eth0 diff --git a/scripts/config/openEuler-20.03-LTS.repo b/scripts/config-common/openEuler-20.03-LTS.repo similarity index 100% rename from scripts/config/openEuler-20.03-LTS.repo rename to scripts/config-common/openEuler-20.03-LTS.repo diff --git a/scripts/config-quick/rpmlist b/scripts/config-common/rpmlist similarity index 71% rename from scripts/config-quick/rpmlist rename to scripts/config-common/rpmlist index 59f2fea..e5e664b 100644 --- a/scripts/config-quick/rpmlist +++ b/scripts/config-common/rpmlist @@ -12,7 +12,4 @@ hostname ntp bluez pulseaudio-module-bluetooth -raspberrypi-kernel -raspberrypi-firmware -raspberrypi-bluetooth openEuler-repos \ No newline at end of file diff --git a/scripts/config-quick/hosts b/scripts/config-quick/hosts deleted file mode 120000 index 9318ace..0000000 --- a/scripts/config-quick/hosts +++ /dev/null @@ -1 +0,0 @@ -../config//hosts \ No newline at end of file diff --git a/scripts/config-quick/99-com.rules b/scripts/config/99-com.rules similarity index 100% rename from scripts/config-quick/99-com.rules rename to scripts/config/99-com.rules diff --git a/scripts/config-quick/LICENCE.raspberrypi-sys-mods b/scripts/config/LICENCE.raspberrypi-sys-mods similarity index 100% rename from scripts/config-quick/LICENCE.raspberrypi-sys-mods rename to scripts/config/LICENCE.raspberrypi-sys-mods diff --git a/scripts/config/chroot.sh b/scripts/config/chroot.sh index 954cf62..405262a 100755 --- a/scripts/config/chroot.sh +++ b/scripts/config/chroot.sh @@ -1,5 +1,4 @@ #!/bin/bash -set -e systemctl enable sshd systemctl enable ntpd systemctl enable hciuart diff --git a/scripts/config/config.txt b/scripts/config/config.txt index 548f4ac..9a8ef12 100644 --- a/scripts/config/config.txt +++ b/scripts/config/config.txt @@ -1,65 +1,65 @@ -# For more options and information see -# http://rpf.io/configtxt -# Some settings may impact device functionality. See link above for details - -# uncomment if you get no picture on HDMI for a default "safe" mode -#hdmi_safe=1 - -# uncomment this if your display has a black border of unused pixels visible -# and your display can output without overscan -#disable_overscan=1 - -# uncomment the following to adjust overscan. Use positive numbers if console -# goes off screen, and negative if there is too much border -#overscan_left=16 -#overscan_right=16 -#overscan_top=16 -#overscan_bottom=16 - -# uncomment to force a console size. By default it will be display's size minus -# overscan. -#framebuffer_width=1280 -#framebuffer_height=720 - -# uncomment if hdmi display is not detected and composite is being output -#hdmi_force_hotplug=1 - -# uncomment to force a specific HDMI mode (this will force VGA) -#hdmi_group=1 -#hdmi_mode=1 - -# uncomment to force a HDMI mode rather than DVI. This can make audio work in -# DMT (computer monitor) modes -#hdmi_drive=2 - -# uncomment to increase signal to HDMI, if you have interference, blanking, or -# no display -#config_hdmi_boost=4 - -# uncomment for composite PAL -#sdtv_mode=2 - -#uncomment to overclock the arm. 700 MHz is the default. -#arm_freq=800 - -# Uncomment some or all of these to enable the optional hardware interfaces -#dtparam=i2c_arm=on -#dtparam=i2s=on -#dtparam=spi=on - -# Uncomment this to enable infrared communication. -#dtoverlay=gpio-ir,gpio_pin=17 -#dtoverlay=gpio-ir-tx,gpio_pin=18 - -# Additional overlays and parameters are documented /boot/overlays/README - -# Enable audio (loads snd_bcm2835) -dtparam=audio=on - -[pi4] -# Enable DRM VC4 V3D driver on top of the dispmanx display stack -dtoverlay=vc4-fkms-v3d -max_framebuffers=2 - -[all] -#dtoverlay=vc4-fkms-v3d +# For more options and information see +# http://rpf.io/configtxt +# Some settings may impact device functionality. See link above for details + +# uncomment if you get no picture on HDMI for a default "safe" mode +#hdmi_safe=1 + +# uncomment this if your display has a black border of unused pixels visible +# and your display can output without overscan +#disable_overscan=1 + +# uncomment the following to adjust overscan. Use positive numbers if console +# goes off screen, and negative if there is too much border +#overscan_left=16 +#overscan_right=16 +#overscan_top=16 +#overscan_bottom=16 + +# uncomment to force a console size. By default it will be display's size minus +# overscan. +#framebuffer_width=1280 +#framebuffer_height=720 + +# uncomment if hdmi display is not detected and composite is being output +#hdmi_force_hotplug=1 + +# uncomment to force a specific HDMI mode (this will force VGA) +#hdmi_group=1 +#hdmi_mode=1 + +# uncomment to force a HDMI mode rather than DVI. This can make audio work in +# DMT (computer monitor) modes +#hdmi_drive=2 + +# uncomment to increase signal to HDMI, if you have interference, blanking, or +# no display +#config_hdmi_boost=4 + +# uncomment for composite PAL +#sdtv_mode=2 + +#uncomment to overclock the arm. 700 MHz is the default. +#arm_freq=800 + +# Uncomment some or all of these to enable the optional hardware interfaces +#dtparam=i2c_arm=on +#dtparam=i2s=on +#dtparam=spi=on + +# Uncomment this to enable infrared communication. +#dtoverlay=gpio-ir,gpio_pin=17 +#dtoverlay=gpio-ir-tx,gpio_pin=18 + +# Additional overlays and parameters are documented /boot/overlays/README + +# Enable audio (loads snd_bcm2835) +dtparam=audio=on + +[pi4] +# Enable DRM VC4 V3D driver on top of the dispmanx display stack +dtoverlay=vc4-fkms-v3d +max_framebuffers=2 + +[all] +#dtoverlay=vc4-fkms-v3d diff --git a/scripts/config-quick/openEuler-20.09.repo b/scripts/config/openEuler-20.09.repo similarity index 100% rename from scripts/config-quick/openEuler-20.09.repo rename to scripts/config/openEuler-20.09.repo diff --git a/scripts/config/rpmlist b/scripts/config/rpmlist index e5e664b..59f2fea 100644 --- a/scripts/config/rpmlist +++ b/scripts/config/rpmlist @@ -12,4 +12,7 @@ hostname ntp bluez pulseaudio-module-bluetooth +raspberrypi-kernel +raspberrypi-firmware +raspberrypi-bluetooth openEuler-repos \ No newline at end of file -- Gitee From e12f4c8cc18c3c0c0e942a84ff9e033fd19ebd96 Mon Sep 17 00:00:00 2001 From: yafen Date: Fri, 4 Sep 2020 16:33:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E8=84=9A=E6=9C=AC=E9=BB=98=E8=AE=A4=E7=9A=84?= =?UTF-8?q?repo=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8F=91=E5=B8=83=20openEuler?= =?UTF-8?q?=2020.09=20=E5=86=85=E6=B5=8B=E7=89=88=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 76 +++++++++++++++++++++-------- README.md | 75 ++++++++++++++++++++-------- documents/changelog-20.09.en.md | 15 ++++++ documents/changelog-20.09.md | 15 ++++++ scripts/build-image-common.sh | 17 ++++--- scripts/build-image-docker.sh | 11 ++++- scripts/build-image.sh | 18 ++++--- scripts/config/openEuler-20.09.repo | 20 -------- 8 files changed, 174 insertions(+), 73 deletions(-) create mode 100644 documents/changelog-20.09.en.md create mode 100644 documents/changelog-20.09.md delete mode 100644 scripts/config/openEuler-20.09.repo diff --git a/README.en.md b/README.en.md index 5c8950f..365e1cd 100644 --- a/README.en.md +++ b/README.en.md @@ -29,22 +29,40 @@ You can get introduction of openEuler RaspberryPi SIG from [sig-RaspberryPi](htt - [Cross-compile the kernel](documents/交叉编译内核.md) - [Install openEuler on a SD card](documents/刷写镜像.md) - [How to use Raspberry Pi](documents/树莓派使用.md) - - [ChangeLog](documents/changelog.en.md) + - [openEuler 20.03 LTS ChangeLog](documents/changelog.en.md) + - [openEuler 20.09 ChangeLog](documents/changelog-20.09.en.md) ## How to download latest image -Alpha version of openEuler 20.03 LTS image for Raspberry Pi, [download](https://isrc.iscas.ac.cn/eulixos/repo/others/openeuler-raspberrypi/images/openEuler-20.03-LTS-aarch64-raspi.img.xz). +1. openEuler 20.03 LTS -Basic information of the above image: + Alpha version of openEuler 20.03 LTS image for Raspberry Pi, [download](https://isrc.iscas.ac.cn/eulixos/repo/others/openeuler-raspberrypi/images/openEuler-20.03-LTS-aarch64-raspi.img.xz). -- [ChangeLog](documents/changelog.en.md) -- Release date: 2020-08-10 -- Size: 259 MiB -- OS version: openEuler 20.03 LTS -- Kernel version: 4.19.90-2005.2.0.0002 -- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) -- Repository of rootfs: [openEuler-20.03-LTS](http://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/) -- Repository inside the image: [openEuler 20.03 LTS repository](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config-common/openEuler-20.03-LTS.repo) + Basic information of the above image: + + - [ChangeLog](documents/changelog.en.md) + - Release date: 2020-08-10 + - Size: 259 MiB + - OS version: openEuler 20.03 LTS + - Kernel version: 4.19.90-2005.2.0.0002 + - Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) + - Repository of rootfs: [openEuler 20.03 LTS](rhttp://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/) + - Repository inside the image: [openEuler 20.03 LTS repository](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config-common/openEuler-20.03-LTS.repo) + +2. openEuler 20.09 + + Alpha version of openEuler 20.09 image for Raspberry Pi, [download](https://isrc.iscas.ac.cn/eulixos/repo/others/openeuler-raspberrypi/images/openEuler-20.09-aarch64-raspi.img.xz). + + Basic information of the above image: + + - [ChangeLog](documents/changelog-20.09.en.md) + - Release date: 2020-09-04 + - Size: 237 MiB + - OS version: openEuler 20.09 + - Kernel version: 4.19.140-2008.3.0.0001 + - Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) + - Repository of rootfs: [openEuler 20.09 repository built daily](http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/) + - Repository inside the image: [openEuler 20.09 repository](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.09/generic.repo) ## How to Use image @@ -67,6 +85,9 @@ Refer to [Script for building openEuler image for Raspberry Pi](documents/openEu #### Quickly Build without kernel compilation(Recommended) +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>Only openEuler 20.09 is supported currently. + Build images with packages of raspberrypi-kernel, raspberrypi-firmware, and raspberrypi-bluetooth. Run the following command to build an image: @@ -85,17 +106,32 @@ The meaning of each parameter: The URL/path of target repo file, or the list of repositories' baseurls. Note that, the baseurls should be separated by space and enclosed in double quotes. - By default, the parameter is the path of the repo file which should be in the `config` directory. Examples are as follows: + Examples are as follows: - - The URL of target repo file: `https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - The path of target repo file: `./config/openEuler-20.09.repo` - - List of repo's baseurls: `"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` + - The URL of target repo file: *currently unavailable* + - The path of target repo file: `./openEuler-20.09.repo` + + The content of the repo file is as follows: + ``` + [MAINLINE] + name=MAINLINE + baseurl=http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/ + enabled=1 + gpgcheck=0 + + [EPOL] + name=EPOL + baseurl=http://119.3.219.20:82/openEuler:/Epol/standard_aarch64/ + enabled=1 + gpgcheck=0 + ``` + - List of repo's baseurls: `"http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/ http://119.3.219.20:82/openEuler:/Epol/standard_aarch64/"` 3. -n, --name IMAGE_NAME The image name to be built. - For example, `openEuler-20.03-LTS.img`. The default is `openEuler-20.09-aarch64-raspi.img`, or it is automatically generated based on parameter: `-r, --repo REPO_INFO`. + For example, `openEuler-20.09.img`. The default is `openEuler-aarch64-raspi.img`, or it is automatically generated based on parameter: `-r, --repo REPO_INFO`. 4. -h, --help @@ -117,7 +153,7 @@ The meaning of each parameter: The image name to be built. - For example, `openEuler-20.03-LTS.img`. The default is `openEuler-20.03-LTS-aarch64-raspi.img`, or it is automatically generated based on parameter: `-r, --repo REPO_INFO`. + For example, `openEuler-20.03-LTS.img`. The default is `openEuler-aarch64-raspi.img`, or it is automatically generated based on parameter: `-r, --repo REPO_INFO`. 2. -k, --kernel KERNEL_URL @@ -135,10 +171,12 @@ The meaning of each parameter: The URL/path of target repo file, or the list of repositories' baseurls. Note that, the baseurls should be separated by space and enclosed in double quotes. - By default, the parameter is the path of the repo file which should be in the `config-common` directory. Examples are as follows: + Examples are as follows: - The URL of target repo file: `https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - The path of target repo file: `./config-common/openEuler-20.03-LTS.repo` + - The path of target repo file: `./openEuler-20.03-LTS.repo` + + Refer to `https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` for details about the content of the repo file. - List of repo's baseurls: `"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` 6. --cores N diff --git a/README.md b/README.md index d6ce1a1..788a5e0 100644 --- a/README.md +++ b/README.md @@ -27,23 +27,40 @@ SIG 组基本信息位于 [sig-RaspberryPi](https://gitee.com/jianminw/community - [交叉编译内核](documents/交叉编译内核.md) - [刷写镜像](documents/刷写镜像.md) - [树莓派使用](documents/树莓派使用.md) - - [更新日志](documents/changelog.md) + - [openEuler 20.03 LTS 更新日志](documents/changelog.md) + - [openEuler 20.09 更新日志](documents/changelog-20.09.md) ## 最新镜像 -openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eulixos/repo/others/openeuler-raspberrypi/images/openEuler-20.03-LTS-aarch64-raspi.img.xz)。 +1. openEuler 20.03 LTS + openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eulixos/repo/others/openeuler-raspberrypi/images/openEuler-20.03-LTS-aarch64-raspi.img.xz)。 -该镜像的基本信息: + 该镜像的基本信息: -- [更新日志](documents/changelog.md) -- 发布时间:2020-08-10 -- 大小:259 MiB -- 操作系统版本:openEuler 20.03 LTS -- 内核版本:4.19.90-2005.2.0.0002 -- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) -- 构建文件系统的源仓库:[openEuler-20.03-LTS](http://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/) -- 镜像内置源仓库:[openEuler 20.03 LTS 源仓库](https://gitee.com/openeuler/raspberrypi/blob/master/scripts/config-common/openEuler-20.03-LTS.repo) + - [更新日志](documents/changelog.md) + - 发布时间:2020-08-10 + - 大小:259 MiB + - 操作系统版本:openEuler 20.03 LTS + - 内核版本:4.19.90-2005.2.0.0002 + - 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) + - 构建文件系统的源仓库:[openEuler 20.03 LTS](http://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/) + - 镜像内置源仓库:[openEuler 20.03 LTS 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo) + +2. openEuler 20.09 + + openEuler 20.09 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eulixos/repo/others/openeuler-raspberrypi/images/openEuler-20.09-aarch64-raspi.img.xz)。 + + 该镜像的基本信息: + + - [更新日志](documents/changelog-20.09.md) + - 发布时间:2020-09-04 + - 大小:237 MiB + - 操作系统版本:openEuler 20.09 + - 内核版本:4.19.140-2008.3.0.0001 + - 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) + - 构建文件系统的源仓库:[openEuler 20.09 每日构建的源仓库](http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/) + - 镜像内置源仓库:[openEuler 20.09 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.09/generic.repo) ## 使用镜像 @@ -69,6 +86,9 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu #### 快速构建(无需编译内核,推荐) +>![](public_sys-resources/icon-notice.gif) **须知:** +>当前只支持 openEuler 20.09 版本。 + 使用已有的树莓派内核、固件、蓝牙等 RPM 包构建镜像。 构建镜像需执行命令: @@ -87,16 +107,31 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。 - 默认使用脚本所在目录的 config 文件夹下的 repo 文件。下面分别举例: - - 开发源 repo 文件的 URL:`https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - 开发源的 repo 文件路径:`./config/openEuler-20.09.repo` - - 资源库的 baseurl 列表:`"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` + 下面分别举例: + - 开发源 repo 文件的 URL:*暂无* + - 开发源的 repo 文件路径:`./openEuler-20.09.repo` + + 该文件的内容如下: + ``` + [MAINLINE] + name=MAINLINE + baseurl=http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/ + enabled=1 + gpgcheck=0 + + [EPOL] + name=EPOL + baseurl=http://119.3.219.20:82/openEuler:/Epol/standard_aarch64/ + enabled=1 + gpgcheck=0 + ``` + - 资源库的 baseurl 列表:`"http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/ http://119.3.219.20:82/openEuler:/Epol/standard_aarch64/"` 3. -n, --name IMAGE_NAME 构建的镜像名称。 - 例如,`openEuler-20.03-LTS.img`。默认为`openEuler-20.09-aarch64-raspi.img`,或者根据 `-r, --repo REPO_INFO` 参数自动生成。 + 例如,`openEuler-20.09.img`。默认为`openEuler-aarch64-raspi.img`,或者根据 `-r, --repo REPO_INFO` 参数自动生成。 4. -h, --help @@ -120,7 +155,7 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 构建的镜像名称。 - 例如,`openEuler-20.03-LTS.img`。默认为`openEuler-20.03-LTS-aarch64-raspi.img`,或者根据 `-r, --repo REPO_INFO` 参数自动生成。 + 例如,`openEuler-20.03-LTS.img`。默认为`openEuler-aarch64-raspi.img`,或者根据 `-r, --repo REPO_INFO` 参数自动生成。 2. -k, --kernel KERNEL_URL @@ -138,9 +173,11 @@ openEuler 20.03 LTS 的内测版本镜像,[下载](https://isrc.iscas.ac.cn/eu 开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。 - 默认使用脚本所在目录的 config-common 文件夹下的 repo 文件。下面分别举例: + 下面分别举例: - 开发源 repo 文件的 URL:`https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo` - - 开发源的 repo 文件路径:`./config-common/openEuler-20.03-LTS.repo` + - 开发源的 repo 文件路径:`./openEuler-20.03-LTS.repo` + + 该文件内容参考 `https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo`。 - 资源库的 baseurl 列表:`"http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/source"` 6. --cores N diff --git a/documents/changelog-20.09.en.md b/documents/changelog-20.09.en.md new file mode 100644 index 0000000..d9c9f9f --- /dev/null +++ b/documents/changelog-20.09.en.md @@ -0,0 +1,15 @@ +## Feature Release Log + +English | [简体中文](./changelog-20.09.md) + +### 2020-09-04 + +#### Basic information + +- Release date: 2020-09-04 +- Size: 237 MiB +- OS version: openEuler 20.09 +- Kernel version: 4.19.140-2008.3.0.0001 +- Firmware source: [firmware](https://github.com/raspberrypi/firmware), [bluez-firmware](https://github.com/RPi-Distro/bluez-firmware), [firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- Repository of rootfs: [openEuler 20.09 repository built daily](http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/) +- Repository inside the image: [openEuler 20.09 repository](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.09/generic.repo) \ No newline at end of file diff --git a/documents/changelog-20.09.md b/documents/changelog-20.09.md new file mode 100644 index 0000000..1bb55c4 --- /dev/null +++ b/documents/changelog-20.09.md @@ -0,0 +1,15 @@ +## Feature Release Log + +[English](./changelog-20.09.en.md) | 简体中文 + +### 2020-09-04 + +#### 基本信息 + +- 发布时间:2020-09-04 +- 大小:237 MiB +- 操作系统版本:openEuler 20.09 +- 内核版本:4.19.140-2008.3.0.0001 +- 固件来源:[firmware](https://github.com/raspberrypi/firmware)、[bluez-firmware](https://github.com/RPi-Distro/bluez-firmware)、[firmware-nonfree](https://github.com/RPi-Distro/firmware-nonfree) +- 构建文件系统的源仓库:[openEuler 20.09 每日构建的源仓库](http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/) +- 镜像内置源仓库:[openEuler 20.09 源仓库](https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.09/generic.repo) \ No newline at end of file diff --git a/scripts/build-image-common.sh b/scripts/build-image-common.sh index 10276d6..d1c3bfc 100644 --- a/scripts/build-image-common.sh +++ b/scripts/build-image-common.sh @@ -10,7 +10,7 @@ Options: -k, --kernel KERNEL_URL The URL of kernel source's repository, which defaults to https://gitee.com/openeuler/raspberrypi-kernel.git. -b, --branch KERNEL_BRANCH The branch name of kernel source's repository, which defaults to master. -c, --config KERNEL_DEFCONFIG The name/path of defconfig file when compiling kernel, which defaults to openeuler-raspi_defconfig. - -r, --repo REPO_INFO The URL/path of target repo file or list of repo's baseurls which should be a space separated list. + -r, --repo REPO_INFO Required! The URL/path of target repo file or list of repo's baseurls which should be a space separated list. --cores N The number of cpu cores to be used during making. -h, --help Show command help. " @@ -23,6 +23,10 @@ help() parseargs() { + if [ "x$#" == "x0" ]; then + return 1 + fi + while [ "x$#" != "x0" ]; do if [ "x$1" == "x-h" -o "x$1" == "x--help" ]; then @@ -87,8 +91,10 @@ prepare(){ echo `date` - ERROR, config file $default_defconfig can not be found. exit 2 fi - - if [ "x${repo_file:0:4}" = "xhttp" ]; then + if [ "x$repo_file" == "x" ] ; then + echo `date` - ERROR, \"-r REPO_INFO or --repo REPO_INFO\" missing. + help 2 + elif [ "x${repo_file:0:4}" = "xhttp" ]; then if [ "x${repo_file:0-5}" == "x.repo" ]; then wget ${repo_file} -P ${tmp_dir}/ repo_file_name=${repo_file##*/} @@ -110,9 +116,6 @@ prepare(){ repo_file=${repo_file_tmp} fi else - if [ "x$repo_file" == "x" ] ; then - repo_file=`ls ${euler_dir}/*.repo 2>/dev/null| head -n 1` - fi if [ ! -f $repo_file ]; then echo `date` - ERROR, repo file $repo_file can not be found. exit 2 @@ -143,7 +146,7 @@ prepare(){ fi LOG "prepare begin..." dnf makecache - dnf install -y git bison flex wget dnf-plugins-core tar parted dosfstools grep bash xz kpartx + dnf install -y bison flex wget dnf-plugins-core tar parted dosfstools grep bash xz kpartx if [ ! -d ${run_dir}/img ]; then mkdir ${run_dir}/img diff --git a/scripts/build-image-docker.sh b/scripts/build-image-docker.sh index 816b226..4c10e4a 100644 --- a/scripts/build-image-docker.sh +++ b/scripts/build-image-docker.sh @@ -12,7 +12,7 @@ Options: -k, --kernel KERNEL_URL The URL of kernel source's repository, which defaults to https://gitee.com/openeuler/raspberrypi-kernel.git. -b, --branch KERNEL_BRANCH The branch name of kernel source's repository, which defaults to master. -c, --config KERNEL_DEFCONFIG The name/path of defconfig file when compiling kernel, which defaults to openeuler-raspi_defconfig. - -r, --repo REPO_INFO The URL/path of target repo file or list of repo's baseurls which should be a space separated list. + -r, --repo REPO_INFO Required! The URL/path of target repo file or list of repo's baseurls which should be a space separated list. --cores N The number of cpu cores to be used during making. -h, --help Show command help. " @@ -25,6 +25,10 @@ help() parseargs() { + if [ "x$#" == "x0" ]; then + return 1 + fi + while [ "x$#" != "x0" ]; do if [ "x$1" == "x-h" -o "x$1" == "x--help" ]; then @@ -125,6 +129,11 @@ else exit 2 fi +if [ "x$repo_file" == "x" ] ; then + echo `date` - ERROR, \"-r REPO_INFO or --repo REPO_INFO\" missing. + help 2 +fi + buildid=$(date +%Y%m%d%H%M%S) builddate=${buildid:0:8} diff --git a/scripts/build-image.sh b/scripts/build-image.sh index 8c03bbf..32f489d 100644 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -4,11 +4,11 @@ set -e __usage=" Usage: build-image [OPTIONS] -Build raspberrypi image. +Build raspberrypi image. Options: - -d, --dir DIR The directory for storing the image and other temporary files, which defaults to be the directory in which the script resides. If the DIR does not exist, it will be created automatically. - -r, --repo REPO_INFO The URL/path of target repo file or list of repo's baseurls which should be a space separated list. + -d, --dir DIR The directory for storing the image and other temporary files, which defaults to be the directory in which the script resides. If the DIR does not exist, it will be created automatically. + -r, --repo REPO_INFO Required! The URL/path of target repo file or list of repo's baseurls which should be a space separated list. -n, --name IMAGE_NAME The raspberrypi image name to be built. -h, --help Show command help. " @@ -21,6 +21,10 @@ help() parseargs() { + if [ "x$#" == "x0" ]; then + return 1 + fi + while [ "x$#" != "x0" ]; do if [ "x$1" == "x-h" -o "x$1" == "x--help" ]; then @@ -60,7 +64,10 @@ prepare(){ else rm -rf ${tmp_dir}/* fi - if [ "x${repo_file:0:4}" = "xhttp" ]; then + if [ "x$repo_file" == "x" ] ; then + echo `date` - ERROR, \"-r REPO_INFO or --repo REPO_INFO\" missing. + help 2 + elif [ "x${repo_file:0:4}" == "xhttp" ]; then if [ "x${repo_file:0-5}" == "x.repo" ]; then wget ${repo_file} -P ${tmp_dir}/ repo_file_name=${repo_file##*/} @@ -82,9 +89,6 @@ prepare(){ repo_file=${repo_file_tmp} fi else - if [ "x$repo_file" == "x" ] ; then - repo_file=`ls ${euler_dir}/*.repo 2>/dev/null| head -n 1` - fi if [ ! -f $repo_file ]; then echo `date` - ERROR, repo file $repo_file can not be found. exit 2 diff --git a/scripts/config/openEuler-20.09.repo b/scripts/config/openEuler-20.09.repo deleted file mode 100644 index eec36e7..0000000 --- a/scripts/config/openEuler-20.09.repo +++ /dev/null @@ -1,20 +0,0 @@ -#generic-repos is licensed under the Mulan PSL v2. -#You can use this software according to the terms and conditions of the Mulan PSL v2. -#You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -#PURPOSE. -#See the Mulan PSL v2 for more details. - -[MAINLINE] -name=MAINLINE -baseurl=http://119.3.219.20:82/openEuler:/Mainline/standard_aarch64/ -enabled=1 -gpgcheck=0 - -[EPOL] -name=EPOL -baseurl=http://119.3.219.20:82/openEuler:/Epol/standard_aarch64/ -enabled=1 -gpgcheck=0 -- Gitee From dd3fda688990fe21ffbd75d82b9159f9f7cf379a Mon Sep 17 00:00:00 2001 From: yafen Date: Fri, 4 Sep 2020 17:58:30 +0800 Subject: [PATCH 3/3] fix copy licenses --- scripts/build-image-common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-image-common.sh b/scripts/build-image-common.sh index d1c3bfc..c04c452 100644 --- a/scripts/build-image-common.sh +++ b/scripts/build-image-common.sh @@ -453,8 +453,8 @@ make_rootfs(){ cp pi-bluetooth/debian/pi-bluetooth.bthelper\@.service ${rootfs_dir}/lib/systemd/system/bthelper\@.service cp pi-bluetooth/debian/pi-bluetooth.hciuart.service ${rootfs_dir}/lib/systemd/system/hciuart.service cp -r ${output_dir}/lib/modules ${rootfs_dir}/lib/ - mkdir -p /usr/share/licenses/raspi - cp -a ${euler_dir}/License/* /usr/share/licenses/raspi/ + mkdir -p ${rootfs_dir}/usr/share/licenses/raspi + cp -a ${euler_dir}/License/* ${rootfs_dir}/usr/share/licenses/raspi/ cp ${euler_dir}/chroot.sh ${rootfs_dir}/chroot.sh chmod +x ${rootfs_dir}/chroot.sh mount --bind /dev ${rootfs_dir}/dev -- Gitee