From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Cc: Mircea Ciocan <m.ciocan@ppc-ag.de>
Subject: Re: [ptxdist] How to create a board/platform from scratch (specifically iMX8M)
Date: Thu, 03 Sep 2020 08:50:21 +0200 [thread overview]
Message-ID: <2785576.4Qf2Y0b2QY@ada> (raw)
In-Reply-To: <2bb61da1-0b1a-ca5f-0ced-ea9628b94156@ppc-ag.de>
Hello Mircea,
Am Mittwoch, 2. September 2020, 15:05:45 CEST schrieb Mircea Ciocan:
> Hello everybody, is there a tutorial on creating a configuration for a
> new board starting from scratch, specifically for the iMX8M MCU ?
Not to my knowledge. What we did here for the last two new boards was using
existing boards as a base and adapting from there.
> As far as I could find there are no public references on how to do it
> from scratch, especially u-Boot integration, image creation and so on.
> If I'm wrong kindly please correct me and point to the documentation.
Integrating an already working U-Boot configuration into ptxdist is not
especially hard, but it involves some steps and you have different possible
ways. What I did for the new board we are currently developing was basically
this:
Get the full U-Boot support running outside of ptxdist, with U-Boot only:
- clone the U-Boot Git tree
- make your own branch based on the last U-Boot release
- you can build with OSELAS.Toolchain already:
PATH="/opt/OSELAS.Toolchain-2019.09.1/arm-v7a-linux-gnueabihf/gcc-9.2.1-
clang-8.0.1-glibc-2.30-binutils-2.32-kernel-5.0-sanitized/bin:${PATH}"
CROSS_COMPILE=arm-v7a-linux-gnueabihf- CFLAGS='-Wall -Wcast-align' make O=~/
build/u-boot …
For ptxdist integration after your U-Boot image is working:
- save the U-Boot defconfig to the tree or export your .config
- export your changes as patches
- import those patches in your BSP
- activate U-Boot in platformconfig
- choose legacy config and enter the defconfig filename
- or choose kconfig and copy over your exported .config
The hard work is in U-Boot itself, but some hints in the docs could be
helpful, too.
For development you could also use the `ptxdist local-src` feature of course
and let ptxdist symlink your U-Boot source tree, this is probably best with
kconfig based U-Boot config then.
Bonus level: get your U-Boot patches upstream, you won't have to carry them in
your BSP then. ;-)
(Of course your U-Boot binary image has to go to your target somehow, but
that's highly dependent on your board and from what memory you want to boot.
It may involve creating a config for genimage: different topic.)
> Also did anybody ever tried ptxdist with a board holding iMX8M MCU, as
> far as I can see everything is now Yocto, or buildroot (rarely).
>
> I think it's also because there are practically no sample configurations
> for modern ARM MCUs, buildroot for example comes with a number included
> configurations at least for the NXP EVKs.
>
> I believe it will be a good idea to include a number of configurations
> for more popular development/evaluation kits, if not in the main
> ptxdist, at least as an add-on package, what is the list opinion ?
See DistroKit. It was already mentioned by Rouven.
HTH & Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
prev parent reply other threads:[~2020-09-03 6:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 13:05 Mircea Ciocan
2020-09-02 13:13 ` Rouven Czerwinski
2020-09-03 6:50 ` Alexander Dahl [this message]
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=2785576.4Qf2Y0b2QY@ada \
--to=ada@thorsis.com \
--cc=m.ciocan@ppc-ag.de \
--cc=ptxdist@pengutronix.de \
/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