[PATCH v4 07/27] rockchip: Enable building a SPI ROM image on bob
Simon Glass
sjg at chromium.org
Sat Aug 8 15:28:22 CEST 2020
Hi Kever,
On Sat, 8 Aug 2020 at 06:40, Kever Yang <kever.yang at rock-chips.com> wrote:
>
> Hi Simon,
>
> On 2020/7/20 上午3:55, Simon Glass wrote:
> > Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot
> > produces a ROM for bob.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> > Changes in v4:
> > - Use CONFIG_ROCKCHIP_SPI_IMAGE to select the image
> >
> > arch/arm/dts/rk3399-gru-u-boot.dtsi | 4 ++++
> > arch/arm/dts/rk3399-gru.dtsi | 2 +-
> > arch/arm/dts/rk3399-u-boot.dtsi | 27 +++++++++++++++++++++++++++
> > arch/arm/mach-rockchip/rk3399/Kconfig | 2 ++
> > 4 files changed, 34 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
> > index 7bddc3acdb..390ac2bb5a 100644
> > --- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
> > @@ -4,3 +4,7 @@
> > */
> >
> > #include "rk3399-u-boot.dtsi"
> > +
> > +&spi_flash {
> > + u-boot,dm-pre-reloc;
> > +};
> > diff --git a/arch/arm/dts/rk3399-gru.dtsi b/arch/arm/dts/rk3399-gru.dtsi
> > index 7ac88392f2..f9c5bb607b 100644
> > --- a/arch/arm/dts/rk3399-gru.dtsi
> > +++ b/arch/arm/dts/rk3399-gru.dtsi
> > @@ -537,7 +537,7 @@ ap_i2c_audio: &i2c8 {
> > pinctrl-names = "default", "sleep";
> > pinctrl-1 = <&spi1_sleep>;
> >
> > - spiflash at 0 {
> > + spi_flash: spiflash at 0 {
> > compatible = "jedec,spi-nor";
> > reg = <0>;
> >
> > diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
> > index 8237782408..ecd230c720 100644
> > --- a/arch/arm/dts/rk3399-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3399-u-boot.dtsi
> > @@ -4,11 +4,14 @@
> > */
> > #define USB_CLASS_HUB 9
> >
> > +#include "rockchip-u-boot.dtsi"
> > +
> > / {
> > aliases {
> > mmc0 = &sdhci;
> > mmc1 = &sdmmc;
> > pci0 = &pcie0;
> > + spi1 = &spi1;
> > };
> >
> > cic: syscon at ff620000 {
> > @@ -57,6 +60,30 @@
> >
> > };
> >
> > +#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
> > +&binman {
> > + rom {
> > + filename = "u-boot.rom";
> > + size = <0x400000>;
> > + pad-byte = <0xff>;
> > +
> > + mkimage {
> > + args = "-n rk3399 -T rkspi";
> > + u-boot-spl {
> > + };
> > + };
> > + u-boot-img {
> > + offset = <0x40000>;
> > + };
> > + u-boot {
> > + offset = <0x300000>;
> > + };
> > + fdtmap {
> > + };
>
> There is a output name 'u-boot.rom' including:
>
> - u-boot-spl output with mkimage cmd at offset 0?
Yes
>
> - u-boot-img at offset 0x40000, how this is generated and what is
> inside? does binary in bl31.elf included?
It is just the u-boot.img file created by the Makefile. There is no BL31.
>
> - u-boot at offset 0x300000, what is this binary and where is it from?
This is u-boot.bin as created by the Makefile.
Regards,
Simon
More information about the U-Boot
mailing list