mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Wadim Egorov <w.egorov@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] images: Add file size check for PBLX files
Date: Wed, 10 Jun 2015 09:05:51 +0200	[thread overview]
Message-ID: <1433919952-28025-1-git-send-email-w.egorov@phytec.de> (raw)

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 common/Kconfig  | 10 ++++++++++
 images/Makefile |  1 +
 2 files changed, 11 insertions(+)

diff --git a/common/Kconfig b/common/Kconfig
index 1c5d14c..0ffa783 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -198,6 +198,16 @@ config BAREBOX_MAX_BARE_INIT_SIZE
 	  this will allow your bare_init to fit in SRAM as example
 	  ARCH can overwrite it via ARCH_BAREBOX_MAX_BARE_INIT_SIZE
 
+config BAREBOX_MAX_PBLX_SIZE
+	depends on PBL_MULTI_IMAGES
+	depends on IMAGE_COMPRESSION
+	prompt "Maximum PBLX size"
+	hex
+	default 0xffffffff
+	help
+	  Define the maximum size of the PBLX image.
+	  The pblx is a self extracting barebox binary.
+
 config HAVE_CONFIGURABLE_MEMORY_LAYOUT
 	bool
 
diff --git a/images/Makefile b/images/Makefile
index 587cb26..bbbfd81 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -75,6 +75,7 @@ quiet_cmd_pblx ?= PBLX    $@
 
 $(obj)/%.pblx: $(obj)/%.pblb $(obj)/barebox.z FORCE
 	$(call if_changed,pblx,$(@F))
+	$(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_PBLX_SIZE))
 
 $(obj)/%.s: $(obj)/% FORCE
 	$(call if_changed,disasm)
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-06-10  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  7:05 Wadim Egorov [this message]
2015-06-10  7:05 ` [PATCH 2/2] ARM: OMAP: Add max file size for PBLX images Wadim Egorov

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=1433919952-28025-1-git-send-email-w.egorov@phytec.de \
    --to=w.egorov@phytec.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox