[U-Boot] [RFC PATCH 0/21] ARM: start to move SoC code into arch/arm/mach-*

Masahiro Yamada yamada.m at jp.panasonic.com
Mon Feb 2 04:33:18 CET 2015


Hi Albert,
(cc Simon)

On Sun, 1 Feb 2015 11:11:44 +0100
Albert ARIBAUD <albert.u.boot at aribaud.net> wrote:

> Hello Simon,
> 
> On Sat, 31 Jan 2015 20:20:06 -0700, Simon Glass <sjg at chromium.org>
> wrote:
> > Hi Albert,
> > 
> > On 31 January 2015 at 20:02, Albert ARIBAUD <albert.u.boot at aribaud.net> wrote:
> > > Hello Masahiro,
> > >
> > > On Sun, 25 Jan 2015 15:11:02 +0900, Masahiro Yamada
> > > <yamada.m at jp.panasonic.com> wrote:
> > >>
> > >> This series can be applied on the current u-boot/master
> > >> (commit 37b608a52dcb133)
> > >
> > > I'd rather not have all mach-* directories just below arch/arm/. Can't
> > > they be created under arch/arm/soc/ instead? That would give a cleaner
> > > structure IMO.
> > 
> > It does save a level and I am forever typing cpu/armv7 to get what
> > feels like nowhere...
> 
> That can easily be solved (and tuned to personal taste) with CDPATH, eg.
> 
> uboot at lilith:~/src/u-boot-arm (master)$ export CDPATH=arch/arm/cpu:arch/arm
> uboot at lilith:~/src/u-boot-arm (master)$ cd armv
> armv7/  armv8/  
> uboot at lilith:~/src/u-boot-arm (master)$ cd armv7
> /home/uboot/src/u-boot-arm/arch/arm/cpu/armv7
> uboot at lilith:~/src/u-boot-arm/arch/arm/cpu/armv7 (master)$ 
> 
> (the u-boot-friendly value of CDPATH can put in a u-boot_env.sh file to
> be sourced along with other u-boot related settings)
> 
> > this is what the kernel does and it does seem convenient.
> 
> Well, to me it does not really -- I'm ok with loads of mach-* subdirs
> under a commin parent dir, but what's the benefit of mixing mach-* dirs
> with non-mach-* ones?


Listing "machdirs" in arch/arm/Makefile has two meanings:

[1] Descide which mach-* directory to descend
    in order to build SoC sources.

[2] Add arch/arm/mach-*/include/mach to the header include path.
   (As I commented in 13/21, I do not prefer creating a symbolic link
    during the build.)



As for [1], I'm OK with having SoC directories in  arch/arm/soc/*.
In that case, I am inclined to describe SoC stuff in arch/arm/soc/Makefile,
which I think makes it difficult to achieve [2].


If you have a better idea, please let me know.



Best Regards
Masahiro Yamada



More information about the U-Boot mailing list