-
Notifications
You must be signed in to change notification settings - Fork 0
Add ADI board support, packages, and build infrastructure #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
605c919
board/pluto: add PlutoSDR board support
mhennerich 5705cc0
board/m2k: add ADALM2000 board support
mhennerich 0749d50
board/microblaze/common: add shared microblaze/NIOS2 board files
mhennerich 7d79ec5
package: add IIO ecosystem packages
mhennerich ee13fe4
package/fru-tools: add FMC FRU tools
mhennerich 84de02d
package: add PlutoSDR/JESD204B utility packages
mhennerich fcefccb
package/python-pygccxml: add Python GCC-XML bindings
mhennerich c1f5df6
br2-external: add Config.in and external.mk for ADI packages
mhennerich 4d8c522
configs: add ADI platform defconfigs
mhennerich 2d63a73
patches/buildroot: add patches for upstream buildroot modifications
mhennerich 486f852
ci: add CI configuration and build scripts
mhennerich ef9b1ff
board/pluto: fix post-build.sh for br2-external compatibility
mhennerich 486dd8a
package/libm2k: bump to v0.9.0
mhennerich c9f4e4f
package/jesd204b_status: bump to v0.2
mhennerich d3503ca
patches/buildroot: update libiio to tip of libiio-v0 branch
mhennerich ab3998a
configs: replace deprecated Linaro toolchain with ARM ARM
mhennerich ad98f1e
add top-level Makefile to clone and build buildroot
mhennerich 7555db2
patches/buildroot: add missing Config.in.host source for host-dropbear
mhennerich bc33d7a
ci/Containerfile: default to node24
gastmaier 2b0b252
ci/Containerfile: add zlib-devel
gastmaier 324f6a7
.github/build: set umask
gastmaier c45b6e3
package/libm2k: use raised cmake version sha
gastmaier d6c165b
board: move m2k/microblaze/pluto under board/adi/
mhennerich d3e4328
package/fru-tools: bump to v0.9.0
mhennerich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| language: c | ||
|
|
||
| branches: | ||
| except: | ||
| - adi-2019.02.2 # current rebased versions of master; change this when updating kernel ver | ||
|
|
||
| os: linux | ||
|
|
||
| notifications: | ||
| email: | ||
| on_success: change | ||
| on_failure: always | ||
|
|
||
| matrix: | ||
| include: | ||
| - env: BUILD_TYPE=ensure_defconfigs_uptodate | ||
| VIVADO_ARCH=zynq | ||
| VIVADO_DEFCONFIGS="zynq_m2k zynq_pluto zynq_sidekiqz2" | ||
| VIVADO_VERSIONS="2018_3 2019_1" | ||
| - env: BUILD_TYPE=ensure_defconfigs_uptodate | ||
| VIVADO_ARCH=microblaze | ||
| VIVADO_DEFCONFIGS="microblaze_adi microblaze_adi_rootfs" | ||
| VIVADO_VERSIONS="2018_3 2019_1" | ||
|
|
||
| script: | ||
| - ./ci/run-build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| menu "ADI packages" | ||
|
|
||
| menu "Hardware handling" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/libad9361-iio/Config.in" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/libm2k/Config.in" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/libini/Config.in" | ||
| endmenu | ||
|
|
||
| menu "Tools and utilities" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/fru-tools/Config.in" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/poll_sysfs/Config.in" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/ad936x_ref_cal/Config.in" | ||
| endmenu | ||
|
|
||
| menu "JESD204B" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/jesd204b_status/Config.in" | ||
| endmenu | ||
|
|
||
| menu "Python modules" | ||
| source "$BR2_EXTERNAL_ADI_PATH/package/python-pygccxml/Config.in" | ||
| endmenu | ||
|
|
||
| endmenu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| BUILDROOT_VERSION ?= adi-2026.02-y | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The top level custom ADI Makefile and patch files mimic Yocto and does not follow mainline Buildroot. This is a custom implementation that also does not follow the standard upstream approach which is already followed by ADSP. |
||
| BUILDROOT_URL ?= https://github.com/analogdevicesinc/buildroot.git | ||
| BUILDROOT_DIR ?= $(CURDIR)/buildroot | ||
|
|
||
| BR2_EXTERNAL := $(CURDIR) | ||
| BUILDROOT_PATCHES := $(sort $(wildcard $(CURDIR)/patches/buildroot/*.patch)) | ||
|
|
||
| # Targets handled locally, not forwarded to buildroot | ||
| buildroot: ## Clone and patch buildroot | ||
| @if [ ! -d $(BUILDROOT_DIR)/.git ]; then \ | ||
| echo "Cloning buildroot $(BUILDROOT_VERSION)..."; \ | ||
| git clone --depth 1 --branch $(BUILDROOT_VERSION) \ | ||
| $(BUILDROOT_URL) $(BUILDROOT_DIR); \ | ||
| fi | ||
| $(MAKE) buildroot-patch | ||
|
|
||
| buildroot-patch: ## Apply patches to buildroot | ||
| @for p in $(BUILDROOT_PATCHES); do \ | ||
| if git -C $(BUILDROOT_DIR) apply --check "$$p" 2>/dev/null; then \ | ||
| echo "Applying $$(basename $$p)..."; \ | ||
| git -C $(BUILDROOT_DIR) apply "$$p" || exit 1; \ | ||
| else \ | ||
| echo "Skipping $$(basename $$p) (already applied or conflicts)"; \ | ||
| fi; \ | ||
| done | ||
|
|
||
| buildroot-clean: ## Remove the buildroot directory | ||
| rm -rf $(BUILDROOT_DIR) | ||
|
|
||
| # Everything else is forwarded to buildroot | ||
| .DEFAULT_GOAL := help | ||
|
|
||
| # This is the forwarding rule: any target not defined above | ||
| # gets passed through to buildroot's Makefile | ||
| .DEFAULT: | ||
| @test -d $(BUILDROOT_DIR) || { echo "Run 'make buildroot' first"; exit 1; } | ||
| $(MAKE) -C $(BUILDROOT_DIR) BR2_EXTERNAL="$(BR2_EXTERNAL)" $(MAKECMDGOALS) | ||
|
|
||
| .PHONY: buildroot buildroot-patch buildroot-clean | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| trigger: | ||
| - main | ||
| - master | ||
| - staging/* | ||
| - adi-20* | ||
|
|
||
| pr: | ||
| - main | ||
| - master | ||
| - adi-20* | ||
|
|
||
| pool: | ||
| vmImage: 'ubuntu-latest' | ||
|
|
||
| stages: | ||
| - stage: Build | ||
| jobs: | ||
| - job: microblaze_rootfs_build_test | ||
| steps: | ||
| - checkout: self | ||
| fetchDepth: 1 | ||
| clean: true | ||
| - script: | | ||
| #!/bin/bash | ||
| make microblaze_adi_rootfs_vivado_2019_1_defconfig | ||
| make -j"$(nproc)" | ||
| displayName: "Build rootfs for microblaze" | ||
| - task: CopyFiles@2 | ||
| inputs: | ||
| sourceFolder: '$(Agent.BuildDirectory)/s/output/images' | ||
| contents: '$(Agent.BuildDirectory)/s/output/images/rootfs.cpio.gz' | ||
| targetFolder: '$(Build.ArtifactStagingDirectory)' | ||
| - task: PublishPipelineArtifact@1 | ||
| inputs: | ||
| targetPath: '$(Build.ArtifactStagingDirectory)' | ||
| artifactName: 'mb_rootfs' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/sh | ||
| # | ||
| # Unbind XADC | ||
| # | ||
| case "$1" in | ||
| start) | ||
| #echo f8007100.adc > /sys/bus/platform/drivers/xadc/unbind | ||
| ;; | ||
| stop) | ||
| ;; | ||
| restart|reload) | ||
| ;; | ||
| *) | ||
| echo "Usage: $0 {start|stop|restart}" | ||
| exit 1 | ||
| esac | ||
|
|
||
| exit $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/bin/sh | ||
| # | ||
| # Keep the main clock in powerdown until used | ||
| # | ||
|
|
||
| source /etc/device_config | ||
|
|
||
| handle_calibration_files() { | ||
| if [[ -s /mnt/jffs2/${CALIBFILENAME} ]]; then | ||
| cp /mnt/jffs2/${CALIBFILENAME} /opt/${CALIBFILENAME} | ||
| elif [[ -s /mnt/jffs2/${CALIBFILENAME_FACTORY} ]]; then | ||
| cp /mnt/jffs2/${CALIBFILENAME_FACTORY} /opt/${CALIBFILENAME} | ||
| fi | ||
|
|
||
| if [[ -s /mnt/jffs2/${CALIBFILENAME_TEMP_LUT} ]]; then | ||
| cp /mnt/jffs2/${CALIBFILENAME_TEMP_LUT} /opt/${CALIBFILENAME_TEMP_LUT} | ||
| fi | ||
| } | ||
|
|
||
| case "$1" in | ||
| start) | ||
| # Restore saved password and Dropbear keys | ||
| [[ -d /mnt/jffs2/etc ]] && cd /mnt/jffs2/etc && md5sum -s -c password.md5 && cp passwd shadow group /etc | ||
| [[ -d /mnt/jffs2/etc/dropbear ]] && cd /mnt/jffs2/etc/dropbear && md5sum -s -c keys.md5 && cp dropbear* /etc/dropbear/ | ||
| [[ -d /mnt/jffs2/root/.ssh ]] && cd /mnt/jffs2/root/.ssh && md5sum -s -c keys.md5 && mkdir /root/.ssh && cp authorized_keys /root/.ssh | ||
| iio_attr -q -d m2k-fabric clk_powerdown 1 | ||
| handle_calibration_files | ||
| ;; | ||
| stop) | ||
| ;; | ||
| restart|reload) | ||
| ;; | ||
| *) | ||
| echo "Usage: $0 {start|stop|restart}" | ||
| exit 1 | ||
| esac | ||
|
|
||
| exit $? |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.