Skip to content

Commit

Permalink
baseroot: add flagfile to indicate we're in an initramfs
Browse files Browse the repository at this point in the history
This is used by udev to deal with firmware requests for firmware that is
not available until the real root. It will also be used by systemd to
detect what to do, if that is ever used.

ref: http://www.spinics.net/lists/linux-wireless/msg94522.html

Signed-off-by: Tom Gundersen <teg@jklm.no>
  • Loading branch information
teg authored and falconindy committed Jul 24, 2012
1 parent 7894028 commit b8459a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions
Expand Up @@ -618,7 +618,7 @@ initialize_buildroot() {
fi

# base directory structure
install -dm755 "$workdir/root"/{new_root,proc,sys,dev,run,tmp,usr/{local,lib,bin}}
install -dm755 "$workdir/root"/{new_root,proc,sys,dev,run,tmp,etc,usr/{local,lib,bin}}
ln -s "usr/lib" "$workdir/root/lib"
ln -s "../lib" "$workdir/root/usr/local/lib"
ln -s "bin" "$workdir/root/usr/sbin"
Expand All @@ -629,6 +629,9 @@ initialize_buildroot() {
# kernel module dir
install -dm755 "$workdir/root/usr/lib/modules/$kernver/kernel"

# indicate that this is an initramfs
>"$workdir/root/etc/initrd-release"

printf '%s' "$workdir"
}

Expand Down

0 comments on commit b8459a2

Please sign in to comment.