mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist]  [PATCH] schedtool: add package
@ 2012-09-26 13:56 Wolf Erik
  2012-09-30 13:01 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Wolf Erik @ 2012-09-26 13:56 UTC (permalink / raw)
  To: ptxdist


Hi, 

i try to send my first (small) patch, i hope it works. 

How can I create patches like the format from wolfram sangs last patch? I was only able to do it in the fomat below... :( 

From 2bb361c3519c3c2c0f69848f4020f6c5f83791d8 Wed, 26 Sep 2012 15:48:46 +0200
From: Erik Wolf <erik.wolf@neuberger.net>
Date: Wed, 26 Sep 2012 15:48:05 +0200
Subject: [PATCH] schedtool: add package


diff --git a/rules/schedtool.in b/rules/schedtool.in
new file mode 100644
index 0000000..0a814f5
--- /dev/null
+++ b/rules/schedtool.in
@@ -0,0 +1,7 @@
+## SECTION=shell_and_console
+
+config SCHEDTOOL
+	tristate
+	prompt "schedtool"
+	help
+	  schedtool can be used to query or alter a process' scheduling policy under linux
diff --git a/rules/schedtool.make b/rules/schedtool.make
new file mode 100644
index 0000000..afc802f
--- /dev/null
+++ b/rules/schedtool.make
@@ -0,0 +1,59 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Martin Wagner <martin.wagner@neuberger.net>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SCHEDTOOL) += schedtool
+
+#
+# Paths and names
+#
+SCHEDTOOL_VERSION	:= 1.3.0
+SCHEDTOOL_MD5		:= 0d968f05d3ad7675f1f33ef1f6d0a3fb
+SCHEDTOOL		:= schedtool-$(SCHEDTOOL_VERSION)
+SCHEDTOOL_SUFFIX	:= tar.bz2
+SCHEDTOOL_URL		:= http://freequaos.host.sk/schedtool/$(SCHEDTOOL).$(SCHEDTOOL_SUFFIX)
+SCHEDTOOL_SOURCE	:= $(SRCDIR)/$(SCHEDTOOL).$(SCHEDTOOL_SUFFIX)
+SCHEDTOOL_DIR		:= $(BUILDDIR)/$(SCHEDTOOL)
+SCHEDTOOL_LICENSE	:= GPLv2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SCHEDTOOL_CONF_TOOL	:= NO
+SCHEDTOOL_MAKE_ENV	:= $(CROSS_ENV)
+SCHEDTOOL_MAKE_OPT 	:= CC=$(CROSS_CC) 
+
+$(STATEDIR)/schedtool.prepare:
+	@$(call targetinfo)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/schedtool.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, schedtool)
+	@$(call install_fixup, schedtool,PRIORITY,optional)
+	@$(call install_fixup, schedtool,SECTION,base)
+	@$(call install_fixup, schedtool,AUTHOR,"Martin Wagner <martin.wagner@neuberger.net>")
+	@$(call install_fixup, schedtool,DESCRIPTION,missing)
+
+	@$(call install_copy, schedtool, 0, 0, 0755, $(SCHEDTOOL_DIR)/schedtool, /bin/schedtool)
+
+	@$(call install_finish, schedtool)
+
+	@$(call touch)
+
+# vim: syntax=make

 
 
 
Mit freundlichen Grüßen
 
i.A. Erik Wolf
Hardwareentwicklung 
 
Neuberger Gebäudeautomation GmbH
Oberer Kaiserweg 6
91541 Rothenburg o.d.T.
 
Telefon:  +49 9861 402-542
Telefax:  +49 9861 402-533
E-Mail:   erik.wolf@neuberger.net
Internet: www.neuberger.net
 
Handelsregister: AG Ansbach HRB 4933
Sitz: Rothenburg ob der Tauber
Geschäftsführer: Klaus Lenkner
Ust.IdNr. DE 271 188 426


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] schedtool: add package
  2012-09-26 13:56 [ptxdist] [PATCH] schedtool: add package Wolf Erik
@ 2012-09-30 13:01 ` Michael Olbrich
  2012-10-01  7:39   ` Wagner Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2012-09-30 13:01 UTC (permalink / raw)
  To: ptxdist

Hi,

On Wed, Sep 26, 2012 at 03:56:50PM +0200, Wolf Erik wrote:
> i try to send my first (small) patch, i hope it works. 
> 
> How can I create patches like the format from wolfram sangs last patch? I was
> only able to do it in the fomat below... :( 

This is done with "git send-email".

> >From 2bb361c3519c3c2c0f69848f4020f6c5f83791d8 Wed, 26 Sep 2012 15:48:46 +0200
> From: Erik Wolf <erik.wolf@neuberger.net>
> Date: Wed, 26 Sep 2012 15:48:05 +0200
> Subject: [PATCH] schedtool: add package

Don't forget your "Signed-off-by:"

> diff --git a/rules/schedtool.in b/rules/schedtool.in
> new file mode 100644
> index 0000000..0a814f5
> --- /dev/null
> +++ b/rules/schedtool.in
> @@ -0,0 +1,7 @@
> +## SECTION=shell_and_console
> +
> +config SCHEDTOOL
> +	tristate
> +	prompt "schedtool"
> +	help
> +	  schedtool can be used to query or alter a process' scheduling policy under linux
> diff --git a/rules/schedtool.make b/rules/schedtool.make
> new file mode 100644
> index 0000000..afc802f
> --- /dev/null
> +++ b/rules/schedtool.make
> @@ -0,0 +1,59 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2012 by Martin Wagner <martin.wagner@neuberger.net>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_SCHEDTOOL) += schedtool
> +
> +#
> +# Paths and names
> +#
> +SCHEDTOOL_VERSION	:= 1.3.0
> +SCHEDTOOL_MD5		:= 0d968f05d3ad7675f1f33ef1f6d0a3fb
> +SCHEDTOOL		:= schedtool-$(SCHEDTOOL_VERSION)
> +SCHEDTOOL_SUFFIX	:= tar.bz2
> +SCHEDTOOL_URL		:= http://freequaos.host.sk/schedtool/$(SCHEDTOOL).$(SCHEDTOOL_SUFFIX)
> +SCHEDTOOL_SOURCE	:= $(SRCDIR)/$(SCHEDTOOL).$(SCHEDTOOL_SUFFIX)
> +SCHEDTOOL_DIR		:= $(BUILDDIR)/$(SCHEDTOOL)
> +SCHEDTOOL_LICENSE	:= GPLv2
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +SCHEDTOOL_CONF_TOOL	:= NO
> +SCHEDTOOL_MAKE_ENV	:= $(CROSS_ENV)

add CPPFLAGS="$(CROSS_CFLAGS) $(CROSS_CPPFLAGS)" here. Otherwise the
CROSS_CFLAGS set by ptxdist are missing (e.g. PTXCONF_TARGET_EXTRA_CFLAGS).

I know this is not easy to spot. So for testing things like this I usually
have:
PTXCONF_TARGET_EXTRA_CPPFLAGS="-Iptx-cppflags"
PTXCONF_TARGET_EXTRA_CFLAGS="-Iptx-cflags"
PTXCONF_TARGET_EXTRA_CXXFLAGS="-Iptx-cxxflags"
PTXCONF_TARGET_EXTRA_LDFLAGS="-Lptx-ldflags"

to see which flags are really added to the command line.

> +SCHEDTOOL_MAKE_OPT 	:= CC=$(CROSS_CC) 

Check your white spaces.

SCHEDTOOL_INSTALL_OPT  := DESTPREFIX=/usr install

and then ...

> +
> +$(STATEDIR)/schedtool.prepare:
> +	@$(call targetinfo)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/schedtool.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, schedtool)
> +	@$(call install_fixup, schedtool,PRIORITY,optional)
> +	@$(call install_fixup, schedtool,SECTION,base)
> +	@$(call install_fixup, schedtool,AUTHOR,"Martin Wagner <martin.wagner@neuberger.net>")
> +	@$(call install_fixup, schedtool,DESCRIPTION,missing)
> +

... change this here:

	@$(call install_copy, schedtool, 0, 0, 0755, -, /usr/bin/schedtool)

Michael

> +
> +	@$(call install_finish, schedtool)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> 
>  
>  
>  
> Mit freundlichen Grüßen
>  
> i.A. Erik Wolf
> Hardwareentwicklung 
>  
> Neuberger Gebäudeautomation GmbH
> Oberer Kaiserweg 6
> 91541 Rothenburg o.d.T.
>  
> Telefon:  +49 9861 402-542
> Telefax:  +49 9861 402-533
> E-Mail:   erik.wolf@neuberger.net
> Internet: www.neuberger.net
>  
> Handelsregister: AG Ansbach HRB 4933
> Sitz: Rothenburg ob der Tauber
> Geschäftsführer: Klaus Lenkner
> Ust.IdNr. DE 271 188 426
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] schedtool: add package
  2012-09-30 13:01 ` Michael Olbrich
@ 2012-10-01  7:39   ` Wagner Martin
  2012-10-04 12:21     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Wagner Martin @ 2012-10-01  7:39 UTC (permalink / raw)
  To: ptxdist

Hi,

As this is my first try porting a package into PTXdist, I think it's best to fix my own mistakes :-).


> On Wed, Sep 26, 2012 at 03:56:50PM +0200, Wolf Erik wrote:
> > i try to send my first (small) patch, i hope it works. 
> > 
> > How can I create patches like the format from wolfram sangs last 
> > patch? I was only able to do it in the fomat below... :(
> 
> This is done with "git send-email".
> 
> > >From 2bb361c3519c3c2c0f69848f4020f6c5f83791d8 Wed, 26 Sep 2012 
> > >15:48:46 +0200
> > From: Erik Wolf <erik.wolf@neuberger.net>
> > Date: Wed, 26 Sep 2012 15:48:05 +0200
> > Subject: [PATCH] schedtool: add package
> 
> Don't forget your "Signed-off-by:"
> 
> > diff --git a/rules/schedtool.in b/rules/schedtool.in new file mode 
> > 100644 index 0000000..0a814f5
> > --- /dev/null
> > +++ b/rules/schedtool.in
> > @@ -0,0 +1,7 @@
> > +## SECTION=shell_and_console
> > +
> > +config SCHEDTOOL
> > +	tristate
> > +	prompt "schedtool"
> > +	help
> > +	  schedtool can be used to query or alter a process' scheduling 
> > +policy under linux
> > diff --git a/rules/schedtool.make b/rules/schedtool.make 
> new file mode 
> > 100644 index 0000000..afc802f
> > --- /dev/null
> > +++ b/rules/schedtool.make
> > @@ -0,0 +1,59 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2012 by Martin Wagner 
> <martin.wagner@neuberger.net> # 
> > +# See CREDITS for details about who has contributed to 
> this project.
> > +#
> > +# For further information about the PTXdist project and license 
> > +conditions # see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_SCHEDTOOL) += schedtool
> > +
> > +#
> > +# Paths and names
> > +#
> > +SCHEDTOOL_VERSION	:= 1.3.0
> > +SCHEDTOOL_MD5		:= 0d968f05d3ad7675f1f33ef1f6d0a3fb
> > +SCHEDTOOL		:= schedtool-$(SCHEDTOOL_VERSION)
> > +SCHEDTOOL_SUFFIX	:= tar.bz2
> > +SCHEDTOOL_URL		:= 
> http://freequaos.host.sk/schedtool/$(SCHEDTOOL).$(SCHEDTOOL_SUFFIX)
> > +SCHEDTOOL_SOURCE	:= $(SRCDIR)/$(SCHEDTOOL).$(SCHEDTOOL_SUFFIX)
> > +SCHEDTOOL_DIR		:= $(BUILDDIR)/$(SCHEDTOOL)
> > +SCHEDTOOL_LICENSE	:= GPLv2
> > +
> > +# 
> > 
> +---------------------------------------------------------------------
> > +-------
> > +# Prepare
> > +# 
> > 
> +---------------------------------------------------------------------
> > +-------
> > +
> > +SCHEDTOOL_CONF_TOOL	:= NO
> > +SCHEDTOOL_MAKE_ENV	:= $(CROSS_ENV)
> 
> add CPPFLAGS="$(CROSS_CFLAGS) $(CROSS_CPPFLAGS)" here. 
> Otherwise the CROSS_CFLAGS set by ptxdist are missing (e.g. 
> PTXCONF_TARGET_EXTRA_CFLAGS).

Is there a documentation available about those flags, which are avaliable and which one to use in which case? In "how to become a PTXdist Guru" there are only a few. Looking what other people have done in other packages also didn't help me much further as it seems that everyone is doing it a little different...
Can you give me a hint which package I can use as a example of how it should be done? Or are the packages all this different from each other so that there are just no similar ones?

> 
> I know this is not easy to spot. So for testing things like 
> this I usually
> have:
> PTXCONF_TARGET_EXTRA_CPPFLAGS="-Iptx-cppflags"
> PTXCONF_TARGET_EXTRA_CFLAGS="-Iptx-cflags"
> PTXCONF_TARGET_EXTRA_CXXFLAGS="-Iptx-cxxflags"
> PTXCONF_TARGET_EXTRA_LDFLAGS="-Lptx-ldflags"
> 
> to see which flags are really added to the command line.

What are those variables supposed to do? I've built my package once with and once without them, but there is no difference on what is displayed.

> 
> > +SCHEDTOOL_MAKE_OPT 	:= CC=$(CROSS_CC) 
> 
> Check your white spaces.
> 
> SCHEDTOOL_INSTALL_OPT  := DESTPREFIX=/usr install
> 
> and then ...
> 
> > +
> > +$(STATEDIR)/schedtool.prepare:
> > +	@$(call targetinfo)
> > +	@$(call touch)
> > +
> > +# 
> > 
> +---------------------------------------------------------------------
> > +-------
> > +# Target-Install
> > +# 
> > 
> +---------------------------------------------------------------------
> > +-------
> > +
> > +$(STATEDIR)/schedtool.targetinstall:
> > +	@$(call targetinfo)
> > +
> > +	@$(call install_init, schedtool)
> > +	@$(call install_fixup, schedtool,PRIORITY,optional)
> > +	@$(call install_fixup, schedtool,SECTION,base)
> > +	@$(call install_fixup, schedtool,AUTHOR,"Martin Wagner 
> <martin.wagner@neuberger.net>")
> > +	@$(call install_fixup, schedtool,DESCRIPTION,missing)
> > +
> 
> ... change this here:
> 
> 	@$(call install_copy, schedtool, 0, 0, 0755, -, 
> /usr/bin/schedtool)
> 
> Michael
> 
> > +
> > +	@$(call install_finish, schedtool)
> > +
> > +	@$(call touch)
> > +
> > +# vim: syntax=make
> > 
> >  

 
Mit freundlichen Grüßen
 
i.A. Martin Wagner
Hardwareentwicklung 
 
Neuberger Gebäudeautomation GmbH
Oberer Kaiserweg 6
91541 Rothenburg o.d.T.
 
Telefon:  +49 9861 402-548
Telefax:  +49 9861 402-533
E-Mail:   martin.wagner@neuberger.net
Internet: www.neuberger.net
 
Handelsregister: AG Ansbach HRB 4933
Sitz: Rothenburg ob der Tauber
Geschäftsführer: Klaus Lenkner
Ust.IdNr. DE 271 188 426

 

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] schedtool: add package
  2012-10-01  7:39   ` Wagner Martin
@ 2012-10-04 12:21     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2012-10-04 12:21 UTC (permalink / raw)
  To: ptxdist

On Mon, Oct 01, 2012 at 09:39:14AM +0200, Wagner Martin wrote:
> > > +
> > > +SCHEDTOOL_CONF_TOOL	:= NO
> > > +SCHEDTOOL_MAKE_ENV	:= $(CROSS_ENV)
> > 
> > add CPPFLAGS="$(CROSS_CFLAGS) $(CROSS_CPPFLAGS)" here. 
> > Otherwise the CROSS_CFLAGS set by ptxdist are missing (e.g. 
> > PTXCONF_TARGET_EXTRA_CFLAGS).
> 
> Is there a documentation available about those flags, which are avaliable and
> which one to use in which case? In "how to become a PTXdist Guru" there are
> only a few. Looking what other people have done in other packages also didn't
> help me much further as it seems that everyone is doing it a little
> different...

Unfortunately not. Take a look at rules/pre/Rules.make. The flags and tools
defined there should always be used.

> Can you give me a hint which package I can use as a example of how it should
> be done? Or are the packages all this different from each other so that there
> are just no similar ones?

There is no good example, because every Makefile is broken in different
ways. You can look at the packages (grep -l '_CONF_TOOL.*NO' rules/*.make)
with plain Makefiles. It should give you some ideas, but please note, that
some of them are not correct either.

> > I know this is not easy to spot. So for testing things like 
> > this I usually
> > have:
> > PTXCONF_TARGET_EXTRA_CPPFLAGS="-Iptx-cppflags"
> > PTXCONF_TARGET_EXTRA_CFLAGS="-Iptx-cflags"
> > PTXCONF_TARGET_EXTRA_CXXFLAGS="-Iptx-cxxflags"
> > PTXCONF_TARGET_EXTRA_LDFLAGS="-Lptx-ldflags"
> > 
> > to see which flags are really added to the command line.
> 
> What are those variables supposed to do? I've built my package once with
> and once without them, but there is no difference on what is displayed.

These variables are set in the platformconfig. If you use CROSS_CFLAGS etc.
then they should show up as compiler flags.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-04 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 13:56 [ptxdist] [PATCH] schedtool: add package Wolf Erik
2012-09-30 13:01 ` Michael Olbrich
2012-10-01  7:39   ` Wagner Martin
2012-10-04 12:21     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox