Hi Heiko, On Fri, 22 Oct 2021 at 07:24, Heiko Thiery <heiko.thi...@gmail.com> wrote: > > Hi, > > Am Fr., 22. Okt. 2021 um 14:37 Uhr schrieb Stefano Babic <sba...@denx.de>: > > > > Hi Heiko, > > > > On 22.10.21 10:19, Heiko Thiery wrote: > > > Hi Stefano, Hi Simon, > > > > > > Am Do., 21. Okt. 2021 um 15:57 Uhr schrieb Heiko Thiery > > > <heiko.thi...@gmail.com>: > > >> > > >> Hi Stefano, Hi Simon, > > >> > > >> > > >> Am Do., 21. Okt. 2021 um 15:29 Uhr schrieb Stefano Babic > > >> <sba...@denx.de>: > > >>> > > >>> On 21.10.21 15:17, Heiko Thiery wrote: > > >>>> Hi Stefano, > > >>>> > > >>>> > > >>>> Am Do., 21. Okt. 2021 um 13:31 Uhr schrieb Stefano Babic > > >>>> <sba...@denx.de>: > > >>>>> > > >>>>> Hi Heiko, > > >>>>> > > >>>>> On 14.10.21 20:08, Heiko Thiery wrote: > > >>>>>> The Kontron pitx-imx8m is an NXP i.MX8MQ based board in the pITX > > >>>>>> form factor. > > >>>>>> > > >>>>> > > >>>>> There is still something using binman that does not work with CI. > > >>>>> Without CI, we load all firmware including signed_hdmi_imx8m.bin. > > >>>>> > > >>>>> But on CI, file is not loaded, but instead of warnings, build for this > > >>>>> board fails with : > > >>>>> > > >>>>> +Image 'main-section' is missing external blobs and is non-functional: > > >>>>> blob-ext@1 blob-ext@2 blob-ext@3 blob-ext@4 > > >>>>> +binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n > > >>>>> spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000 > > >>>>> ./mkimage-out.spl.mkimage': signed_hdmi_imx8m.bin: Can't open: No such > > >>>>> file or directory > > >>>>> + > > >>>>> > > >>>>> Could you take a look ? > > >>>> > > >>>> Sure. Could you point me to the right CI configuration? > > >>>> > > >>> > > >>> Configuration is in .gitlab-ci.yml. For thsi board, buildman is called > > >>> as part of aarch64 target, that is > > >>> > > >>> buildman -o /tmp -P -E -W arm -x aarch64 > > >>> > > >>>> I need to understand how the required imx-firmware files are copied to > > >>>> the u-boot dir. This seems to work already for e. g. the imx8mm > > >>>> boards. These require the lpdd* train fw files. > > >> > > >> Here we seem to hit an issue with the CI. blobs (lpddr*) are required > > >> for the imx8mm boards. Binman reports the missing files only as a > > >> warning and buildman does not care about that: > > >> ---- > > >> +WARNING 'mkimage.flash.mkimage' not found, resulting binary is > > >> not-functional > > >> ---- > > >> > > >> With the imx8mq boards switching to binman we also need an additional > > >> fw part (signed_hdmi_imx8m.bin). But other than the lpddr firmware as > > >> blob the signed_hmdi'_imx8m.bin is passed to mkimage and mkimage exits > > >> with an error. Thats leads to the error: > > >> ---- > > >> binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n > > >> spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000 > > >> ./mkimage-out.spl.mkimage': signed_hdmi_imx8m.bin: Can't open: No such > > >> file or directory > > >> ---- > > >> > > >> Currently I do not have an idea how to handle that. Anyone else?
If I understand correctly: 1.You don't have these blobs in the tree so don't want to fail a build in CI, which is why binman's blob-ext is used 2. You sometimes need to ensure that they do exist Should we add a cmdline flag to binman to require all external blobs? Could we drop the blobs and add code to generate them, or put the date in a C struct? > > > > > > I thought about it a little and did a quick hack. What do you think > > > about dummy files being generated for buildman? > > > > I had quite the same idea... > > > > > I had buildman > > > generate the blobs needed by binman. So at least the build runs > > > through successfully. > > > > But it should be checked if files are present - I guess there are people > > relying on buildman to produce the functional bootloader, and a dummy > > file cannot overwrite the right one if present. > > Sure. As said ,this was only a quick hack to see if it could work. > Another thing is if there should be a config for each board that says > what files have to be created. > > > > I don't know yet how to integrate this sensibly > > > into buildman or if this is useful for the maintainers at all. But > > > this would get rid of the warnings and errors that come from binman. > > > > > > > > > diff --git a/tools/buildman/board.py b/tools/buildman/board.py > > > index 447aaabea8..cf270c8b72 100644 > > > --- a/tools/buildman/board.py > > > +++ b/tools/buildman/board.py > > > @@ -96,6 +96,28 @@ class Board: > > > self.vendor, self.soc, self.options] > > > self.build_it = False > > > > > > + def create_dummy_files(self, work_dir): > > > + import configparser > > > + import os > > > + > > > + settings = configparser.SafeConfigParser() > > > + config_fname = '%s/.buildman/' % os.getenv('HOME') > > > + if os.path.exists(config_fname): > > > + settings.read(config_fname) > > > + > > > + if self.target == "kontron_pitx_imx8m": > > > + > > > + dummy_files = ['bl31.bin', > > > + 'signed_hdmi_imx8m.bin', > > > + 'lpddr4_pmu_train_1d_imem.bin', > > > + 'lpddr4_pmu_train_1d_dmem.bin', > > > + 'lpddr4_pmu_train_2d_imem.bin', > > > + 'lpddr4_pmu_train_2d_dmem.bin' > > > + ] > > > + for dummy_file in dummy_files: > > > + dummy = os.path.join(work_dir, 'build', dummy_file) > > > + with open(dummy, "wb") as out: > > > + out.truncate(1024) > > > > > > class Boards: > > > """Manage a list of boards.""" > > > diff --git a/tools/buildman/builderthread.py > > > b/tools/buildman/builderthread.py > > > index 48128cf673..dee7d9b0fe 100644 > > > --- a/tools/buildman/builderthread.py > > > +++ b/tools/buildman/builderthread.py > > > @@ -475,6 +475,7 @@ class BuilderThread(threading.Thread): > > > """ > > > brd = job.board > > > work_dir = self.builder.GetThreadDir(self.thread_num) > > > + brd.create_dummy_files(work_dir) > > > self.toolchain = None > > > if job.commits: > > > # Run 'make board_defconfig' on the first commit > > > > > > -- > Heiko Regards, Simon