From 3a73c14aced7d744450dd9e4964085baf0550392 Mon Sep 17 00:00:00 2001 From: linwenkai <941116795@qq.com> Date: Wed, 7 Nov 2018 11:21:53 +0100 Subject: [PATCH 1/5] Install extra package for debian Signed-off-by: linwenkai <941116795@qq.com> --- submodules/debian-build-kernel.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/submodules/debian-build-kernel.sh b/submodules/debian-build-kernel.sh index 30bd7c57..98aed099 100755 --- a/submodules/debian-build-kernel.sh +++ b/submodules/debian-build-kernel.sh @@ -21,6 +21,7 @@ estuary_dist=${DEBIAN_ESTUARY_DIST:-estuary-5.2} echo "deb-src http://mirrors.163.com/debian/ stretch main" >> /etc/apt/sources.list set_debian_mirror apt-get update -q=2 +apt-get install -y imagemagick systemtap-sdt-dev liblzma-dev python3-dev python-dev asciidoctor # 1) build kernel packages debs, udebs mkdir -p ${workspace} From cc9b9faf5d4813350a1403b99cc1113f06ca1b0a Mon Sep 17 00:00:00 2001 From: linwenkai <941116795@qq.com> Date: Wed, 21 Nov 2018 10:58:51 +0100 Subject: [PATCH 2/5] Make ubuntu suitable for linus branch Signed-off-by: linwenkai <941116795@qq.com> --- submodules/ubuntu-build-installer.sh | 2 +- submodules/ubuntu-build-kernel.sh | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/submodules/ubuntu-build-installer.sh b/submodules/ubuntu-build-installer.sh index a05db1a3..159691c6 100755 --- a/submodules/ubuntu-build-installer.sh +++ b/submodules/ubuntu-build-installer.sh @@ -31,7 +31,7 @@ if [ -f "${build_dir}/build-ubuntu-kernel" ]; then fi if [ x"$build_kernel" = x"true" ]; then kernel_version=$(dpkg --info ${kernel_deb_dir}/meta/linux-image-estuary* \ - | grep Depends | sed -e "s/.*linux-image-extra-//g" -e "s/,.*//g") + | grep Depends | sed -e "s/.*linux-image-//" -e "s/,.*//") cd ${kernel_deb_dir}/not_meta/ dpkg-scanpackages -t udeb . > Packages fi diff --git a/submodules/ubuntu-build-kernel.sh b/submodules/ubuntu-build-kernel.sh index 1524e743..b2759b8f 100755 --- a/submodules/ubuntu-build-kernel.sh +++ b/submodules/ubuntu-build-kernel.sh @@ -24,6 +24,7 @@ estuary_dist=${UBUNTU_ESTUARY_DIST:-estuary-5.2} set_ubuntu_mirror apt-get update -q=2 +apt-get install -y python-sphinx python-sphinx-rtd-theme # 1) build kernel packages debs, udebs mkdir -p ${workspace} @@ -55,6 +56,7 @@ else fi kernel_version=$(make kernelversion) +kernel_tag=v$(echo $kernel_version |sed "s/.[0-9]*-/-/") kernel_deb_pkg_version=$(echo ${kernel_version}) export KDEB_PKGVERSION="${kernel_deb_pkg_version}-${build_num}.estuary" git tag -f v${kernel_deb_pkg_version//\~/-} @@ -71,10 +73,13 @@ cd ${workspace} rm -rf linux/debian/ rm -rf linux/debian.master/ -cp -r ubuntu-package/debian/ linux -cp -r ubuntu-package/debian.master/ linux - cd ${workspace}/linux +patch_url=http://kernel.ubuntu.com/~kernel-ppa/mainline +wget -T 60 -c ${patch_url}/${kernel_tag}/ +for pname in `cat index.html|grep -Po "(?<=\">)(.*?)(?=<)"|grep patch|sort -n|uniq`; do + wget -N -T 60 -c ${patch_url}/${kernel_tag}/${pname} + patch -p1 < ${pname} +done # Use build_num as ABI cat << EOF > debian.master/changelog linux ($KDEB_PKGVERSION) unstable; urgency=medium @@ -89,6 +94,8 @@ EOF # Enable HISI SAS module sed -i "s/CONFIG_SCSI_HISI_SAS=m/CONFIG_SCSI_HISI_SAS=y/g" debian.master/config/config.common.ubuntu +sed -i "s/syncconfig/olddefconfig/g" debian/rules.d/2-binary-arch.mk +sed -i '/^do_zfs/ s/true/false/g' debian.master/rules.d/arm64.mk echo kernel build start...... debian/rules clean || true @@ -109,6 +116,7 @@ cd ${workspace}/ubuntu-meta-package kernel_abi_version=${kernel_deb_pkg_version}.${build_num}.2 package_version=${build_num} +sed -i "s/linux-image-extra/linux-modules-\${kernel-abi-version}-generic, linux-modules-extra/g" debian/control.d/generic echo meta kernel build start... NAME="OpenEstuary" EMAIL=xinliang.liu@linaro.org dch -v "${kernel_abi_version}" -D xenial --force-distribution "Bump ABI to ${kernel_abi_version}" From 4e91bd50a6343612ada11e4c55454027c9e71fd9 Mon Sep 17 00:00:00 2001 From: linwenkai <941116795@qq.com> Date: Fri, 23 Nov 2018 10:31:11 +0100 Subject: [PATCH 3/5] Add estuary 5.0 to centos repolist Signed-off-by: linwenkai <941116795@qq.com> --- .../auto-install/centos/auto-iso/ks-iso.cfg | 18 +++++++++++++++--- configs/auto-install/centos/auto-pxe/ks.cfg | 18 +++++++++++++++--- submodules/ubuntu-build-kernel.sh | 1 + 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/configs/auto-install/centos/auto-iso/ks-iso.cfg b/configs/auto-install/centos/auto-iso/ks-iso.cfg index bb0798df..6d96878b 100644 --- a/configs/auto-install/centos/auto-iso/ks-iso.cfg +++ b/configs/auto-install/centos/auto-iso/ks-iso.cfg @@ -7,9 +7,21 @@ wget %end %post --interpreter=/bin/bash -wget -T 120 -c -O /etc/yum.repos.d/estuary.repo https://raw.githubusercontent.com/open-estuary/distro-repo/master/estuaryftp.repo -sed -i 's/5.[0-9]/5.2/g' /etc/yum.repos.d/estuary.repo +estuary_release=ftp://repoftp:repopushez7411@117.78.41.188/releases +cat > /etc/yum.repos.d/estuary.repo << EOF +[estuary-app] +name=estuary-app +baseurl=${estuary_release}/5.0/centos/ +enabled=1 +gpgcheck=1 + +[estuary-kernel] +name=estuary-kernel +baseurl=${estuary_release}/5.2/centos/ +enabled=1 +gpgcheck=1 +EOF chmod +r /etc/yum.repos.d/estuary.repo -rpm --import ftp://repoftp:repopushez7411@117.78.41.188/releases//ESTUARY-GPG-KEY +rpm --import ${estuary_release}/ESTUARY-GPG-KEY yum clean dbcache %end diff --git a/configs/auto-install/centos/auto-pxe/ks.cfg b/configs/auto-install/centos/auto-pxe/ks.cfg index e0d9d831..a1acf053 100644 --- a/configs/auto-install/centos/auto-pxe/ks.cfg +++ b/configs/auto-install/centos/auto-pxe/ks.cfg @@ -12,9 +12,21 @@ wget %end %post --interpreter=/bin/bash -wget -T 120 -c -O /etc/yum.repos.d/estuary.repo https://raw.githubusercontent.com/open-estuary/distro-repo/master/estuaryftp.repo -sed -i 's/5.[0-9]/5.2/g' /etc/yum.repos.d/estuary.repo +estuary_release=ftp://repoftp:repopushez7411@117.78.41.188/releases +cat > /etc/yum.repos.d/estuary.repo << EOF +[estuary-app] +name=estuary-app +baseurl=${estuary_release}/5.0/centos/ +enabled=1 +gpgcheck=1 + +[estuary-kernel] +name=estuary-kernel +baseurl=${estuary_release}/5.2/centos/ +enabled=1 +gpgcheck=1 +EOF chmod +r /etc/yum.repos.d/estuary.repo -rpm --import ftp://repoftp:repopushez7411@117.78.41.188/releases//ESTUARY-GPG-KEY +rpm --import ${estuary_release}/ESTUARY-GPG-KEY yum clean dbcache %end diff --git a/submodules/ubuntu-build-kernel.sh b/submodules/ubuntu-build-kernel.sh index b2759b8f..d8882a0b 100755 --- a/submodules/ubuntu-build-kernel.sh +++ b/submodules/ubuntu-build-kernel.sh @@ -94,6 +94,7 @@ EOF # Enable HISI SAS module sed -i "s/CONFIG_SCSI_HISI_SAS=m/CONFIG_SCSI_HISI_SAS=y/g" debian.master/config/config.common.ubuntu +sed -i "/^CONFIG_STRICT_DEVMEM=y/d" debian.master/config/config.common.ubuntu sed -i "s/syncconfig/olddefconfig/g" debian/rules.d/2-binary-arch.mk sed -i '/^do_zfs/ s/true/false/g' debian.master/rules.d/arm64.mk From c34f3bd42f4d41ef850d505a2c845feab0d55deb Mon Sep 17 00:00:00 2001 From: linwenkai <941116795@qq.com> Date: Tue, 27 Nov 2018 04:24:16 +0100 Subject: [PATCH 4/5] Update estuary repo name Signed-off-by: linwenkai <941116795@qq.com> --- configs/auto-install/centos/auto-iso/ks-iso.cfg | 4 ++-- configs/auto-install/centos/auto-pxe/ks.cfg | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/auto-install/centos/auto-iso/ks-iso.cfg b/configs/auto-install/centos/auto-iso/ks-iso.cfg index 6d96878b..f6ee8965 100644 --- a/configs/auto-install/centos/auto-iso/ks-iso.cfg +++ b/configs/auto-install/centos/auto-iso/ks-iso.cfg @@ -9,8 +9,8 @@ wget %post --interpreter=/bin/bash estuary_release=ftp://repoftp:repopushez7411@117.78.41.188/releases cat > /etc/yum.repos.d/estuary.repo << EOF -[estuary-app] -name=estuary-app +[Estuary] +name=Estuary baseurl=${estuary_release}/5.0/centos/ enabled=1 gpgcheck=1 diff --git a/configs/auto-install/centos/auto-pxe/ks.cfg b/configs/auto-install/centos/auto-pxe/ks.cfg index a1acf053..5533ed2a 100644 --- a/configs/auto-install/centos/auto-pxe/ks.cfg +++ b/configs/auto-install/centos/auto-pxe/ks.cfg @@ -14,8 +14,8 @@ wget %post --interpreter=/bin/bash estuary_release=ftp://repoftp:repopushez7411@117.78.41.188/releases cat > /etc/yum.repos.d/estuary.repo << EOF -[estuary-app] -name=estuary-app +[Estuary] +name=Estuary baseurl=${estuary_release}/5.0/centos/ enabled=1 gpgcheck=1 From 8ca3cf3c3a288de43c8abf73a23f113e2226efec Mon Sep 17 00:00:00 2001 From: linwenkai <941116795@qq.com> Date: Wed, 28 Nov 2018 07:01:26 +0100 Subject: [PATCH 5/5] Optimize centos grub config inst.repo=cdrom is hidden as default inst.stage2=cdrom ignore Packages Signed-off-by: linwenkai <941116795@qq.com> --- configs/auto-install/centos/auto-iso/grub.cfg | 4 ++-- configs/auto-install/centos/auto-pxe/grub.cfg | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/auto-install/centos/auto-iso/grub.cfg b/configs/auto-install/centos/auto-iso/grub.cfg index 9d28355d..91e90dfa 100644 --- a/configs/auto-install/centos/auto-iso/grub.cfg +++ b/configs/auto-install/centos/auto-iso/grub.cfg @@ -27,10 +27,10 @@ search --no-floppy --set=root -l 'CentOS 7 aarch64' ### BEGIN /etc/grub.d/10_linux ### menuentry 'Install CentOS 7 (text mode)' --class red --class gnu-linux --class gnu --class os { - linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20aarch64 ro inst.ks=file:/ks-iso.cfg ip=dhcp inst.text rootdelay=120 + linux /images/pxeboot/vmlinuz inst.ks=file:/ks-iso.cfg ip=dhcp inst.text initrd /images/pxeboot/initrd.img } menuentry 'Install CentOS 7 (graphical mode)' --class red --class gnu-linux --class gnu --class os { - linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20aarch64 ro inst.ks=file:/ks-iso.cfg ip=dhcp rootdelay=120 + linux /images/pxeboot/vmlinuz inst.ks=file:/ks-iso.cfg ip=dhcp initrd /images/pxeboot/initrd.img } diff --git a/configs/auto-install/centos/auto-pxe/grub.cfg b/configs/auto-install/centos/auto-pxe/grub.cfg index 053595c6..d7007bf1 100644 --- a/configs/auto-install/centos/auto-pxe/grub.cfg +++ b/configs/auto-install/centos/auto-pxe/grub.cfg @@ -27,10 +27,10 @@ search --no-floppy --set=root -l 'CentOS 7 aarch64' ### BEGIN /etc/grub.d/10_linux ### menuentry 'Install CentOS Linux 7 (text mode)' --class red --class gnu-linux --class gnu --class os { - linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20aarch64 ro inst.ks=file:/ks.cfg ip=dhcp inst.text + linux /images/pxeboot/vmlinuz inst.stage2=cdrom inst.ks=file:/ks.cfg ip=dhcp inst.text initrd /images/pxeboot/initrd.img } menuentry 'Install CentOS Linux 7 (graphical mode)' --class red --class gnu-linux --class gnu --class os { - linux /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20aarch64 ro inst.ks=file:/ks.cfg ip=dhcp + linux /images/pxeboot/vmlinuz inst.stage2=cdrom inst.ks=file:/ks.cfg ip=dhcp initrd /images/pxeboot/initrd.img }