aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-01-04 03:38:00 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-01-04 03:38:00 +0000
commit14c61e729d9612f57e1ab66b5916d6340935d847 (patch)
tree14ba869fe74922af2b29b4f9dd4572ef965d612e /gen_initramfs.sh
parentImprove option handling. (diff)
downloadgenkernel-14c61e729d9612f57e1ab66b5916d6340935d847.tar.gz
genkernel-14c61e729d9612f57e1ab66b5916d6340935d847.tar.bz2
genkernel-14c61e729d9612f57e1ab66b5916d6340935d847.zip
Add a few more directories and initial device nodes to the initramfs, and improve datestamp. Based on development by WilliamH for initramfs /usr mounting.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'gen_initramfs.sh')
-rwxr-xr-xgen_initramfs.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index c6446945..cfcfe979 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -13,8 +13,13 @@ append_base_layout() {
mkdir -p ${TEMP}/initramfs-base-temp/bin
mkdir -p ${TEMP}/initramfs-base-temp/etc
mkdir -p ${TEMP}/initramfs-base-temp/usr
+ mkdir -p ${TEMP}/initramfs-base-temp/lib
+ mkdir -p ${TEMP}/initramfs-base-temp/mnt
+ mkdir -p ${TEMP}/initramfs-base-temp/run
+ mkdir -p ${TEMP}/initramfs-base-temp/sbin
mkdir -p ${TEMP}/initramfs-base-temp/proc
mkdir -p ${TEMP}/initramfs-base-temp/temp
+ mkdir -p ${TEMP}/initramfs-base-temp/tmp
mkdir -p ${TEMP}/initramfs-base-temp/sys
mkdir -p ${TEMP}/initramfs-temp/.initrd
mkdir -p ${TEMP}/initramfs-base-temp/var/lock/dmraid
@@ -29,9 +34,12 @@ append_base_layout() {
cd ${TEMP}/initramfs-base-temp/dev
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3
+ mknod -m 660 zero c 1 5
+ mknod -m 600 tty0 c 4 0
mknod -m 600 tty1 c 4 1
+ mknod -m 600 ttyS0 c 4 64
- date '+%Y%m%d' > ${TEMP}/initramfs-base-temp/etc/build_date
+ date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date
cd "${TEMP}/initramfs-base-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \