From: George Chan via B4 Relay <devnull+gchan9527.gmail.com@kernel.org>
To: Tom Rini <trini@konsulko.com>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Simon Glass <sjg@chromium.org>,
Casey Connolly <casey.connolly@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Sumit Garg <sumit.garg@kernel.org>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io,
George Chan <gchan9527@gmail.com>
Subject: [PATCH v2 2/5] mach-snapdragon: Enhance android image handling memory footprint
Date: Mon, 05 May 2025 17:17:10 +0800 [thread overview]
Message-ID: <20250505-android-boot-v2-2-92dcb5bf59c8@gmail.com> (raw)
In-Reply-To: <20250505-android-boot-v2-0-92dcb5bf59c8@gmail.com>
From: George Chan <gchan9527@gmail.com>
In order to unzipped kernel from androidboot img, extra memory for
loadaddr is needed. So once fastboot is enabled fastboot memory also
share with loadaddr.
That can balance with memory constrain soc and android usecase.
Signed-off-by: George Chan <gchan9527@gmail.com>
---
arch/arm/mach-snapdragon/board.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
index deae4d32378..3ee0933d962 100644
--- a/arch/arm/mach-snapdragon/board.c
+++ b/arch/arm/mach-snapdragon/board.c
@@ -500,8 +500,12 @@ int board_late_init(void)
status |= env_set_hex("ramdisk_addr_r", addr_alloc(SZ_128M));
status |= env_set_hex("kernel_comp_addr_r", addr_alloc(KERNEL_COMP_SIZE));
status |= env_set_hex("kernel_comp_size", KERNEL_COMP_SIZE);
- if (IS_ENABLED(CONFIG_FASTBOOT))
- status |= env_set_hex("fastboot_addr_r", addr_alloc(FASTBOOT_BUF_SIZE));
+ if (IS_ENABLED(CONFIG_FASTBOOT)) {
+ addr = addr_alloc(FASTBOOT_BUF_SIZE);
+ status |= env_set_hex("fastboot_addr_r", addr);
+ /* override loadaddr for memory rich soc */
+ status |= env_set_hex("loadaddr", addr);
+ }
status |= env_set_hex("scriptaddr", addr_alloc(SZ_4M));
status |= env_set_hex("pxefile_addr_r", addr_alloc(SZ_4M));
addr = addr_alloc(SZ_2M);
--
2.43.0
next prev parent reply other threads:[~2025-05-05 12:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 9:17 [PATCH v2 0/5] u-boot chain-loading LineageOS bootimg George Chan via B4 Relay
2025-05-05 9:17 ` [PATCH v2 1/5] boot/image-android: Workaround kernel/ramdisk invalid addr George Chan via B4 Relay
2025-05-05 12:22 ` Neil Armstrong
2025-05-07 9:30 ` Mattijs Korpershoek
2025-05-07 7:47 ` Mattijs Korpershoek
2025-05-08 4:22 ` george chan
2025-05-09 14:22 ` Mattijs Korpershoek
2025-05-05 9:17 ` George Chan via B4 Relay [this message]
2025-05-05 12:23 ` [PATCH v2 2/5] mach-snapdragon: Enhance android image handling memory footprint Neil Armstrong
2025-05-05 9:17 ` [PATCH v2 3/5] fdt_support: Add support for extra var for bootargs George Chan via B4 Relay
2025-05-05 9:17 ` [PATCH v2 4/5] qcom-phone.env: Example of new env var legacy_os_boot_param George Chan via B4 Relay
2025-05-05 9:17 ` [PATCH v2 5/5] mach-snapdragon: Enable workaround of ignoring androidboot addr George Chan via B4 Relay
2025-05-05 12:23 ` Neil Armstrong
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=20250505-android-boot-v2-2-92dcb5bf59c8@gmail.com \
--to=devnull+gchan9527.gmail.com@kernel.org \
--cc=casey.connolly@linaro.org \
--cc=gchan9527@gmail.com \
--cc=mkorpershoek@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=sjg@chromium.org \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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