All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Refactoring of U-Boot directory structure
Date: Mon, 28 Jul 2014 04:26:32 +0100	[thread overview]
Message-ID: <CAPnjgZ1LZfk5WyjUu9uzytKF6uQ39BNFRtAEe9724S2sXUTK9Q@mail.gmail.com> (raw)
In-Reply-To: <20140612131050.963A.AA925319@jp.panasonic.com>

Hi Masahiro,

On 12 June 2014 05:10, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Hi.
>
> In U-Boot, the directory structure under arch/ is like this
> arch/${ARCH}/cpu/${CPU}/${SOC}
>
>   Exception:
>     - ${CPU} is missing for some architectures such as blackfin, sandbox, etc.
>     - There are many boards without ${SOC}
>
>
> My question is, ${SOC} should always depend on ${CPU} ?
>
> I think it is reasonable to migrate to the structure like this:
>
>      arch/${ARCH}/cpu/${CPU}
>                           /mach-${foo}
>                           /mach-${bar}
>
> I think  arch/${ARCH}/cpu/${CPU}/${SOC}  structure
> have given us a lot of pain.
>
>
> The problems I want to solve are:
>
>
> [1] Do not split the similar  SoC family to various directories
>
> at91 SoC directory exists under arm920t, arm926ejs, armv7 directory.
>
> ./arch/arm/cpu/arm920t/at91
> ./arch/arm/cpu/arm926ejs/at91
> ./arch/arm/cpu/armv7/at91
>
> It looks reasonable to collect at91 sources into a single place,
> arch/arm/mach-at91

This does make it clear that the chips are in a single family. We can
have different files for the chip-specific stuff such as low-level
code. But this approach makes it easier to use common code I think.

>
>
> [2] Collect C/ASM sources and headers into a single place
>
> Now SoC-specific sources are under
> ./arch/${ARCH}/cpu/${CPU}/${SOC}/
>
> But headers are
> ./arch/${ARCH}/include/asm/arch-${SOC}/
>
> In the new structure,
> ./arch/arm/mach-${SOC}/                      : C/ASM files
> ./arch/arm/mach-${SOC}/include/          : Header files

This seems better to me.

>
>
> [3] Do not create a symbolic link to header dicrectory
>
> mkconfig creates a symbolic link to
> arch/asm/include/asm/arch-${SOC}
>
> I dislike creating a symbolic link by configuration
> and remove it by mrproper.
>
> Linux Kernel did that long time ago, but they did away with it.

OK

Regards,
Simon

      parent reply	other threads:[~2014-07-28  3:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  4:10 [U-Boot] Refactoring of U-Boot directory structure Masahiro Yamada
2014-06-12  4:41 ` Wolfgang Denk
2014-06-12  6:32   ` Masahiro Yamada
2014-06-12  7:46     ` Andreas Bießmann
2014-06-12 15:16 ` Stephen Warren
2014-06-13  7:18   ` Masahiro Yamada
2014-07-28  3:31     ` Simon Glass
2014-07-28 17:24       ` Stephen Warren
2014-07-28  3:26 ` Simon Glass [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=CAPnjgZ1LZfk5WyjUu9uzytKF6uQ39BNFRtAEe9724S2sXUTK9Q@mail.gmail.com \
    --to=sjg@chromium.org \
    --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.