All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: "Franklin S. Cooper Jr" <fcooperjr27@gmail.com>
Cc: meta-arago@arago-project.org
Subject: Re: [meta-arago-extras][PATCH] ti-oobe-script: Add script to parse ip address
Date: Mon, 24 Sep 2012 16:56:00 -0400	[thread overview]
Message-ID: <20120924205600.GC4278@denix.org> (raw)
In-Reply-To: <1348274766-27559-1-git-send-email-fcooper@ti.com>

On Fri, Sep 21, 2012 at 07:46:06PM -0500, Franklin S. Cooper Jr wrote:
> * Add script to parse ip address from the target system
>   and save it into a mmc partition that is mountable by
>   the host PC.
> * This is used to determine the right ip address to bring
>   up remote Matrix.
> 
> Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
> ---
>  .../recipes-tisdk/ti-oobe-script/ti-oobe-script.bb |   24 ++++++++++
>  .../ti-oobe-script/ti-oobe-script/init             |   46 ++++++++++++++++++++
>  2 files changed, 70 insertions(+), 0 deletions(-)
>  create mode 100644 meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script.bb
>  create mode 100644 meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script/init

Not a big deal, but the subject says extras, while the recipe is actually in 
distro, which I think is the correct location.

> diff --git a/meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script.bb b/meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script.bb
> new file mode 100644
> index 0000000..4aba91d
> --- /dev/null
> +++ b/meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script.bb
> @@ -0,0 +1,24 @@
> +DESCRIPTION = "Script to parse ip address during boot and make it available to the host system using shared partitions"
> +LICENSE = "BSD"
> +LIC_FILES_CHKSUM = "file://init;beginline=3;endline=31;md5=fc4b04a33df6d892c9f4d4a9d92b945e"
> +
> +COMPATIBLE_MACHINE = "ti33x"
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +SRC_URI = "file://init"
> +
> +PR = "r0"
> +
> +S = "${WORKDIR}"
> +
> +INITSCRIPT_NAME = "parse-ip"

Also, wouldn't it be better to call the recipe parse-ip as well, instead of 
ti-oobe-script? Is it meant to be extended in the future?


> +INITSCRIPT_PARAMS = "defaults 98"
> +
> +inherit update-rc.d
> +
> +do_install() {
> +    install -d ${D}${sysconfdir}/init.d
> +    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/parse-ip
> +}
> +
> +FILES_${PN} = "${sysconfdir}"
> diff --git a/meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script/init b/meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script/init
> new file mode 100644
> index 0000000..0020ea2
> --- /dev/null
> +++ b/meta-arago-distro/recipes-tisdk/ti-oobe-script/ti-oobe-script/init
> @@ -0,0 +1,46 @@
> +#!/bin/sh
> +
> +# This distribution contains contributions or derivatives under copyright
> +# as follows:
> +#
> +# Copyright (c) 2010, Texas Instruments Incorporated
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +# - Redistributions of source code must retain the above copyright notice,
> +#   this list of conditions and the following disclaimer.
> +# - Redistributions in binary form must reproduce the above copyright
> +#   notice, this list of conditions and the following disclaimer in the
> +#   documentation and/or other materials provided with the distribution.
> +# - Neither the name of Texas Instruments nor the names of its
> +#   contributors may be used to endorse or promote products derived
> +#   from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
> +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> +# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
> +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
> +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
> +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
> +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +case "$1" in
> +    start )
> +        if [ -e /media/mmcblk0p1 ]
> +        then
> +            echo `ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{print $1}'` > /media/mmcblk0p1/.ipaddr
> +            sync
> +	    sync
> +	fi
> +    ;;
> +    stop )
> +        exit 0;;
> +esac
> +
> +exit 0
> -- 
> 1.7.0.4
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> 


  reply	other threads:[~2012-09-24 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22  0:46 [meta-arago-extras][PATCH] ti-oobe-script: Add script to parse ip address Franklin S. Cooper Jr
2012-09-24 20:56 ` Denys Dmytriyenko [this message]
2012-09-24 21:02   ` Cooper Jr., Franklin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120924205600.GC4278@denix.org \
    --to=denis@denix.org \
    --cc=fcooperjr27@gmail.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.