14 Sep, 2014

1 commit

  • Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME}
    are specified in arch/Kconfig.

    We can delete the ones in arch and board Kconfig files.

    This commit can be easily reproduced by the following command:

    find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e '
    /config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ {
    N
    s/\n[[:space:]]*string//
    }
    '

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

31 Jul, 2014

1 commit


30 Jul, 2014

1 commit

  • This commit adds:
    - arch/${ARCH}/Kconfig
    provide a menu to select target boards
    - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig
    set CONFIG macros to the appropriate values for each board
    - configs/${TARGET_BOARD}_defconfig
    default setting of each board

    (This commit was automatically generated by a conversion script
    based on boards.cfg)

    In Linux Kernel, defconfig files are located under
    arch/${ARCH}/configs/ directory.
    It works in Linux Kernel since ARCH is always given from the
    command line for cross compile.

    But in U-Boot, ARCH is not given from the command line.
    Which means we cannot know ARCH until the board configuration is done.
    That is why all the "*_defconfig" files should be gathered into a
    single directory ./configs/.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada
     

22 Jul, 2014

2 commits

  • There is only one line diff between LEON2 and LEON3 linker scripts:

    - arch/sparc/cpu/leon2/start.o (.text)
    + arch/sparc/cpu/leon3/start.o (.text)

    They can be written in the same way:

    */start.o (.text)

    So, board/gaisler/grsim_leon2/u-boot.lds
    and arch/sparc/cpu/leon3/u-boot.lds
    can be merged into arch/sparc/cpu/u-boot.lds.

    Signed-off-by: Masahiro Yamada
    Cc: Daniel Hellstrom

    Masahiro Yamada
     
  • The linker scripts of LEON3

    - board/gaisler/grsim/u-boot.lds
    - board/gaisler/gr_cpci_ax2000/u-boot.lds
    - board/gaisler/gr_ep2s60/u-boot.lds
    - board/gaisler/gr_xc3s_1500/u-boot.lds

    are the same (except cosmetic differences such as indentation).

    This commit merges them into arch/sparc/cpu/leon3/u-boot.lds.

    Signed-off-by: Masahiro Yamada
    Cc: Daniel Hellstrom

    Masahiro Yamada
     

13 May, 2014

1 commit

  • gd->bd->bi_baudrate is a copy of gd->baudrate.

    Since baudrate is a common feature for all architectures,
    keep gd->baudrate only.

    It is true that bi_baudrate was passed to the kernel in that structure
    but it was a long time ago.

    Signed-off-by: Masahiro Yamada
    Cc: Tom Rini
    Cc: Simon Glass
    Cc: Wolfgang Denk
    Cc: Heiko Schocher
    Acked-by: Michal Simek (For microblaze)

    Masahiro Yamada
     

09 May, 2014

2 commits


22 Mar, 2014

1 commit

  • CONFIG_LEON is already defined in
    arch/sparc/cpu/{leon2,leon3}/config.mk.
    Remove the redundant definition in board header files.

    All leon3 boards define CONFIG_LEON3 in board header files.
    Move the definition to arch/sparc/cpu/leon3/config.mk.

    CONFIG_LEON2 can be move to arch/sparc/cpu/leon2/config.mk
    as well.

    Signed-off-by: Masahiro Yamada
    Cc: Daniel Hellstrom

    Masahiro Yamada
     

11 Mar, 2014

1 commit

  • Many USB host controller drivers contain almost identical copies of the
    same virtual root hub descriptors. Put these into a common file to avoid
    duplication.

    Note that there were some very minor differences between the descriptors
    in the various files, such as:

    - USB 1.0 vs. USB 1.1
    - Manufacturer/Device ID
    - Max packet size
    - String content

    I assume these aren't relevant.

    Cc: Thomas Lange
    Cc: Shinya Kuribayashi
    Cc: Gary Jennejohn
    Cc: Wolfgang Denk
    Cc: Eric Millbrandt
    Cc: Pierre Aubert
    Cc: Stefan Roese
    Cc: Daniel Hellstrom
    Cc: Denis Peter
    Cc: Rodolfo Giometti
    Cc: Zhang Wei
    Cc: Mateusz Zalega
    Cc: Remy Bohmer
    Cc: Markus Klotzbuecher
    Cc: Minkyu Kang
    Cc: Gary Jennejohn
    Cc: C Nauman
    Cc: David Müller
    Cc: Yoshihiro Shimoda
    Cc: Nobuhiro Iwamatsu
    Cc: Thomas Abraham
    Cc: Tom Rini
    Cc: Andrew Murray
    Cc: Matej Frančeškin
    Cc: Cliff Cai
    Cc: Bryan Wu
    Signed-off-by: Stephen Warren

    Stephen Warren
     

07 Mar, 2014

2 commits

  • Kbuild brought about many advantages for us but a significant
    performance regression was reported by Simon Glass.

    After some discussions and analysis, it turned out
    its main cause is in $(call cc-option,...).

    Historically, U-Boot parses all config.mk
    (arch/*/config.mk and board/*/config.mk)
    every time descending into subdirectories.
    That means cc-options are evaluated over and over again.

    $(call cc-option,...) is useful but costly.
    So we want to evaluate them only in ./Makefile
    and spl/Makefile and export compiler flags.

    This commit changes the build system as follows:

    - Modify scripts/Makefile.build to not include config.mk
    Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
    cppflags-y.

    - Export many variables
    Going forward, Kbuild will not parse config.mk files
    when it descends into subdirectories.
    If we want to set variables in config.mk and use them
    in subdirectories, they must be exported.

    This is the list of variables to get exported:
    PLATFORM_CPPFLAGS
    CPUDIR
    BOARDDIR
    OBJCOPYFLAGS
    LDFLAGS
    LDFLAGS_FINAL
    (used in nand_spl/board/*/*/Makefile)
    CONFIG_STANDALONE_LOAD_ADDR
    (used in examples/standalone/Makefile)
    SYM_PREFIX
    (used in examples/standalone/Makefile)
    RELFLAGS
    (used in examples/standalone/Makefile)

    - Delete CPPFLAGS
    This variable has been replaced with PLATFORM_CPPFLAGS

    - Copy gcclibdir from example/standalone/Makefile
    to arch/sparc/config.mk
    The reference in CONFIG_STANDALONE_LOAD_ADDR must be
    resolved before it is exported.

    Signed-off-by: Masahiro Yamada
    Reported-by: Simon Glass
    Acked-by: Simon Glass
    Tested-by: Simon Glass [on Sandbox]
    Tested-by: Stephen Warren [on Tegra]

    Masahiro Yamada
     
  • We want to change the build system to include config.mk
    only from ./Makefile and spl/Makefile.
    We must prepare for that in this commit.

    $(src) is a moving target and not handy for our purpose.
    We must replace it with a fixed path.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

05 Mar, 2014

1 commit


20 Feb, 2014

1 commit

  • This commit changes the working directory
    where the build process occurs.

    Before this commit, build process occurred under the source
    tree for both in-tree and out-of-tree build.

    That's why we needed to add $(obj) prefix to all generated
    files in makefiles like follows:
    $(obj)u-boot.bin: $(obj)u-boot

    Here, $(obj) is empty for in-tree build, whereas it points
    to the output directory for out-of-tree build.

    And our old build system changes the current working directory
    with "make -C " syntax when descending into the
    sub-directories.

    On the other hand, Kbuild uses a different idea
    to handle out-of-tree build and directory descending.

    The build process of Kbuild always occurs under the output tree.
    When "O=dir/to/store/output/files" is given, the build system
    changes the current working directory to that directory and
    restarts the make.

    Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj="
    syntax for descending into sub-directories.
    (We can write it like "make $(obj)=" with a shorthand.)
    This means the current working directory is always the top
    of the output directory.

    Signed-off-by: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     

25 Nov, 2013

1 commit


09 Nov, 2013

1 commit

  • Linux Kernel abolished include/linux/config.h long time ago.
    (around version v2.6.18..v2.6.19)

    We don't need to provide Linux copatibility any more.

    This commit deletes include/linux/config.h
    and fixes source files not to include this.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

08 Nov, 2013

1 commit

  • arch/sparc/cpu/leon3/start.S requires CONFIG_SYS_SPARC_NWINDOES
    to be defined:

    #ifndef CONFIG_SYS_SPARC_NWINDOWS
    #error Must define number of SPARC register windows, default is 8
    #endif

    But it missed to include , which always ended up in compile error.

    This commit fixes this problem.

    Signed-off-by: Masahiro Yamada
    Cc: Daniel Hellstrom

    Masahiro Yamada
     

01 Nov, 2013

2 commits


21 Oct, 2013

1 commit


24 Jul, 2013

1 commit


17 Jul, 2013

1 commit


02 Jul, 2013

1 commit

  • Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It
    requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before
    calling it again with flag set to BOOTM_STATE_OS_GO.
    Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will
    require a complete refactoring later on.

    Signed-off-by: Andreas Bießmann
    [trini: Apply to m68k, microblaze, nds32, nios2, openrisc, sh and sparc]
    Signed-off-by: Tom Rini

    Andreas Bießmann
     

15 May, 2013

1 commit

  • Sparc only really sets up the ramdisk, but we should still use
    image_setup_linux() so that setup is common across all architectures
    that use the FDT.

    Cover-letter
    Introduce a common image_setup_linux() function
    This series continues the work to tidy up the image code. Each
    architecture has its own code for setting up ready for booting linux.
    An attempt is made here to unify these in a single image_setup_linux()
    function.

    The part of the image code that deals with FDT is split into image-fdt.c
    and a few tweaks are added to make FIT images more viable in SPL.
    END
    Signed-off-by: Simon Glass

    Simon Glass
     

02 May, 2013

1 commit

  • Delete all occurrences of hang() and provide a generic function.

    Signed-off-by: Andreas Bießmann
    Acked-by: Albert ARIBAUD
    [trini: Modify check around puts() in hang.c slightly]
    Signed-off-by: Tom Rini

    Andreas Bießmann
     

16 Mar, 2013

3 commits

  • These macros are already defined in io.h so should not be declared in
    serial.c.

    serial.c:38:0: warning: "READ_BYTE" redefined
    /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:36:0: note: this is the location of the previous definition
    serial.c:39:0: warning: "READ_HWORD" redefined
    /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:37:0: note: this is the location of the previous definition
    serial.c:40:0: warning: "READ_WORD" redefined
    /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:38:0: note: this is the location of the previous definition
    serial.c:41:0: warning: "READ_DWORD" redefined
    /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:39:0: note: this is the location of the previous definition

    Signed-off-by: Simon Glass
    Signed-off-by: Simon Glass

    Simon Glass
     
  • It isn't clear why the sparc cpu Makefile has its own compile line, but
    it does not work correctly with an out-of-tree build. Removing it fixes
    this problem. Perhaps it does not introduce others.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • We create a separate header file for link symbols defined by the link
    scripts. It is helpful to have these all in one place and try to
    make them common across architectures. Since Linux already has a similar
    file, we bring this in even though many of the symbols there are not
    relevant to us.

    Each architecture has its own asm/sections.h where symbols specifc to
    that architecture can be added. For now everything except AVR32 just
    includes the generic header.

    One change is needed in arch/avr32/lib/board.c to make this conversion
    work.

    Reviewed-by: Tom Rini (version 5)
    Signed-off-by: Simon Glass

    Simon Glass
     

20 Feb, 2013

1 commit

  • On architectures where manual relocation
    is needed, the 'malloc_bin_reloc' function
    must be called after 'mem_malloc_init'.

    Make the 'malloc_bin_reloc' function static
    and call it directly from 'mem_malloc_init'
    instead of calling that from board_init_{r,f}
    functions of the affected architectures.

    Signed-off-by: Gabor Juhos
    Cc: Wolfgang Denk
    Cc: Andreas Bießmann
    Cc: Jason Jin
    Cc: Macpaul Lin
    Cc: Daniel Hellstrom
    Cc: Daniel Schwierzeck

    Gabor Juhos
     

04 Feb, 2013

2 commits


02 Feb, 2013

1 commit

  • We plan to move architecture-specific data into a separate structure so
    that we can make the rest of it common.

    As a first step, create struct arch_global_data to hold these fields.
    Initially it is empty.

    This patch applies to all archs at once. I can split it if this is really
    a pain.

    Signed-off-by: Simon Glass

    Simon Glass
     

14 Dec, 2012

1 commit


12 Dec, 2012

1 commit

  • strncasecmp() is present as strnicmp() but disabled. Make it available
    and define strcasecmp() also. There is a only a small performance penalty
    to having strcasecmp() call strncasecmp(), so do this instead of a
    standalone function, to save code space.

    Update the prototype in arch-specific headers as needed to avoid warnings.

    Signed-off-by: Simon Glass

    Simon Glass
     

22 Oct, 2012

1 commit

  • This patch converts the old method of creating a list of command
    onto the new LG-arrays code. The old u_boot_cmd section is converted
    to new u_boot_list_cmd subsection and LG-array macros used as needed.

    Minor adjustments had to be made to the common code to work with the
    LG-array macros, mostly the fixup_cmdtable() calls are now passed the
    ll_entry_start and ll_entry_count instead of linker-generated symbols.

    The command.c had to be adjusted as well so it would use the newly
    introduced LG-array API instead of directly using linker-generated
    symbols.

    Signed-off-by: Marek Vasut
    Cc: Joe Hershberger
    Cc: Mike Frysinger

    Marek Vasut
     

20 Oct, 2012

1 commit


17 Oct, 2012

1 commit


16 Oct, 2012

3 commits