* [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts
@ 2014-05-14 7:54 Teresa Gámez
2014-05-14 7:54 ` [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images Teresa Gámez
2014-05-14 8:49 ` [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Alexander Aring
0 siblings, 2 replies; 6+ messages in thread
From: Teresa Gámez @ 2014-05-14 7:54 UTC (permalink / raw)
To: ptxdist
Creating multiple device trees result in a quite
long DTC_OFTREE_DTS variable. Splitting it into a
path variable and file variable makes it more handy.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
platforms/dtc.in | 7 ++++++-
rules/post/dts.make | 8 ++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/platforms/dtc.in b/platforms/dtc.in
index a39af97..de10aaa 100644
--- a/platforms/dtc.in
+++ b/platforms/dtc.in
@@ -19,9 +19,14 @@ config DTC_INSTALL_OFTREE
Creates an package to install the 'oftree' file to /boot
of your target system.
+config DTC_OFTREE_DTS_PATH
+ string "path to source dts file"
+ help
+ Define path to the dts source file.
+
config DTC_OFTREE_DTS
string "source dts file"
- default "${KERNEL_DIR}/arch/${PTXCONF_KERNEL_ARCH_STRING}/boot/dts/<yourboard>.dts"
+ default "<yourboard>.dts"
help
Select the dts file to use for the device tree binary
blob generation. Default is to use the one shipped with
diff --git a/rules/post/dts.make b/rules/post/dts.make
index 8d2b7fe..b39a4f0 100644
--- a/rules/post/dts.make
+++ b/rules/post/dts.make
@@ -12,10 +12,14 @@
# defined in post/ to make sure PTXCONF_DTC_OFTREE_DTS is fully defined
# .dtb depends on the .dts and dtc.install for all other dependencies
#
+
+DTS_PATH = $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTS_PATH))
+
$(foreach dts, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTS)), \
- $(eval $(IMAGEDIR)/$(call ptx/dtb, $(dts)): $(dts) $(STATEDIR)/dtc.install))
+ $(eval $(IMAGEDIR)/$(call ptx/dtb, $(DTS_PATH)/$(dts)): \
+ $(DTS_PATH)/$(dts) $(STATEDIR)/dtc.install))
$(foreach dts, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTS)), \
- $(eval $(dts): $(STATEDIR)/kernel.extract.post))
+ $(eval $(DTS_PATH)/$(dts): $(STATEDIR)/kernel.extract.post))
# vim: syntax=make
--
1.7.0.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images
2014-05-14 7:54 [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Teresa Gámez
@ 2014-05-14 7:54 ` Teresa Gámez
2014-05-14 8:47 ` Alexander Aring
2014-05-14 8:49 ` [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Alexander Aring
1 sibling, 1 reply; 6+ messages in thread
From: Teresa Gámez @ 2014-05-14 7:54 UTC (permalink / raw)
To: ptxdist
New barebox versions may create multiple MLO images.
Adapted barebox_mlo rule to handle this.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
rules/barebox_mlo.make | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make
index 3c53575..8b2bce4 100644
--- a/rules/barebox_mlo.make
+++ b/rules/barebox_mlo.make
@@ -76,9 +76,20 @@ $(STATEDIR)/barebox_mlo.install:
$(STATEDIR)/barebox_mlo.targetinstall:
@$(call targetinfo)
# #barebox renamed barebox.bin.ift to MLO, so fall back to barebox.bin.ift
- @ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
- "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
- install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"
+ @rm -f $(IMAGEDIR)/MLO
+ @for image in `ls $(BAREBOX_MLO_DIR)/images/barebox-*-mlo.img`; do \
+ install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \
+ if [ ! -e $(IMAGEDIR)/MLO ]; then \
+ ln -sf `basename $$image` $(IMAGEDIR)/MLO; \
+ fi; \
+ done
+ @if [ -e $(IMAGEDIR)/MLO ]; then \
+ :; \
+ else \
+ ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
+ "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
+ install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"; \
+ fi
@$(call touch)
--
1.7.0.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images
2014-05-14 7:54 ` [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images Teresa Gámez
@ 2014-05-14 8:47 ` Alexander Aring
2014-05-14 9:04 ` Uwe Kleine-König
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Aring @ 2014-05-14 8:47 UTC (permalink / raw)
To: ptxdist
On Wed, May 14, 2014 at 09:54:32AM +0200, Teresa Gámez wrote:
> New barebox versions may create multiple MLO images.
> Adapted barebox_mlo rule to handle this.
>
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> ---
> rules/barebox_mlo.make | 17 ++++++++++++++---
> 1 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make
> index 3c53575..8b2bce4 100644
> --- a/rules/barebox_mlo.make
> +++ b/rules/barebox_mlo.make
> @@ -76,9 +76,20 @@ $(STATEDIR)/barebox_mlo.install:
> $(STATEDIR)/barebox_mlo.targetinstall:
> @$(call targetinfo)
> # #barebox renamed barebox.bin.ift to MLO, so fall back to barebox.bin.ift
> - @ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
> - "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
> - install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"
> + @rm -f $(IMAGEDIR)/MLO
> + @for image in `ls $(BAREBOX_MLO_DIR)/images/barebox-*-mlo.img`; do \
> + install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \
> + if [ ! -e $(IMAGEDIR)/MLO ]; then \
> + ln -sf `basename $$image` $(IMAGEDIR)/MLO; \
> + fi; \
> + done
> + @if [ -e $(IMAGEDIR)/MLO ]; then \
> + :; \
> + else \
> + ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
> + "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
> + install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"; \
> + fi
negative logic here, without explicit do nothing [if -e $(IMAGEDIR)/MLO] ?
Or we should call "exit 1" here? I don't know if ptxdist can handle this
as error or this case can ever happen.
And why ":;"?
- Alex
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images
2014-05-14 8:47 ` Alexander Aring
@ 2014-05-14 9:04 ` Uwe Kleine-König
2014-05-14 9:22 ` Alexander Aring
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2014-05-14 9:04 UTC (permalink / raw)
To: ptxdist
On Wed, May 14, 2014 at 10:47:38AM +0200, Alexander Aring wrote:
> On Wed, May 14, 2014 at 09:54:32AM +0200, Teresa Gámez wrote:
> > New barebox versions may create multiple MLO images.
> > Adapted barebox_mlo rule to handle this.
> >
> > Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> > ---
> > rules/barebox_mlo.make | 17 ++++++++++++++---
> > 1 files changed, 14 insertions(+), 3 deletions(-)
> >
> > diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make
> > index 3c53575..8b2bce4 100644
> > --- a/rules/barebox_mlo.make
> > +++ b/rules/barebox_mlo.make
> > @@ -76,9 +76,20 @@ $(STATEDIR)/barebox_mlo.install:
> > $(STATEDIR)/barebox_mlo.targetinstall:
> > @$(call targetinfo)
> > # #barebox renamed barebox.bin.ift to MLO, so fall back to barebox.bin.ift
> > - @ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
> > - "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
> > - install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"
> > + @rm -f $(IMAGEDIR)/MLO
> > + @for image in `ls $(BAREBOX_MLO_DIR)/images/barebox-*-mlo.img`; do \
> > + install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \
> > + if [ ! -e $(IMAGEDIR)/MLO ]; then \
> > + ln -sf `basename $$image` $(IMAGEDIR)/MLO; \
> > + fi; \
> > + done
> > + @if [ -e $(IMAGEDIR)/MLO ]; then \
> > + :; \
> > + else \
> > + ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
> > + "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
> > + install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"; \
> > + fi
> negative logic here, without explicit do nothing [if -e $(IMAGEDIR)/MLO] ?
> Or we should call "exit 1" here? I don't know if ptxdist can handle this
> as error or this case can ever happen.
>
> And why ":;"?
You need a command in the then branch:
$ sh -c 'if true; then
# nothing
else
echo jippie
fi'
sh: 3: Syntax error: "else" unexpected
Using ":" instead of "# nothing" works fine.
An option is [ ! -e $(IMAGEDIR)/MLO ];.
ISTR that
if ! $somecommand; then ...
isn't portable, but I think [ supports ! everywhere.
Apart from that, there are missing quotes, better write
if [ ! -e "$(IMAGEDIR)/MLO" ]; then \
but the surrounding code seems affected, too.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images
2014-05-14 9:04 ` Uwe Kleine-König
@ 2014-05-14 9:22 ` Alexander Aring
0 siblings, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2014-05-14 9:22 UTC (permalink / raw)
To: ptxdist
On Wed, May 14, 2014 at 11:04:01AM +0200, Uwe Kleine-König wrote:
> On Wed, May 14, 2014 at 10:47:38AM +0200, Alexander Aring wrote:
> > On Wed, May 14, 2014 at 09:54:32AM +0200, Teresa Gámez wrote:
> > > New barebox versions may create multiple MLO images.
> > > Adapted barebox_mlo rule to handle this.
> > >
> > > Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> > > ---
> > > rules/barebox_mlo.make | 17 ++++++++++++++---
> > > 1 files changed, 14 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make
> > > index 3c53575..8b2bce4 100644
> > > --- a/rules/barebox_mlo.make
> > > +++ b/rules/barebox_mlo.make
> > > @@ -76,9 +76,20 @@ $(STATEDIR)/barebox_mlo.install:
> > > $(STATEDIR)/barebox_mlo.targetinstall:
> > > @$(call targetinfo)
> > > # #barebox renamed barebox.bin.ift to MLO, so fall back to barebox.bin.ift
> > > - @ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
> > > - "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
> > > - install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"
> > > + @rm -f $(IMAGEDIR)/MLO
> > > + @for image in `ls $(BAREBOX_MLO_DIR)/images/barebox-*-mlo.img`; do \
> > > + install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \
> > > + if [ ! -e $(IMAGEDIR)/MLO ]; then \
> > > + ln -sf `basename $$image` $(IMAGEDIR)/MLO; \
> > > + fi; \
> > > + done
> > > + @if [ -e $(IMAGEDIR)/MLO ]; then \
> > > + :; \
> > > + else \
> > > + ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
> > > + "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
> > > + install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"; \
> > > + fi
> > negative logic here, without explicit do nothing [if -e $(IMAGEDIR)/MLO] ?
> > Or we should call "exit 1" here? I don't know if ptxdist can handle this
> > as error or this case can ever happen.
> >
> > And why ":;"?
> You need a command in the then branch:
>
> $ sh -c 'if true; then
> # nothing
> else
> echo jippie
> fi'
> sh: 3: Syntax error: "else" unexpected
>
> Using ":" instead of "# nothing" works fine.
ok.
>
> An option is [ ! -e $(IMAGEDIR)/MLO ];.
> ISTR that
>
> if ! $somecommand; then ...
>
> isn't portable, but I think [ supports ! everywhere.
>
> Apart from that, there are missing quotes, better write
>
> if [ ! -e "$(IMAGEDIR)/MLO" ]; then \
>
> but the surrounding code seems affected, too.
Yea, you mean the line:
if [ ! -e $(IMAGEDIR)/MLO ]; then \
I never saw a test implementation builtin or coreutils implementation
which doesn't support a "!". But you can never be sure...
- Alex
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts
2014-05-14 7:54 [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Teresa Gámez
2014-05-14 7:54 ` [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images Teresa Gámez
@ 2014-05-14 8:49 ` Alexander Aring
1 sibling, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2014-05-14 8:49 UTC (permalink / raw)
To: ptxdist
On Wed, May 14, 2014 at 09:54:31AM +0200, Teresa Gámez wrote:
> Creating multiple device trees result in a quite
> long DTC_OFTREE_DTS variable. Splitting it into a
> path variable and file variable makes it more handy.
>
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> ---
> platforms/dtc.in | 7 ++++++-
> rules/post/dts.make | 8 ++++++--
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/platforms/dtc.in b/platforms/dtc.in
> index a39af97..de10aaa 100644
> --- a/platforms/dtc.in
> +++ b/platforms/dtc.in
> @@ -19,9 +19,14 @@ config DTC_INSTALL_OFTREE
> Creates an package to install the 'oftree' file to /boot
> of your target system.
>
> +config DTC_OFTREE_DTS_PATH
> + string "path to source dts file"
> + help
> + Define path to the dts source file.
> +
Maybe put as default value:
"${KERNEL_DIR}/arch/${PTXCONF_KERNEL_ARCH_STRING}/boot/dts/"
then you can keep the old behaviour.
- Alex
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-14 9:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-14 7:54 [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Teresa Gámez
2014-05-14 7:54 ` [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images Teresa Gámez
2014-05-14 8:47 ` Alexander Aring
2014-05-14 9:04 ` Uwe Kleine-König
2014-05-14 9:22 ` Alexander Aring
2014-05-14 8:49 ` [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox