summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Cragg <edward.cragg@codethink.co.uk>2015-05-27 17:24:26 (GMT)
committerBaserock Gerrit <gerrit@baserock.org>2015-10-06 23:50:40 (GMT)
commit9dd681bcc9c41e2ede4bd9320b8c0f3cf1f3a37a (patch)
tree323e005503ad3b331dc395ec41bc68a5eaf7222f
parent5db0c4d2db508b08f9b0ebfad0e2c2e730f60c9b (diff)
downloaddefinitions-9dd681bcc9c41e2ede4bd9320b8c0f3cf1f3a37a.tar.gz
SoCFPGA: Add BSP and systems for Altera Cyclone V SoCFPGA Development Kit
Add BSP and system definitions to support the Altera Cyclone V SoCFPGA development kit [1] [1] https://www.altera.com/products/boards_and_kits/dev-kits/altera/kit-cyclone-v-soc.html Change-Id: I9a2371e52b5601f814e2b0feedce006f0c4f7882
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit.morph47
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit/bsp-support.morph17
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit/device-tree-compiler.morph6
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit/linux-armv7l-altera-socfpga-devkit.morph34
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit/preloader@socfpga-devkit.morph17
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit/u-boot-tools@socfpga-devkit.morph14
-rw-r--r--strata/bsp-armv7l-altera-socfpga-devkit/u-boot@socfpga-devkit.morph9
-rw-r--r--systems/base-system-armv7l-altera-socfpga-devkit.morph21
-rw-r--r--systems/build-system-armv7l-altera-socfpga-devkit.morph48
-rw-r--r--systems/devel-system-armv7l-altera-socfpga-devkit.morph60
10 files changed, 273 insertions, 0 deletions
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit.morph b/strata/bsp-armv7l-altera-socfpga-devkit.morph
new file mode 100644
index 0000000..8a81c96
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit.morph
@@ -0,0 +1,47 @@
+name: bsp-armv7l-altera-socfpga-devkit
+kind: stratum
+description: |
+ The platform dependent components required to boot the Altera Cortex-A9
+ HPS core on an Altera SoCFPGA development kit.
+build-depends:
+- morph: strata/coreutils-common.morph
+chunks:
+- name: device-tree-compiler
+ morph: strata/bsp-armv7l-altera-socfpga-devkit/device-tree-compiler.morph
+ repo: upstream:device-tree-compiler
+ ref: 302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2
+ unpetrify-ref: v1.4.1
+- name: u-boot-tools@socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit/u-boot-tools@socfpga-devkit.morph
+ repo: upstream:u-boot
+ ref: 905e8f9e53766e606bd4a0ed46d804889e613f32
+ unpetrify-ref: v2015.07-rc1
+ build-depends:
+ - device-tree-compiler
+- name: u-boot@socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit/u-boot@socfpga-devkit.morph
+ repo: upstream:u-boot-socfpga
+ ref: 32c1d91bc0d10beca54c2dfc5b475d4ffeffc15a
+ unpetrify-ref: socfpga_v2013.01.01
+ build-depends:
+ - device-tree-compiler
+- name: bsp-support
+ morph: strata/bsp-armv7l-altera-socfpga-devkit/bsp-support.morph
+ repo: upstream:bsp-support
+ ref: 95e6be2188ad9dfd13cb8887cdc698519831871d
+ unpetrify-ref: master
+ build-depends:
+ - u-boot-tools@socfpga-devkit
+- name: preloader@socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit/preloader@socfpga-devkit.morph
+ repo: upstream:u-boot-socfpga
+ ref: 32c1d91bc0d10beca54c2dfc5b475d4ffeffc15a
+ unpetrify-ref: socfpga_v2013.01.01
+ build-depends:
+ - bsp-support
+ - u-boot-tools@socfpga-devkit
+- name: linux-armv7l-altera-socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit/linux-armv7l-altera-socfpga-devkit.morph
+ repo: upstream:linux
+ ref: e26081808edadfd257c6c9d81014e3b25e9a6118
+ unpetrify-ref: v4.1-rc4
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit/bsp-support.morph b/strata/bsp-armv7l-altera-socfpga-devkit/bsp-support.morph
new file mode 100644
index 0000000..c7f7ed0
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit/bsp-support.morph
@@ -0,0 +1,17 @@
+name: bsp-support
+kind: chunk
+build-commands:
+# Modify auto-generated source files:
+- mv altera-socfpga/* .
+- for file in patches/*.diff; do patch -p 1 < "$file"; done
+- sed -i 's/^PRELOADER_SETTINGS_DIR := .*$/PRELOADER_SETTINGS_DIR := .\/hps_hps_0/' hardware-handoff/spl_bsp/Makefile
+- sed -i 's/^CROSS_COMPILE := .*$/CROSS_COMPILE := \/usr\/bin\//' hardware-handoff/spl_bsp/Makefile
+- mkenvimage -s 4096 -o socfpga-devkit-env.img socfpga-devkit-env.txt
+- dtc -f -I dts -O dtb dts-generated/socfpga-devkit.dts > socfpga-devkit.dtb
+install-commands:
+- mkdir -p "$DESTDIR/boot"
+- install -m 755 socfpga-devkit-env.img "$DESTDIR/boot"
+- install -m 755 socfpga-devkit.dtb "$DESTDIR/boot"
+# These files are required later, to be built against U-Boot:
+- mkdir -p "$DESTDIR/tmp/preloader"
+- cp -R ./hardware-handoff/* "$DESTDIR/tmp/preloader"
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit/device-tree-compiler.morph b/strata/bsp-armv7l-altera-socfpga-devkit/device-tree-compiler.morph
new file mode 100644
index 0000000..8abfafc
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit/device-tree-compiler.morph
@@ -0,0 +1,6 @@
+name: device-tree-compiler
+kind: chunk
+build-commands:
+- make all
+install-commands:
+- make install DESTDIR="$DESTDIR" PREFIX="$PREFIX"
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit/linux-armv7l-altera-socfpga-devkit.morph b/strata/bsp-armv7l-altera-socfpga-devkit/linux-armv7l-altera-socfpga-devkit.morph
new file mode 100644
index 0000000..9568408
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit/linux-armv7l-altera-socfpga-devkit.morph
@@ -0,0 +1,34 @@
+name: linux-armv7l-socfpga-devkit
+kind: chunk
+configure-commands:
+- git status
+- make ARCH=arm socfpga_defconfig
+- scripts/config -e BTRFS_FS
+- scripts/config -e BTRFS_FS_POSIX_ACL
+- scripts/config -d BTRFS_FS_CHECK_INTEGRITY
+- scripts/config -e DEVTMPFS
+- scripts/config -e DEVTMPFS_MOUNT
+- scripts/config -e FUSE_FS
+- scripts/config -e OVERLAY_FS
+- scripts/config -e CONFIG_FHANDLE
+- scripts/config -e CGROUPS
+- scripts/config -e AUTOFS4_FS
+- scripts/config -e BLK_DEV_LOOP
+- scripts/config --set-str UEVENT_HELPER_PATH ''
+- scripts/config -e DM_SNAPSHOT
+- scripts/config -e IKCONFIG
+- scripts/config -e IKCONFIG_PROC
+- scripts/config -e SECCOMP
+- scripts/config -d DEBUG_STACK_TRACE
+- scripts/config -e FB_VESA
+- scripts/config -e VLAN_8021Q
+- scripts/config -e BRIDGE_VLAN_FILTERING
+- scripts/config -e IPV6
+- scripts/config -d MTD_NAND
+- yes '' | make oldconfig
+build-commands:
+- make ARCH=arm LOADADDR=0x8000 zImage dtbs $MAKEFLAGS
+install-commands:
+- mkdir -p "$DESTDIR"/boot
+- cp arch/arm/boot/zImage "$DESTDIR"/boot/zImage
+- cp arch/arm/boot/dts/socfpga_cyclone5*.dtb "$DESTDIR"/boot/
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit/preloader@socfpga-devkit.morph b/strata/bsp-armv7l-altera-socfpga-devkit/preloader@socfpga-devkit.morph
new file mode 100644
index 0000000..c61b10a
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit/preloader@socfpga-devkit.morph
@@ -0,0 +1,17 @@
+name: preloader@socfpga-devkit
+kind: chunk
+configure-commands:
+- mkdir uboot-socfpga
+- find -maxdepth 1 | egrep -v '^./uboot-socfpga|\.$' | xargs -I {} mv {} uboot-socfpga
+- cp -R /tmp/preloader/spl_bsp/* .
+- cp -R /tmp/preloader/hps_hps_0 .
+build-commands:
+- make
+- mkimage -T socfpgaimage -d uboot-socfpga/spl/u-boot-spl.bin preloader.bin
+# Signed preloader needs to be duplicated four times
+# which U-Boot's mkimage tool doesn't support
+- dd if=/dev/zero of=socfpga-preloader.img bs=64K count=4
+- for i in $(seq 0 3); do dd if=preloader.bin of=socfpga-preloader.img bs=64K seek="$i" conv=notrunc; done
+install-commands:
+- mkdir -p "$DESTDIR/boot"
+- install -m 755 socfpga-preloader.img "$DESTDIR/boot"
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit/u-boot-tools@socfpga-devkit.morph b/strata/bsp-armv7l-altera-socfpga-devkit/u-boot-tools@socfpga-devkit.morph
new file mode 100644
index 0000000..f7d3f7c
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit/u-boot-tools@socfpga-devkit.morph
@@ -0,0 +1,14 @@
+name: u-boot-tools@socfpga-devkit
+kind: chunk
+configure-commands:
+- git status
+- make ARCH=arm socfpga_cyclone5_config
+build-commands:
+- make ARCH=arm tools
+install-commands:
+- mkdir -p "$DESTDIR$PREFIX/bin"
+- install -m 755 tools/img2brec.sh "$DESTDIR$PREFIX/bin/."
+- install -m 755 tools/jtagconsole "$DESTDIR$PREFIX/bin/."
+- install -m 755 tools/netconsole "$DESTDIR$PREFIX/bin/."
+- install -m 755 tools/mkenvimage "$DESTDIR$PREFIX/bin/."
+- install -m 755 tools/mkimage "$DESTDIR$PREFIX/bin/."
diff --git a/strata/bsp-armv7l-altera-socfpga-devkit/u-boot@socfpga-devkit.morph b/strata/bsp-armv7l-altera-socfpga-devkit/u-boot@socfpga-devkit.morph
new file mode 100644
index 0000000..2b7ce45
--- /dev/null
+++ b/strata/bsp-armv7l-altera-socfpga-devkit/u-boot@socfpga-devkit.morph
@@ -0,0 +1,9 @@
+name: u-boot@socfpga-devkit
+kind: chunk
+configure-commands:
+- make ARCH=arm socfpga_cyclone5_config
+build-commands:
+- make ARCH=arm
+install-commands:
+- mkdir -p "$DESTDIR/boot"
+- install -m 755 u-boot.img "$DESTDIR/boot"
diff --git a/systems/base-system-armv7l-altera-socfpga-devkit.morph b/systems/base-system-armv7l-altera-socfpga-devkit.morph
new file mode 100644
index 0000000..b8fe4c2
--- /dev/null
+++ b/systems/base-system-armv7l-altera-socfpga-devkit.morph
@@ -0,0 +1,21 @@
+name: base-system-armv7l-altera-socfpga-devkit
+kind: system
+description: |
+ The set of strata required to have a minimal system for use on Altera SoCFPGA
+ development kit, using little-endian word order.
+arch: armv7lhf
+strata:
+- name: build-essential
+ morph: strata/build-essential.morph
+- name: core
+ morph: strata/core.morph
+- name: foundation
+ morph: strata/foundation.morph
+- name: bsp-armv7l-altera-socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit.morph
+configuration-extensions:
+- extensions/set-hostname
+- extensions/add-config-files
+- extensions/nfsboot
+- extensions/install-files
+- extensions/install-essential-files
diff --git a/systems/build-system-armv7l-altera-socfpga-devkit.morph b/systems/build-system-armv7l-altera-socfpga-devkit.morph
new file mode 100644
index 0000000..ff93569
--- /dev/null
+++ b/systems/build-system-armv7l-altera-socfpga-devkit.morph
@@ -0,0 +1,48 @@
+name: build-system-armv7l-altera-socfpga-devkit
+kind: system
+description: |
+ The system that should be used for building other Baserock systems. For
+ use on Altera SoCFPGA development kit, using little-endian word order.
+arch: armv7lhf
+strata:
+- name: build-essential
+ morph: strata/build-essential.morph
+- name: core
+ morph: strata/core.morph
+- name: foundation
+ morph: strata/foundation.morph
+- name: bsp-armv7l-altera-socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit.morph
+- name: python-core
+ morph: strata/python-core.morph
+- name: tools
+ morph: strata/tools.morph
+- name: python-cliapp
+ morph: strata/python-cliapp.morph
+- name: python-pygobject
+ morph: strata/python-pygobject.morph
+- name: python-wsgi
+ morph: strata/python-wsgi.morph
+- name: morph-utils
+ morph: strata/morph-utils.morph
+- name: nfs
+ morph: strata/nfs.morph
+- name: python-common
+ morph: strata/python-common.morph
+- name: ansible
+ morph: strata/ansible.morph
+- name: devtools
+ morph: strata/devtools.morph
+- name: libsoup-common
+ morph: strata/libsoup-common.morph
+- name: ostree-core
+ morph: strata/ostree-core.morph
+configuration-extensions:
+- extensions/set-hostname
+- extensions/add-config-files
+- extensions/nfsboot
+- extensions/install-files
+- extensions/distbuild
+- extensions/fstab
+- extensions/mason
+- extensions/install-essential-files
diff --git a/systems/devel-system-armv7l-altera-socfpga-devkit.morph b/systems/devel-system-armv7l-altera-socfpga-devkit.morph
new file mode 100644
index 0000000..e467d86
--- /dev/null
+++ b/systems/devel-system-armv7l-altera-socfpga-devkit.morph
@@ -0,0 +1,60 @@
+name: devel-system-armv7l-altera-socfpga-devkit
+kind: system
+description: |
+ A system with useful tools for doing Baserock development.
+
+ For use on Altera SoCFPGA development kit, using little-endian word
+ order.
+arch: armv7lhf
+strata:
+- name: build-essential
+ morph: strata/build-essential.morph
+- name: core
+ morph: strata/core.morph
+- name: foundation
+ morph: strata/foundation.morph
+- name: bsp-armv7l-altera-socfpga-devkit
+ morph: strata/bsp-armv7l-altera-socfpga-devkit.morph
+- name: tools
+ morph: strata/tools.morph
+- name: python-cliapp
+ morph: strata/python-cliapp.morph
+- name: python-pygobject
+ morph: strata/python-pygobject.morph
+- name: python-wsgi
+ morph: strata/python-wsgi.morph
+- name: morph-utils
+ morph: strata/morph-utils.morph
+- name: nodejs
+ morph: strata/nodejs.morph
+- name: ruby
+ morph: strata/ruby.morph
+- name: lorry
+ morph: strata/lorry.morph
+- name: baserock-import
+ morph: strata/baserock-import.morph
+- name: nfs
+ morph: strata/nfs.morph
+- name: python-core
+ morph: strata/python-core.morph
+- name: python-tools
+ morph: strata/python-tools.morph
+- name: python-common
+ morph: strata/python-common.morph
+- name: devtools
+ morph: strata/devtools.morph
+- name: ansible
+ morph: strata/ansible.morph
+- name: swift
+ morph: strata/swift.morph
+- name: libsoup-common
+ morph: strata/libsoup-common.morph
+- name: ostree-core
+ morph: strata/ostree-core.morph
+configuration-extensions:
+- extensions/set-hostname
+- extensions/add-config-files
+- extensions/nfsboot
+- extensions/install-files
+- extensions/fstab
+- extensions/install-essential-files