summaryrefslogtreecommitdiff
path: root/package/boot
diff options
context:
space:
mode:
authorIan Pozella <Ian.Pozella@imgtec.com>2017-02-02 09:42:04 +0000
committerFelix Fietkau <nbd@nbd.name>2017-03-22 11:43:22 +0100
commit0d271cef8071d0698246b4b50a610b5ff718af01 (patch)
treefcb0806cd55456e354ba1318eba6e4075ed52f6d /package/boot
parent52c17bff3c861dc28517303e535b880473a54498 (diff)
downloadmtk-20170518-0d271cef8071d0698246b4b50a610b5ff718af01.zip
mtk-20170518-0d271cef8071d0698246b4b50a610b5ff718af01.tar.gz
mtk-20170518-0d271cef8071d0698246b4b50a610b5ff718af01.tar.bz2
target: add pistachio
The Pistachio target is a MIPS interaptiv based SoC developed by Imagination Technologies. It includes blocks for i2c, spi, audio, usb and WiFi. This also adds the base support for the 'Creator Ci40 (marduk)' device which uses the Pistachio SoC to create an IoT hub by including Bluetooth, WiFi and 6lowpan on one board. Additionally 2x Mikrobus ports are available to expand with further RF technologies or add sensors. You can find out more here http://creatordev.io. Note, this commit is just the initial board support hence the following are not expected to work yet: * WiFi * Bluetooth * 6lowpan * Audio * Mikrobus uarts, user leds (clock dependency of 6lowpan chip) The aim of this commit is to essentially have the same level of support that currently exists in the mainline kernel. Signed-off-by: Abhijit Mahajani <Abhijit.Mahajani@imgtec.com> Signed-off-by: Francois Berder <francois.berder@imgtec.com> Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com> Signed-off-by: Mayank Sirotiya <Mayank.Sirotiya@imgtec.com> Signed-off-by: Sean Kelly <Sean.Kelly@imgtec.com>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/uboot-envtools/Makefile4
-rw-r--r--package/boot/uboot-envtools/files/pistachio28
2 files changed, 32 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
index 784fc64..10175b0 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -112,6 +112,10 @@ ifneq ($(CONFIG_TARGET_oxnas),)
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools
endif
+ifneq ($(CONFIG_TARGET_pistachio),)
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_DATA) ./files/pistachio $(1)/etc/uci-defaults/30_uboot-envtools
+endif
ifneq ($(CONFIG_TARGET_ramips),)
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
diff --git a/package/boot/uboot-envtools/files/pistachio b/package/boot/uboot-envtools/files/pistachio
new file mode 100644
index 0000000..56bac35
--- /dev/null
+++ b/package/boot/uboot-envtools/files/pistachio
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/pistachio.sh
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(pistachio_board_name)
+
+case "$board" in
+marduk)
+ ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x2000" "0x1000"
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0