~cyphermox/debian-cd/server-live

« back to all changes in this revision

Viewing changes to tools/boot/etch/post-boot-mips

  • Committer: Colin Watson
  • Date: 2005-11-06 09:34:49 UTC
  • mfrom: (unknown (missing))
  • Revision ID: Arch-1:colin.watson@canonical.com--2005%debian-cd--ubuntu--0--patch-205
merge from upstream up to patch-771
Patches applied:

 * debian-cd@arch.ubuntu.com/debian-cd--MAIN--0--patch-771
   Add etch stuff. Mostly copied unchanged from sarge, wit...

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# post-boot-mips
 
4
#
 
5
# Do post-image-building tasks for mips, to make CDs bootable.
 
6
#
 
7
# $1 is the CD number
 
8
# $2 is the temporary CD build dir
 
9
# $3 is the image file
 
10
 
 
11
set -e
 
12
 
 
13
N=$1
 
14
CDROOT=$2
 
15
CDIMAGE=$3
 
16
 
 
17
cd $CDROOT/..
 
18
 
 
19
# Only disk 1* bootable
 
20
if [ $N != 1 -a $N != 1_NONUS ]; then
 
21
        exit 0
 
22
fi
 
23
 
 
24
for sub in r4k-ip22 r5k-ip22; do
 
25
        _start=$(isoinfo -i $CDIMAGE -lR |grep -A 10 'Directory listing of /install' |grep ${sub}-boot.img |awk '{print $10 * 4}')
 
26
        _size=$(isoinfo -i $CDIMAGE -lR |grep -A 10 'Directory listing of /install' |grep ${sub}-boot.img |awk '{OFMT="%.0f"; print int(($5 + 2047) / 2048) * 2048}')
 
27
        _bootfiles="${_bootfiles} ${sub}:${_start},${_size}"
 
28
done
 
29
_start=$(isoinfo -i $CDIMAGE -lR |grep -A 10 'Directory listing of /install' |grep $r4k-ip22-boot.img |awk '{print $10 * 4}')
 
30
_size=$(isoinfo -i $CDIMAGE -lR |grep -A 10 'Directory listing of /install' |grep $r4k-ip22-boot.img |awk '{OFMT="%.0f"; print int(($5 + 2047) / 2048) * 2048}')
 
31
_bootfiles="${_bootfiles} sashARCS:${_start},${_size}"
 
32
 
 
33
echo Bootfiles: ${_bootfiles}
 
34
 
 
35
genisovh $CDIMAGE ${_bootfiles}