From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
ian.jackson@eu.citrix.com, Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards.
Date: Wed, 17 Jun 2015 14:06:35 +0100 [thread overview]
Message-ID: <1434546404-2036-3-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1434546404-2036-1-git-send-email-wei.liu2@citrix.com>
From: Ian Campbell <ian.campbell@citrix.com>
In mg-debian-installer-update:
- Expand the list of (suite,arch) combinations which don't exist and
move it to the top.
- Tweak the backports.org handling to allow it to be specified on a
per (suite,arch) basis, and specify it only for (wheezy,armhf)
since it is not currently needed for jessie. Make the
initramfs-tools fetching conditional too.
- Only extract backports-dtbs if they are present in the package.
- Handle arm64.
- Collect the correct armhf kernel for Jessie onwards (vexpress
removed from path).
Have mg-debian-installer-update-all fetch arm64 too.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[wei: wrap lines]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Osstest/Debian.pm | 2 +-
mg-debian-installer-update | 67 ++++++++++++++++++++++++++++--------------
mg-debian-installer-update-all | 2 +-
ts-host-install | 4 +--
4 files changed, 49 insertions(+), 26 deletions(-)
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 7c652f7..26363af 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -862,7 +862,7 @@ END
foreach my $kp (keys %{ $ho->{Flags} }) {
# Backwards compatibility
$kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp";
- $kp =~ s/need-kernel-deb-$ho->{Suite}// or next;
+ $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next;
my $kern = "$d_i/$kp.deb";
my $kurl = create_webfile($ho, "kernel", sub {
diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index f21f216..750258d 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -38,20 +38,29 @@ fetch () {
}
case ${suite}_${arch} in
+ lenny_armhf|squeeze_armhf|lenny_arm64|squeeze_arm64|wheezy_arm64)
+ # No such thing.
+ exit 0
+ ;;
*_i386|*_amd64)
src=$sbase/main/installer-$arch/current/images/netboot/
files="debian-installer/$arch/initrd.gz:initrd.gz debian-installer/$arch/linux:linux xen/vmlinuz:vmlinuz-xen xen/initrd.gz:initrd.gz-xen"
;;
- lenny_armhf|squeeze_armhf)
- # No such thing.
- exit 0
+ *_arm64)
+ src=$sbase/main/installer-$arch/current/images/netboot/
+ files="debian-installer/$arch/initrd.gz:initrd.gz \
+ debian-installer/$arch/linux:linux"
;;
- *_armhf)
+ wheezy_armhf)
# Use the vexpress image, we are going to bash in our own
# kernel+modules anyway.
src=$sbase/main/installer-$arch/current/images/vexpress/netboot
files='initrd.gz' # no kernel -- needs a newer kernel
;;
+ *_armhf)
+ src=$sbase/main/installer-$arch/current/images/netboot
+ files='vmlinuz initrd.gz'
+ ;;
esac
pfile=$sbase/non-free/binary-$arch/Packages.gz
@@ -89,28 +98,40 @@ for p in $packages; do
rm -rf x
done
-# armhf requires a newer kernel than was in Wheezy for most
-# platforms. Construct something suitable from the latest kernel in
-# wheezy-backports.
-if [ $arch = armhf ]; then
+# Some platforms require a newer kernel than is in Debian. Construct
+# something suitable from the latest kernel ($bpok=flavour) in
+# backports.
+case $suite_$arch in
+ wheezy_armhf) bpok=armmp; need_initramfs=y;;
+esac
+if [ x$bpok != x ]; then
bp="$sbase-backports"
- pfile=$bp/main/binary-armhf/Packages.gz
+ pfile=$bp/main/binary-$arch/Packages.gz
fetch $pfile >Packages.gz
- # Newer kernel often needs a newer initramfs-tools. Make that available
- echo >&2 "collecting backports initramfs-tools"
- pkgfile=`zcat Packages.gz | grep-dctrl -PX initramfs-tools -nsFilename | sort -n -r | head -n1`
- rc=$?
- set -e
- if [ $rc != 0 ]; then fail "initramfs-tools package not found"; fi
- fetch "$site/$pkgfile" >initramfs-tools.deb
+ if [ x$need_initramfs = xy ]; then
+ # Newer kernel often needs a newer initramfs-tools. Make that
+ # available
+ echo >&2 "collecting backports initramfs-tools"
+ pkgfile=`zcat Packages.gz \
+ | grep-dctrl -PX initramfs-tools -nsFilename \
+ | sort -n -r | head -n1`
+ rc=$?
+ set -e
+ if [ $rc -ne 0 ] || [ x$pkgfile = x ]; then
+ fail "initramfs-tools package not found";
+ fi
+ fetch "$site/$pkgfile" >initramfs-tools.deb
+ fi
set +e
echo >&2 "collecting backports kernel"
# Be careful to pickup the actual kernel package from the 'linux'
# source and not a meta package from 'linux-latest'
- pkgfile=`zcat Packages.gz | grep-dctrl -S linux | grep-dctrl -Pe ^linux-image-.*-armmp$ -nsFilename | sort -n -r | head -n1`
+ pkgfile=`zcat Packages.gz | grep-dctrl -S linux \
+ | grep-dctrl -Pe ^linux-image-.*-${bpok}$ -nsFilename \
+ | sort -n -r | head -n1`
rc=$?
set -e
if [ $rc != 0 ]; then fail "backports kernel package not found"; fi
@@ -143,11 +164,13 @@ if [ $arch = armhf ]; then
|pax -x sv4cpio -s '%lib%/lib%' -d -w -M norm >../cpio; cd ..
gzip -9nf cpio
mv cpio.gz backports.cpio.gz
- rm -rf backports-dtbs/
- mkdir backports-dtbs/
- mv x/usr/lib/linux-image-*-armmp/*.dtb backports-dtbs/
- tar --mtime=./x/usr/lib -cf backports-dtbs.tar backports-dtbs
- gzip -9nf backports-dtbs.tar
+ if [ -d x/usr/lib/linux-image-*-${bpok}/ ] ; then
+ rm -rf backports-dtbs/
+ mkdir backports-dtbs/
+ mv x/usr/lib/linux-image-*-${bpok}/*.dtb backports-dtbs/
+ tar --mtime=./x/usr/lib -cf backports-dtbs.tar backports-dtbs
+ gzip -9nf backports-dtbs.tar
+ fi
rm -rf x
fi
diff --git a/mg-debian-installer-update-all b/mg-debian-installer-update-all
index eca4a5f..241e2e3 100755
--- a/mg-debian-installer-update-all
+++ b/mg-debian-installer-update-all
@@ -24,7 +24,7 @@ set -e
suite=`getconfig DebianSuite`
fws=`getconfig DebianNonfreeFirmware`
-arches="armhf amd64 i386"
+arches="arm64 armhf amd64 i386"
for arch in $arches ; do
./mg-debian-installer-update $suite $arch $fws
diff --git a/ts-host-install b/ts-host-install
index 2fea451..242bfb0 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -200,7 +200,7 @@ sub setup_pxeboot_firstboot($) {
foreach my $kp (keys %{ $ho->{Flags} }) {
# Backwards compatibility
$kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp";
- $kp =~ s/need-kernel-deb-$ho->{Suite}// or next;
+ $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next;
my $kern= "$ho->{Tftp}{Path}/$d_i/linux.$kp";
if (stat $kern) {
logm("using kernel from: $kern");
@@ -249,7 +249,7 @@ END
foreach my $kp (keys %{ $ho->{Flags} }) {
# Backwards compatibility
$kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp";
- $kp =~ s/need-kernel-deb-$ho->{Suite}// or next;
+ $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next;
$dtbs = "fdtdir /$d_i/$kp-dtbs"
if -e "$ho->{Tftp}{Path}/$d_i/$kp-dtbs";
--
1.9.1
next prev parent reply other threads:[~2015-06-17 13:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 13:06 [PATCH OSSTEST v3 00/11] Upgrade to Jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 01/11] More flexible handling of need-kernel-deb-$flavour host flag Wei Liu
2015-06-17 13:06 ` Wei Liu [this message]
2015-06-19 12:33 ` [PATCH OSSTEST v3 02/11] mg-debian-installer-update: updates to better handle Jessie onwards Ian Jackson
2015-06-19 13:50 ` Ian Campbell
2015-06-19 14:53 ` Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 03/11] mg-debian-installer-update: Also collect DTBs for standard kernels Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 04/11] Force sysvinit with Jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 05/11] Debian.pm: install grub to default device Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 06/11] Cope with Jessie's d-i vg name Wei Liu
2015-06-17 14:22 ` Ian Campbell
2015-06-17 14:42 ` Wei Liu
2015-06-17 15:05 ` Wei Liu
2015-06-19 12:21 ` Ian Jackson
2015-06-17 13:06 ` [PATCH OSSTEST v3 07/11] Debian: grub2: Allow submenu and menuentry items to be indented Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 08/11] ts-xen-build-prep: install libnl-route-3-dev on Jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 09/11] ts-xen-build-prep: reverse the test for installing libc6-dev-i386 Wei Liu
2015-06-19 12:22 ` Ian Jackson
2015-06-17 13:06 ` [PATCH OSSTEST v3 10/11] ts-xen-install: install libnl-route-3-200 for jessie Wei Liu
2015-06-17 13:06 ` [PATCH OSSTEST v3 11/11] ts-kernel-build: enable CONFIG_FHANDLE Wei Liu
2015-06-18 16:27 ` [PATCH OSSTEST v3 12/11] toolstack/libvirt: install libnl-3-200 on Jessie Wei Liu
2015-06-19 12:05 ` Ian Jackson
2015-06-19 16:13 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434546404-2036-3-git-send-email-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.