diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af4ea64..4a6a881 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: branches: - main - pull_request: + pull_request_target: branches: - main release: @@ -28,9 +28,15 @@ jobs: string: '${{ github.ref_name }}' replace-with: '-' + - name: Retrieve the Lattice Diamond license from secrets and decode it + run: echo $LICENSE | base64 --decode > fw/project/lcmxo2/license.dat + env: + LICENSE: ${{ secrets.LATTICE_DIAMOND_LICENSE_BASE64 }} + - name: Build firmware run: ./docker_build.sh release --force-clean env: + MAC_ADDRESS: ${{ secrets.LATTICE_DIAMOND_MAC_ADDRESS }} SC64_VERSION: ${{ steps.version.outputs.replaced }} - name: Upload artifact diff --git a/docs/05_fw_and_sw_info.md b/docs/05_fw_and_sw_info.md index 07e1ad8..f6874fc 100644 --- a/docs/05_fw_and_sw_info.md +++ b/docs/05_fw_and_sw_info.md @@ -10,13 +10,14 @@ Docker method is a preferred option. Run `./docker_build.sh release` to build all firmware/software and generate release package. -For other options run script without any command to print help. +For other options run script without any command to print help about available options. #### Lattice Diamond license -Lattice Diamond software is used to build FPGA bitstream, a free 1 year license is necessary to run the build process. -Repository already contains license attached to fake MAC address `F8:12:34:56:78:90` (path to the license: `fw/project/lcmxo2/license.dat`). -If the license expires, it is required to request new license from Lattice webpage. -New license can be attached to aforementioned MAC address or any other address. -In case of non default MAC address it is possible to provide it via `MAC_ADDRESS` environment variable. -For example: `MAC_ADDRESS=AB:00:00:00:00:00 ./docker_build.sh release`. +Lattice Diamond software is used to build the FPGA bitstream. +A free 1 year license is necessary to run the build process. +You can request personal license from the [Lattice website](https://www.latticesemi.com/Support/Licensing). +Build script expects license file to be present in this path: `fw/project/lcmxo2/license.dat`. +Since build is done inside docker container it is required to pass the MAC address, linked with the license file, to a container. +Build script expects it in the `MAC_ADDRESS` environment variable. +For example, run `MAC_ADDRESS=AB:00:00:00:00:00 ./docker_build.sh release` command to start the building process if your license is attached to `AB:00:00:00:00:00` MAC address. diff --git a/fw/project/lcmxo2/.gitignore b/fw/project/lcmxo2/.gitignore index 0782d87..d7bab47 100644 --- a/fw/project/lcmxo2/.gitignore +++ b/fw/project/lcmxo2/.gitignore @@ -1,6 +1,7 @@ .recovery *.dir/ *.ccl +*.dat *.dmp *.html *.ini diff --git a/fw/project/lcmxo2/license.dat b/fw/project/lcmxo2/license.dat deleted file mode 100644 index d1d9149..0000000 --- a/fw/project/lcmxo2/license.dat +++ /dev/null @@ -1,30 +0,0 @@ -FEATURE LSC_BASE lattice 8.0 23-feb-2025 uncounted EEEED0E56442 \ - VENDOR_STRING="ispLEVER BASE" HOSTID=f81234567890 -FEATURE LSC_SYNPLIFY lattice 8.0 23-feb-2025 uncounted BCE24EFB1CC8 \ - VENDOR_STRING="ispLEVER System with Synplicity" \ - HOSTID=f81234567890 -FEATURE LSC_SYNPLIFYPRO1 lattice 10.0 23-feb-2025 uncounted \ - A55E225A8213 VENDOR_STRING="ispLEVER System with Synplicity \ - Pro 1" HOSTID=f81234567890 -FEATURE LSC_ADVANCED_DSP lattice 10.0 23-feb-2025 uncounted \ - 670E6D281E0E VENDOR_STRING="ispLEVER DSP" HOSTID=f81234567890 -FEATURE LSC_DIAMOND_A lattice 10.0 23-feb-2025 uncounted 75EFC1B810BA \ - VENDOR_STRING="Diamond Free" HOSTID=f81234567890 -FEATURE LSC_PROGRAMMER_MATURE lattice 10.0 23-feb-2025 uncounted \ - 46BCF34C2DC7 VENDOR_STRING=Programmer HOSTID=f81234567890 -FEATURE LSC_ADVANCED_ORCA lattice 9.0 23-feb-2025 uncounted \ - CC2DBC156EE2 VENDOR_STRING="ispORCA System" \ - HOSTID=f81234567890 -FEATURE LSC_CTL_PROPBLD lattice 2025.02 23-feb-2025 uncounted \ - 6CCE29206AC9 VENDOR_STRING=LSC_CTL_PROPBLD HOSTID=f81234567890 -FEATURE LSC_CTL_PROPSDK_PFR lattice 2025.02 23-feb-2025 uncounted \ - 7FE203087494 VENDOR_STRING=LSC_CTL_PROPSDK_PFR \ - HOSTID=f81234567890 - -DAEMON mgcld path_to_mgcld -INCREMENT latticemsim mgcld 2024.10 23-feb-2025 uncounted \ - FFD823285F6785FED8B2 VENDOR_STRING=7E796EE6 HOSTID=f81234567890 \ - ISSUER="ModelSIM/Questa Lattice" SN=290985235 SIGN2="1A3D 76F8 48B1 \ - B3C0 D0C7 8C20 1131 C772 AB70 A5D3 D7F0 6B5F F4F7 70F8 F1D6 040C E65F \ - 8CE4 CF22 E322 D961 988D 6A4C 5806 B9EC D64A 3D9F 1F16 260B AB10" -