No description, website, or topics provided.
C Makefile Shell Other C++ Perl Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config build: don't add -fno-plt for ARC Feb 7, 2016
docs build: Prevent more gzip timestamps Jul 14, 2015
include Workaround: replace opkg by opkg-smime in target.mk Sep 26, 2016
package uboot-envtools: add pistachio support Sep 29, 2016
scripts treewide: fix replace nbd@openwrt.org with nbd@nbd.name Jun 7, 2016
target Merge pull request #166 from francois-berder-imgtec/ckt-422 Oct 7, 2016
toolchain treewide: fix replace nbd@openwrt.org with nbd@nbd.name Jun 7, 2016
tools treewide: fix replace nbd@openwrt.org with nbd@nbd.name Jun 7, 2016
.gitattributes add .gitattributes to prevent the git autocrlf option from messing wi… May 8, 2012
.gitignore build: add integration for managing opkg package feed keys Apr 6, 2015
.travis.sh update .travis.sh to throw build warnings Apr 12, 2016
.travis.yml travis.yml: install device-tree-compiler Sep 29, 2016
BSDmakefile add missing copyright header Feb 26, 2007
Config.in scripts/config: sync with linux upstream Jan 8, 2015
LICENSE rename GPL to LICENSE Aug 13, 2005
Makefile Makefile: set timezone to UTC Jan 28, 2016
README.md add device-tree-compiler to dependencies Sep 27, 2016
creatorlogo.png Logo to use in README.md Apr 14, 2016
feeds.conf.default feeds.conf.default: Change openwrt-feeds to Ci40-platform-feed Sep 20, 2016
getver.sh Update creator-platform-default configs with Ci40 as VERSION_NUMBER Jun 28, 2016
rules.mk build: disable the use of -iremap for UML (#21851) Feb 13, 2016

README.md

Creator logo

Using OpenWrt on Creator Ci40 (Marduk) platform

For more high-level details about the platform please visit the Creator Ci40 website


Overview

OpenWrt is a highly extensible GNU/Linux distribution for embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with optional package management. This frees you from the restrictions of the application selection and configuration provided by the vendor and allows you to use packages to customize an embedded device to suit any application. For developers, OpenWrt provides a framework to build an application without having to create a complete firmware image and distribution around it. For users, this means the freedom of full customisation, allowing the use of an embedded device in ways the vendor never envisioned.

Creator is a MIPS based developer program from Imagination Technologies. Creator Ci40 (Marduk) is the latest development board in the Creator program. Pistachio is the name of the Imagination Technologies SoC that Ci40 is uses as it's core. This guide helps as a quick start but for full details about OpenWrt please see the OpenWrt project wiki.

This readme contains the basics of building and modifying OpenWrt for Ci40. You will find much more documentation on the Creator Documentation website.

Package Content

The release distribution is structured as documented in the upstream project however there are some key paths where IMG have added solutions:

Folder Content
target/linux/pistachio IMG pistachio SoC based board configs and makefiles
target/linux/pistachio/config-4.1 IMG pistachio SoC specific kernel config
target/linux/pistachio/marduk/profiles/marduk_cc2520.mk IMG Marduk platform profile with TI cc2520
target/linux/pistachio/marduk/profiles/marduk_ca8210.mk IMG Marduk platform profile with Cascoda ca8210

Note that mass production Ci40 boards use the Cascoda ca8210 chip, so assume the use of this profile unless you have been personally informed otherwise

Getting started

Firstly, to obtain a copy of the (Ci40) Marduk platform supported OpenWrt source code:

  • Sign up for a GitHub account

  • Install Git: sudo apt-get install git

  • Clone the repository: git clone https://github.com/CreatorDev/openwrt.git

Install build dependencies:

$ sudo apt-get install libncurses5-dev libncursesw5-dev zlib1g-dev libssl-dev gawk subversion device-tree-compiler

To make a build based on the default Ci40 config, run the following commands:

$ cd openwrt
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a

Ignore any "WARNING: No feed for package..." from the install feeds step.

Set the default configuration for Ci40 by running the following command (this sets version numbers and OPKG URLs):

$ cat target/linux/pistachio/creator-platform-default-cascoda.config > .config

Complete the configuration process by running menuconfig:

$ make menuconfig
  1. Check that "Target System" is IMG MIPS Pistachio

     Target System (IMG MIPS Pistachio)  --->
    
  2. Check the "Target Profile" is set to Basic platform profile for Marduk with Cascoda ca8210

     Target Profile (Basic platform profile for Marduk with Cascoda ca8210)  --->
    
  3. Save and Exit menuconfig

Optionally, you can add a git revision number as DISTRIB_REVISION in the openwrt image by doing the following:

$ getver.sh . > version

Now build OpenWrt with one of the following commands (see the gnu make documentation for more options):

$ make

or

$ make V=s                       // Verbose mode

Once the build is completed, you will find the resulting output i.e. images, dtbs and rootfs at "bin/pistachio".

Example output for V0.9.4:

  • openwrt-0.9.4-pistachio-pistachio_marduk_ca8210-uImage
  • openwrt-0.9.4-pistachio-pistachio_marduk_ca8210-uImage-initramfs
  • openwrt-0.9.4-pistachio-marduk-marduk_ca8210-rootfs.tar.gz
  • pistachio_marduk_ca8210.dtb

By default the version number is blank if you do not use the creator-platform-default-cascoda.config for loading the configuration.

Customising your OpenWrt

You can configure OpenWrt from scratch but it's best to start from a base profile e.g. the one for the IMG pistachio board as it has some useful defaults.

Simply select the package you need and add into the marduk profile:

$ vi target/linux/pistachio/marduk/profiles/marduk_ca8210.mk

If you want to add new package, then simply add package name in the list of packages:

define Profile/marduk
NAME:=Basic platform profile for Marduk with Cascoda ca8210
PACKAGES:=kmod-i2c kmod-ca8210 kmod-sound-pistachio-soc \
            wpan-tools tcpdump uhttpd uboot-envtools \
            alsa-lib alsa-utils alsa-utils-tests \
            iw hostapd wpa-supplicant kmod-uccp420wlan kmod-cfg80211
endef

Please ensure to remove .config, tmp folders before running make menuconfig.

$ make menuconfig

Verify that package name is selected. Just save and exit.

Customising your Linux Kernel

Kernel configuration is saved at target/linux/pistachio/config-4.1 e.g. This the one for the IMG pistachio board as it has some useful defaults.

To customise to suit your requirements use the following command:

$ make kernel_menuconfig

If you change any option you need and then save & quit GUI, the changed configuration will get written into target/linux/pistachio/config-4.1

For more details please refer to OpenWrt Build System

Adding Linux Kernel patches

Linux kernel patches are added at :-

target/linux/pistachio/patches-<kernel_version>/
  • All kernel patches are created from the linux kernel hosted here.

  • Kernel patches for specific kernel version used in OpenWrt are prepared from corresponding branches in linux repo. e.g.

      target/linux/pistachio/patches-4.1/
    

contains patches created from openwrt-4.1.13 branch.

  • For adding the kernel patch in OpenWrt, create a PR in linux with the change, and also create a PR with the patch of the change in OpenWrt repository.

  • Following command can be used for creating the kernel patch :-

      git format-patch <commit_id> --keep-subject --start-number <number>
    

NOTE : Number should the next one from the last patch already added in OpenWrt.