Mercurial > hg > aboriginal
annotate root-image.sh @ 1582:6a8114c148d1
Lots of small improvements: check for toybox instead of busybox for host-tools $PATH adjustment, better manifest generation (with toybox in list), make package_cache function to find extracted source (so root-image.sh works when packages contains linux-git snapshot), fix more/record-commands.sh path adjustment.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 17 Feb 2013 22:25:00 -0600 |
parents | 5c29a091278a |
children | 8bbf3038c0f2 |
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 && |
1582
6a8114c148d1
Lots of small improvements: check for toybox instead of busybox for host-tools $PATH adjustment, better manifest generation (with toybox in list), make package_cache function to find extracted source (so root-image.sh works when packages contains linux-git snapshot), fix more/record-commands.sh path adjustment.
Rob Landley <rob@landley.net>
parents:
1459
diff
changeset
|
40 $CC "$(package_cache $PACKAGE)/usr/gen_init_cpio.c" -o my_gen_init_cpio || |
6a8114c148d1
Lots of small improvements: check for toybox instead of busybox for host-tools $PATH adjustment, better manifest generation (with toybox in list), make package_cache function to find extracted source (so root-image.sh works when packages contains linux-git snapshot), fix more/record-commands.sh path adjustment.
Rob Landley <rob@landley.net>
parents:
1459
diff
changeset
|
41 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
|
42 ./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
|
43 "$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
|
44 [ ! -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
|
45 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
|
46 [ ! -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
|
47 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
|
48 ) > "$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
|
49 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
|
50 |
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 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
|
52 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
|
53 # 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
|
54 # 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
|
55 # 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
|
56 |
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 [ -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
|
58 |
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 # 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
|
60 # 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
|
61 |
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=$[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
|
63 [ $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
|
64 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
|
65 |
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
|
66 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
|
67 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
|
68 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
|
69 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
|
70 |
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 # 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
|
72 # 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
|
73 # 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
|
74 |
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
|
75 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
|
76 [ $((`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
|
77 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
|
78 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
|
79 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
|
80 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
|
81 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
|
82 |
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 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
|
84 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
|
85 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
|
86 ${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
|
87 -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
|
88 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
|
89 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
|
90 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
|
91 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
|
92 |
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 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
|
94 |
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
|
95 echo Image generation complete. |