12 Jul, 2010

1 commit

  • The smc911x_detect function in /net/driver/net/smc911x.c
    returns a 0 if everything was ok (a chip was found) and -1 else.
    In the standalone example 'smc911x_eeprom' the return value
    of smc911x_detect is interpreted in a different way
    (0 for error, !0 as OK).
    This leads to the error that the chip will not be detected.

    Signed-off-by: Juergen Kilb
    Acked-by: Mike Frysinger

    Signed-off-by: Ben Warren

    Juergen Kilb
     

05 Jul, 2010

2 commits

  • The hush shell dynamically allocates (and re-allocates) memory for the
    argument strings in the "char *argv[]" argument vector passed to
    commands. Any code that modifies these pointers will cause serious
    corruption of the malloc data structures and crash U-Boot, so make
    sure the compiler can check that no such modifications are being done
    by changing the code into "char * const argv[]".

    This modification is the result of debugging a strange crash caused
    after adding a new command, which used the following argument
    processing code which has been working perfectly fine in all Unix
    systems since version 6 - but not so in U-Boot:

    int main (int argc, char **argv)
    {
    while (--argc > 0 && **++argv == '-') {
    /* ====> */ while (*++*argv) {
    switch (**argv) {
    case 'd':
    debug++;
    break;
    ...
    default:
    usage ();
    }
    }
    }
    ...
    }

    The line marked "====>" will corrupt the malloc data structures and
    usually cause U-Boot to crash when the next command gets executed by
    the shell. With the modification, the compiler will prevent this with
    an
    error: increment of read-only location '*argv'

    N.B.: The code above can be trivially rewritten like this:

    while (--argc > 0 && **++argv == '-') {
    char *arg = *argv;
    while (*++arg) {
    switch (*arg) {
    ...

    Signed-off-by: Wolfgang Denk
    Acked-by: Mike Frysinger

    Wolfgang Denk
     
  • Change the return type of the *printf() functions to the standard
    "int"; no changes are needed but returning the already available
    length count.

    This will save a few additional strlen() calls later...

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

30 Jun, 2010

1 commit

  • Previously, standalone applications were compiled with gcc flags that
    produced relocatable executables on the PowerPC architecture (eg with
    the -mrelocatable and -fPIC flags). There's no reason for these
    applications to be fully relocatable at this time since no relocation
    fixups are performed on standalone applications.

    Additionally, removing the gcc relocation flags results in the entry
    point of applications residing at the base of the image. When
    a standalone application was relocatable, the entry point was generally
    located at an offset into the image which was confusing and prone to
    errors.

    This change moves the entry point of PowerPC standalone applications
    from 0x40004 (usually) to 0x40000.

    Signed-off-by: Peter Tyser
    Signed-off-by: Wolfgang Denk

    Peter Tyser
     

28 May, 2010

2 commits


22 Apr, 2010

1 commit

  • As discussed on the list, move "arch/ppc" to "arch/powerpc" to
    better match the Linux directory structure.

    Please note that this patch also changes the "ppc" target in
    MAKEALL to "powerpc" to match this new infrastructure. But "ppc"
    is kept as an alias for now, to not break compatibility with
    scripts using this name.

    Signed-off-by: Stefan Roese
    Acked-by: Wolfgang Denk
    Acked-by: Detlev Zundel
    Acked-by: Kim Phillips
    Cc: Peter Tyser
    Cc: Anatolij Gustschin

    Stefan Roese
     

13 Apr, 2010

3 commits


13 Mar, 2010

2 commits


01 Feb, 2010

1 commit

  • Building for a bf533-stamp ends up with this error:
    smc91111_eeprom.o: In function `smc91111_eeprom':
    examples/standalone/smc91111_eeprom.c:58: undefined reference to `memset'
    make[2]: *** [smc91111_eeprom] Error 1

    The new eth_struct definition means gcc has to zero out the structure on
    the stack, and some gcc versions optimize this with an implicit call to
    memset. So tweak the structure style to avoid that gcc feature.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Ben Warren

    Mike Frysinger
     

19 Jan, 2010

1 commit

  • Commit 6a45e384955262882375a2785426dc65aeb636c4 (Make getenv_IPaddr() global)
    inadvertently added ' #include "net.h" ' to the standalone programs, creating
    duplicate definitions of 'struct eth_device'. This patch removes the local
    definitions and removes other code that breaks due to the change in definition.

    Signed-off-by: Ben Warren
    Acked-by: Mike Frysinger

    Ben Warren
     

05 Dec, 2009

2 commits

  • Conflicts:
    board/esd/plu405/plu405.c
    drivers/rtc/ftrtc010.c

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     
  • According to the PPC reference implementation the udelay() function is
    responsible for resetting the watchdog timer as frequently as needed.
    Most other architectures do not meet that requirement, so long-running
    operations might result in a watchdog reset.

    This patch adds a generic udelay() function which takes care of
    resetting the watchdog before calling an architecture-specific
    __udelay().

    Signed-off-by: Ingo van Lil

    Ingo van Lil
     

03 Dec, 2009

2 commits

  • Since the Makefile now controls the compilation of this, there is no need
    for CONFIG checking nor the stub function.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     
  • Some versions of 'make' do not handle trailing white-spaces
    properly. Trailing spaces in ELF causes a 'fake' source to
    be added to the variable COBJS; leading to build failure
    (listed below). The problem was found with GNU Make 3.80.

    Using text-function 'strip' as a workaround for the problem.

    make[1]: Entering directory `/home/sanjeev/u-boot/examples/standalone'
    arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float
    -D__KERNEL__ -DTEXT_BASE=0x80e80000 -I/home/sanjeev/u-boot/include
    -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-
    203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe -DCONFIG_
    ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5
    -Wall -Wstrict-prototypes -fno-stack-protector -g -Os -fno-common -ff
    ixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e80000 -I/home/sanje
    ev/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/co
    desourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/includ
    e -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-inte
    rwork -march=armv5 -I.. -Bstatic -T u-boot.lds -Ttext 0x80e80000 -o .c
    arm-none-linux-gnueabi-gcc: no input files
    make[1]: *** [.c] Error 1
    make[1]: Leaving directory `/home/sanjeev/u-boot/examples/standalone'
    make: *** [examples/standalone] Error 2
    premi #

    Signed-off-by: Sanjeev Premi

    Fixed typo (s/ElF/ELF/).
    Signed-off-by: Wolfgang Denk

    Sanjeev Premi
     

24 Nov, 2009

1 commit


13 Nov, 2009

1 commit


27 Oct, 2009

1 commit


05 Oct, 2009

1 commit

  • All in-tree boards that use this controller have CONFIG_NET_MULTI
    added
    Also:
    - changed CONFIG_DRIVER_SMC91111 to CONFIG_SMC91111
    - cleaned up line lengths
    - modified all boards that override weak function in this driver
    - modified all eeprom standalone apps to work with new driver
    - updated blackfin standalone EEPROM app after testing

    Signed-off-by: Ben Warren
    Signed-off-by: Mike Frysinger

    Ben Warren
     

16 Sep, 2009

1 commit


05 Sep, 2009

2 commits

  • Rather than maintain/extend the current ifeq($(ARCH)) mess that exists in
    the standalone Makefile, push the setting up of LOAD_ADDR out to the arch
    config.mk (and rename to STANDALONE_LOAD_ADDR in the process). This keeps
    the common code clean and lets the arch do whatever crazy crap it wants in
    its own area.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     
  • Atmel DataFlashes by default operate with pages that are slightly bigger
    than normal binary sizes (i.e. many are 1056 byte pages rather than 1024
    bytes). However, they also have a "power of 2" mode where the pages show
    up with the normal binary size. The latter mode is required in order to
    boot with a Blackfin processor, so many people wish to convert their
    DataFlashes on their development systems to this mode. This standalone
    application does just that.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

02 Sep, 2009

1 commit

  • Since the Blackfin ABI favors higher scratch registers by default, use the
    last scratch register (P3) for global data rather than the first (P5).
    This allows the compiler's register allocator to use higher number scratch
    P registers, which in turn better matches the Blackfin instruction set,
    which reduces the size of U-Boot by more than 1024 bytes...

    Signed-off-by: Robin Getz
    Signed-off-by: Mike Frysinger

    Robin Getz
     

08 Aug, 2009

1 commit

  • The attached patch corrects an error in the examples/Makefile which
    causes the applications in the examples directory to hang on OMAP3
    based boards. The current Makefile sets -Ttext during linking to
    0x0c100000 which is outside of addressable SDRAM memory. The script
    corrects the existing ifeq...else...endif logic to look at the VENDOR
    tag rather than the CPU tag.

    The patch affects the following configs: omap3_beagle_config,
    omap3_overo_config, omap3_evm_config, omap3_pandora_config,
    omap3_zoom1_config and omap3_zoom2_config.

    Signed-off-by: Michael Evans

    Edited commit message.
    Signed-off-by: Wolfgang Denk

    Michael Evans
     

27 Jul, 2009

1 commit


21 Jul, 2009

2 commits


05 Apr, 2009

1 commit


21 Mar, 2009

1 commit

  • A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
    which needs to be added the the linker script. Instead of just adding this
    one section, we use a wildcard ".rodata*" to get all rodata linker section
    gcc has now and might add in the future.

    However, '*(.rodata*)' by itself will result in sub-optimal section
    ordering. The sections will be sorted by object file, which causes extra
    padding between the unaligned rodata.str.1.1 of one object file and the
    aligned rodata of the next object file. This is easy to fix by using the
    SORT_BY_ALIGNMENT command.

    This patch has not be tested one most of the boards modified. Some boards
    have a linker script that looks something like this:

    *(.text)
    . = ALIGN(16);
    *(.rodata)
    *(.rodata.str1.4)
    *(.eh_frame)

    I change this to:

    *(.text)
    . = ALIGN(16);
    *(.eh_frame)
    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))

    This means the start of rodata will no longer be 16 bytes aligned.
    However, the boundary between text and rodata/eh_frame is still aligned to
    16 bytes, which is what I think the real purpose of the ALIGN call is.

    Signed-off-by: Trent Piepho

    Trent Piepho
     

19 Mar, 2009

1 commit


23 Feb, 2009

1 commit

  • A forward port of the last version to work with the newer smc911x driver.
    I only have a board with a LAN9218 part on it, so that is the only one
    I've tested. But there isn't anything in this that would make it terribly
    chip specific afaik.

    Signed-off-by: Mike Frysinger
    CC: Sascha Hauer
    CC: Guennadi Liakhovetski
    CC: Magnus Lilja
    Signed-off-by: Ben Warren

    Mike Frysinger
     

25 Jan, 2009

1 commit


10 Dec, 2008

1 commit


19 Nov, 2008

1 commit

  • Most of the bss initialization loop increments 4 bytes
    at a time. And the loop end is checked for an 'equal'
    condition. Make the bss end address aligned by 4, so
    that the loop will end as expected.

    Signed-off-by: Selvamuthukumar
    Signed-off-by: Wolfgang Denk

    Selvamuthukumar
     

19 Oct, 2008

1 commit


14 Oct, 2008

1 commit


09 Sep, 2008

1 commit