[PATCH 4/4] usb: gadget: Introduce usb gadget vendor/product default id for ARCH_QCOM

2025-05-20 Thread George Chan via B4 Relay
From: George Chan Currently vendor/product id are both 0, and that might not as we want. Set to some arbitary known value that we can make it work more smoothly. Signed-off-by: George Chan --- drivers/usb/gadget/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget

[PATCH 0/4] A series of patch for enable sc7180 android boot

2025-05-20 Thread George Chan via B4 Relay
/pipermail/u-boot/2025-April/585995.html Signed-off-by: George Chan --- George Chan (4): image-android: Prepend/postpend default bootargs value with given bootcmd iommu: qcom-smmu: Introduce sc7180 compatible string boot: bootmeth_android: Conditionally dependent on abootimg usb

[PATCH 1/4] image-android: Prepend/postpend default bootargs value with given bootcmd

2025-05-20 Thread George Chan via B4 Relay
From: George Chan Control how default bootargs is prepended or postpended to boot param found from androidboot img. Signed-off-by: George Chan --- boot/Kconfig | 8 boot/image-android.c | 10 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/boot

[PATCH 3/4] boot: bootmeth_android: Conditionally dependent on abootimg

2025-05-20 Thread George Chan via B4 Relay
From: George Chan If target u-boot img do not support androidboot v3 or greater, abootimg might not be necessary. aarch64-linux-gnu-ld.bfd: boot/bootmeth_android.o: in function `boot_android_normal': /home/user/sources/u-boot-next/boot/bootmeth_android.c:541:(.text.boot_android_normal

[PATCH 2/4] iommu: qcom-smmu: Introduce sc7180 compatible string

2025-05-20 Thread George Chan via B4 Relay
From: George Chan Add basic compatible string for sc7180 family soc. Signed-off-by: Vitalii Skorkin Co-developed-by: George Chan Signed-off-by: George Chan --- drivers/iommu/qcom-hyp-smmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/qcom-hyp-smmu.c b/drivers/iommu

[PATCH v3 3/3] mach-snapdragon: Enhance android image handling memory footprint

2025-05-18 Thread George Chan via B4 Relay
From: George Chan 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. Reviewed-by: Neil Armstrong Signed-off-by: George Chan

[PATCH v3 0/3] u-boot chain-loading LineageOS bootimg

2025-05-18 Thread George Chan via B4 Relay
CONFIG_FASTBOOT is because that also imply CONFIG_ANDROID_BOOT_IMAGE set y. To: Tom Rini To: Mattijs Korpershoek To: Simon Glass To: Casey Connolly To: Neil Armstrong To: Sumit Garg To: Rayagonda Kokatanur Cc: u-boot@lists.denx.de Cc: u-boot-q...@groups.io Signed-off-by: George Chan Changes

[PATCH v3 1/3] boot/image-android: Workaround kernel/ramdisk invalid addr

2025-05-18 Thread George Chan via B4 Relay
From: George Chan Some androidboot image have invalid kernel/ramdisk load addr, force to ignore those value and use loadaddr instead. There is a concern on exposing the whole memory to image loading is dangerous. Also, since it's not always possible to change the load addr by repackin

[PATCH v3 2/3] mach-snapdragon: Enable workaround of ignoring androidboot addr

2025-05-18 Thread George Chan via B4 Relay
From: George Chan Enable the workaround for whole snapdragon family. Suggested-by: Casey Connolly Reviewed-by: Neil Armstrong Signed-off-by: George Chan --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fedfdb21457

Re: [PATCH v2 1/5] boot/image-android: Workaround kernel/ramdisk invalid addr

2025-05-08 Thread george chan
t; I have a couple of small remarks below. > > On lun., mai 05, 2025 at 17:17, George Chan via B4 Relay < > devnull+gchan9527.gmail....@kernel.org> wrote: > > > From: George Chan > > > > Some androidboot image have invalid kernel/ramdisk load addr, > > fo

[PATCH v2 0/5] u-boot chain-loading LineageOS bootimg

2025-05-05 Thread George Chan via B4 Relay
Kokatanur Cc: u-boot@lists.denx.de Cc: u-boot-q...@groups.io Signed-off-by: George Chan Changes in v2: - Revised patch #1 to control by kconfig, suggested by Casey - Split old #1 into new #1 and #5 for maintainer to choose. - Revised Casey's approach for #2 and make it as band-aid atm. - Re

[PATCH v2 2/5] mach-snapdragon: Enhance android image handling memory footprint

2025-05-05 Thread George Chan via B4 Relay
From: George Chan 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 --- arch/arm/mach

[PATCH v2 4/5] qcom-phone.env: Example of new env var legacy_os_boot_param

2025-05-05 Thread George Chan via B4 Relay
From: George Chan This is an example for newly introduced env_var legacy_os_boot_param that will append 'console=ramoops' to fdt bootargs. Signed-off-by: George Chan --- board/qualcomm/qcom-phone.env | 4 1 file changed, 4 insertions(+) diff --git a/board/qualcomm/qcom-phone.e

[PATCH v2 5/5] mach-snapdragon: Enable workaround of ignoring androidboot addr

2025-05-05 Thread George Chan via B4 Relay
From: George Chan Enable the workaround for whole snapdragon family. Suggested-by: Casey Connolly Signed-off-by: George Chan --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index df373d38a55..249bd4b5bf3 100644 --- a/arch/arm

[PATCH v2 1/5] boot/image-android: Workaround kernel/ramdisk invalid addr

2025-05-05 Thread George Chan via B4 Relay
From: George Chan Some androidboot image have invalid kernel/ramdisk load addr, force to ignore those value and use loadaddr instead. Suggested-by: Casey Connolly Signed-off-by: George Chan --- boot/Kconfig | 6 ++ boot/image-android.c | 9 ++--- 2 files changed, 12

[PATCH v2 3/5] fdt_support: Add support for extra var for bootargs

2025-05-05 Thread George Chan via B4 Relay
From: George Chan Introduce a new env var 'legacy_os_boot_param' to hold legacy OS dependent boot param. Signed-off-by: George Chan --- boot/Kconfig | 9 + boot/fdt_support.c | 20 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/bo

Re: [PATCH 0/3] u-boot chain-loading LineageOS bootimg

2025-04-30 Thread george chan
Hi Mattijs, Thx for reply. I like your attitude and appreciate it. There are many topic get silent in the end. > >> It's a bit unclear to me why it's impractical to repack the boot.img and > >> specify the appropriate address. Could you elaborate ? > > > > > > It is hard to ask less experience p

Re: [PATCH 0/3] u-boot chain-loading LineageOS bootimg

2025-04-29 Thread george chan
> Thanks a lot for the series, it's super exciting to see support for > > booting Android on top of U-Boot :D > > > > On 4/27/25 13:25, George Chan via B4 Relay wrote: > >> This is a series of patches to enable chainloading LineageOS on qcom > SOC. > >> &g

Re: [PATCH 0/3] u-boot chain-loading LineageOS bootimg

2025-04-28 Thread george chan
Hi Casey, Thx for reply. Sorry for a bit long message for explain the problem. 在 2025年4月28日週一 21:53,Casey Connolly 寫道: > Hi George, > > Thanks a lot for the series, it's super exciting to see support for > booting Android on top of U-Boot :D > > On 4/27/25 13:25, George

[PATCH 2/3] boot/bootmeth-android.c: Reuse fastboot memory block for unzip kernel

2025-04-27 Thread George Chan via B4 Relay
From: George Chan Some androidboot images have gzipped kernel so we need to reuse extra mem block for holding gzipped boot.img, and let loadaddr to hold unzipped kernel data. Here we choose fastboot memory for reuse and avoid dramatically increase memory footprint. Signed-off-by: George Chan

[PATCH 3/3] mach-snapdragon: Add support to append string to kernel cmdline

2025-04-27 Thread George Chan via B4 Relay
From: George Chan Add support for blindly appending string to bootargs env_param and let boot process take care of it. Signed-off-by: George Chan --- arch/arm/mach-snapdragon/Kconfig | 11 + arch/arm/mach-snapdragon/board.c | 97 2 files changed

[PATCH 1/3] boot/image-android.c: Workaround androidboot kernel/ramdisk addr

2025-04-27 Thread George Chan via B4 Relay
From: George Chan Some vendor bootloader ignored kernel/ramdisk addr and use their own addr. Even those addr are pointing to out-of-reach memory block at 0, and available address start at 0x8000. So we also need to use our own available addr for loadaddr. Signed-off-by: George Chan

[PATCH 0/3] u-boot chain-loading LineageOS bootimg

2025-04-27 Thread George Chan via B4 Relay
device_type = <0x07>; /* We expect the bootloader to fill in the size */ reg = <0 0 0 0>; }; chosen { bootargs = ""; }; }; Signed-off-by: George Chan --- George Chan (3): boot/image-android.c: Workaround a

[PATCH RFC] bootm: ARM64 EL1 direct jump to kernel start

2025-04-07 Thread George Chan via B4 Relay
From: George Chan It was EL3->EL2 or EL2->EL1 when boot. But in many case such chain loading from bootloader is already run in EL1. There is no practically way to raise EL1 to EL2. Thus theonly way to start kernel is direct jump. This apporach is similar to KEXEC purgatory idea but do no

[PATCH RFC] fdt.c: fdt chosen cmd had off-by-one issue

2025-04-07 Thread George Chan via B4 Relay
From: George Chan The kernel searching bootconfig will be off-by-1 and never match thus always not found in this case. Signed-off-by: George Chan --- The searching will shift-by-1 and never match the bootconfig thus always not found bootconfig this case. Kernel: data = (char