Skip to content

Commit

Permalink
Unify AFCv3.1 BPM and Timing hardware support
Browse files Browse the repository at this point in the history
Now that the clock switch can be configured via IPMI it is possible to
use a unified firmware binary for AFCv3.1 Timing and BPM.
  • Loading branch information
gustavosr8 authored and augustofg committed Oct 4, 2023
1 parent f5cb422 commit fff54dc
Show file tree
Hide file tree
Showing 24 changed files with 23 additions and 2,527 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
strategy:
matrix:
build-flags:
- { flags: -DBOARD=afc-bpm -DVERSION=3.1 }
- { flags: -DBOARD=afc-timing -DBOARD_RTM=8sfp }
- { flags: -DBOARD=afc-v4 }
- { flags: -DBOARD=afc-v4 -DDEBUG_PROBE=jlink -DOPENOCD_TRANSPORT=swd }
- { flags: -DBOARD=afc-v4 -DDEBUG_PROBE=cmsis-dap -DOPENOCD_TRANSPORT=swd }
- { flags: -DBOARD=afc-v4 -DDEBUG_PROBE=digilent_jtag_hs3 -DOPENOCD_TRANSPORT=jtag }
- { flags: -DBOARD=afc -DVERSION=3.1 -DBOARD_RTM=8sfp }
- { flags: -DBOARD=afc -DVERSION=4.0}
- { flags: -DBOARD=afc -DVERSION=4.0 -DDEBUG_PROBE=jlink -DOPENOCD_TRANSPORT=swd }
- { flags: -DBOARD=afc -DVERSION=4.0 -DDEBUG_PROBE=cmsis-dap -DOPENOCD_TRANSPORT=swd }
- { flags: -DBOARD=afc -DVERSION=4.0 -DDEBUG_PROBE=digilent_jtag_hs3 -DOPENOCD_TRANSPORT=jtag }
steps:
- uses: actions/checkout@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Create a new folder wherever is suitable

cd <build_folder>

Run CMake using the path to the repository folder as an direct argument and the flag `-DBOARD=<board_name>` and `-DVERSION=<board_version>` to configure the compilation scripts to your specific board hardware
Run CMake using the path to the repository folder as an direct argument and the flag `-DBOARD=<board_name>`(at this moment, only `afc` can be selected) ,`-DVERSION=<board_version>` (`3.1` or `4.0`) and `-DBOARD_RTM=<rtm_name>` (for now, only RTM `8sfp` for AFCv3.1 is supported) to configure the compilation scripts to your specific board hardware.

cmake <path_to_source> -DBOARD=<board_name> -DVERSION=<board_version>
cmake <path_to_source> -DBOARD=<board_name> -DVERSION=<board_version> -DBOARD_RTM=<rtm_name>

Example:

cmake ~/openmmc/ -DBOARD=afc -DVERSION=3.1
cmake ~/openmmc/ -DBOARD=afc -DVERSION=3.1 -DBOARD_RTM=8sfp

After creating the build files with CMake, you can compile the firmware using `make`, optionally setting the VERBOSE flag to 1 if you wish to see all the compilation commands

Expand Down
20 changes: 4 additions & 16 deletions port/board/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(NOT BOARD)
message(FATAL_ERROR "${BoldRed}Target board was not selected! You must pass the flag -DBOARD=<board_name>${ColourReset}")
endif()

if(${BOARD} MATCHES "^(afc-bpm)$")
if(${BOARD} MATCHES "^(afc)$")

if(NOT VERSION)
message(FATAL_ERROR "${BoldRed}AFC board version was not selected! You must pass the flag -DVERSION=<major>.<minor>${ColourReset}")
Expand All @@ -14,23 +14,11 @@ if(${BOARD} MATCHES "^(afc-bpm)$")
if(${VERSION} MATCHES "(3.0)")
message(FATAL_ERROR "${BoldRed}AFCv3.0 is not supported anymore. Use -DVERSION=3.1 instead.${ColourReset}")
elseif(${VERSION} MATCHES "(3.1)")
add_subdirectory(afc-bpm/v3_1)
add_subdirectory(afc-v3)
elseif(${VERSION} MATCHES "(4.0)")
add_subdirectory(afc-v4)
endif()

elseif(${BOARD} MATCHES "^(afc-fofb-ctrl)$")

if(NOT VERSION)
message(FATAL_ERROR "${BoldRed}AFC board version was not selected! You must pass the flag -DVERSION=<major>.<minor>${ColourReset}")
endif()

message(STATUS "Selected Board version: ${VERSION}")
if(${VERSION} MATCHES "(3.1)")
add_subdirectory(afc-fofb-ctrl/v3_1)
endif()

elseif(${BOARD} MATCHES "^(afc-timing)$" )
add_subdirectory(afc-timing)

elseif(${BOARD} MATCHES "^(afc-v4)$" )
add_subdirectory(afc-v4)

Expand Down
62 changes: 0 additions & 62 deletions port/board/afc-bpm/v3_1/CMakeLists.txt

This file was deleted.

72 changes: 0 additions & 72 deletions port/board/afc-bpm/v3_1/i2c_mapping.h

This file was deleted.

165 changes: 0 additions & 165 deletions port/board/afc-bpm/v3_1/ipmi_oem.c

This file was deleted.

Loading

0 comments on commit fff54dc

Please sign in to comment.