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>
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io,
George Chan <gchan9527@gmail.com>
Subject: [PATCH 0/3] u-boot chain-loading LineageOS bootimg
Date: Sun, 27 Apr 2025 19:25:19 +0800 [thread overview]
Message-ID: <20250427-android-boot-v1-0-bb6b37c9c9f1@gmail.com> (raw)
This is a series of patches to enable chainloading LineageOS on qcom SOC.
First patch is to workaround kernel/ramdisk invalid addr by identify
its physical memory address out-of-range. Since qcom SOC usually have
0x80000000 as start/base/real memory address but androidboot img
specified to around 0x0. If other vendor bootloader behave similar then
this patch can also workaround it as well.
Second patch is enable bootmeth-android to have chance for extra mem block.
Usually the fastboot mem block, to hold androidboot img, and loadaddr for
unzipped kernel. If other SOC have extra mem block available but
fastboot block, we can add extra logic to take care of it.
Third patch is optional to enable snapdragon board to have extra cmdline
found from original bootloader that is required for LineageOS boot init.
An alternate method is to put the append string into a dummy device-tree
file, as /chosen/bootarg ofnode porperty, that also contain msm-id. Then
encapsulate as androidboot img and let u-boot as kernel binary. Below is
an example for Xiaomi Miatoll device.
/dts-v1/;
/ {
qcom,msm-id = <443 0x0>;
qcom,board-id = <0 0>,
<0x10022 1>,
<0x20022 1>,
<0x30022 1>,
<0x40022 1>,
<0x50022 1>;
#address-cells = <2>;
#size-cells = <2>;
memory {
ddr_device_type = <0x07>;
/* We expect the bootloader to fill in the size */
reg = <0 0 0 0>;
};
chosen {
bootargs = "";
};
};
Signed-off-by: George Chan <gchan9527@gmail.com>
---
George Chan (3):
boot/image-android.c: Workaround androidboot kernel/ramdisk addr
boot/bootmeth-android.c: Reuse fastboot memory block for unzip kernel
mach-snapdragon: Add support to append string to kernel cmdline
arch/arm/mach-snapdragon/Kconfig | 11 +++++
arch/arm/mach-snapdragon/board.c | 97 ++++++++++++++++++++++++++++++++++++++++
boot/bootmeth_android.c | 12 +++++
boot/image-android.c | 10 +++++
4 files changed, 130 insertions(+)
---
base-commit: 5a0a93a768487e55ebe50a34cc90d751bf99cc56
change-id: 20250427-android-boot-ecbb768cda72
Best regards,
--
George Chan <gchan9527@gmail.com>
next reply other threads:[~2025-04-27 12:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-27 11:25 George Chan via B4 Relay [this message]
2025-04-27 11:25 ` [PATCH 1/3] boot/image-android.c: Workaround androidboot kernel/ramdisk addr George Chan via B4 Relay
2025-04-27 11:25 ` [PATCH 2/3] boot/bootmeth-android.c: Reuse fastboot memory block for unzip kernel George Chan via B4 Relay
2025-04-27 11:25 ` [PATCH 3/3] mach-snapdragon: Add support to append string to kernel cmdline George Chan via B4 Relay
2025-04-28 13:53 ` [PATCH 0/3] u-boot chain-loading LineageOS bootimg Casey Connolly
2025-04-29 4:04 ` george chan
2025-04-29 8:30 ` Mattijs Korpershoek
2025-04-30 3:58 ` george chan
2025-04-30 12:03 ` Mattijs Korpershoek
2025-04-30 15:13 ` george chan
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=20250427-android-boot-v1-0-bb6b37c9c9f1@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=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