[oe] [PATCH 13/15] initscripts-shr: add mountdevtmpfs init script for palmpre machine

Klaus 'mrmoku' Kurzmann mok at mnet-online.de
Wed Oct 20 08:04:32 UTC 2010


Acked-by: Klaus Kurzmann <mok at fluxnetz.de>

> On the palmpre machine we are currently come into the SHR rootfs through
> mounting it from /boot and switch the rootfs via pivot_root. So we can't
> automatically mount devtmpfs on /dev. Instead we do this right after SHR
> begins to boot and before any other filesystem is mounted on the new
> rootfs.
> 
> Signed-off-by: Simon Busch <morphis at gravedo.de>
> ---
>  .../shr/initscripts-shr/palmpre/mountdevtmpfs.sh   |    9 +++++++++
>  recipes/shr/initscripts-shr_0.0.1.bb               |    9 ++++++++-
>  2 files changed, 17 insertions(+), 1 deletions(-)
>  create mode 100644 recipes/shr/initscripts-shr/palmpre/mountdevtmpfs.sh
> 
> diff --git a/recipes/shr/initscripts-shr/palmpre/mountdevtmpfs.sh
> b/recipes/shr/initscripts-shr/palmpre/mountdevtmpfs.sh new file mode
> 100644
> index 0000000..dbeb7c0
> --- /dev/null
> +++ b/recipes/shr/initscripts-shr/palmpre/mountdevtmpfs.sh
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +mount -t devtmpfs -o mode=0755,nr_inodes=0 devtmpfs /dev
> +
> +# Create additional nodes which devtmpfs does not provide
> +test -c /dev/fd || ln -s /proc/self/fd /dev/fd
> +test -c /dev/stdin || ln -s fd/0 /dev/stdin
> +test -c /dev/stdout || ln -s fd/1 /dev/stdout
> +test -c /dev/stderr || ln -s fd/2 /dev/stderr
> diff --git a/recipes/shr/initscripts-shr_0.0.1.bb
> b/recipes/shr/initscripts-shr_0.0.1.bb index e4dc736..ce76fbd 100644
> --- a/recipes/shr/initscripts-shr_0.0.1.bb
> +++ b/recipes/shr/initscripts-shr_0.0.1.bb
> @@ -5,7 +5,7 @@ DEPENDS = ""
>  RDEPENDS_${PN} = "procps"
>  LICENSE = "GPL"
>  PV = "0.0.1"
> -PR = "r20"
> +PR = "r21"
> 
>  RCONFLICTS_${PN} = "initscripts"
> 
> @@ -32,6 +32,8 @@ SRC_URI = "file://alignment.sh \
>  	   file://umountnfs.sh \
>  	   "
> 
> +SRC_URI_append_palmpre = " file://mountdevtmpfs.sh"
> +
>  inherit base
> 
>  do_install () {
> @@ -74,6 +76,11 @@ do_install () {
>  	install -m 0755	${WORKDIR}/umountfs		${D}${sysconfdir}/init.d
>  	install -m 0755	${WORKDIR}/umountnfs.sh		${D}${sysconfdir}/init.d
> 
> +	if [ "${MACHINE}" == "palmpre" ]; then
> +		install -m 0755 ${WORKDIR}/mountdevtmpfs.sh ${D}${sysconfdir}/init.d
> +		ln -sf ../init.d/mountdevtmpfs.sh
> ${D}${sysconfdir}/rcS.d/S03mountdevtmpfs.sh +	fi
> +
>  #
>  # Create runlevel links
>  #
-- 
Klaus 'mrmoku' Kurzmann




More information about the Openembedded-devel mailing list