[PATCH v2 17/33] dtoc: Process driver aliases along with drivers

Simon Glass sjg at chromium.org
Sun Jul 4 20:18:14 CEST 2021


Hi Johan,

On Sat, 26 Jun 2021 at 12:32, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Johan,
>
> On Mon, 21 Jun 2021 at 12:39, Johan Jonker <jbx6244 at gmail.com> wrote:
> >
> > Hi Simon, Heiko,
> >
> > With introduction of rockchip-nand-controller.c in Linux and recently
> > rockchip_nfc.c in U-boot it offers a renewed opportunity to add support
> > for MK808 with a rk3066 + NAND to boot from.
> > rk3066 shares /arch/arm/dts/rk3xxx.dtsi with rk3188.
> > The only 'usable' boot loader now is closed source with proprietary FTL.
> >
> > As a spinoff to that discussion I've tried to compile for
> > rk3188-radxarock as an example due to the lack of rk3066 support in next
> > and enabling the new rockchip_nfc.c driver.
> > I'm not familiar with Python/U-boot.
> > Do you have an idea what this error below is about?
> >
> > Kind regards,
> >
> > Johan
> > ===
> >
> > python --version
> > Python 2.7.13
> >
> > ===
> >
> > From rock_defconfig:
> > CONFIG_SPL_OF_PLATDATA=y
> >
> > ===
> >
> > git clone -b next
> > https://source.denx.de/u-boot/custodians/u-boot-rockchip.git
> > u-boot-next-20210619
> >
> > make rock_defconfig
> >
> > make CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig
> >
> > [ ]   Support for NAND controller on Rockchip SoCs (NEW)
> >
> > Add to rock.h:
> > #define CONFIG_SYS_MAX_NAND_DEVICE      1
> >
> > make CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- all
> >
> > ===
> > mkdir -p spl/dts/
> >   FDTGREP spl/dts/dt-spl.dtb
> >   COPY    spl/u-boot-spl.dtb
> >   CC      spl/./lib/asm-offsets.s
> >   CC      spl/./arch/arm/lib/asm-offsets.s
> >   DTOC    spl/dts/dt-plat.c
> > Traceback (most recent call last):
> >   File "./tools/dtoc/dtoc", line 112, in <module>
> >     options.phase, instantiate=options.instantiate)
> >   File
> > "~/Downloads/u-boot-next-20210619/tools/dtoc/../dtoc/dtb_platdata.py",
> > line 1180, in run_steps
> >     scan.scan_drivers()
> >   File
> > "~/Downloads/u-boot-next-20210619/tools/dtoc/../dtoc/src_scan.py", line
> > 649, in scan_drivers
> >     self.scan_driver(pathname)
> >   File
> > "~/Downloads/u-boot-next-20210619/tools/dtoc/../dtoc/src_scan.py", line
> > 608, in scan_driver
> >     self._parse_driver(fname, buff)
> >   File
> > "~/Downloads/u-boot-next-20210619/tools/dtoc/../dtoc/src_scan.py", line
> > 558, in _parse_driver
> >     self._driver_aliases[m_alias[2]] = m_alias[1]
> > TypeError: '_sre.SRE_Match' object is not subscriptable
> > scripts/Makefile.spl:352: recipe for target 'spl/dts/dt-plat.c' failed
> > make[1]: *** [spl/dts/dt-plat.c] Error 1
> > Makefile:1977: recipe for target 'spl/u-boot-spl' failed
> > make: *** [spl/u-boot-spl] Error 2
> >
> > ===
> >
> > Changed:
> > self._driver_aliases[m_alias[2]] = m_alias[1]
> >
> > To:
> > self._driver_aliases[m_alias.group(2)] = m_alias.group(1)
> >
> > Is that a correct python change of mine?
>
> I think so, yes. I will take a look.

This was introduced in Python 3.6 so I suspect your Python is quite
old. I will send a patch.

>
> >
> > ===
> >
> > After that it compiles normal with only this warning.
> >
> >   DTOC    spl/dts/dt-plat.c
> > WARNING: the driver rockchip_rk3188_grf was not found in the driver list
> > WARNING: the driver rockchip_rk3188_pmu was not found in the driver list
> > WARNING: the driver rockchip_rk3188_uart was not found in the driver list
> >   DTOC    include/generated/dt-structs-gen.h
> > WARNING: the driver rockchip_rk3188_grf was not found in the driver list
> > WARNING: the driver rockchip_rk3188_pmu was not found in the driver list
> > WARNING: the driver rockchip_rk3188_uart was not found in the driver list
> >   DTOC    include/generated/dt-decl.h
> > WARNING: the driver rockchip_rk3188_grf was not found in the driver list
> > WARNING: the driver rockchip_rk3188_pmu was not found in the driver list
> > WARNING: the driver rockchip_rk3188_uart was not found in the driver list
>
> OK that means you have the driver missing. It is not fatal unless
> OF_PLATDATA_INST is enabled.

I'll send a series to improve the warnings here. The problem is in the
strange use of the .compatible memory in the rockchip driver, so I've
updated dtoc to handle it but show a warning.

Regards,
Simon


More information about the U-Boot mailing list