Mercurial > hg > aboriginal
annotate system-image.sh @ 1252:ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 25 Sep 2010 13:40:04 -0500 |
parents | 61e7e9be8eb4 |
children | 6ea4204209d0 |
rev | line source |
---|---|
177 | 1 #!/bin/bash |
109
d9dae1196ea7
Package ext2 filesystem image using UML.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
888 | 3 # Package a root filesystem directory into a filesystem image, with |
4 # associated bootable kernel binary and launch scripts. | |
109
d9dae1196ea7
Package ext2 filesystem image using UML.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 |
669 | 6 source sources/include.sh || exit 1 |
109
d9dae1196ea7
Package ext2 filesystem image using UML.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 |
744
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
8 # Parse the sources/targets/$1 directory |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
9 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
10 read_arch_dir "$1" |
744
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
11 |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
12 # Do we have our prerequisites? |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
13 |
1116
2b68517f5b62
Break out simple-root-filesystem.sh and root-filesystem.sh (adding native-compiler.sh output), and use NO_NATIVE_COMPILER to determine which to use. Rename STATIC_CC_HOST to CROSS_HOST_ARCH.
Rob Landley <rob@landley.net>
parents:
1099
diff
changeset
|
14 if [ -z "$NATIVE_ROOT" ] |
2b68517f5b62
Break out simple-root-filesystem.sh and root-filesystem.sh (adding native-compiler.sh output), and use NO_NATIVE_COMPILER to determine which to use. Rename STATIC_CC_HOST to CROSS_HOST_ARCH.
Rob Landley <rob@landley.net>
parents:
1099
diff
changeset
|
15 then |
2b68517f5b62
Break out simple-root-filesystem.sh and root-filesystem.sh (adding native-compiler.sh output), and use NO_NATIVE_COMPILER to determine which to use. Rename STATIC_CC_HOST to CROSS_HOST_ARCH.
Rob Landley <rob@landley.net>
parents:
1099
diff
changeset
|
16 [ -z "$NO_NATIVE_COMPILER" ] && |
1176
29c86692f80d
Automatically use simple-root-filesystem if root-filesystem isn't avaialble.
Rob Landley <rob@landley.net>
parents:
1169
diff
changeset
|
17 NATIVE_ROOT="$BUILD/root-filesystem-$ARCH" |
29c86692f80d
Automatically use simple-root-filesystem if root-filesystem isn't avaialble.
Rob Landley <rob@landley.net>
parents:
1169
diff
changeset
|
18 |
29c86692f80d
Automatically use simple-root-filesystem if root-filesystem isn't avaialble.
Rob Landley <rob@landley.net>
parents:
1169
diff
changeset
|
19 [ -e "$NATIVE_ROOT" ] || |
1116
2b68517f5b62
Break out simple-root-filesystem.sh and root-filesystem.sh (adding native-compiler.sh output), and use NO_NATIVE_COMPILER to determine which to use. Rename STATIC_CC_HOST to CROSS_HOST_ARCH.
Rob Landley <rob@landley.net>
parents:
1099
diff
changeset
|
20 NATIVE_ROOT="$BUILD/simple-root-filesystem-$ARCH" |
2b68517f5b62
Break out simple-root-filesystem.sh and root-filesystem.sh (adding native-compiler.sh output), and use NO_NATIVE_COMPILER to determine which to use. Rename STATIC_CC_HOST to CROSS_HOST_ARCH.
Rob Landley <rob@landley.net>
parents:
1099
diff
changeset
|
21 fi |
2b68517f5b62
Break out simple-root-filesystem.sh and root-filesystem.sh (adding native-compiler.sh output), and use NO_NATIVE_COMPILER to determine which to use. Rename STATIC_CC_HOST to CROSS_HOST_ARCH.
Rob Landley <rob@landley.net>
parents:
1099
diff
changeset
|
22 |
744
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
23 if [ ! -d "$NATIVE_ROOT" ] |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
24 then |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
25 [ -z "$FAIL_QUIET" ] && echo No "$NATIVE_ROOT" >&2 |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
26 exit 1 |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
27 fi |
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
728
diff
changeset
|
28 |
813
e2fc10ede93f
Consistently use STAGE_DIR as the output directory. (root-filesystem.sh already did, host-tools.sh was using $HOSTTOOLS, cross-compiler.sh was using $CROSS, and system-image.sh was using SYSIMAGE.)
Rob Landley <rob@landley.net>
parents:
783
diff
changeset
|
29 # Announce start of stage. (Down here after the recursive call above so |
e2fc10ede93f
Consistently use STAGE_DIR as the output directory. (root-filesystem.sh already did, host-tools.sh was using $HOSTTOOLS, cross-compiler.sh was using $CROSS, and system-image.sh was using SYSIMAGE.)
Rob Landley <rob@landley.net>
parents:
783
diff
changeset
|
30 # it doesn't get announced twice.) |
764
dc34da83204d
Cosmetic fix: don't announce system-image.sh stage twice.
Rob Landley <rob@landley.net>
parents:
747
diff
changeset
|
31 |
dc34da83204d
Cosmetic fix: don't announce system-image.sh stage twice.
Rob Landley <rob@landley.net>
parents:
747
diff
changeset
|
32 echo "=== Packaging system image from root-filesystem" |
dc34da83204d
Cosmetic fix: don't announce system-image.sh stage twice.
Rob Landley <rob@landley.net>
parents:
747
diff
changeset
|
33 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
34 # The initramfs packaging uses the kernels build infrastructure, so extract |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
35 # it now. |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
537
diff
changeset
|
36 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
37 setupfor linux |
1065
1d776e44b908
Save the uClibc and linux .config files in the native toolchain, and install them with the rest of the native toolchain. Don't bother extracting and configuring the kernel if we don't need to.
Rob Landley <rob@landley.net>
parents:
1056
diff
changeset
|
38 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
39 [ -z "$SYSIMAGE_TYPE" ] && SYSIMAGE_TYPE=squashfs |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
40 echo "Generating $SYSIMAGE_TYPE root filesystem from $NATIVE_ROOT." |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
41 |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
42 # Embed an initramfs image in the kernel? |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
43 |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
44 if [ "$SYSIMAGE_TYPE" == "initramfs" ] |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
537
diff
changeset
|
45 then |
588
965923c576f3
More initramfs fixes. Still doesn't work yet.
Rob Landley <rob@landley.net>
parents:
586
diff
changeset
|
46 $CC usr/gen_init_cpio.c -o my_gen_init_cpio || dienow |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
47 ./my_gen_init_cpio <( |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
48 "$SOURCES"/toys/gen_initramfs_list.sh "$NATIVE_ROOT" || dienow |
597
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
593
diff
changeset
|
49 [ ! -e "$NATIVE_ROOT"/init ] && |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
50 echo "slink /init /sbin/init.sh 755 0 0" |
597
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
593
diff
changeset
|
51 [ ! -d "$NATIVE_ROOT"/dev ] && echo "dir /dev 755 0 0" |
590
8e7db79a3d75
Make initramfs work, add "--memory MEGS" option to ./run-emulator.sh and make run-from-build.sh use it.
Rob Landley <rob@landley.net>
parents:
588
diff
changeset
|
52 echo "nod /dev/console 660 0 0 c 5 1" |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
53 ) > initramfs_data.cpio || dienow |
588
965923c576f3
More initramfs fixes. Still doesn't work yet.
Rob Landley <rob@landley.net>
parents:
586
diff
changeset
|
54 echo Initramfs generated. |
354
d96741481221
User Mode Linux found a new way to break: now when it panics, it sends a kill
Rob Landley <rob@landley.net>
parents:
353
diff
changeset
|
55 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
56 # No need to supply an hda image to the emulator. |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
57 |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
58 IMAGE= |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
59 |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
60 MORE_KERNEL_CONFIG='CONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE="initramfs_data.cpio"\nCONFIG_INITRAMFS_COMPRESSION_GZIP=y' |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
61 |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
62 elif [ "$SYSIMAGE_TYPE" == "ext2" ] |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
63 then |
597
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
593
diff
changeset
|
64 # Generate a 64 megabyte ext2 filesystem image from the $NATIVE_ROOT |
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
593
diff
changeset
|
65 # directory, with a temporary file defining the /dev nodes for the new |
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
593
diff
changeset
|
66 # filesystem. |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
67 |
616
a95cb8f13284
Add SYSIMAGE_HDA_MEGS config parameter (defaulting to 64).
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
68 [ -z "$SYSIMAGE_HDA_MEGS" ] && SYSIMAGE_HDA_MEGS=64 |
a95cb8f13284
Add SYSIMAGE_HDA_MEGS config parameter (defaulting to 64).
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
69 |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
70 IMAGE="image-${ARCH}.ext2" |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
71 DEVLIST="$WORK"/devlist |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
72 |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
73 echo "/dev d 755 0 0 - - - - -" > "$DEVLIST" && |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
74 echo "/dev/console c 640 0 0 5 1 0 0 -" >> "$DEVLIST" && |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
75 |
671
fda459e9515a
Autodetect the amount of space in a mini-native directory for genext2fs.
Rob Landley <rob@landley.net>
parents:
669
diff
changeset
|
76 # Produce a filesystem with the currently used space plus 20% for filesystem |
fda459e9515a
Autodetect the amount of space in a mini-native directory for genext2fs.
Rob Landley <rob@landley.net>
parents:
669
diff
changeset
|
77 # overhead, which should always be big enough. |
642
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
78 |
712
9d766670154a
genext2fs needs a minimum amount of free space or it dies.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
79 BLOCKS=$[1024*(($(du -m -s "$NATIVE_ROOT" | awk '{print $1}')*12)/10)] |
9d766670154a
genext2fs needs a minimum amount of free space or it dies.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
80 [ $BLOCKS -lt 4096 ] && BLOCKS=4096 |
9d766670154a
genext2fs needs a minimum amount of free space or it dies.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
81 |
9d766670154a
genext2fs needs a minimum amount of free space or it dies.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
82 genext2fs -z -D "$DEVLIST" -d "$NATIVE_ROOT" -b $BLOCKS -i 1024 \ |
813
e2fc10ede93f
Consistently use STAGE_DIR as the output directory. (root-filesystem.sh already did, host-tools.sh was using $HOSTTOOLS, cross-compiler.sh was using $CROSS, and system-image.sh was using SYSIMAGE.)
Rob Landley <rob@landley.net>
parents:
783
diff
changeset
|
83 "$STAGE_DIR/$IMAGE" && |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
84 rm "$DEVLIST" || dienow |
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
85 |
642
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
86 # Extend image size to HDA_MEGS if necessary, keeping it sparse. (Feeding |
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
87 # a larger -b size to genext2fs is insanely slow, and not particularly |
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
88 # sparse.) |
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
89 |
1056
4a6f0088450c
Only rebuild kernel when we need to.
Rob Landley <rob@landley.net>
parents:
1005
diff
changeset
|
90 echo "$(stat -c %s "$STAGE_DIR/$IMAGE") -lt $SYSIMAGE_HDA_MEGS" |
4a6f0088450c
Only rebuild kernel when we need to.
Rob Landley <rob@landley.net>
parents:
1005
diff
changeset
|
91 |
4a6f0088450c
Only rebuild kernel when we need to.
Rob Landley <rob@landley.net>
parents:
1005
diff
changeset
|
92 if [ ! -z "$SYSIMAGE_HDA_MEGS" ] && |
4a6f0088450c
Only rebuild kernel when we need to.
Rob Landley <rob@landley.net>
parents:
1005
diff
changeset
|
93 [ $((`stat -c %s "$STAGE_DIR/$IMAGE"` / (1024*1024) )) -lt "$SYSIMAGE_HDA_MEGS" ] |
642
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
94 then |
1056
4a6f0088450c
Only rebuild kernel when we need to.
Rob Landley <rob@landley.net>
parents:
1005
diff
changeset
|
95 echo resizing image to $SYSIMAGE_HDA_MEGS |
813
e2fc10ede93f
Consistently use STAGE_DIR as the output directory. (root-filesystem.sh already did, host-tools.sh was using $HOSTTOOLS, cross-compiler.sh was using $CROSS, and system-image.sh was using SYSIMAGE.)
Rob Landley <rob@landley.net>
parents:
783
diff
changeset
|
96 dd if=/dev/zero of="$STAGE_DIR/$IMAGE" bs=1k count=1 seek=$[1024*1024-1] && |
e2fc10ede93f
Consistently use STAGE_DIR as the output directory. (root-filesystem.sh already did, host-tools.sh was using $HOSTTOOLS, cross-compiler.sh was using $CROSS, and system-image.sh was using SYSIMAGE.)
Rob Landley <rob@landley.net>
parents:
783
diff
changeset
|
97 resize2fs "$STAGE_DIR/$IMAGE" ${SYSIMAGE_HDA_MEGS}M || dienow |
1056
4a6f0088450c
Only rebuild kernel when we need to.
Rob Landley <rob@landley.net>
parents:
1005
diff
changeset
|
98 echo resize complete |
642
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
99 fi |
c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
Rob Landley <rob@landley.net>
parents:
640
diff
changeset
|
100 |
648
a72f7f70c003
Now that the 2.6.29 kernel is out with squashfs, add squashfs to host-tools.sh and system-image.sh.
Rob Landley <rob@landley.net>
parents:
643
diff
changeset
|
101 elif [ "$SYSIMAGE_TYPE" == "squashfs" ] |
a72f7f70c003
Now that the 2.6.29 kernel is out with squashfs, add squashfs to host-tools.sh and system-image.sh.
Rob Landley <rob@landley.net>
parents:
643
diff
changeset
|
102 then |
a72f7f70c003
Now that the 2.6.29 kernel is out with squashfs, add squashfs to host-tools.sh and system-image.sh.
Rob Landley <rob@landley.net>
parents:
643
diff
changeset
|
103 IMAGE="image-${ARCH}.sqf" |
813
e2fc10ede93f
Consistently use STAGE_DIR as the output directory. (root-filesystem.sh already did, host-tools.sh was using $HOSTTOOLS, cross-compiler.sh was using $CROSS, and system-image.sh was using SYSIMAGE.)
Rob Landley <rob@landley.net>
parents:
783
diff
changeset
|
104 mksquashfs "${NATIVE_ROOT}" "$STAGE_DIR/$IMAGE" -noappend -all-root \ |
1074
dd5be60a2794
Show squashfs progress indicator when not in FORK mode.
Rob Landley <rob@landley.net>
parents:
1072
diff
changeset
|
105 ${FORK:+-no-progress} -p "/dev d 755 0 0" \ |
dd5be60a2794
Show squashfs progress indicator when not in FORK mode.
Rob Landley <rob@landley.net>
parents:
1072
diff
changeset
|
106 -p "/dev/console c 666 0 0 5 1" || dienow |
586
c9c7420e952b
More tweaks to make hw- targets work.
Rob Landley <rob@landley.net>
parents:
581
diff
changeset
|
107 else |
c9c7420e952b
More tweaks to make hw- targets work.
Rob Landley <rob@landley.net>
parents:
581
diff
changeset
|
108 echo "Unknown image type." >&2 |
c9c7420e952b
More tweaks to make hw- targets work.
Rob Landley <rob@landley.net>
parents:
581
diff
changeset
|
109 dienow |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
537
diff
changeset
|
110 fi |
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
537
diff
changeset
|
111 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
112 echo Image generation complete. |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
113 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
114 # Build linux kernel for the target |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
580
diff
changeset
|
115 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
116 [ -z "$BOOT_KARCH" ] && BOOT_KARCH=$KARCH |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
117 make ARCH=$BOOT_KARCH $LINUX_FLAGS KCONFIG_ALLCONFIG=<(getconfig linux && echo -e "$MORE_KERNEL_CONFIG") allnoconfig >/dev/null && |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
118 make -j $CPUS ARCH=$BOOT_KARCH $DO_CROSS $LINUX_FLAGS $VERBOSITY && |
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
119 cp "$KERNEL_PATH" "$STAGE_DIR/zImage-$ARCH" |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
537
diff
changeset
|
120 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
121 cleanup |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
537
diff
changeset
|
122 |
893
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
123 # Provide qemu's common command line options between architectures. |
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
124 |
1081
e992bc65b048
Remove unnecessary "function" label from shell functions.
Rob Landley <rob@landley.net>
parents:
1074
diff
changeset
|
125 kernel_cmdline() |
893
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
126 { |
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
127 [ "$SYSIMAGE_TYPE" != "initramfs" ] && |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
128 echo -n "root=/dev/$ROOT rw init=/sbin/init.sh " |
893
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
129 |
1163
2b05860c6cf1
Update initramfs generation to deal with kernel changes, and rip out unnecessary complexity (backgrounding the kernel build, partial rebuild) that other stages don't do.
Rob Landley <rob@landley.net>
parents:
1152
diff
changeset
|
130 echo -n "panic=1 PATH=\$DISTCC_PATH_PREFIX/bin console=$CONSOLE" |
893
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
131 echo -n " HOST=$ARCH ${KERNEL_EXTRA}\$KERNEL_EXTRA" |
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
132 } |
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
133 |
1081
e992bc65b048
Remove unnecessary "function" label from shell functions.
Rob Landley <rob@landley.net>
parents:
1074
diff
changeset
|
134 qemu_defaults() |
325
51bcd6de223d
Redo plumbing that constructs run-emulator.sh. Group common qemu command
Rob Landley <rob@landley.net>
parents:
317
diff
changeset
|
135 { |
893
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
136 echo -n "-nographic -no-reboot -kernel \"$2\" \$WITH_HDC \$WITH_HDB" |
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
137 [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -hda \"$1\"" |
9ae3c9520bec
Split out kernel_cmdline from qemu-defaults.
Rob Landley <rob@landley.net>
parents:
888
diff
changeset
|
138 echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA" |
325
51bcd6de223d
Redo plumbing that constructs run-emulator.sh. Group common qemu command
Rob Landley <rob@landley.net>
parents:
317
diff
changeset
|
139 } |
51bcd6de223d
Redo plumbing that constructs run-emulator.sh. Group common qemu command
Rob Landley <rob@landley.net>
parents:
317
diff
changeset
|
140 |
490
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
141 # Write out a script to call the appropriate emulator. We split out the |
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
142 # filesystem, kernel, and base kernel command line arguments in case you want |
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
143 # to use an emulator other than qemu, but put the default case in qemu_defaults |
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
144 |
1005
ed8e33b81032
Make run-emulator.sh executable.
Rob Landley <rob@landley.net>
parents:
1000
diff
changeset
|
145 cat > "$STAGE_DIR/run-emulator.sh" << EOF && |
1000
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
146 ARCH=$ARCH |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
147 run_emulator() |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
148 { |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
149 [ ! -z "\$DEBUG" ] && set -x |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
150 $(emulator_command "$IMAGE" zImage-$ARCH) |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
151 } |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
152 |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
153 if [ "\$1" != "--norun" ] |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
154 then |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
155 run_emulator |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
156 fi |
6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
Rob Landley <rob@landley.net>
parents:
999
diff
changeset
|
157 EOF |
1005
ed8e33b81032
Make run-emulator.sh executable.
Rob Landley <rob@landley.net>
parents:
1000
diff
changeset
|
158 chmod +x "$STAGE_DIR/run-emulator.sh" && |
864
5660a438421b
Make system-image.sh write out dev-environment.sh from a here document.
Rob Landley <rob@landley.net>
parents:
863
diff
changeset
|
159 |
1072
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
160 # Write out development wrapper scripts, substituting INCLUDE lines. |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
161 |
1169
d13ddec32cee
Only include the dev-environment.sh and native-build.sh scripts when the system image contains native development tools.
Rob Landley <rob@landley.net>
parents:
1163
diff
changeset
|
162 [ -z "$NO_NATIVE_COMPILER" ] && for FILE in dev-environment.sh native-build.sh |
1072
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
163 do |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
164 (export IFS="$(echo -e "\n")" |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
165 cat "$SOURCES/toys/$FILE" | while read -r i |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
166 do |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
167 if [ "${i:0:8}" == "INCLUDE " ] |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
168 then |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
169 cat "$SOURCES/toys/${i:8}" || dienow |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
170 else |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
171 # because echo doesn't support --, that's why. |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
172 echo "$i" || dienow |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
173 fi |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
174 done |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
175 ) > "$STAGE_DIR/$FILE" |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
176 |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
177 chmod +x "$STAGE_DIR/$FILE" || dienow |
94b0b4ef1157
Add native-build.sh to system-image (it takes only one argument now, the build control system image file). Make system-image.sh script processing understand an INCLUDE syntax to insert unique-port, and trim the unique-port comment to something less distracting.
Rob Landley <rob@landley.net>
parents:
1071
diff
changeset
|
178 done |
490
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
179 |
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
180 # Tar it up. |
004f9509349b
Rip out User Mode Linux, switch to genext2fs instead. (Based on an old patch from James Davidson.)
Rob Landley <rob@landley.net>
parents:
486
diff
changeset
|
181 |
988
30e4bab11f9e
Rename SKIP_STAGE_TARBALLS to NO_STAGE_TARBALLS (for consistency), and make system-image.sh use it instead of doing it by hand.
Rob Landley <rob@landley.net>
parents:
972
diff
changeset
|
182 ARCH="$ARCH_NAME" create_stage_tarball |
267
98c1a2136322
Update package-mini-native.sh to create qemu-image-$ARCH.tar.bz2
Rob Landley <rob@landley.net>
parents:
264
diff
changeset
|
183 |
1067
d4b0e9d731fc
Minor cleanup, collate the === announce lines.
Rob Landley <rob@landley.net>
parents:
1066
diff
changeset
|
184 echo "=== Packaging complete" |