[OpenWrt-Devel] [PATCH 3/3] linux: add support of Synopsys ARC boards

Alexey Brodkin Alexey.Brodkin at synopsys.com
Thu Sep 3 12:11:28 EDT 2015


Hi Jonas,

On Thu, 2015-09-03 at 15:33 +0200, Jonas Gorski wrote:
> Hi,
> 
> On Wed, Sep 2, 2015 at 10:40 PM, Alexey Brodkin
> <Alexey.Brodkin at synopsys.com> wrote:
> > Hi Jonas,
> > 
> > On Wed, 2015-09-02 at 10:32 +0200, Jonas Gorski wrote:
> > > On Thu, Aug 27, 2015 at 1:03 PM, Alexey Brodkin
> > > <Alexey.Brodkin at synopsys.com> wrote:
> > > > This patch introduces support of new boards with ARC cores.
> > > > 
> > > >  [1] Synopsys SDP board
> > > >      This is a new-generation development board from Synopsys that
> > > >      consists of base-board and CPU tile-board (which might have a real
> > > >      ASIC or FPGA with CPU image).
> > > >      It sports a lot of DesignWare peripherals like GMAC, USB, SPI, I2C
> > > >      etc and is intended to be used for early development of ARC-based
> > > >      products.
> > > > 
> > > >  [2] nSIM
> > > >      This is a virtual board implemented in Synopsys proprietary
> > > >      software simulator (even though available for free for open source
> > > >      community). This board has only serial port as a peripheral and so
> > > >      it is meant to be used for runtime testing which is especially
> > > >      useful during bring-up of new tools and platforms.
> > > >      What's also important ARC cores are very configurable so there're
> > > >      many variations of options like cache sizes, their line lengths,
> > > >      additional hardware blocks like multipliers, dividers etc. And this
> > > >      board could be used to make sure built software still runs on
> > > >      different HW configurations.
> > > > 
> > > > Note there's a prerequisite http://patchwork.ozlabs.org/patch/502081/
> > 
> > [snip]
> > 
> > > > diff --git a/target/linux/arc/axs10x/config-4.1 b/target/linux/arc/axs10x/config-4.1
> > > > new file mode 100644
> > > > index 0000000..2cd3471
> > > > --- /dev/null
> > > > +++ b/target/linux/arc/axs10x/config-4.1
> > > > @@ -0,0 +1,127 @@
> > > > +#
> > > > +# ARC Architecture Configuration
> > > > +#
> > > 
> > > Please run make kernel_{menu|old|def}config to make this configs
> > > contain only the differences to the generic config.
> > 
> > Hm... even though I see "kernel_menuconfig" and "kernel_oldconfig"
> > targets exist in OpenWRT I cannot fing "kernel_defconfig". So I'm not sure
> > if there's an automated way for creation of minimalistic defconfig that
> > takes into account all levels of higher-level configs.
> 
> Right, kernel_defconfig doesn't exist, I always forget that. Buf
> running kernel_oldconfig or kernel_menuconfig and saving should work
> mostly the same way.
> 
> You can choose which config to modify with CONFIG_TARGET=platform for
> the top target config and CONFIG_TARGET=subtarget for the subtarget.
> The target config will be the difference to the generic config, and
> the subtarget config will be then the difference to (generic +
> target).

Ok I'll try to do that.

> > And kernel's "make savedefconfig" won't help here as well because
> > lots of items will be stripped from defconfig and so OpenWRT on build will
> > ask user to decide if this and that option should be on or off.
> > 
> > I tried to create very minimal configs that still have all options covered
> > on oldconfig.
> > 
> > If there's a how-to or guide on hoe to prepare configs for OpenWRT target
> > I'll try to conform its requirements.
> 
> There is no how-to, but if running make kernel_oldconfig for either
> CONFIG_TARGET={platform|subtarget} results in no changed files, then
> you did it right.

Understood :)

> > > Also please move
> > > all common options from both subtargets into a
> > > target/linux/arc/config-4.1.
> > 
> > Well indeed there're same options in both configs.
> > But please note nSIM and AXS10x are completely different boards.
> > And each of those boards may have different CPU.
> > 
> > This first set of patches only covers ARC legacy architecture (ARC 700).
> > 
> > But with 4.2 release of Linux kernel new gen ARC architecture (ARC HS38)
> > was introduced and once that patch set is accepted in OpenWRT I'll
> > send another patch that add support of new gen ARC CPUs.
> > 
> > My plan was to have following files structure:
> > 
> > target/linux/arc/axs10x/profiles/arc700.mk
> >                                 /archs38.mk
> >                 /nsim/profiles/arc700.mk
> >                               /archs38.mk
> > 
> > Is it acceptable or I need to modify it?
> 
> That seems backward, since arc700 and hs38 are different
> architectures, so I would assume their kernels and toolchains won't be
> compatible.
> 
> So I would use
> 
> target/linuxarc/arc700
> and
> target/linux/arc/hs38
> 
> and then
> 
> target/linux/arc/profiles/axs10x.mk
> and
> target/linux/arc/profiles/nsim.mk
> 
> (You can have "toplevel" profiles that apply to all subtargets)

Well I don't understand how that will work.
I mean we need to have different:
 [1] kernel config options for both pairs: boards (axs10x vs nsim)
     and architectures (arcv1 vs arcv2)
 [2] basefiles for boards (axs10x vs nsim)

I.e. setting profiles for axs10x and nsim won't be enough.

Maybe this all is not very clear, so I'll try to put here what we need to accommodate:
 [1] For axs10x board:
    a) base files for axs10x board
    b) kernel options for axs10x board
    c) kernel options for arc700 core in axs10x
    d) kernel options for archs38 core in axs10x

 [2] For nsim board:
    a) base files for nsim board
    b) kernel options for nsim board
    c) kernel options for arc700
core in nsim
    d) kernel options for archs38 core in nsim

So maybe the only option that will work is having 2 top-level arc entries like:
 * target/linux/arcv1 (or arc700)
 * target/linux/arcv2 (or archs38)

Or another alternative is 4 subtargets like that (I see something similar for RPi,
see target/linux/brcm2708):
 * target/linux/axs101 (which is axs10x with arc700)
 * target/linux/axs103 (which is axs10x with archs38)
 * target/linux/nsim_700 (which is nsim with arc700)
 * target/linux/nsim_hs (which is nsim with archs38)

But that in its turn will require to duplicate basefiles and kernel configs
relevant to boards but not cores.

Any thoughts about that are much appreciated.

-Alexey
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list