From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH 04/10] mg-debian-installer-update: support armhf
Date: Wed, 4 Sep 2013 17:58:17 +0100 [thread overview]
Message-ID: <1378313903-10539-4-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1378313870.17510.172.camel@kazak.uk.xensource.com>
The path to the installer differs on armhf vs amd64/i386.
Debian Wheezy does not contain kernels for the devices we want to support.
Therefore we download a kernel and modules from wheezy-backports which is new
enough.
---
mg-debian-installer-update | 63 ++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 61 insertions(+), 2 deletions(-)
diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index 6e3d359..c0b547f 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -32,9 +32,20 @@ fail () { echo >&2 "$0: $1"; exit 1; }
site=http://ftp.debian.org/debian/
sbase=$site/dists/$suite
-src=$sbase/main/installer-$arch/current/images/netboot/debian-installer/$arch
+case $arch in
+ i386|amd64)
+ src=$sbase/main/installer-$arch/current/images/netboot/debian-installer/$arch
+ files='initrd.gz linux'
+ ;;
+ 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
+ ;;
+esac
+
pfile=$sbase/non-free/binary-$arch/Packages.bz2
-files='initrd.gz linux'
dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/
date=`date +%Y-%m-%d`-$suite
@@ -67,6 +78,54 @@ 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
+ bp="$sbase-backports"
+ pfile=$bp/main/binary-armhf/Packages.bz2
+
+ curl -s $pfile >Packages.bz2
+
+ # Newer kernel often needs a newer initramfs-tools. Make that available
+ echo >&2 "collecting backports initramfs-tools"
+ pkgfile=`bzcat Packages.bz2 | grep-dctrl -PX initramfs-tools -nsFilename | sort -n | head -n1`
+ rc=$?
+ set -e
+ if [ $rc != 0 ]; then fail "initramfs-tools package not found"; fi
+ curl -s "$site/$pkgfile" >initramfs-tools.deb
+
+ set +e
+ echo >&2 "collecting armmp kernel"
+ # Be careful to pickup the actual kernel package from the 'linux'
+ # source and not a meta package from 'linux-latest'
+ pkgfile=`bzcat Packages.bz2 | grep-dctrl -S linux | grep-dctrl -Pe linux-image-.*-armmp -nsFilename | sort -n | head -n1`
+ rc=$?
+ set -e
+ if [ $rc != 0 ]; then fail "armmp kernel package not found"; fi
+ curl -s "$site/$pkgfile" >armmp.deb
+ dpkg-deb -x armmp.deb x
+ cp x/boot/vmlinuz-* linux.armmp
+ # The full set of modules is pretty large and not that
+ # useful. Just pull in the ones we need for our particular
+ # preseed, which is basically disk, net, filesystems and LVM.
+ cd x; find lib -type d \
+ -o -type f -name modules.\* \
+ -o -type f -name \*.ko \
+ \( -path \*/kernel/lib/\* -o \
+ -path \*/kernel/fs/mbcache.ko -o \
+ -path \*/kernel/fs/ext\* -o \
+ -path \*/kernel/fs/jbd\* -o \
+ -path \*/kernel/drivers/net/\* -o \
+ -path \*/kernel/drivers/ata/\* -o \
+ -path \*/kernel/drivers/scsi/\* -o \
+ -path \*/kernel/drivers/md/\* \) \
+ |pax -x sv4cpio -s '%lib%/lib%' -d -w >../cpio; cd ..
+ gzip -9f cpio
+ mv cpio.gz armmp.cpio.gz
+ rm -rf x
+fi
+
for f in $files; do
mv -f $f.new $f
done
--
1.7.10.4
next prev parent reply other threads:[~2013-09-04 16:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 16:57 [PATCH osstest 00/10] Add initial support for testing arm32 on arm servers (Calxeda Midway) Ian Campbell
2013-09-04 16:58 ` [PATCH 01/10] README: Point to current test report mail Ian Campbell
2013-09-04 16:58 ` [PATCH 02/10] Allow hyphen in host names when parsing properties Ian Campbell
2013-09-04 16:58 ` [PATCH 03/10] standalone-reset: configure for armhf too Ian Campbell
2013-09-04 16:58 ` Ian Campbell [this message]
2013-09-04 16:58 ` [PATCH 05/10] ts-host-install: Support for different console devices Ian Campbell
2013-09-04 16:58 ` [PATCH 06/10] ts-host-install: Add need-kernel-deb host flag Ian Campbell
2013-09-04 16:58 ` [PATCH 07/10] Debian: Honour need-kernel-deb- flag in the installed system too Ian Campbell
2013-09-04 16:58 ` [PATCH 08/10] Debian: New host flag need-uboot-bootstr Ian Campbell
2013-09-04 16:58 ` [PATCH 09/10] Debian: New host flag "no-di-kernel" Ian Campbell
2013-09-04 16:58 ` [PATCH 10/10] make-flight: make an armhf flight Ian Campbell
2013-09-04 17:42 ` [PATCH osstest 00/10] Add initial support for testing arm32 on arm servers (Calxeda Midway) Ian Campbell
2013-09-05 11:27 ` Ian Campbell
2013-09-05 11:31 ` Ian Jackson
2013-09-05 11:36 ` Ian Campbell
2013-09-06 15:12 ` Ian Campbell
2013-09-06 16:13 ` Ian Jackson
2013-09-09 9:51 ` Ian Campbell
2013-09-10 16:54 ` Ian Jackson
2013-09-11 9:24 ` Ian Campbell
2013-09-11 16:17 ` Ian Jackson
2013-09-12 8:46 ` Ian Campbell
2013-09-12 11:00 ` Ian Jackson
2013-09-12 11:19 ` Ian Campbell
2013-09-12 14:22 ` Ian Jackson
2013-09-12 14:27 ` Ian Campbell
2013-09-12 11:28 ` Ian Campbell
2013-09-12 14:46 ` Ian Jackson
2013-09-10 16:54 ` Ian Jackson
2013-09-09 10:01 ` Ian Campbell
2013-09-09 10:34 ` Ian Campbell
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=1378313903-10539-4-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).