1 |
commit: 4186feac966e2d1bf32f55282581a7a1d2810e3b |
2 |
Author: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net> |
3 |
AuthorDate: Thu Jul 28 01:52:53 2011 +0000 |
4 |
Commit: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net> |
5 |
CommitDate: Thu Jul 28 01:52:53 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=4186feac |
7 |
|
8 |
Add initrd support for cached kernels |
9 |
|
10 |
--- |
11 |
create_image.sh | 8 ++++++-- |
12 |
1 files changed, 6 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/create_image.sh b/create_image.sh |
15 |
index cc4e366..5052202 100755 |
16 |
--- a/create_image.sh |
17 |
+++ b/create_image.sh |
18 |
@@ -207,8 +207,9 @@ echo "Step 17: Setting up kernel" |
19 |
# If we got the flag, used a cached kernel to reduce build times for testing |
20 |
if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then |
21 |
echo "Using cached kernel" &>> ${LOG_FILE} |
22 |
- cp ${TOOL_RES_PATH}/bzImage boot/kernel || handle_error "Error copying cached kernel" |
23 |
- cp -R ${TOOL_RES_PATH}/kernelmodules/* lib/modules/ || handle_error "Error copying cached kernel modules" |
24 |
+ cp ${TOOL_RES_PATH}/kernel boot/kernel || handle_error "Error copying cached kernel" |
25 |
+ cp ${TOOL_RES_PATH}/initrd boot/initrd || handle_error "Error copying cached initrd" |
26 |
+ cp -R ${TOOL_RES_PATH}/modules/* lib/modules/ || handle_error "Error copying cached kernel modules" |
27 |
else |
28 |
echo "Downloading/installing kernel sources" &>> ${LOG_FILE} |
29 |
linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE} || handle_error "Error emerging kernel sources" |
30 |
@@ -256,6 +257,9 @@ echo "Step 22: Installing extlinux" |
31 |
extlinux --heads 255 --sectors 63 --install boot &>> ${LOG_FILE} || handle_error "Error installing extlinux" |
32 |
dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE} || handle_error "Error copying extlinux MBR" |
33 |
cp ${TOOL_RES_PATH}/extlinux.conf boot/ || handle_error "Error copying extlinux configuration" |
34 |
+if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then |
35 |
+ echo -e "\tinitrd initrd" >> boot/extlinux.conf || handle_error "Error adding initrd to bootloader" |
36 |
+fi |
37 |
cd .. |
38 |
cleanup_mounts |
39 |
case "${OUTPUT_FORMAT}" in |