diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fdd93fb..822ee06 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,11 +15,21 @@ jobs: strategy: matrix: - defconfig: - - adi_sc598_ezkit_defconfig - flavor: - - debug - - bootstrap + include: + # SC598 SoM EZ-KIT builds + - defconfig: adi_sc598_ezkit_defconfig + name: sc598-som-ezkit-debug + fragments: ../configs/buildroot.fragment ../configs/debug.fragment + - defconfig: adi_sc598_ezkit_defconfig + name: sc598-som-ezkit-bootstrap + fragments: ../configs/buildroot.fragment ../configs/bootstrap.fragment + # HTOL builds + - defconfig: adi_sc598_ezkit_defconfig + name: sc598-htol-debug + fragments: ../configs/buildroot.fragment ../configs/htol.fragment ../configs/debug.fragment + - defconfig: adi_sc598_ezkit_defconfig + name: sc598-htol-bootstrap + fragments: ../configs/buildroot.fragment ../configs/htol.fragment ../configs/bootstrap.fragment steps: - name: Checkout br2-external @@ -27,26 +37,24 @@ jobs: with: submodules: recursive - - name: Build image for ${{ matrix.defconfig }} with ${{ matrix.flavor }} configuration + - name: Build ${{ matrix.name }} run: | cd buildroot make distclean make BR2_EXTERNAL="${PWD}/.." ${{ matrix.defconfig }} - support/kconfig/merge_config.sh .config \ - ../configs/buildroot.fragment \ - ../configs/${{ matrix.flavor }}.fragment + support/kconfig/merge_config.sh .config ${{ matrix.fragments }} make -j$(nproc) - - name: Upload Buildroot images for ${{ matrix.defconfig }} with ${{ matrix.flavor }} configuration + - name: Upload ${{ matrix.name }} images uses: actions/upload-artifact@v6 with: - name: images-${{ matrix.flavor }}-${{ matrix.defconfig }} + name: images-${{ matrix.name }} path: buildroot/output/images - name: Archive output images directory if: ${{ github.event_name == 'release' }} run: | - tar -cJvf images-${{ matrix.flavor }}-${{ matrix.defconfig }}-${{ github.event.release.tag_name }}.tar.xz \ + tar -cJvf images-${{ matrix.name }}-${{ github.event.release.tag_name }}.tar.xz \ buildroot/output/images/ - name: Upload release archive to release @@ -54,5 +62,5 @@ jobs: if: ${{ github.event_name == 'release' }} with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: images-${{ matrix.flavor }}-${{ matrix.defconfig }}-${{ github.event.release.tag_name }}.tar.xz + file: images-${{ matrix.name }}-${{ github.event.release.tag_name }}.tar.xz tag: ${{ github.ref }} diff --git a/board/adi/sc598-htol/genimage.cfg b/board/adi/sc598-htol/genimage.cfg new file mode 100644 index 0000000..11e6933 --- /dev/null +++ b/board/adi/sc598-htol/genimage.cfg @@ -0,0 +1,44 @@ +# ISSI Quad 128 Megabyte SPI flash +# Model: IS25LP01G-RILE +# Datasheet: https://www.issi.com/WW/pdf/IS25LP(WP)01G.pdf +# Label: U4 +flash nor-128M-256 { + pebsize = 64K + numpebs = 2K + minimum-io-unit-size = 1 + vid-header-offset = 64 + sub-page-size = 1 +} + +image flash.img { + flash {} + flashtype = "nor-128M-256" + + partition u-boot-spl { + image = "u-boot-spl.ldr" + size = 256K + } + + partition u-boot { + image = "u-boot.ldr" + size = 704K + } + + partition u-boot-env { + size = 64K + } + + partition dtb { + image = "sc598-htol.dtb" + size = 64K + } + + partition kernel { + image = "Image" + size = 32M + } + + partition rootfs { + image = "rootfs.ubi" + } +} diff --git a/board/adi/sc598-htol/linux.fragment b/board/adi/sc598-htol/linux.fragment new file mode 100644 index 0000000..3b0af10 --- /dev/null +++ b/board/adi/sc598-htol/linux.fragment @@ -0,0 +1,7 @@ +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_INFO=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_NETCONSOLE=y +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_CONFIGFS_FS=y diff --git a/board/adi/sc598-htol/uboot.env b/board/adi/sc598-htol/uboot.env new file mode 100644 index 0000000..d551b0f --- /dev/null +++ b/board/adi/sc598-htol/uboot.env @@ -0,0 +1,15 @@ +bootmenu_0=Boot HTOL SPI flash=run sfboot +bootmenu_1=Boot HTOL eMMC=run emmcboot +bootdelay=5 +bootcmd=run sfboot +sfboot=sf probe; sf read ${fdt_addr_r} 0x100000 0x9000; sf read ${kernel_addr_r} 0x110000 0xf00000; setenv bootargs ${bootargs} rootfstype=ubifs root=ubi0:rootfs ubi.mtd=3 rw; booti ${kernel_addr_r} - ${fdt_addr_r} +emmcboot=fatload mmc 0:1 ${fdt_addr_r} /${fdtfile}; fatload mmc 0:1 ${kernel_addr_r} /Image; setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait; booti ${kernel_addr_r} - ${fdt_addr_r} +bootargs=earlycon=adi_uart,0x31003000 console=ttySC0,115200 vmalloc=512M log_buf_len=4M +kernel_addr_r=0x90009000 +fdt_addr_r=0x90000000 +fdtfile=sc598-htol.dtb +ethaddr=02:80:ad:20:31:e8 +eth1addr=02:80:ad:20:31:e9 +httpdstp=8000 +nc_start=setenv stdin serial,nc; setenv stdout serial,nc; setenv stderr serial,nc +nc_stop=setenv stdin serial; setenv stdout serial; setenv stderr serial diff --git a/board/adi/sc598-htol/uboot.fragment b/board/adi/sc598-htol/uboot.fragment new file mode 100644 index 0000000..588af0e --- /dev/null +++ b/board/adi/sc598-htol/uboot.fragment @@ -0,0 +1,5 @@ +# CONFIG_ENV_IS_NOWHERE is not set +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_ENV_OFFSET=0xF0000 +CONFIG_ENV_SIZE=0x10000 +CONFIG_ENV_SECT_SIZE=0x10000 diff --git a/buildroot b/buildroot index 8403d60..dd54916 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 8403d60da3225e97c36cca61f0eb14b4b25309e4 +Subproject commit dd54916b365ce7c72ceaf10cc82eda28ad3f04f0 diff --git a/configs/htol.fragment b/configs/htol.fragment new file mode 100644 index 0000000..22f9cef --- /dev/null +++ b/configs/htol.fragment @@ -0,0 +1,9 @@ +BR2_TARGET_GENERIC_HOSTNAME="sc598-htol" +BR2_TARGET_GENERIC_ISSUE="Welcome to the ADI SC598 HTOL Board" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="adi/sc598-htol" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sc598-htol-spl" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL)/board/adi/sc598-htol/uboot.fragment" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL)/board/adi/sc598-htol/linux.fragment" +BR2_TARGET_UBOOT_DEFAULT_ENV_FILE="$(BR2_EXTERNAL)/board/adi/sc598-htol/uboot.env" +BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c $(BR2_EXTERNAL)/board/adi/sc598-htol/genimage.cfg" +BR2_PACKAGE_LIGHTTPD=y