Mercurial > hg > aboriginal
annotate linux-kernel.sh @ 1744:4c3164f0d2c2 draft
As long as current kernels have an overlay filesystem, might as well enable it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 22 Feb 2015 17:22:00 -0600 |
parents | b89324905ca2 |
children |
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:
1358
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:
1358
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 |
1516
f19ce5e2ec02
Combining KCONFIG_ALLSYMS=<() sometimes works, but not always. Just use a file.
Rob Landley <rob@landley.net>
parents:
1406
diff
changeset
|
11 setupfor linux |
f19ce5e2ec02
Combining KCONFIG_ALLSYMS=<() sometimes works, but not always. Just use a file.
Rob Landley <rob@landley.net>
parents:
1406
diff
changeset
|
12 |
1728
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
13 # Build linux kernel for the target |
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
|
14 |
1516
f19ce5e2ec02
Combining KCONFIG_ALLSYMS=<() sometimes works, but not always. Just use a file.
Rob Landley <rob@landley.net>
parents:
1406
diff
changeset
|
15 getconfig linux > mini.conf |
1728
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
16 [ "$SYSIMAGE_TYPE" == rootfs ] && |
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
17 echo -e "CONFIG_INITRAMFS_SOURCE=\"$BUILD/rootfs-$ARCH.cpio\"\n" \ |
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
18 >> mini.conf |
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
19 make ARCH=${BOOT_KARCH:-$KARCH} $LINUX_FLAGS KCONFIG_ALLCONFIG=mini.conf \ |
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
20 allnoconfig >/dev/null && |
b89324905ca2
Giant redo to put simple-root-filesystem in initmpfs.
Rob Landley <rob@landley.net>
parents:
1652
diff
changeset
|
21 make -j $CPUS ARCH=${BOOT_KARCH:-$KARCH} $DO_CROSS $LINUX_FLAGS $VERBOSITY && |
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
|
22 cp "$KERNEL_PATH" "$STAGE_DIR" |
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 cleanup |
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 |
1406
aca2150c9531
Fix variant target bug where linux-kernel.sh was using the base architecture name to create the stage tarball. It was both wrong and didn't work when we hadn't built the base architecture yet.
Rob Landley <rob@landley.net>
parents:
1398
diff
changeset
|
26 ARCH="$ARCH_NAME" create_stage_tarball |