From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6312BC433F5 for ; Fri, 22 Oct 2021 08:19:56 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D051261108 for ; Fri, 22 Oct 2021 08:19:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D051261108 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3AAC3833B1; Fri, 22 Oct 2021 10:19:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TYVE75+V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82BC4833B1; Fri, 22 Oct 2021 10:19:52 +0200 (CEST) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C513E834FE for ; Fri, 22 Oct 2021 10:19:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heiko.thiery@gmail.com Received: by mail-lf1-x12d.google.com with SMTP id x27so1999704lfu.5 for ; Fri, 22 Oct 2021 01:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TyorKJG8soF3gG389YIgXzHADeGNGtrhfvrcZXu+hkE=; b=TYVE75+VwUf+uRj0Lz1rbEUmhK5jSBUrdDn7WnfT9VMqEJGfY/v8zekeWcm0NpY/1J GUjWxp0b0AG4i+YMZNbTWN86kjEBaJkQf5WnpzVPQU9O+oJDNzJJbMGpUioOkdiInikC +TZfAWN0n25WRIXw9SvgAHulV0DugWlElG5piaAgdtVTaWwYFWLpBOrm6guDTW+vc0YM Dh5NYxONQP/PkfEplkcNHJLqFZAzMqN2vc10t4F3b/r/l2+TD5ABmafVm6FzrI2eePQd QgntPtneq/aAy/cIV/RlJ+4xAqK+dxRYD1P10IkjN3lIiMOFQDDYIa2m3YjyDAZ6foVB rh6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TyorKJG8soF3gG389YIgXzHADeGNGtrhfvrcZXu+hkE=; b=Kkow2UsepamZooHnxGg0bp/68OppGk3xbiX1mSqcWziNb+P5fVTyjcdN4/dtWlVDrY VFjUFsl+2XzXFD+6a/zhLHm6BEkD1ADf6c0v+T9MyUEVN5MHppO+HHsyOMgyE/Vcb24z 4BVu5mRaVU+L9QhWu2/CqAmexjhUDrZme9c0u+f0ZwHfWDCc8QpU39jsCq57LUUsITlh RK9aUPuHNy+ukx1nNykuBOJ/MjBmT/Q+8hQWlg/HXcpItXD8syspQZ4Tdsacs/ftvxMl r+psRDLu22UBi5o2zwZhVk11an38g0BQRJQ4Dhppebg2xIHekIcI1HDebW8uzsMvkBYs SgdQ== X-Gm-Message-State: AOAM532xulVt3rOarxug6K39fHd0Zru6jMFyFGwpIdI19WRPFd08UWPB ZRL8fD40u0++TitJ9LAcvMed1Yt4nVOe8+G50zg= X-Google-Smtp-Source: ABdhPJxKVZ5nPqwMfC5NT95M5ZLX8CG/Wl5Xz1hDskj6tjr0lGgio2Dw0QaKaQl//9PsEE+dqBbkOnZhEU/1Y+4Ryto= X-Received: by 2002:a05:6512:3404:: with SMTP id i4mr9907273lfr.14.1634890785037; Fri, 22 Oct 2021 01:19:45 -0700 (PDT) MIME-Version: 1.0 References: <20211014180824.10681-1-heiko.thiery@gmail.com> <20211014180824.10681-2-heiko.thiery@gmail.com> In-Reply-To: From: Heiko Thiery Date: Fri, 22 Oct 2021 10:19:33 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] board: kontron: pitx-imx8m: Add Kontron pitx-imx8m board support To: Stefano Babic , Simon Glass Cc: u-boot@lists.denx.de, Fabio Estevam , "NXP i . MX U-Boot Team" , Peng Fan , Ye Li , Patrick Wildt , Michael Walle , =?UTF-8?Q?Thomas_Sch=C3=A4fer?= Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Stefano, Hi Simon, Am Do., 21. Okt. 2021 um 15:57 Uhr schrieb Heiko Thiery : > > Hi Stefano, Hi Simon, > > > Am Do., 21. Okt. 2021 um 15:29 Uhr schrieb Stefano Babic : > > > > On 21.10.21 15:17, Heiko Thiery wrote: > > > Hi Stefano, > > > > > > > > > Am Do., 21. Okt. 2021 um 13:31 Uhr schrieb Stefano Babic : > > >> > > >> 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? I thought about it a little and did a quick hack. What do you think about dummy files being generated for buildman? I had buildman generate the blobs needed by binman. So at least the build runs through successfully. 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