Skip to content

Commit

Permalink
Merge pull request #305 from lin755/centos-bugfix
Browse files Browse the repository at this point in the history
Install extra package for debian
  • Loading branch information
xin3liang authored Nov 29, 2018
2 parents 105d2f3 + 8ca3cf3 commit 12cc11d
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 14 deletions.
4 changes: 2 additions & 2 deletions configs/auto-install/centos/auto-iso/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
18 changes: 15 additions & 3 deletions configs/auto-install/centos/auto-iso/ks-iso.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
name=Estuary
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
4 changes: 2 additions & 2 deletions configs/auto-install/centos/auto-pxe/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
18 changes: 15 additions & 3 deletions configs/auto-install/centos/auto-pxe/ks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
name=Estuary
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
1 change: 1 addition & 0 deletions submodules/debian-build-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion submodules/ubuntu-build-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 12 additions & 3 deletions submodules/ubuntu-build-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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//\~/-}
Expand All @@ -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
Expand All @@ -89,6 +94,9 @@ 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

echo kernel build start......
debian/rules clean || true
Expand All @@ -109,6 +117,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}"
Expand Down

0 comments on commit 12cc11d

Please sign in to comment.