All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Chan <gchan9527@gmail.com>
To: Tom Rini <trini@konsulko.com>,
	 Casey Connolly <casey.connolly@linaro.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	 Sumit Garg <sumit.garg@kernel.org>,
	Simon Glass <sjg@chromium.org>,
	 Mattijs Korpershoek <mkorpershoek@kernel.org>,
	 Lukasz Majewski <lukma@denx.de>, Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io, gchan9527@gmail.com,
	 Vitalii Skorkin <nikroks@mainlining.org>
Subject: [PATCH v2 0/5] A series of patch for enable sc7180 android boot
Date: Sat, 07 Jun 2025 13:24:55 +0800	[thread overview]
Message-ID: <20250607-sc7180-android-boot-v2-0-2df5d7f61124@gmail.com> (raw)

Since attempt[1] to embed android specific boot param into fdt bootargs,
a new idea is formed as to make use of env file to contain default param
value. Current code logic is already working fine, unless the priority
of param at begining is higher than at tail. From env file, bootargs is
treated important, and prepend at begining. So there is a need to
reverse the logic, and make sure default bootargs value at the end, and
let androidboot img bootargs value sit at begining.

So a new kconfig item is introduced. Once enabled, the bootargs strcat
param will get reversed.

A similar logic is needed for fastboot->bootm glue function, so apply
same trick to glue function too.

Some one-liners patch is included to enable device driver for sc7180
soc. It is about iommu for usb, usb gadget vendor/product id.

Reduce dependency on abootimg when androidboot v3 or greater is not
needed. Since Tom suggested to reduce __maybe_unused directive and 
use IS_ENABLE() instead; two __weak func proto need to add into image.h

This series is independent, but modified boot/Kconfig that roughly same
location to another patch series[2], so directly apply both would fail.
Please let me know if maintainer wanna to let the one gets applied
first and rebase _OR_ combine two series as one.

[1]https://lists.denx.de/pipermail/u-boot/2025-May/588828.html
[2]https://lists.denx.de/pipermail/u-boot/2025-May/589926.html

Signed-off-by: George Chan <gchan9527@gmail.com>
---
Changes in v2:
- Add new patch #2 that is same trick as #1 to fastboot->bootm glue layer.
- Remove default n to patch #1, suggested by Tom.
- Use IS_ENABLE() instead, suggested by Tom.
- Collect review-by from Casey and Neil.
- Rebase to u-boot/next branch.
- CCing myself too.
- Link to v1: https://lore.kernel.org/r/20250520-sc7180-android-boot-v1-0-3075a84ea094@gmail.com

---
George Chan (5):
      image-android: Prepend/postpend default bootargs value with given bootcmd
      bootm: Append bootargs value when bootmeth_android provide cmdline
      boot: bootmeth_android: Conditionally dependent on abootimg
      iommu: qcom-smmu: Introduce sc7180 compatible string
      usb: gadget: Introduce usb gadget vendor/product default id for ARCH_QCOM

 boot/Kconfig                  |  7 +++++++
 boot/bootm.c                  | 29 ++++++++++++++++++++++++++++-
 boot/bootmeth_android.c       |  2 +-
 boot/image-android.c          | 10 ++++++++--
 drivers/iommu/qcom-hyp-smmu.c |  1 +
 drivers/usb/gadget/Kconfig    |  2 ++
 include/image.h               |  3 ++-
 7 files changed, 49 insertions(+), 5 deletions(-)
---
base-commit: a822b95da4b799bdc2a42c06923af4359238dc9e
change-id: 20250520-sc7180-android-boot-a845ecf48a48

Best regards,
-- 
George Chan <gchan9527@gmail.com>


WARNING: multiple messages have this Message-ID (diff)
From: George Chan via B4 Relay <devnull+gchan9527.gmail.com@kernel.org>
To: Tom Rini <trini@konsulko.com>,
	 Casey Connolly <casey.connolly@linaro.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	 Sumit Garg <sumit.garg@kernel.org>,
	Simon Glass <sjg@chromium.org>,
	 Mattijs Korpershoek <mkorpershoek@kernel.org>,
	 Lukasz Majewski <lukma@denx.de>, Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io, gchan9527@gmail.com,
	 Vitalii Skorkin <nikroks@mainlining.org>
Subject: [PATCH v2 0/5] A series of patch for enable sc7180 android boot
Date: Sat, 07 Jun 2025 13:24:55 +0800	[thread overview]
Message-ID: <20250607-sc7180-android-boot-v2-0-2df5d7f61124@gmail.com> (raw)

Since attempt[1] to embed android specific boot param into fdt bootargs,
a new idea is formed as to make use of env file to contain default param
value. Current code logic is already working fine, unless the priority
of param at begining is higher than at tail. From env file, bootargs is
treated important, and prepend at begining. So there is a need to
reverse the logic, and make sure default bootargs value at the end, and
let androidboot img bootargs value sit at begining.

So a new kconfig item is introduced. Once enabled, the bootargs strcat
param will get reversed.

A similar logic is needed for fastboot->bootm glue function, so apply
same trick to glue function too.

Some one-liners patch is included to enable device driver for sc7180
soc. It is about iommu for usb, usb gadget vendor/product id.

Reduce dependency on abootimg when androidboot v3 or greater is not
needed. Since Tom suggested to reduce __maybe_unused directive and 
use IS_ENABLE() instead; two __weak func proto need to add into image.h

This series is independent, but modified boot/Kconfig that roughly same
location to another patch series[2], so directly apply both would fail.
Please let me know if maintainer wanna to let the one gets applied
first and rebase _OR_ combine two series as one.

[1]https://lists.denx.de/pipermail/u-boot/2025-May/588828.html
[2]https://lists.denx.de/pipermail/u-boot/2025-May/589926.html

Signed-off-by: George Chan <gchan9527@gmail.com>
---
Changes in v2:
- Add new patch #2 that is same trick as #1 to fastboot->bootm glue layer.
- Remove default n to patch #1, suggested by Tom.
- Use IS_ENABLE() instead, suggested by Tom.
- Collect review-by from Casey and Neil.
- Rebase to u-boot/next branch.
- CCing myself too.
- Link to v1: https://lore.kernel.org/r/20250520-sc7180-android-boot-v1-0-3075a84ea094@gmail.com

---
George Chan (5):
      image-android: Prepend/postpend default bootargs value with given bootcmd
      bootm: Append bootargs value when bootmeth_android provide cmdline
      boot: bootmeth_android: Conditionally dependent on abootimg
      iommu: qcom-smmu: Introduce sc7180 compatible string
      usb: gadget: Introduce usb gadget vendor/product default id for ARCH_QCOM

 boot/Kconfig                  |  7 +++++++
 boot/bootm.c                  | 29 ++++++++++++++++++++++++++++-
 boot/bootmeth_android.c       |  2 +-
 boot/image-android.c          | 10 ++++++++--
 drivers/iommu/qcom-hyp-smmu.c |  1 +
 drivers/usb/gadget/Kconfig    |  2 ++
 include/image.h               |  3 ++-
 7 files changed, 49 insertions(+), 5 deletions(-)
---
base-commit: a822b95da4b799bdc2a42c06923af4359238dc9e
change-id: 20250520-sc7180-android-boot-a845ecf48a48

Best regards,
-- 
George Chan <gchan9527@gmail.com>



             reply	other threads:[~2025-06-07  5:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07  5:24 George Chan [this message]
2025-06-07  5:24 ` [PATCH v2 0/5] A series of patch for enable sc7180 android boot George Chan via B4 Relay
2025-06-07  5:24 ` [PATCH v2 1/5] image-android: Prepend/postpend default bootargs value with given bootcmd George Chan
2025-06-07  5:24   ` George Chan via B4 Relay
2025-06-12  7:19   ` Mattijs Korpershoek
2025-06-07  5:24 ` [PATCH v2 2/5] bootm: Append bootargs value when bootmeth_android provide cmdline George Chan
2025-06-07  5:24   ` George Chan via B4 Relay
2025-06-07  5:24 ` [PATCH v2 3/5] boot: bootmeth_android: Conditionally dependent on abootimg George Chan
2025-06-07  5:24   ` George Chan via B4 Relay
2025-06-12  7:35   ` Mattijs Korpershoek
2025-06-07  5:24 ` [PATCH v2 4/5] iommu: qcom-smmu: Introduce sc7180 compatible string George Chan
2025-06-07  5:24   ` George Chan via B4 Relay
2025-06-07  5:25 ` [PATCH v2 5/5] usb: gadget: Introduce usb gadget vendor/product default id for ARCH_QCOM George Chan
2025-06-07  5:25   ` George Chan via B4 Relay
2025-06-12  7:24   ` Mattijs Korpershoek

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=20250607-sc7180-android-boot-v2-0-2df5d7f61124@gmail.com \
    --to=gchan9527@gmail.com \
    --cc=casey.connolly@linaro.org \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=mkorpershoek@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nikroks@mainlining.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.