annotate root-image.sh @ 1459:5c29a091278a

Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
author Rob Landley <rob@landley.net>
date Thu, 20 Oct 2011 02:03:48 -0500
parents f1d2afdf2034
children 6a8114c148d1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Package a root filesystem directory into a filesystem image file
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 source sources/include.sh || exit 1
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
6
1398
b74d36876c0a Replace read_arch_dir with load_target, which understands that sources/targets/$TARGET can be a file or a directory.
Rob Landley <rob@landley.net>
parents: 1366
diff changeset
7 # Parse sources/targets/$1
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
1398
b74d36876c0a Replace read_arch_dir with load_target, which understands that sources/targets/$TARGET can be a file or a directory.
Rob Landley <rob@landley.net>
parents: 1366
diff changeset
9 load_target "$1"
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
10
1401
f1d2afdf2034 Add base_architecture, make base architectures and extra targets work, and move i586 virtio stuff to new i686-kvm target.
Rob Landley <rob@landley.net>
parents: 1398
diff changeset
11 check_for_base_arch || exit 0
f1d2afdf2034 Add base_architecture, make base architectures and extra targets work, and move i586 virtio stuff to new i686-kvm target.
Rob Landley <rob@landley.net>
parents: 1398
diff changeset
12
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 # Which directory do we package up?
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
14
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 if [ -z "$NATIVE_ROOT" ]
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 then
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 [ -z "$NO_NATIVE_COMPILER" ] &&
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 NATIVE_ROOT="$BUILD/root-filesystem-$ARCH"
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
19
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 [ -e "$NATIVE_ROOT" ] ||
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 NATIVE_ROOT="$BUILD/simple-root-filesystem-$ARCH"
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 fi
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
23
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 if [ ! -d "$NATIVE_ROOT" ]
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 then
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 [ -z "$FAIL_QUIET" ] && echo No "$NATIVE_ROOT" >&2
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 exit 1
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
28 fi
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
29
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 [ -z "$SYSIMAGE_TYPE" ] && SYSIMAGE_TYPE=squashfs
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
31
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
32 echo "Generating $SYSIMAGE_TYPE root filesystem from $NATIVE_ROOT."
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
33
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
34 # Embed an initramfs image in the kernel?
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
35
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 if [ "$SYSIMAGE_TYPE" == "initramfs" ]
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
37 then
1366
2059add65b8c Fix initramfs packaging (never fixed gen_init_cpio.c into sources/toys, best to use the copy out of the Linux source anyway).
Rob Landley <rob@landley.net>
parents: 1350
diff changeset
38 # Borrow gen_init_cpio.c out of package cache copy of Linux source
2059add65b8c Fix initramfs packaging (never fixed gen_init_cpio.c into sources/toys, best to use the copy out of the Linux source anyway).
Rob Landley <rob@landley.net>
parents: 1350
diff changeset
39 extract_package linux &&
2059add65b8c Fix initramfs packaging (never fixed gen_init_cpio.c into sources/toys, best to use the copy out of the Linux source anyway).
Rob Landley <rob@landley.net>
parents: 1350
diff changeset
40 $CC "$SRCTREE/$PACKAGE/usr/gen_init_cpio.c" -o my_gen_init_cpio || dienow
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
41 ./my_gen_init_cpio <(
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
42 "$SOURCES"/toys/gen_initramfs_list.sh "$NATIVE_ROOT" || dienow
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
43 [ ! -e "$NATIVE_ROOT"/init ] &&
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
44 echo "slink /init /sbin/init.sh 755 0 0"
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
45 [ ! -d "$NATIVE_ROOT"/dev ] && echo "dir /dev 755 0 0"
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
46 echo "nod /dev/console 660 0 0 c 5 1"
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
47 ) > "$STAGE_DIR/initramfs_data.cpio" || dienow
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
48 echo Initramfs generated.
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
49
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
50 elif [ "$SYSIMAGE_TYPE" == "ext2" ]
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
51 then
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
52 # Generate a 64 megabyte ext2 filesystem image from the $NATIVE_ROOT
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
53 # directory, with a temporary file defining the /dev nodes for the new
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
54 # filesystem.
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
55
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
56 [ -z "$SYSIMAGE_HDA_MEGS" ] && SYSIMAGE_HDA_MEGS=64
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
57
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
58 # Produce a filesystem with the currently used space plus 20% for filesystem
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
59 # overhead, which should always be big enough.
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
60
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
61 BLOCKS=$[1024*(($(du -m -s "$NATIVE_ROOT" | awk '{print $1}')*12)/10)]
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
62 [ $BLOCKS -lt 4096 ] && BLOCKS=4096
1459
5c29a091278a Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
Rob Landley <rob@landley.net>
parents: 1401
diff changeset
63 IMAGE="$STAGE_DIR/hda.ext2"
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
64
1459
5c29a091278a Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
Rob Landley <rob@landley.net>
parents: 1401
diff changeset
65 echo "/dev d 755 0 0 - - - - -" > "$WORK/devs" &&
5c29a091278a Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
Rob Landley <rob@landley.net>
parents: 1401
diff changeset
66 echo "/dev/console c 640 0 0 5 1 0 0 -" >> "$WORK/devs" &&
5c29a091278a Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
Rob Landley <rob@landley.net>
parents: 1401
diff changeset
67 genext2fs -z -D "$WORK/devs" -d "$NATIVE_ROOT" -b $BLOCKS -i 1024 "$IMAGE" &&
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
68 rm "$WORK/devs" || dienow
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
69
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
70 # Extend image size to HDA_MEGS if necessary, keeping it sparse. (Feeding
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
71 # a larger -b size to genext2fs is insanely slow, and not particularly
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
72 # sparse.)
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
73
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
74 if [ ! -z "$SYSIMAGE_HDA_MEGS" ] &&
1459
5c29a091278a Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
Rob Landley <rob@landley.net>
parents: 1401
diff changeset
75 [ $((`stat -c %s "$IMAGE"` / (1024*1024) )) -lt "$SYSIMAGE_HDA_MEGS" ]
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
76 then
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
77 echo resizing image to $SYSIMAGE_HDA_MEGS
1459
5c29a091278a Oops, the SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS stuff never quite got completed when root-image was split out from system-image. Make that work.
Rob Landley <rob@landley.net>
parents: 1401
diff changeset
78 resize2fs "$IMAGE" ${SYSIMAGE_HDA_MEGS}M || dienow
1350
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
79 echo resize complete
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
80 fi
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
81
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
82 elif [ "$SYSIMAGE_TYPE" == "squashfs" ]
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
83 then
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
84 mksquashfs "${NATIVE_ROOT}" "$STAGE_DIR/hda.sqf" -noappend -all-root \
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
85 ${FORK:+-no-progress} -p "/dev d 755 0 0" \
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
86 -p "/dev/console c 666 0 0 5 1" || dienow
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
87 else
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
88 echo "Unknown image type $SYSIMAGE_TYPE" >&2
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
89 dienow
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
90 fi
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
91
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
92 create_stage_tarball
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
93
7eabfa815c90 Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
diff changeset
94 echo Image generation complete.