mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/2] images: Add file size check for PBLX files
@ 2015-06-25  8:18 Wadim Egorov
  2015-06-25  8:18 ` [PATCH v2 2/2] ARM: OMAP: Add max file size for PBLX images Wadim Egorov
  2015-06-26  9:08 ` [PATCH v2 1/2] images: Add file size check for PBLX files Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Wadim Egorov @ 2015-06-25  8:18 UTC (permalink / raw)
  To: barebox

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

diff --git a/common/Kconfig b/common/Kconfig
index 3dfb5ac..cebe086 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -201,6 +201,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..6ee1dcc 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -75,6 +75,8 @@ 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

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

* [PATCH v2 2/2] ARM: OMAP: Add max file size for PBLX images
  2015-06-25  8:18 [PATCH v2 1/2] images: Add file size check for PBLX files Wadim Egorov
@ 2015-06-25  8:18 ` Wadim Egorov
  2015-06-26  9:08 ` [PATCH v2 1/2] images: Add file size check for PBLX files Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Wadim Egorov @ 2015-06-25  8:18 UTC (permalink / raw)
  To: barebox

On AM335x SOCs the maximum size of a downloaded MLO/PBLX image is 109 KB.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
v2:
	size fixed: size was 109*1000
---
 arch/arm/configs/am335x_mlo_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/am335x_mlo_defconfig b/arch/arm/configs/am335x_mlo_defconfig
index 1dd7567..b66a653 100644
--- a/arch/arm/configs/am335x_mlo_defconfig
+++ b/arch/arm/configs/am335x_mlo_defconfig
@@ -9,6 +9,7 @@ CONFIG_THUMB2_BAREBOX=y
 # CONFIG_MEMINFO is not set
 CONFIG_MMU=y
 CONFIG_TEXT_BASE=0x0
+CONFIG_BAREBOX_MAX_PBLX_SIZE=0x1b400
 CONFIG_MALLOC_SIZE=0x0
 CONFIG_MALLOC_TLSF=y
 CONFIG_RELOCATABLE=y
-- 
1.9.1


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

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

* Re: [PATCH v2 1/2] images: Add file size check for PBLX files
  2015-06-25  8:18 [PATCH v2 1/2] images: Add file size check for PBLX files Wadim Egorov
  2015-06-25  8:18 ` [PATCH v2 2/2] ARM: OMAP: Add max file size for PBLX images Wadim Egorov
@ 2015-06-26  9:08 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-06-26  9:08 UTC (permalink / raw)
  To: Wadim Egorov; +Cc: barebox

On Thu, Jun 25, 2015 at 10:18:28AM +0200, Wadim Egorov wrote:
> Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> ---
>  common/Kconfig  | 10 ++++++++++
>  images/Makefile |  2 ++
>  2 files changed, 12 insertions(+)

Applied, thanks

Sascha


-- 
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 |

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

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

end of thread, other threads:[~2015-06-26  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25  8:18 [PATCH v2 1/2] images: Add file size check for PBLX files Wadim Egorov
2015-06-25  8:18 ` [PATCH v2 2/2] ARM: OMAP: Add max file size for PBLX images Wadim Egorov
2015-06-26  9:08 ` [PATCH v2 1/2] images: Add file size check for PBLX files Sascha Hauer

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