Re: [PATCH] bootstd: android: Add U-Boot version to cmdline

2024-09-10 Thread Julien Masson
t;androidboot.force_normal_boot", > "1", false); > > --- > base-commit: 360aaddd9cea8c256f50c576794415cadfb61819 > change-id: 20240904-bootmeth-bootloader-version-2a2b35fce4cf > > Best regards, > -- > Mattijs Korpershoek > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH v3 5/5] bootstd: Add test for bootmeth_android

2024-07-11 Thread Julien Masson
#x27;]} -b {ptr} -s {size} -l > {part['label']} -t basicdata {fname}") > +ptr += size > + > +u_boot_utils.run_and_log(cons, f'cgpt boot -p {fname}') > +out = u_boot_utils.run_and_log(cons, f'cgpt show -q {fname}') > + > +# Create a dict (indexed by partition number) containing the above info > +for line in out.splitlines(): > +start, size, num, name = line.split(maxsplit=3) > +parts[int(num)] = Partition(int(start), int(size), name) > + > +with open(fname, 'rb') as inf: > +disk_data = inf.read() > + > +test_abootimg.AbootimgTestDiskImage(cons, 'bootv4.img', > test_abootimg.boot_img_hex) > +boot_img = os.path.join(cons.config.result_dir, 'bootv4.img') > +with open(boot_img, 'rb') as inf: > +set_part_data(2, inf.read()) > + > +test_abootimg.AbootimgTestDiskImage(cons, 'vendor_boot.img', > test_abootimg.vboot_img_hex) > +vendor_boot_img = os.path.join(cons.config.result_dir, 'vendor_boot.img') > +with open(vendor_boot_img, 'rb') as inf: > +set_part_data(4, inf.read()) > + > +with open(fname, 'wb') as outf: > +outf.write(disk_data) > + > +print('wrote to {}'.format(fname)) > + > +return fname > > def setup_cedit_file(cons): > infname = os.path.join(cons.config.source_dir, > @@ -478,6 +556,7 @@ def test_ut_dm_init_bootstd(u_boot_console): > setup_bootmenu_image(u_boot_console) > setup_cedit_file(u_boot_console) > setup_cros_image(u_boot_console) > +setup_android_image(u_boot_console) > > # Restart so that the new mmc1.img is picked up > u_boot_console.restart_uboot() > > -- > 2.45.2 > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH v2 1/5] boot: android: Provide vendor_bootimg_addr in boot_get_fdt()

2024-06-13 Thread Julien Masson
if (android_image_get_dtb_by_index((ulong)hdr, > get_avendor_bootimg_addr(), > dtb_idx, &fdt_addr, > &fdt_size)) { > fdt_blob = (char *)map_sysmem(fdt_addr, 0); > if (fdt_check_header(fdt_blob)) > > -- > 2.45.2 > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH v2 3/5] android: boot: Add set_abootimg_addr() and set_avendor_bootimg_addr()

2024-06-13 Thread Julien Masson
@ ulong get_ainit_bootimg_addr(void); > */ > ulong get_avendor_bootimg_addr(void); > > +/** > + * set_abootimg_addr() - Set Android vendor boot image address > + * > + * Return: no returned results > + */ > +void set_avendor_bootimg_addr(ulong addr); > + > /** > * board_fit_config_name_match() - Check for a matching board name > * > > -- > 2.45.2 > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH v2 5/5] bootstd: Add test for bootmeth_android

2024-06-13 Thread Julien Masson
f"cgpt add -i {part['num']} -b {ptr} -s {size} -l > {part['label']} -t basicdata {fname}") > +ptr += size > + > +u_boot_utils.run_and_log(cons, f'cgpt boot -p {fname}') > +out = u_boot_utils.run_and_log(cons, f'cgpt show -q {fname}') > + > +# Create a dict (indexed by partition number) containing the above info > +for line in out.splitlines(): > +start, size, num, name = line.split(maxsplit=3) > +parts[int(num)] = Partition(int(start), int(size), name) > + > +with open(fname, 'rb') as inf: > +disk_data = inf.read() > + > +boot_img = os.path.join(cons.config.result_dir, 'bootv4.img') > +with open(boot_img, 'rb') as inf: > +set_part_data(2, inf.read()) > + > +vendor_boot_img = os.path.join(cons.config.result_dir, 'vendor_boot.img') > +with open(vendor_boot_img, 'rb') as inf: > +set_part_data(4, inf.read()) > + > +with open(fname, 'wb') as outf: > +outf.write(disk_data) > + > +print('wrote to {}'.format(fname)) > + > +return fname > > def setup_cedit_file(cons): > infname = os.path.join(cons.config.source_dir, > @@ -477,6 +552,7 @@ def test_ut_dm_init_bootstd(u_boot_console): > setup_bootmenu_image(u_boot_console) > setup_cedit_file(u_boot_console) > setup_cros_image(u_boot_console) > +setup_android_image(u_boot_console) > > # Restart so that the new mmc1.img is picked up > u_boot_console.restart_uboot() > > -- > 2.45.2 > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH v2 4/5] bootstd: Add a bootmeth for Android

2024-06-13 Thread Julien Masson
+ struct bootmeth_uc_plat *plat = dev_get_uclass_plat(dev); > + > + plat->desc = "Android boot"; > + plat->flags = BOOTMETHF_ANY_PART; > + > + return 0; > +} > + > +static struct bootmeth_ops android_bootmeth_ops = { > + .check

Re: [PATCH v2 2/5] bootstd: Add bootflow_iter_check_mmc() helper

2024-06-13 Thread Julien Masson
er device is used (e.g. ethernet) > + */ > +int bootflow_iter_check_mmc(const struct bootflow_iter *iter); > + > /** > * bootflow_iter_check_sf() - Check that a bootflow uses SPI FLASH > * > > -- > 2.45.2 > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH v2 1/2] bootstd: Fix a handful of doc typos in bootmeth

2024-06-10 Thread Julien Masson
If there is no > + * ordering of the bootmeths in bootstd_priv->bootmeth_order. If there is no > * ordering there, then all bootmethods are added > * > * @iter: Iterator to update with the order > > -- > 2.45.0 > > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH] cmd: bcb: Fix bcb compilation when CONFIG_CMD_BCB=n

2024-06-10 Thread Julien Masson
> base-commit: ea722aa5eb33740ae77e8816aeb72b385e621cd0 > change-id: 20240603-bcb-compil-d8eaf7074475 > > Best regards, > -- > Mattijs Korpershoek > > Reviewed-by: Julien Masson -- Julien Masson

Re: [PATCH] image: Set load_end on partial loads

2024-06-10 Thread Julien Masson
sion type %d\n", comp); > return ret; > } > - if (ret) > - return ret; > > *load_end = load + image_len; > + if (ret) > + return ret; > > return 0; > } > > --- > base-commit: a7f

[PATCH v2] clk: fix clk_get_rate() always return ulong

2023-12-15 Thread Julien Masson
When we call clk_get_rate(), we expect to get clock rate value as ulong. In that case we should not use log_ret() macro since it use internally an int. Otherwise we may return an invalid/truncated clock rate value. Signed-off-by: Julien Masson --- Changes in v2: - remove local var ret (fix

Re: [PATCH] clk: fix clk_get_rate() always return ulong

2023-12-15 Thread Julien Masson
Hi Mattijs, Thanks for the review. On Fri 15 Dec 2023 at 14:38, Mattijs Korpershoek wrote: > On ven., déc. 15, 2023 at 13:34, Mattijs Korpershoek > wrote: > >> Hi Julien, >> >> Thank you for the patch. >> >> On mar., nov. 21, 2023 at 15:42, Ju

Re: [PATCH] clk: fix clk_get_rate() always return ulong

2023-12-15 Thread Julien Masson
Sorry for the noise but I miss a (obvious) warning: drivers/clk/clk-uclass.c:474:8: warning: unused variable ‘ret’ [-Wunused-variable] 474 | ulong ret; |^~~ I will send a V2. On Fri 15 Dec 2023 at 14:32, Julien Masson wrote: > When we call clk_get_rate(), we expect to

[PATCH] mmc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT

2023-12-04 Thread Julien Masson
The block count limit on MMC based devices should be set according to CONFIG_SYS_MMC_MAX_BLK_COUNT instead of hardcoding value. Signed-off-by: Julien Masson --- drivers/mmc/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c

[PATCH 6/6] board: mediatek: add MT8365 EVK board support

2023-12-04 Thread Julien Masson
This adds support for the MT8365 EVK board with the following features enabled/tested: Boot, UART, Watchdog and MMC. Signed-off-by: Julien Masson --- arch/arm/dts/mt6357.dtsi | 282 + arch/arm/dts/mt8365-evk.dts| 418 + board

[PATCH 5/6] dt-bindings: clock: add Mediatek MT8365 pinctrl bindings

2023-12-04 Thread Julien Masson
This adds the pinctrl bindings for Mediatek MT8365 SoC based on the dt-bindings in Linux tag v6.7-rc2. (commit 8b4c397d88d97d4fd9c3f3527aa66688b1a3387a) Signed-off-by: Julien Masson --- include/dt-bindings/pinctrl/mt8365-pinfunc.h | 858 +++ 1 file changed, 858 insertions

[PATCH 4/6] arm: mediatek: add support for MediaTek MT8365 SoC

2023-12-04 Thread Julien Masson
This patch adds basic support for MediaTek MT8365 SoC. The dtsi has been copied from Linux source code tag v6.7-rc2. (commit 9b5d64654ea8f51fe1e8e29ca1777b620be8fb7c) Signed-off-by: Julien Masson --- arch/arm/dts/mt8365.dtsi | 840 + arch/arm/mach-mediatek

[PATCH 3/6] dt-bindings: power: add power-domain header for MediaTek MT8365 SoC

2023-12-04 Thread Julien Masson
Add power-domain header for MediaTek MT8365 SoC copied from Linux source code tag v6.7-rc2. (commit a1571f1f333c2fced076f0d54ed771d1838d827f) Signed-off-by: Julien Masson --- MAINTAINERS | 1 + .../dt-bindings/power/mediatek,mt8365-power.h | 19

[PATCH 2/6] clk: mediatek: add clock driver support for MediaTek MT8365 SoC

2023-12-04 Thread Julien Masson
(65c9ad77cbc0eed78db94d80041aba675cfbdfa9) And adapted following the clk attributes supported by U-Boot. Signed-off-by: Julien Masson --- drivers/clk/mediatek/Makefile | 1 + drivers/clk/mediatek/clk-mt8365.c | 766 ++ 2 files changed, 767 insertions(+) create mode 100644 drivers/clk/mediatek

[PATCH 0/6] Add support for MediaTek MT8365 EVK Board

2023-12-04 Thread Julien Masson
This patch series add the support for the MediaTek MT8365 EVK Board [1]. Most of the code have been copied/adapted from Linux tag v6.7-rc2. For now we only enable/test these features: Boot, UART, Watchdog and MMC. [1] https://www.mediatek.com/products/iot-genio/mediatek-genio-350-evk Julien

[PATCH 1/6] dt-bindings: clock: add Mediatek MT8365 SoC clock bindings

2023-12-04 Thread Julien Masson
This adds the clock bindings for Mediatek MT8365 SoC based on the dt-bindings in Linux tag v6.7-rc2. (commit c61978175ac1337f028ac1f95f16db84f4e5) Signed-off-by: Julien Masson --- MAINTAINERS | 1 + .../dt-bindings/clock/mediatek,mt8365-clk.h | 375

[PATCH] clk: fix clk_get_rate() always return ulong

2023-11-21 Thread Julien Masson
When we call clk_get_rate(), we expect to get clock rate value as ulong. In that case we should not use log_ret() macro since it use internally an int. Otherwise we may return an invalid/truncated clock rate value. Signed-off-by: Julien Masson --- drivers/clk/clk-uclass.c | 6 +- 1 file

[PATCH v2 2/2] splash: get devpart from environment variable

2022-10-17 Thread Julien Masson
ser to set the devpart though this environment variable. Example: image located in splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Reviewed-by: Simon Glass Signed-off-by: Julien Masson --- Changes in v2: - rename local var env_splashdevpart_value

[PATCH v2 1/2] splash: support raw image from MMC

2022-10-17 Thread Julien Masson
The user has now the choice to specify the splash location in the MMC as a raw storage. Signed-off-by: Julien Masson --- Changes in v2: - splash_mmc_read_raw: return -EIO in case of errors - splash_mmc_read_raw: use IS_ENABLED(CONFIG_CMD_MMC) instead of #ifdef common/splash.c| 6

[PATCH v2 0/2] splash: add more options/support

2022-10-17 Thread Julien Masson
splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Changes in v2: - splash_mmc_read_raw: return -EIO in case of errors - splash_mmc_read_raw: use IS_ENABLED(CONFIG_CMD_MMC) instead of #ifdef - rename local var env_splashdevpart_value to devpart Julien Masson (2

Re: [RESEND PATCH 2/2] splash: get devpart from environment variable

2022-10-17 Thread Julien Masson
Hi Simon, On Mon 17 Oct 2022 at 09:49, Simon Glass wrote: > Hi Julien, > > > On Thu, 13 Oct 2022 at 09:51, Julien Masson wrote: >> >> Hi Simon, >> >> Thanks for the review. >> >> On Thu 13 Oct 2022 at 17:44, Simon Glass wrote: >> >&

Re: [RESEND PATCH 1/2] splash: support raw image from MMC

2022-10-13 Thread Julien Masson
Hi Simon, On Thu 13 Oct 2022 at 17:51, Simon Glass wrote: > HI Julien, > > On Wed, 12 Oct 2022 at 05:38, Julien Masson wrote: >> >> The user has now the choice to specify the splash location in the MMC >> as a raw storage. >> >> Signed-off-by: J

Re: [RESEND PATCH 2/2] splash: get devpart from environment variable

2022-10-13 Thread Julien Masson
Hi Simon, Thanks for the review. On Thu 13 Oct 2022 at 17:44, Simon Glass wrote: > Hi Julien, > > On Wed, 12 Oct 2022 at 05:38, Julien Masson wrote: >> >> By default several types of splash locations are supported and the >> user can select one of them through en

[RESEND PATCH 2/2] splash: get devpart from environment variable

2022-10-12 Thread Julien Masson
ser to set the devpart though this environment variable. Example: image located in splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Signed-off-by: Julien Masson --- common/splash_source.c | 5 + 1 file changed, 5 insertions(+) diff --gi

[RESEND PATCH 1/2] splash: support raw image from MMC

2022-10-12 Thread Julien Masson
The user has now the choice to specify the splash location in the MMC as a raw storage. Signed-off-by: Julien Masson --- common/splash.c| 6 ++ common/splash_source.c | 29 + 2 files changed, 35 insertions(+) diff --git a/common/splash.c b/common

[RESEND PATCH 0/2] splash: add more options/support

2022-10-12 Thread Julien Masson
splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Julien Masson (2): splash: support raw image from MMC splash: get devpart from environment variable common/splash.c| 6 ++ common/splash_source.c | 34 ++ 2 files

[PATCH 2/2] splash: get devpart from environment variable

2022-09-19 Thread Julien Masson
ser to set the devpart though this environment variable. Example: image located in splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Signed-off-by: Julien Masson --- common/splash_source.c | 5 + 1 file changed, 5 insertions(+) diff --gi

[PATCH 1/2] splash: support raw image from MMC

2022-09-19 Thread Julien Masson
The user has now the choice to specify the splash location in the MMC as a raw storage. Signed-off-by: Julien Masson --- common/splash.c| 6 ++ common/splash_source.c | 29 + 2 files changed, 35 insertions(+) diff --git a/common/splash.c b/common

[PATCH 0/2] splash: add more options/support

2022-09-19 Thread Julien Masson
splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Julien Masson (2): splash: support raw image from MMC splash: get devpart from environment variable common/splash.c| 6 ++ common/splash_source.c | 34 ++ 2 files

[PATCH 0/2] splash: add more options/support

2022-09-19 Thread Julien Masson
splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Julien Masson (2): splash: support raw image from MMC splash: get devpart from environment variable common/splash.c| 6 ++ common/splash_source.c | 34 ++ 2 files

Re: [RFC PATCH v2] clk: fix clk_get_rate() always return ulong

2022-08-30 Thread Julien Masson
Hi Simon, On Tue 30 Aug 2022 at 10:32, Simon Glass wrote: > Hi Julien, > > On Mon, 29 Aug 2022 at 06:06, Julien Masson wrote: >> >> According to clk_ops struct definition, the callback `get_rate()` >> return current clock rate value as ulong. >> `clk_get_rat

[RFC PATCH v2] clk: fix clk_get_rate() always return ulong

2022-08-29 Thread Julien Masson
since it use an `int` in the macro definition. Signed-off-by: Julien Masson --- drivers/clk/clk-uclass.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index b89c77bf79..c351fa97d1 100644 --- a/drivers/clk/clk

Re: [RFC PATCH] clk: fix clk_get_rate() always return ulong

2022-08-29 Thread Julien Masson
On Mon 29 Aug 2022 at 10:38, Simon Glass wrote: > Hi, > > On Fri, 26 Aug 2022 at 08:00, Sean Anderson wrote: >> >> On 8/26/22 6:31 AM, Julien Masson wrote: >>> According to clk_ops struct definition, the callback `get_rate()` >>> return current clock

[RFC PATCH] clk: fix clk_get_rate() always return ulong

2022-08-26 Thread Julien Masson
since it use an `int` in the macro definition. Signed-off-by: Julien Masson --- drivers/clk/clk-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index b89c77bf79..446f7c49b8 100644 --- a/drivers/clk/clk-uclass.c

[PATCH] mmc: mtk-sd: implement waiting for DAT0 line state

2021-11-05 Thread Julien Masson
ms was added for every __mmc_switch call. By adding the support of wait_dat0(), we now don't need to mdelay during mmc_init anymore. [1]: https://patchwork.ozlabs.org/project/uboot/patch/1629192034-64056-1-git-send-email-ye...@nxp.com/ Signed-off-by: Julien Masson --- drivers/mmc/mtk

[U-Boot] [PATCH v2] ARM: meson: display Amlogic SoC Information

2019-03-25 Thread Julien Masson
The Amlogic SoCs have a registers containing the die revision and packaging type to determine the SoC family and package marketing name like S905X for the GXL SoC Family. This code is taken from the Linux meson-gx-socinfo driver and adapted to U-Boot printing. Signed-off-by: Julien Masson

[U-Boot] [PATCH] ARM: meson: display Amlogic SoC Information

2019-03-19 Thread Julien Masson
The Amlogic SoCs have a registers containing the die revision and packaging type to determine the SoC family and package marketing name like S905X for the GXL SoC Family. This code is taken from the Linux meson-gx-socinfo driver and adapted to U-Boot printing. Signed-off-by: Julien Masson