The Wayback Machine - https://web.archive.org/web/20221226233812/https://github.com/raspberrypi/hats/commits/master
Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Nov 11, 2022

  1. eepdump: Add support for bank 1 GPIOs

    Add support for the new ATOM type 5 which specifies the bank 1 GPIO
    settings.
    
    Signed-off-by: Lino Sanfilippo <[email protected]>
    linosanfilippo-kunbus authored and pelwell committed Nov 11, 2022
  2. eepmake: add support for bank 1 GPIOs

    Add support for optional configuration of GPIOs on bank 1:
    Create a second gpio_map_d structure and instead of using a global variable
    for the GPIO map use a local structure pointer that points to the correct
    map depending on the GPIO number.
    
    Also support drive, hysteresis and slew for bank 1. Use the new ATOM of
    type 5 to store the settings in the EEPROM image file.
    
    Finally extend eeprom_settings.txt by the new configuration settings for
    bank 1.
    
    Signed-off-by: Lino Sanfilippo <[email protected]>
    linosanfilippo-kunbus authored and pelwell committed Nov 11, 2022
  3. eeprom-format: Add support to configure GPIO bank 1

    The GPIO bank 1 is available on CM1/CM3/CM3+ and CM4S devices. On these
    devices an ID EEPROM can be used to get all available GPIOs in a defined
    state before the operating system takes over.
    
    Add an optional GPIO map section for GPIO bank 1.
    
    Signed-off-by: Philipp Rosenberger <[email protected]>
    iluminat23 authored and pelwell committed Nov 11, 2022

Commits on Aug 23, 2022

  1. Fix buffer overflow in custom_atom

    If a custom file is added with the -c option no additional memory is
    reserved. Thus read_custom() writes over the reserved memory.
    To reproduce the issue the following eepmake call is sufficient:
    ./eepmake eeprom_settings.txt out.eep custom.bin
    
    Signed-off-by: Philipp Rosenberger <[email protected]>
    iluminat23 authored and pelwell committed Aug 23, 2022

Commits on Mar 22, 2022

  1. Add more challenging custom_data

    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Mar 22, 2022
  2. Fix the totally broken data parser

    The hexadecimal data parsing is fundamentally broken. Not only does it
    insert NULs to limit sscanf()s input (which is unnecessary), it writes
    the output as ints rather than chars, occupying four times more memory
    than it should, corrupting the data, and possibly also corrupting the
    heap.
    
    See: #88
    
    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Mar 22, 2022

Commits on Jan 11, 2022

  1. README: Fix forum link

    See: #87
    
    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Jan 11, 2022

Commits on Nov 1, 2021

  1. Convert to UNIX line endings (no CRs)

    A whitespace-only change.
    
    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Nov 1, 2021
  2. eepmake/eepdump: Fix compiler warnings

    Change the serial_<n> structure members into a 4-element array, so that
    we can read into all of it without triggering warnings about
    overwriting the destination.
    
    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Nov 1, 2021

Commits on Oct 20, 2021

  1. eepflash: add "-y" option to skip user interaction

    Ensure that eepflash can be used in a non-interactive (scripting) mode
    by adding a "-y" option, that will disable user confirmation.
    
    Signed-off-by: Robin Getz <[email protected]>
    rgetz authored and pelwell committed Oct 20, 2021

Commits on Jun 22, 2021

  1. eepflash.sh: Parse parameters before root test

    Do parameter parsing and validation before testing for root privilege
    in order to display help without requiring sudo.
    
    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Jun 22, 2021
  2. eepflash.sh: Accept filename as separate parameter

    Shell expansion of ~ to $HOME (e.g. ~/filename), and TAB completion
    on the command line, doesn't work in the middle of a string. Accept
    -f filename and --file filename in addition to the usual -f=filename
    and --file=filename as a way around this problem.
    
    See: #76
    
    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Jun 22, 2021

Commits on Jun 14, 2021

  1. eepmake: Fail on uneven number of data bytes

    Instead of just printing that an error occurred, pass the error up the
    call-chain to make the program fail gracefully and avoid producing
    corrupted output.
    mattimo authored and pelwell committed Jun 14, 2021
  2. eepmake: Exit with error code

    Exit with error code 1 if anything goes wrong. This allows passing
    errors in the tool up to scripts or makefiles and avoid silent failures
    resulting in corrupted outputs.
    mattimo authored and pelwell committed Jun 14, 2021

Commits on Jun 3, 2021

  1. eepflash.sh: make compatible with busybox's dd

    BusyBox's dd does not necessarily support 'status' option,
    so adapt the detection/handling slightly to be compatible.
    
    Signed-off-by: Michael Heimpold <[email protected]>
    mhei authored and pelwell committed Jun 3, 2021
  2. eepflash.sh: preset ADDR earlier so that it appears in warning

    Signed-off-by: Michael Heimpold <[email protected]>
    mhei authored and pelwell committed Jun 3, 2021

Commits on Jan 26, 2021

  1. eepflash.sh: Use double quote to prevent globbing of the file name

    If the file name given with -f contains a whitespace the file is not
    found. Just use double quote to make sure the file name is not split up.
    
    Signed-off-by: Philipp Rosenberger <[email protected]>
    iluminat23 authored and pelwell committed Jan 26, 2021
  2. eepflash.sh: Use a variable to print the script name.

    The usage function prints the script name as ./eepflash.sh in the example
    it is called just ./eepflash. Use the actual script name instead of
    hardcoding the name.
    
    Signed-off-by: Philipp Rosenberger <[email protected]>
    iluminat23 authored and pelwell committed Jan 26, 2021
  3. eepflash.sh: fix indention

    Signed-off-by: Philipp Rosenberger <[email protected]>
    iluminat23 authored and pelwell committed Jan 26, 2021
  4. eeptypes.h: cleanup formating

    - fix indention
    - move brace of the function to a new line
    - move tailing comment over the code line
    
    Signed-off-by: Philipp Rosenberger <[email protected]>
    iluminat23 authored and pelwell committed Jan 26, 2021

Commits on Jan 9, 2021

  1. Update designguide.md

    Pi4B also does not have a ZVD
    jimbojr committed Jan 9, 2021

Commits on Oct 28, 2020

  1. Swap README to github markdown, and add a few pointers for end users.

    Signed-off-by: Robin Getz <[email protected]>
    rgetz authored and pelwell committed Oct 28, 2020
  2. add install & uninstall target, to make it easier to make it use.

    Don't force people to always add it by hand, or use use the full path.
    
    Signed-off-by: Robin Getz <[email protected]>
    rgetz authored and pelwell committed Oct 28, 2020

Commits on Oct 26, 2020

  1. Make eepdump more robust to random files

    by not segfaulting when pointing this to random files (like other
    EEPROMs in the system, which might have other data in different formats
    in them).
    
    This now checks signature and verison, and keeps track of file length
    to make sure things are correct.
    
    tested on files created with eepmake, on disk and pointing to EEPROMs.
    
    Signed-off-by: Robin Getz <[email protected]>
    rgetz authored and pelwell committed Oct 26, 2020
  2. make a little more robust to be/le machines

    We store the signature in host format, but need to write it to the disk
    in big endian format (so it can be read by the Pi properly).
    
    Tested on powerpc64le, 686 and arm.
    
    Signed-off-by: Robin Getz <[email protected]>
    rgetz authored and pelwell committed Oct 26, 2020
  3. add -Wall -Wextra to make, and clean up warnings.

    This cleans up compiler warnings, to try to keep things cleaner going
    forward.
    
    Tested on i686 (gcc 8.3.0, Debian 8.3.0-6); ARMv8a (gcc version 8.3.0,
    Raspbian 8.3.0-6+rpi1) and ARMv7 (gcc version 4.8.2, Ubuntu/Linaro 4.8.2-19ubuntu1).
    
    Signed-off-by: Robin Getz <[email protected]>
    rgetz authored and pelwell committed Oct 26, 2020

Commits on Oct 21, 2020

  1. Clarify CRC format as "CRC-16"

    uSpike authored and pelwell committed Oct 21, 2020
  2. eepflash.sh: remove references to rpi-update (#64)

    * Remove references to rpi-update
    
    * Fix up usage: capitalise EEPROM, adjust alignment
    
    Co-authored-by: andrum99 <[email protected]>
    pelwell and andrum99 committed Oct 21, 2020
  3. custom_data in settings causes segfault

    The custom_data command is not well documented.  Through a reading
    of eepmake.c, it was clear that it was possible to include custom
    data in the eeprom_settings.txt file, but the format was not clear.
    Once I figured out the format, I found that eepmake would segfault:
    
    ```
    hats/eepromutils$ ./eepmake eeprom_settings.txt /dev/null
    Opening file eeprom_settings.txt for read
    UUID=71b07c8e-10fe-472c-b24a-906f5301fb4e
    Done reading
    Writing out...
    eepmake(99370,0x7fffacf01380) malloc: *** error for object 0x7fe3c6c02818: incorrect checksum for freed object - object was probably modified after being freed.
    *** set a breakpoint in malloc_error_break to debug
    Abort trap: 6
    ```
    
    This is because the data_receive flag is never set back to false.
    There is a final call to finish_data() in read_text(), which I think
    is there to allow long custom data or device tree blobs to be tacked
    onto the end of the file without an "end" command.  However, since
    data_receive was not being set to false, finish_data() is run fully
    twice.  This results in a count of two custom atoms when there is
    only one.  eepmake crashes when trying to write out the second,
    non-existant custom atom.
    
    I've added a small example to the eeprom_settings.txt to show
    the custom_data command.
    omenlabs authored and pelwell committed Oct 21, 2020

Commits on Oct 1, 2020

  1. eepflash.sh: Renumber i2c-gpio bus due to i2c-mux

    Signed-off-by: Phil Elwell <[email protected]>
    pelwell committed Oct 1, 2020

Commits on May 26, 2020

  1. Correct ID pin description

    See #68.
    pelwell committed May 26, 2020

Commits on Mar 19, 2020

  1. devicetree-guide: Document embedding an overlay

    Explain that overlays can be embedded directly or by name. Give some
    hints about submitting code and overlays to our kernel repo.
    
    Signed-off-by: Phil Elwell <[email protected]>
    Phil Elwell committed Mar 19, 2020

Commits on Mar 18, 2020

  1. Convert devicetree-guide.md to UNIX line endings

    Signed-off-by: Phil Elwell <[email protected]>
    Phil Elwell committed Mar 18, 2020

Commits on Mar 17, 2020

  1. Fix syntax typo

    lurch authored and pelwell committed Mar 17, 2020
Older