mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 06/12] ARM: at91: use compressed DTB for AT91_MULTI_BOARDS
Date: Mon, 14 Oct 2019 14:18:55 +0200	[thread overview]
Message-ID: <20191014121901.19471-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20191014121901.19471-1-a.fatoum@pengutronix.de>

To offset the size increase by using multi-image have the DTBs be
compressed. This reduces e.g. the microchip_ksz9477_evb_defconfig
by about 22K from 244K to 222K.
This will also come in handy when implementing first stage support
later on.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/at91sam9263ek/lowlevel_init.c    | 4 ++--
 arch/arm/boards/at91sam9x5ek/lowlevel.c          | 4 ++--
 arch/arm/boards/microchip-ksz9477-evb/lowlevel.c | 5 +++--
 arch/arm/mach-at91/Kconfig                       | 1 +
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boards/at91sam9263ek/lowlevel_init.c b/arch/arm/boards/at91sam9263ek/lowlevel_init.c
index ba0ae39c7fee..0bf0e0fb4eeb 100644
--- a/arch/arm/boards/at91sam9263ek/lowlevel_init.c
+++ b/arch/arm/boards/at91sam9263ek/lowlevel_init.c
@@ -115,7 +115,7 @@ static void __bare_init at91sam9263ek_init(void *fdt)
 			  fdt);
 }
 
-extern char __dtb_at91sam9263ek_start[];
+extern char __dtb_z_at91sam9263ek_start[];
 
 ENTRY_FUNCTION(start_at91sam9263ek, r0, r1, r2)
 {
@@ -126,7 +126,7 @@ ENTRY_FUNCTION(start_at91sam9263ek, r0, r1, r2)
 	arm_setup_stack(AT91SAM9263_SRAM0_BASE + AT91SAM9263_SRAM0_SIZE);
 
 	if (IS_ENABLED(CONFIG_MACH_AT91SAM9263EK_DT))
-		fdt = __dtb_at91sam9263ek_start + get_runtime_offset();
+		fdt = __dtb_z_at91sam9263ek_start + get_runtime_offset();
 	else
 		fdt = NULL;
 
diff --git a/arch/arm/boards/at91sam9x5ek/lowlevel.c b/arch/arm/boards/at91sam9x5ek/lowlevel.c
index 9033597e7cb1..c1433c8f7e84 100644
--- a/arch/arm/boards/at91sam9x5ek/lowlevel.c
+++ b/arch/arm/boards/at91sam9x5ek/lowlevel.c
@@ -7,7 +7,7 @@
 #include <io.h>
 #include <debug_ll.h>
 
-extern char __dtb_at91sam9x5ek_start[];
+extern char __dtb_z_at91sam9x5ek_start[];
 
 ENTRY_FUNCTION(start_at91sam9x5ek, r0, r1, r2)
 {
@@ -16,7 +16,7 @@ ENTRY_FUNCTION(start_at91sam9x5ek, r0, r1, r2)
 	arm_cpu_lowlevel_init();
 	arm_setup_stack(AT91SAM9X5_SRAM_BASE + AT91SAM9X5_SRAM_SIZE);
 
-	fdt = __dtb_at91sam9x5ek_start + get_runtime_offset();
+	fdt = __dtb_z_at91sam9x5ek_start + get_runtime_offset();
 
 	barebox_arm_entry(AT91_CHIPSELECT_1, at91sam9x5_get_ddram_size(), fdt);
 }
diff --git a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
index 0ce2b299edbd..2a72ca321a09 100644
--- a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
+++ b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
@@ -12,7 +12,7 @@
 
 #include <mach/hardware.h>
 
-extern char __dtb_at91_microchip_ksz9477_evb_start[];
+extern char __dtb_z_at91_microchip_ksz9477_evb_start[];
 
 ENTRY_FUNCTION(start_sama5d3_xplained_ung8071, r0, r1, r2)
 {
@@ -22,7 +22,8 @@ ENTRY_FUNCTION(start_sama5d3_xplained_ung8071, r0, r1, r2)
 
 	arm_setup_stack(SAMA5D3_SRAM_BASE + SAMA5D3_SRAM_SIZE);
 
-	fdt = __dtb_at91_microchip_ksz9477_evb_start + get_runtime_offset();
+
+	fdt = __dtb_z_at91_microchip_ksz9477_evb_start + get_runtime_offset();
 
 	barebox_arm_entry(SAMA5_DDRCS, SZ_256M, fdt);
 }
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 8bb9cf8bbea8..070f2f6893dc 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -536,6 +536,7 @@ endif
 config AT91_MULTI_BOARDS
 	bool "Allow multiple boards to be selected"
 	select HAVE_PBL_MULTI_IMAGES
+	select ARM_USE_COMPRESSED_DTB
 
 if AT91_MULTI_BOARDS
 
-- 
2.23.0


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

  parent reply	other threads:[~2019-10-14 12:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 12:18 [PATCH 00/12] ARM: at91: improve sama5 and multi-image support Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 01/12] ARM: at91: at91sam9x5ek: squelch new dtc warning Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 02/12] ARM: at91: delete no-longer needed #ifdef guards Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 03/12] usb: gadget: at91_udc: don't depend on !ARCH_SAMA5D4 Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 04/12] ARM: at91: don't define ARCH_BAREBOX_MAX_BARE_INIT_SIZE for multi-image Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 05/12] ARM: at91: build for all SoCs when AT91_MULTI_BOARDS is selected Ahmad Fatoum
2019-10-14 12:18 ` Ahmad Fatoum [this message]
2019-10-14 12:18 ` [PATCH 07/12] LICENSES: add BSD-1-Clause license Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 08/12] ARM: at91: import lowlevel clock initialization from at91bootstrap Ahmad Fatoum
2019-10-14 12:42   ` Roland Hieber
2019-10-14 12:50     ` [PATCH] fixup! " Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 09/12] ARM: at91: import lowlevel dbgu UART init code " Ahmad Fatoum
2019-10-14 12:18 ` [PATCH 10/12] ARM: at91: microchip-ksz9477-evb: add debug_ll UART Ahmad Fatoum
2019-10-14 12:19 ` [PATCH 11/12] ARM: at91: add basic sama5d2 support Ahmad Fatoum
2019-10-14 12:19 ` [PATCH 12/12] ARM: at91: add basic sama5d2-som1-ek1 support Ahmad Fatoum

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=20191014121901.19471-7-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.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