~tsimonq2/debian-cd/lubuntu-cosmic-changes

« back to all changes in this revision

Viewing changes to tools/boot/maverick/boot-armel+imx51

  • Committer: Colin Watson
  • Date: 2010-05-04 15:13:12 UTC
  • Revision ID: cjwatson@canonical.com-20100504151312-664dfv9uibyk14fe
add CONF.sh bits for maverick; copy lucid -> maverick elsewhere

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# Do install stuff for armel+imx51, including making bootable CDs
 
4
# Works with debian-installer
 
5
#
 
6
# $1 is the CD number
 
7
# $2 is the temporary CD build dir
 
8
#
 
9
# TODO
 
10
# - hardcodes flavour
 
11
 
 
12
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
 
13
 
 
14
set -e
 
15
 
 
16
N=$1
 
17
CDDIR=$2
 
18
BOOTDIR=
 
19
if [ "$DI_WWW_HOME" = "default" ];then
 
20
   DI_WWW_HOME="http://people.debian.org/~joeyh/d-i/images/daily"
 
21
fi
 
22
if [ ! "$DI_DIST" ]; then
 
23
   export DI_DIST="$DI_CODENAME"
 
24
fi
 
25
if [ -z "$DI_PATH" ]; then
 
26
   DI_PATH="$($BASEDIR/tools/find-newest-installer)"
 
27
fi
 
28
 
 
29
default_preseed
 
30
 
 
31
cd $CDDIR/..
 
32
 
 
33
#
 
34
# This script is called with $1 (now $N) as the CD to.
 
35
# make bootable.  N may be in the form "n" or "n_NONUS"
 
36
# There may be more than 4 disks...support extras.
 
37
 
 
38
# Strip NONUS part of disk number
 
39
# NN will be 1...N so it can be used as an index
 
40
#
 
41
NN=`echo $N | sed -e 's/_NONUS//'`
 
42
 
 
43
if [ "$CDIMAGE_ADDON" ]; then
 
44
    # second disk, at least in spirit
 
45
    NN=2
 
46
fi
 
47
 
 
48
if [ "$IMAGE_FORMAT" = iso ]; then
 
49
    echo -n "-J -joliet-long " > $N.mkisofs_opts
 
50
 
 
51
    "$BASEDIR/tools/sorting_weights" "$N"
 
52
    echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
 
53
fi
 
54
 
 
55
if [ "$IMAGE_FORMAT" != vfat ]; then
 
56
    echo "armel booting for image format '$IMAGE_FORMAT' disabled for now"
 
57
    exit 0
 
58
fi
 
59
 
 
60
# XXX hardcodes SUBARCH / FLAVOUR
 
61
SUBARCH=imx51
 
62
FLAVOUR=imx51
 
63
 
 
64
BOOT_IMAGES="udeb.list $SUBARCH/cdrom/initrd.gz"
 
65
DISK_IMAGES=""
 
66
TAR_IMAGES=""
 
67
 
 
68
if [ "$DI_WWW_HOME" ]; then
 
69
    echo "boot-armel does not support DI_WWW_HOME mode at the moment" >&2
 
70
    exit 1
 
71
fi
 
72
BOOT_IMAGE_KERNEL=`cd "$DI_PATH/current/images" && ls $SUBARCH/cdrom/vmlinuz*`
 
73
if [ -z "$BOOT_IMAGE_KERNEL" ]; then
 
74
    echo "no kernel found in $DI_PATH/current/images/$SUBARCH/cdrom/!" >&2
 
75
    exit 1
 
76
fi
 
77
BOOT_IMAGES="$BOOT_IMAGES $BOOT_IMAGE_KERNEL"
 
78
 
 
79
#### the snippet below was copied from the i386 version
 
80
# Download boot images
 
81
for image in $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do
 
82
    if [ ! -e "$image" ]; then
 
83
        dir=$(dirname $image)
 
84
        mkdir -p $dir
 
85
        if [ ! "$DI_WWW_HOME" ];then
 
86
                cp "$DI_PATH/current/images/$image" "$image"
 
87
        else
 
88
                wget "$DI_WWW_HOME/$image" -O "$image"
 
89
        fi
 
90
    fi
 
91
done
 
92
 
 
93
if [ "$BOOT_IMAGE_KERNEL" != "$SUBARCH/cdrom/vmlinuz" ]; then
 
94
    mv "$BOOT_IMAGE_KERNEL" "$SUBARCH/cdrom/vmlinuz"
 
95
fi
 
96
 
 
97
 
 
98
if [ "$NN" = "1" ]; then
 
99
    check_kernel_sync udeb.list $FLAVOUR
 
100
 
 
101
    if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
 
102
        cp -lf $SUBARCH/cdrom/vmlinuz $CDDIR/install/
 
103
        cp -lf $SUBARCH/cdrom/initrd.gz $CDDIR/install/
 
104
    fi
 
105
 
 
106
    if [ "$CDIMAGE_LIVE" = 1 ]; then
 
107
        mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR/casper/vmlinuz
 
108
        CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
 
109
        mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
 
110
    fi
 
111
fi
 
112
 
 
113
# th,th, thats all