diff options
author | Edward Cragg <edward.cragg@codethink.co.uk> | 2015-05-27 17:24:26 +0000 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2015-10-06 23:50:40 +0000 |
commit | 9dd681bcc9c41e2ede4bd9320b8c0f3cf1f3a37a (patch) | |
tree | 323e005503ad3b331dc395ec41bc68a5eaf7222f /strata/bsp-armv7l-altera-socfpga-devkit | |
parent | 5db0c4d2db508b08f9b0ebfad0e2c2e730f60c9b (diff) | |
download | definitions-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
Diffstat (limited to 'strata/bsp-armv7l-altera-socfpga-devkit')
6 files changed, 97 insertions, 0 deletions
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 00000000..c7f7ed0a --- /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 00000000..8abfafc8 --- /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 00000000..95684083 --- /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 00000000..c61b10a7 --- /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 00000000..f7d3f7cb --- /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 00000000..2b7ce450 --- /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" |