mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: 'of_compatible' and 'model' imd records are unusable
Date: Fri, 1 Oct 2021 14:46:19 +0300	[thread overview]
Message-ID: <20211001144619.6db15b8269c912722bf0f2d0@gmail.com> (raw)

Hi all!

I have cloned barebox c67ada0024da (v2021.08.0) and found that
'of_compatible' and 'model' imd records are unusable.

E.g.

barebox$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- imx_v8_defconfig
barebox$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-
...
images built:
barebox-nxp-imx8mm-evk.img
barebox-prt-prt8mm.img
barebox-nxp-imx8mp-evk.img
barebox-nxp-imx8mq-evk.img
barebox-zii-imx8mq-dev.img
barebox-phytec-phycore-imx8mq.img

barebox$ ./scripts/bareboximd images/barebox-nxp-imx8mm-evk.img
build: #1 Fri Oct 1 10:16:30 UTC 2021
buildsystem version: 
crc32: 0x00000000
release: 2021.08.0
barebox$ 

There is no 'of_compatible' and 'model' imd records in bareboximd output.

So there is no chance to imd_find_type(..., IMD_TYPE_OF_COMPATIBLE)
(see common/bbu.c) in a barebox image file.

scripts/gen-dtb-s puts IMD_TYPE_OF_COMPATIBLE and IMD_TYPE_MODEL
records into barebox_imd_0 section.

BAREBOX_IMD macro (include/asm-generic/barebox.lds.h)
does not KEEP barebox_imd_0 section":

#define BAREBOX_IMD                             \
        STRUCT_ALIGN();                         \
        KEEP(*(.barebox_imd_start))             \
        KEEP(*(.barebox_imd_1*))                \
        *(.barebox_imd_0*)                      \
        KEEP(*(.barebox_imd_end))

KEEPing barebox_imd_0 leads to several 'of_compatible' and 'model' records
in one barebox image file, e.g.:

barebox$ ./scripts/bareboximd images/barebox-prt-prt8mm.img
build: #2 Fri Oct 1 10:19:07 UTC 2021
buildsystem version: 
crc32: 0x00000000
release: 2021.08.0-dirty
of_compatible: fsl,imx8mm-evk fsl,imx8mm
model: FSL i.MX8MM EVK board
of_compatible: prt,prt8mm fsl,imx8mm
model: Protonic PRT8MM
of_compatible: fsl,imx8mp-evk fsl,imx8mp
model: NXP i.MX8MPlus EVK board
of_compatible: fsl,imx8mq-evk fsl,imx8mq
model: NXP i.MX8MQ EVK
of_compatible: phytec,imx8mq-pcl066 fsl,imx8mq
model: Phytec phyCORE-i.MX8
of_compatible: zii,imx8mq-ultra-rmb3 zii,imx8mq-ultra fsl,imx8mq
model: ZII Ultra RMB3 Board
of_compatible: zii,imx8mq-ultra-zest zii,imx8mq-ultra fsl,imx8mq
model: ZII Ultra Zest Board
builduser@ae676260680c:~/barebox$ 

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


             reply	other threads:[~2021-10-01 11:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 11:46 Antony Pavlov [this message]
2021-10-01 23:47 ` Antony Pavlov
     [not found] <20211001142453.4a3c0ba9bd7bb909125e2a5f@gmail.com>
2021-10-02  8:48 ` Sascha Hauer
2021-10-02  9:44   ` Antony Pavlov
2021-10-04  7:52     ` Sascha Hauer

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=20211001144619.6db15b8269c912722bf0f2d0@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox