Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael S. Zick <minimod@morethan.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Add support for package-declared devices
Date: Mon, 5 Sep 2011 05:08:25 -0500	[thread overview]
Message-ID: <201109050508.27068.minimod@morethan.org> (raw)
In-Reply-To: <201109042336.44526.arnout@mind.be>

On Sun September 4 2011, Arnout Vandecappelle wrote:
> 
> On Friday 02 September 2011 14:08:59, Maxime Ripard wrote:
> > Add a way for packages to declare files they need instead of relying
> > only on device tables, which creates files no matter if the package is
> > indeed enabled, as we can see for busybox.
> 
>  Good idea!  This will also make it possible to create setuid executables.
> 
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  Makefile                    |    4 ++++
> >  fs/common.mk                |    1 +
> >  package/Makefile.package.in |    1 +
> >  3 files changed, 6 insertions(+), 0 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index 9ed46fc..b293d2f 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -52,6 +52,10 @@ qstrip=$(strip $(subst ",,$(1)))
> >  comma:=,
> >  empty:=
> >  space:=$(empty) $(empty)
> > +define newline
> > +
> > +
> > +endef
> > 
> >  ifneq ("$(origin O)", "command line")
> >  O:=output
> > diff --git a/fs/common.mk b/fs/common.mk
> > index f793ff9..46d191b 100644
> > --- a/fs/common.mk
> > +++ b/fs/common.mk
> > @@ -50,6 +50,7 @@ $(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES)
> >  	echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
> >  ifneq ($(ROOTFS_DEVICE_TABLES),)
> >  	cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
> > +	echo -e '$(subst $(newline),\n,$(PACKAGES_DEVICE_TABLE))' >>
> > $(FULL_DEVICE_TABLE) echo "$(HOST_DIR)/usr/bin/makedevs -d
> > $(FULL_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT) endif
> >  	echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
> > diff --git a/package/Makefile.package.in b/package/Makefile.package.in
> > index 868bf28..d8d435e 100644
> > --- a/package/Makefile.package.in
> > +++ b/package/Makefile.package.in
> > @@ -541,6 +541,7 @@ endif
> >  ifeq ($$($$($(2)_KCONFIG_VAR)),y)
> > 
> >  TARGETS += $(1)
> > +PACKAGES_DEVICE_TABLE += $$($(2)_DEVICES)$$(newline)
> 
>  Since it anyway will be echo -e'd, why not just use the following?
> 
> +PACKAGES_DEVICE_TABLE += \n$$($(2)_DEVICES)
> 
> (I haven't tried it, but I expect the terminating space and the initial empty 
> line are not a problem.)
>

Couldn't the initial empty line be avoided by a fixed device declaration
that initializes PACKAGES_DEVICE_TABLE with something either harmless or
required?
Such as: /dev/console or /dev/null?

Mike 
> 
>  Regards,
>  Arnout
> 
> 
> > 
> >  ifeq ($$($(2)_SITE_METHOD),svn)
> >  DL_TOOLS_DEPENDENCIES += svn
> 

  parent reply	other threads:[~2011-09-05 10:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 12:08 [Buildroot] [pull request] Pull request for branch for-2011.11/pkg-device Maxime Ripard
2011-09-02 12:08 ` [Buildroot] [PATCH 1/2] Add support for package-declared devices Maxime Ripard
2011-09-04 21:36   ` Arnout Vandecappelle
2011-09-05  6:52     ` Thomas Petazzoni
2011-09-05 16:15       ` Maxime Ripard
2011-09-06 16:03         ` Arnout Vandecappelle
2011-09-07  9:21           ` Maxime Ripard
2011-09-07 16:22             ` Arnout Vandecappelle
2011-09-08  8:18               ` Maxime Ripard
2011-09-08  9:00                 ` Arnout Vandecappelle
2011-09-08 10:00                 ` Quotient Remainder
2011-09-08 11:03                   ` Luca Ceresoli
2011-09-08 11:24                     ` Michael S. Zick
2011-09-05  9:11     ` Maxime Ripard
2011-09-05 10:08     ` Michael S. Zick [this message]
2011-09-02 12:09 ` [Buildroot] [PATCH 2/2] Convert busybox to the device declaration method Maxime Ripard

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=201109050508.27068.minimod@morethan.org \
    --to=minimod@morethan.org \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox