26 Feb, 2014

1 commit


20 Feb, 2014

2 commits

  • Now we are ready to switch over to real Kbuild.

    This commit disables temporary scripts:
    scripts/{Makefile.build.tmp, Makefile.host.tmp}
    and enables real Kbuild scripts:
    scripts/{Makefile.build,Makefile.host,Makefile.lib}.

    This switch is triggered by the line in scripts/Kbuild.include
    -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
    +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj

    We need to adjust some build scripts for U-Boot.
    But smaller amount of modification is preferable.

    Additionally, we need to fix compiler flags which are
    locally added or removed.

    In Kbuild, it is not allowed to change CFLAGS locally.
    Instead, ccflags-y, asflags-y, cppflags-y,
    CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
    are prepared for that purpose.

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

    Masahiro Yamada
     
  • 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
     

30 Jan, 2014

1 commit

  • Commit cbe5cdfcd changed config.mk and arch/sandbox/cpu/Makefile
    to use -idirafter instead of -I and remove -nostdinc.

    But
    * Sandbox-specific code dirties config.mk
    * os.c is compiled without such compiler flags as:
    -Wall -Wstrict-prototypes -Wno-format-security
    -fno-builtin -ffreestanding -fno-stack-protector
    -fstack-usage -Wno-format-nonliteral

    This commit use -idirafter and remove the -nostdinc
    differently and more simply.

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

    Masahiro Yamada
     

25 Jan, 2014

1 commit


09 Jan, 2014

9 commits

  • This function is defined but has no prototype declaration. Add it.

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

    Simon Glass
     
  • It is often useful to be able to save out the state from a sandbox test
    run, for analysis or to restore it later to continue a test. Add generic
    infrastructure for doing this using a device tree binary file. This is
    a flexible tagged file format which is already supported by U-Boot, and
    it supports hierarchy if needed.

    Signed-off-by: Simon Glass
    Signed-off-by: Simon Glass
    Reviewed-by: Hung-ying Tyan

    Simon Glass
     
  • It is useful to be able to save and restore the RAM contents of sandbox
    U-Boot either for setting up tests, for later analysys, or for chaining
    together multiple tests which need to keep the same memory contents.

    Add a function to provide a memory file for U-Boot. This is read on
    start-up and written when shutting down. If the file does not exist
    on start-up, it will be created when shutting down.

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

    Simon Glass
     
  • Normally when U-Boot starts with a command (-c option) it quits when the
    command completes. Normally this is what is requires, since the test is
    likely complete.

    Provide an option to jump into the console instead, so that debugging or
    other tasks may be performed before quitting.

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

    Simon Glass
     
  • With sandbox, errors and problems may be reported before console_init_f()
    is executed. For example, an argument may not parse correctly or U-Boot may
    panic(). At present this output is swallowed so there is no indication what
    is going wrong.

    Adjust the console to deal with a very early sandbox setup, by detecting that
    there is no global_data yet, and calling os functions in that case.

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

    Simon Glass
     
  • When sandbox does a 'bootm' to run a kernel we cannot actually execute it.
    So just exit sandbox, which is essentially what U-Boot does on other archs.
    Also, allow sandbox to use bootm on any kernel, so that it can be used
    to test booting of kernels from any architecture.

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

    Simon Glass
     
  • The execution flow becomes easier if we can return from board_init_f()
    as ARM does. We can control things from start.c instead of having to
    call back into that file from other places.

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

    Simon Glass
     
  • The is displayed for options with no argument, and omitted for those
    with an argument. Swap this around.

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

    Simon Glass
     
  • Implement realloc() and free() for sandbox, by adding a header to each
    block which contains the block size.

    Signed-off-by: Simon Glass
    Signed-off-by: Simon Glass
    Reviewed-by: Che-Liang Chiou
    Reviewed-by: Hung-ying Tyan

    Simon Glass
     

10 Dec, 2013

2 commits


22 Nov, 2013

4 commits


01 Nov, 2013

1 commit


15 Oct, 2013

1 commit


24 Jul, 2013

1 commit


26 Jun, 2013

1 commit

  • Support tracing on sandbox by adding suitable CONFIG options. To enable it,
    compile U-Boot with FTRACE=1.

    The timer functions are marked to skip tracing, since these are called from
    the tracing code itself, and we want to avoid an infinite loop.

    Signed-off-by: Simon Glass

    Simon Glass
     

01 May, 2013

4 commits

  • This allows passing of entire scripts to sandbox with the -c argument,
    which is useful for testing. Commands can be delimited with a newline
    or semicolon.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • With sandbox it is tricky to add an FDT to the image at build time (or
    later) since we build an ELF file, not a plain binary, and the address
    space of the whole U-Boot is not accessible in the emulated memory map
    of sandbox.

    Sandbox can read files directly from the host, though, so add an option
    to read an FDT from a host file on start-up.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add generic board support for sandbox. and remove the old board init code.

    Select CONFIG_SYS_GENERIC_BOARD for sandbox now that this is supported.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     
  • In many cases, pointers to memory are passed around, and these pointers
    refer to U-Boot memory, not host memory. This in itself is not a
    problem.

    However, in a few places, we cast that pointer back to a ulong (being
    a U-Boot memory address). It is possible to convert many of these cases
    to avoid this. However there are data structures (e.g. struct
    bootm_headers) which use pointers. We could with a lot of effort adjust
    the structs and all code that uses them to use ulong instead of pointers.

    This seems like an unacceptable cost, since our objective with sandbox
    is to minimise the impact on U-Boot code while maximising the features
    available to sandbox.

    Therefore, create a map_to_sysmem() function which converts from a
    pointer to a U-Boot address. This can be used sparingly when needed.

    Signed-off-by: Simon Glass

    Simon Glass
     

19 Mar, 2013

1 commit

  • Albert's rework of the linker scripts conflicted with Simon's making
    everyone use __bss_end. We also had a minor conflict over
    README.scrapyard being added to in mainline and enhanced in
    u-boot-arm/master with proper formatting.

    Conflicts:
    arch/arm/cpu/ixp/u-boot.lds
    arch/arm/cpu/u-boot.lds
    arch/arm/lib/Makefile
    board/actux1/u-boot.lds
    board/actux2/u-boot.lds
    board/actux3/u-boot.lds
    board/dvlhost/u-boot.lds
    board/freescale/mx31ads/u-boot.lds
    doc/README.scrapyard
    include/configs/tegra-common.h

    Build tested for all of ARM and run-time tested on am335x_evm.

    Signed-off-by: Tom Rini

    Tom Rini
     

16 Mar, 2013

1 commit

  • 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
     

13 Mar, 2013

1 commit

  • Refactor linker-generated array code so that symbols
    which were previously linker-generated are now compiler-
    generated. This causes relocation records of type
    R_ARM_ABS32 to become R_ARM_RELATIVE, which makes
    code which uses LGA able to run before relocation as
    well as after.

    Note: this affects more than ARM targets, as linker-
    lists span possibly all target architectures, notably
    PowerPC.

    Conflicts:
    arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
    arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
    arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
    board/ait/cam_enc_4xx/u-boot-spl.lds
    board/davinci/da8xxevm/u-boot-spl-da850evm.lds
    board/davinci/da8xxevm/u-boot-spl-hawk.lds
    board/vpac270/u-boot-spl.lds

    Signed-off-by: Albert ARIBAUD

    Albert ARIBAUD
     

05 Mar, 2013

1 commit


01 Mar, 2013

3 commits

  • Sandbox doesn't actually provide U-Boot access to the machine's physical
    memory. Instead it provides a RAM buffer of configurable size, and all
    memory accesses are within that buffer. Sandbox memory starts at 0 and
    is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer
    might produce unpredictable results in the event of an error, and would
    expose the host machine's memory architecture to the sandbox U-Boot.

    Most U-Boot functions assume that they can just access memory at given
    address. For sandbox this is not true.

    Add a map_sysmem() call which converts a U-Boot address to a system
    address. In most cases this is a NOP, but for sandbox it returns a
    pointer to that memory inside the RAM buffer.

    To get a U-Boot feature to work correctly within sandbox, you should call
    map_sysmem() to get a pointer to the address, and then use that address for
    any U-Boot memory accesses.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Implements the tstc() interface for the serial driver. Multiplexing
    the console between the serial port and a keyboard uses a polling
    method of checking if characters are available; this means that the
    serial console must be non-blocking when attempting to read
    characters.

    Signed-off-by: Taylor Hutt
    Signed-off-by: Simon Glass

    Taylor Hutt
     
  • Add back return statement to fix compiler warning about control flow
    reaching end of non void function that was introduced with:

    e05e5de arm: move C runtime setup code in crt0.S

    Signed-off-by: Allen Martin
    Acked-by: Simon Glass

    Allen Martin
     

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
     

22 Oct, 2012

2 commits

  • The command declaration now uses the new LG-array method to generate
    list of commands. Thus the __u_boot_cmd section is now superseded and
    redundant and therefore can be removed. Also, remove externed symbols
    associated with this section from include/command.h .

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

    Marek Vasut
     
  • Add section for the linker-generated lists into all possible linker
    files, so that everyone can easily use these lists. This is mostly
    a mechanical adjustment.

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

    Marek Vasut