07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

29 Apr, 2018

2 commits

  • The size of 'filebuf' was not increased as more and more bytes are read
    from stdin, but 'filebuf' was always reallocated to the same fix size.
    This works as long as only less bytes than the initial buffer size come
    in, for more input this will segfault. (It actually does, I tested
    that.) So for each loop cycle the buffer size has to be increased by the
    number of bytes we want to read.

    Signed-off-by: Alexander Dahl

    Alexander Dahl
     
  • On success read() returns the number of bytes read or zero for EOF. On
    error -1 is returned and errno is set, so the right way to test if read
    had failed is to test the return value instead of errno.

    Signed-off-by: Alexander Dahl

    Alexander Dahl
     

29 Mar, 2015

1 commit

  • The current head revision of mkenvimage
    (e72be8947e129f5ab274c0a9f235d2cc0014b2ea) will prevent you from creating
    an env image from a text file that is larger than the env length specified
    by the '-s' option. That doesn't make sense given that the tool now allows
    comments and blank lines. This patch removes that limitation and allows
    longer text files to be used.

    I don't have time / desire at the moment to figure out "patman" and could
    really care less if this is adopted up stream. Just figured I would share
    in case anybody else finds it useful enough to take time to do a proper
    patch.

    >From 39ff30190c2bf687861f4b4b33230f1944fb64f9 Mon Sep 17 00:00:00 2001
    From: Brian McFarland
    Date: Thu, 12 Mar 2015 11:37:19 -0400
    Subject: [PATCH] In mkenvimage, removed the check that prevented using a
    source text file larger than the output environment image. Instead, the main
    parsing loop checks to see if the environment buffer is full, and quits if it
    is. After the main parse loop, a second loop swallows comments and
    whitespace until either the EOF is reached or more env vars are found, in
    which case an error will be thrown.

    Brian McFarland
     

11 Nov, 2014

1 commit


17 Aug, 2013

1 commit

  • Commit 669dfc2e adds libfdt_env.h to HOSTCPPFLAGS. It causes stdio.h
    to be included before _GNU_SOURCE is defined in C files. On some old hosts
    some prototypes are protected by #ifdef __USE_GNU, which is set when
    _GNU_SOURCE is defined.

    Signed-off-by: York Sun
    Acked-by: Simon Glass

    York Sun
     

24 Jul, 2013

1 commit


20 Jul, 2012

1 commit


09 Jul, 2012

1 commit


03 Jul, 2012

1 commit

  • Use the POSIX variant of basename due to BSD systems (e.g. OS X) do not provide
    GNU version of basename(3). It is save to use the POSIX variant here cause we do
    never use argv[0] later on which may be modified by the basename(3) POSIX
    variant.
    On systems providing GNU variant the GNU variant should be used since string.h
    is included before libgen.h. Therefore let the _GNU_SOURCE as is.

    This patch fixes following warning (on OS X):
    ---88---

    Signed-off-by: Andreas Bießmann
    cc: Keith Mok

    Andreas Bießmann
     

11 Apr, 2012

1 commit

  • Fix the compiler warning

    mkenvimage.c: In function ‘main’:
    mkenvimage.c:218: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
    mkenvimage.c:226: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’

    introduced with the commit

    mkenvimage: Use mmap() when reading from a regular file
    6ee39f8055680654f9cc97b98dcce9588f1ab71e

    Signed-off-by: Dirk Behme
    CC: David Wagner
    CC: Anatolij Gustschin
    CC: Mike Frysinger
    Acked-by: Mike Frysinger
    Acked-by: David Wagner

    Dirk Behme
     

27 Mar, 2012

7 commits


26 Mar, 2012

1 commit

  • Don't use argv[0] for usage() because it may or may not be clobbered
    by the previous call to basename(). Use "prg" instead as it is done
    in the rest of the code.

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

    Wolfgang Denk
     

06 Jan, 2012

1 commit


05 Jan, 2012

1 commit


24 Dec, 2011

1 commit

  • * 'next' of ../next:
    mkenvimage: Add version info switch (-V)
    mkenvimage: Fix getopt() error handling
    mkenvimage: Fix some typos
    phy: add Micrel KS8721BL phy definition
    net: introduce per device index
    mvgbe: remove setting of ethaddr within the driver
    x86: Add support for specifying an initrd with the zboot command
    x86: Refactor the zboot innards so they can be reused with a vboot image
    x86: Add infrastructure to extract an e820 table from the coreboot tables
    x86: Add support for booting Linux using the 32 bit boot protocol
    x86: Clean up the x86 zimage code in preparation to extend it
    x86: Import code from coreboot's libpayload to parse the coreboot table
    x86: Initial commit for running as a coreboot payload
    CHECKPATCH: ./board/esd/hh405/logo_320_240_8bpp.c
    CHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c
    CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c
    CHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c
    CHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c
    CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c
    CHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c
    CHECKPATCH: ./board/esd/hh405/fpgadata.c
    CHECKPATCH: ./board/esd/pci405/fpgadata.c
    CHECKPATCH: ./board/esd/tasreg/fpgadata.c
    CHECKPATCH: ./board/esd/apc405/fpgadata.c
    CHECKPATCH: ./board/esd/voh405/fpgadata.c
    CHECKPATCH: ./board/esd/ash405/fpgadata.c
    CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c
    CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c
    CHECKPATCH: ./board/esd/ar405/fpgadata.c
    CHECKPATCH: ./board/esd/plu405/fpgadata.c
    CHECKPATCH: ./board/esd/wuh405/fpgadata.c
    CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c
    CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c
    CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c
    CHECKPATCH: ./board/esd/canbt/fpgadata.c
    CHECKPATCH: ./board/esd/du405/fpgadata.c
    CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c
    CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c
    avr32:mmu.c: fix printf() length modifier
    fat.c: fix printf() length modifier
    cmd_sf.c: fix printf() length modifier
    Make printf and vprintf safe from buffer overruns
    vsprintf: Move function documentation into header file
    Add safe vsnprintf and snprintf library functions
    Move vsprintf functions into their own header

    Conflicts:
    tools/mkenvimage.c

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

22 Dec, 2011

1 commit


21 Dec, 2011

3 commits


22 Nov, 2011

1 commit