All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Board specific files
Date: Wed, 03 Apr 2019 14:58:36 +0200	[thread overview]
Message-ID: <2532062.el2UTNH4R2@ada> (raw)
In-Reply-To: <7837adcf44234b3bb227043f7ed29efb@edu.hefr.ch>

Hello Pascal,

Am Mittwoch, 3. April 2019, 09:08:57 CEST schrieb Linder Pascal:
> I am new to U-Boot and I am trying to understand what I need to code for
> using my own board with the bootloader.

Welcome. :-)

I try to describe my view on this, anyone correct me, if something is wrong.

> The device tree files I have already found under ./arch/arm/dts/. Can I just
> add my device tree under this directory?

Yes. Note: you probably can not just copy a dts file from the Linux Kernel. 
From what I discovered when adding a new board lately, those files are 
slightly different.

> Also, what is the difference between the configuration files under
> ./configs/ and ./include/configs/? Do I need to add a file in both of the
> named directories?

For setting board options and more, U-Boot uses the Kconfig system from the 
Linux kernel (adapted to the needs of U-Boot). In the old days everything was 
set as preprocessor define in a board specific header in ./include/configs but 
more and more options have been converted over the years.

Today you still need that header in ./include/configs but fewer things are set 
there with each new U-Boot release.

The files in ./configs/ are default configs for a board to have an initial 
working ./.config configuration file for that Kconfig approach. Although these 
defconfigs are not strictly necessary, it's very convenient as a starting 
point when compiling an image for a board. Some embedded build systems use 
those defconfigs.

> If someone knows a well documented guide to add a new board to the mainline,
> I would be very grateful.

I see two steps here. Getting all the things in place for a new board to boot 
is one, the other one with a different set of challenges is getting that into 
mainline U-Boot. 

For the first I would advise to look into ./README and ./doc/ (keep in mind, 
information there might be outdated) and read lots of code of other boards, 
preferably boards with a similar SoC added lately. 

For getting your patches into mainline, the guide on submitting patches in the 
Linux kernel docs [1] mostly applies to U-Boot as well.

Greets
Alex

[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html

  reply	other threads:[~2019-04-03 12:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  9:08 [U-Boot] Board specific files Linder Pascal
2019-04-03 12:58 ` Alexander Dahl [this message]
2019-04-16 10:20   ` Matthias Brugger

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=2532062.el2UTNH4R2@ada \
    --to=ada@thorsis.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.