From: Johan Jonker <jbx6244@gmail.com>
To: Quentin Schulz <foss+uboot@0leil.net>
Cc: bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com,
sjg@chromium.org, philipp.tomsich@vrull.eu,
kever.yang@rock-chips.com, jagan@amarulasolutions.com,
alpernebiyasak@gmail.com, andy.yan@rock-chips.com,
hl@rock-chips.com, chenjh@rock-chips.com,
manivannan.sadhasivam@linaro.org, nick@khadas.com,
klaus.goger@theobroma-systems.com, jernej.skrabec@gmail.com,
deepakdas.linux@gmail.com, linux@alxd.me, mail@david-bauer.net,
peterwillcn@gmail.com, heiko@sntech.de, w.egorov@phytec.de,
pbrobinson@gmail.com, sunil@amarulasolutions.com,
ldevulder@suse.com, akash@openedev.com,
banglang.huang@foxmail.com, matwey.kornilov@gmail.com,
michael@amarulasolutions.com, xypron.glpk@gmx.de,
u-boot@lists.denx.de,
Quentin Schulz <quentin.schulz@theobroma-systems.com>
Subject: Re: [PATCH v2 1/7] rockchip: generate idbloader.img content for u-boot-rockchip.bin with binman for ARM
Date: Sat, 23 Jul 2022 14:07:30 +0200 [thread overview]
Message-ID: <794bbfad-6579-ce3a-5faa-c8f758221196@gmail.com> (raw)
In-Reply-To: <20220722113505.3875669-2-foss+uboot@0leil.net>
Hi Quentin and others,
Some comments. Have a look if it's useful.
It works, but is in need for some improvement...
Johan
On 7/22/22 13:34, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> idbloader.img content - currently created by way of Makefile - can be
> created by binman directly.
>
> So let's do that for Rockchip ARM platforms.
>
> Cc: Quentin Schulz <foss+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
> Makefile | 2 +-
> arch/arm/dts/rockchip-u-boot.dtsi | 15 +++++++++++++--
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index d76ec69b52..f780bfe211 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1005,7 +1005,7 @@ endif
> else
> ifeq ($(CONFIG_SPL),y)
> # Generate these inputs for binman which will create the output files
> -INPUTS-y += idbloader.img u-boot.img
> +INPUTS-y += u-boot.img
> endif
> endif
> endif
> diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
> index eae3ee715d..0362c97e0b 100644
> --- a/arch/arm/dts/rockchip-u-boot.dtsi
> +++ b/arch/arm/dts/rockchip-u-boot.dtsi
> @@ -17,9 +17,20 @@
> filename = "u-boot-rockchip.bin";
> pad-byte = <0xff>;
>
> - blob {
> - filename = "idbloader.img";
"u-boot-rockchip.bin" is a combination image of mkimage(TPL/SPL) + "u-boot.img". Not everyone suites this fixed GPT format.
People may still want to write them separate while testing or whatever, so "idbloader.img" and "u-boot.img" must be kept available after this change!
===
rockchip.rst and README.rockchip and elsewhere on the internet still refer to "idbloader.img" so it should come back, but then made by binman.
idbloader {
filename = "idbloader.img";
mkimage {
args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
#ifdef CONFIG_TPL
multiple-data-files;
u-boot-tpl {
};
#endif
u-boot-spl {
};
};
};
===
After this patch serie "idbloader.img" is not removed.
make clean
After:
CLEAN include/generated/env.in u-boot-nodtb.bin u-boot.lds u-boot.cfg.configs u-boot.bin u-boot-dtb.bin u-boot.img u-boot-dtb.img u-boot.sym u-boot.map u-boot.srec u-boot.cfg u-boot.dtb.out u-boot-tpl.dtb.out u-boot u-boot-spl.dtb.out u-boot.dtb u-boot-rockchip.bin System.map
Before:
CLEAN include/generated/env.in u-boot-nodtb.bin u-boot.lds u-boot.cfg.configs u-boot.bin u-boot-dtb.bin u-boot.img u-boot-dtb.img u-boot.sym u-boot.map u-boot.srec u-boot.cfg u-boot.dtb.out u-boot-tpl.dtb.out u-boot u-boot-spl.dtb.out u-boot.dtb u-boot-rockchip.bin System.map idbloader.img
===
Your serie generates zombie files. PLease remove after use.
Same for others like:
simple-bin.map
mkimage-out.rom.mkimage
mkimage.rom.mkimage
rom.map
tools/boot/bootm.c
tools/boot/fdt_region.c
tools/boot/image-cipher.c
tools/boot/image-fit-sig.c
tools/boot/image-fit.c
tools/boot/image-host.c
tools/boot/image.c
u_boot_logo.S
Untracked files:
(use "git add <file>..." to include in what will be committed)
mkimage-out.simple-bin.mkimage
mkimage.simple-bin.mkimage
===
===
> + mkimage {
> + args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
> +#ifndef CONFIG_TPL
> + u-boot-spl {
> + };
> };
> +#else
> + u-boot-tpl {
> + };
> + };
> +
u-boot-spl is the input for mkimage and should be a subnode.
> + u-boot-spl {
> + };
> +#endif
Fix your dts format:
simple-bin {
filename = "u-boot-rockchip.bin";
pad-byte = <0xff>;
mkimage {
args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
#ifdef CONFIG_TPL
multiple-data-files;
u-boot-tpl {
};
#endif
u-boot-spl {
};
};
#ifdef CONFIG_ARM64
blob {
filename = "u-boot.itb";
#else
u-boot-img {
#endif
offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>;
};
};
===
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR is only related to MMC!
There are other boot mediums like NAND or USB, so don't assume that CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR is defined.
See my patch serie that still is in need for review:
https://lore.kernel.org/u-boot/20220508150825.21711-7-jbx6244@gmail.com/
Without it generates a warning:
Error: arch/arm/dts/rockchip-u-boot.dtsi:54.16-17 syntax error
FATAL ERROR: Unable to parse input tree
Add more compile conditions!
===
RK3066:
For NAND the "idbloader.img" might be useful for my serie (in need for review) when it gets TPL/SPL and rc4 right:
[PATCH v2 00/11] Add Rockchip IDB device
https://lore.kernel.org/u-boot/a1458a7b-2043-6397-3107-2d1fdf08c8e1@gmail.com/
In mk808_defconfig change:
CONFIG_TPL_TEXT_BASE=0x10080C04
to:
CONFIG_TPL_TEXT_BASE=0x10080C00
In rockchip.rst change:
printf "RK30" > tplspl.bin
dd if=u-boot-tpl.bin >> tplspl.bin
to:
printf "RK30" > tplspl.bin
dd if=u-boot-tpl.bin ibs=1 skip=4 >> tplspl.bin
The NAND can be programmed simular to MMC with:
rkdeveloptool wlx loader1 idbloader.img
TODO:
rk30 usbplug (open source)
===
>
> u-boot-img {
> offset = <CONFIG_SPL_PAD_TO>;
next prev parent reply other threads:[~2022-07-23 12:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 11:34 [PATCH v2 0/7] migrate u-boot-rockchip.bin to binman and generate an image for SPI Quentin Schulz
2022-07-22 11:34 ` [PATCH v2 1/7] rockchip: generate idbloader.img content for u-boot-rockchip.bin with binman for ARM Quentin Schulz
2022-07-23 12:07 ` Johan Jonker [this message]
2022-07-23 18:04 ` Matwey V. Kornilov
2022-07-23 19:49 ` [SPAM] " Xavier Drudis Ferran
2022-07-25 10:25 ` Quentin Schulz
2022-07-25 11:05 ` Xavier Drudis Ferran
2022-07-25 11:56 ` Johan Jonker
2022-07-28 13:26 ` Jagan Teki
2022-07-22 11:35 ` [PATCH v2 2/7] rockchip: generate u-boot-rockchip.bin with binman for ARM64 boards Quentin Schulz
2022-07-22 11:35 ` [PATCH v2 3/7] rockchip: remove unneeded CONFIG_SPL_PAD_TO Quentin Schulz
2022-07-22 11:35 ` [PATCH v2 4/7] rockchip: simplify binman image dependencies addition to INPUTS Quentin Schulz
2022-07-22 11:35 ` [PATCH v2 5/7] rockchip: allow to build SPI images even without HAS_ROM option Quentin Schulz
2022-07-22 11:35 ` [PATCH v2 6/7] binman: add support for skipping file concatenation for mkimage Quentin Schulz
2022-07-22 11:35 ` [PATCH v2 7/7] rockchip: add u-boot-rockchip-spi.bin image for booting from SPI-NOR flash Quentin Schulz
2022-07-24 7:46 ` [SPAM] [PATCH v2 0/7] migrate u-boot-rockchip.bin to binman and generate an image for SPI Xavier Drudis Ferran
2022-07-25 10:54 ` Quentin Schulz
2022-07-25 11:20 ` Xavier Drudis Ferran
2022-07-25 16:39 ` Quentin Schulz
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=794bbfad-6579-ce3a-5faa-c8f758221196@gmail.com \
--to=jbx6244@gmail.com \
--cc=akash@openedev.com \
--cc=alpernebiyasak@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=banglang.huang@foxmail.com \
--cc=bharat.gooty@broadcom.com \
--cc=chenjh@rock-chips.com \
--cc=deepakdas.linux@gmail.com \
--cc=foss+uboot@0leil.net \
--cc=heiko@sntech.de \
--cc=hl@rock-chips.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=klaus.goger@theobroma-systems.com \
--cc=ldevulder@suse.com \
--cc=linux@alxd.me \
--cc=mail@david-bauer.net \
--cc=manivannan.sadhasivam@linaro.org \
--cc=matwey.kornilov@gmail.com \
--cc=michael@amarulasolutions.com \
--cc=nick@khadas.com \
--cc=pbrobinson@gmail.com \
--cc=peterwillcn@gmail.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@theobroma-systems.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=sjg@chromium.org \
--cc=sunil@amarulasolutions.com \
--cc=u-boot@lists.denx.de \
--cc=w.egorov@phytec.de \
--cc=xypron.glpk@gmx.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.