-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PiAIZU tag v2.1.0 with latest Jessie
PiAIZU tag 2.1.0 + fixed doxygen source path. Jessie commit: 68cdf34 https://github.com/RPi-Distro/pi-gen/commits/jessie
- Loading branch information
1 parent
68cdf34
commit 19a36e5
Showing
656 changed files
with
28,733 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
deploy/* | ||
work/* | ||
config | ||
#config | ||
postrun.sh | ||
SKIP | ||
#SKIP | ||
.pc | ||
*-pc | ||
apt-cacher-ng/ |
This file contains 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,2 @@ | ||
IMG_NAME="PiAIZU" | ||
|
This file contains 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,3 @@ | ||
i2c-tools dnsmasq hostapd python-smbus mplayer fbi vim lighttpd sshfs doxygen clang-3.9 clang-format-3.9 graphviz libfcgi-dev libjansson-dev | ||
|
||
|
This file contains 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/bash -e | ||
|
||
#################################################################### | ||
# | ||
# Installation of config and dts for LMX-001 | ||
# Enable autologin | ||
# Enable SSHD | ||
# Enable i2c-dev | ||
# | ||
#################################################################### | ||
|
||
############ Config.txt ############################################ | ||
if [ ! -f ${ROOTFS_DIR}/boot/config_original.txt ]; then | ||
echo "No backup of original config found" | ||
cp -v ${ROOTFS_DIR}/boot/config.txt ${ROOTFS_DIR}/boot/config_original.txt | ||
fi | ||
|
||
# Install the config | ||
install -m 644 files/config.txt ${ROOTFS_DIR}/boot/ | ||
|
||
############ Install dts ############################################ | ||
install -d ${ROOTFS_DIR}/home/pi/piaizu/dts | ||
install -t ${ROOTFS_DIR}/home/pi/piaizu/dts files/dts/* | ||
|
||
############ LMX-001 scripts ######################################## | ||
install -m 755 files/brightness.py ${ROOTFS_DIR}/usr/sbin | ||
install -m 755 files/lmx001_init.py ${ROOTFS_DIR}/usr/sbin | ||
|
||
cp -v files/rc.local ${ROOTFS_DIR}/etc/rc.local | ||
|
||
############ Enable autologin ####################################### | ||
sed -i 's\ExecStart=-/sbin/agetty --noclear %I $TERM\ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM\g' ${ROOTFS_DIR}/etc/systemd/system/getty.target.wants/[email protected] | ||
|
||
############ Enable SSHD ############################################ | ||
touch ${ROOTFS_DIR}/boot/ssh | ||
|
||
############ Enable i2c-dev ######################################### | ||
cp -v files/modules ${ROOTFS_DIR}/etc/modules |
This file contains 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/bash -e | ||
|
||
#################################################################### | ||
# | ||
# Configuration of hostapd dnsmasq | ||
# Fix network config | ||
# | ||
#################################################################### | ||
|
||
############ Install lighttpd, host and dnsmasq config ####################### | ||
install -m 644 files/lighttpd.conf ${ROOTFS_DIR}/etc/lighttpd/ | ||
install -m 644 files/hostapd.conf ${ROOTFS_DIR}/etc/hostapd | ||
install -m 644 files/dnsmasq.conf ${ROOTFS_DIR}/etc/ | ||
|
||
sed -i 's\#DAEMON_CONF=""\DAEMON_CONF="/etc/hostapd/hostapd.conf"\g' ${ROOTFS_DIR}/etc/default/hostapd | ||
|
||
############ Network setup ######################################### | ||
cp -v files/interfaces ${ROOTFS_DIR}/etc/network/interfaces |
This file contains 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,35 @@ | ||
#/bin/bash -e | ||
|
||
#################################################################### | ||
# | ||
# Installation of LMX-001 example app and documentation | ||
# | ||
#################################################################### | ||
|
||
############ Insert git tag and related into docs ################## | ||
GITREV=$(git describe --tags) | ||
NOW=$(date) | ||
echo $GITREV | ||
sed -i -r "s/(Build date:)(.*)/\1 $NOW/g" files/fb/documentation.txt | ||
sed -i -r "s/(Git describe:)(.*)/\1 $GITREV/g" files/fb/documentation.txt | ||
|
||
############ Install demo, example and documentation files ######### | ||
install -d ${ROOTFS_DIR}/home/pi/piaizu/demo | ||
install -t ${ROOTFS_DIR}/home/pi/piaizu/demo files/demo/* | ||
|
||
install -d ${ROOTFS_DIR}/home/pi/lmx_example | ||
cp -rfv files/fb/* ${ROOTFS_DIR}/home/pi/lmx_example/ | ||
|
||
make -C ${ROOTFS_DIR}/home/pi/lmx_example doc | ||
cp -rfv ${ROOTFS_DIR}/home/pi/lmx_example/docs/html/* ${ROOTFS_DIR}/var/www/html | ||
|
||
############ Setup terminal ####################### | ||
cp -v files/.profile ${ROOTFS_DIR}/home/pi/.profile | ||
cp -v files/.bashrc ${ROOTFS_DIR}/home/pi/.bashrc | ||
############ Create copy of this buildsystem on target fs################# | ||
buildsystem_path=piaizu_$GITREV | ||
pth=$(readlink -e ../..) | ||
if [ ! -d "${ROOTFS_DIR}/home/pi/$buildsystem_path" ]; then | ||
git clone file://$pth --depth=1 ${ROOTFS_DIR}/home/pi/$buildsystem_path | ||
fi | ||
|
This file contains 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/bash -e | ||
|
||
#################################################################### | ||
# | ||
# Commands to run under chroot | ||
# | ||
#################################################################### | ||
|
||
############ Compile and install device tree ####################### | ||
make -C /home/pi/piaizu/dts/ install | ||
|
||
############ Chmod the example folder ############################## | ||
chmod -R a+rw /home/pi/lmx_example | ||
|
||
############ Build and install the lmx example ##################### | ||
make -C /home/pi/lmx_example clean install | ||
|
||
|
This file contains 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,114 @@ | ||
# ~/.bashrc: executed by bash(1) for non-login shells. | ||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | ||
# for examples | ||
|
||
# If not running interactively, don't do anything | ||
case $- in | ||
*i*) ;; | ||
*) return;; | ||
esac | ||
|
||
# don't put duplicate lines or lines starting with space in the history. | ||
# See bash(1) for more options | ||
HISTCONTROL=ignoreboth | ||
|
||
# append to the history file, don't overwrite it | ||
shopt -s histappend | ||
|
||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | ||
HISTSIZE=1000 | ||
HISTFILESIZE=2000 | ||
|
||
# check the window size after each command and, if necessary, | ||
# update the values of LINES and COLUMNS. | ||
shopt -s checkwinsize | ||
|
||
# If set, the pattern "**" used in a pathname expansion context will | ||
# match all files and zero or more directories and subdirectories. | ||
#shopt -s globstar | ||
|
||
# make less more friendly for non-text input files, see lesspipe(1) | ||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | ||
|
||
# set variable identifying the chroot you work in (used in the prompt below) | ||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | ||
debian_chroot=$(cat /etc/debian_chroot) | ||
fi | ||
|
||
# set a fancy prompt (non-color, unless we know we "want" color) | ||
case "$TERM" in | ||
xterm-color) color_prompt=yes;; | ||
esac | ||
|
||
# uncomment for a colored prompt, if the terminal has the capability; turned | ||
# off by default to not distract the user: the focus in a terminal window | ||
# should be on the output of commands, not on the prompt | ||
force_color_prompt=yes | ||
|
||
if [ -n "$force_color_prompt" ]; then | ||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | ||
# We have color support; assume it's compliant with Ecma-48 | ||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such | ||
# a case would tend to support setf rather than setaf.) | ||
color_prompt=yes | ||
else | ||
color_prompt= | ||
fi | ||
fi | ||
|
||
if [ "$color_prompt" = yes ]; then | ||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' | ||
else | ||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | ||
fi | ||
unset color_prompt force_color_prompt | ||
|
||
# If this is an xterm set the title to user@host:dir | ||
case "$TERM" in | ||
xterm*|rxvt*) | ||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | ||
;; | ||
*) | ||
;; | ||
esac | ||
|
||
# enable color support of ls and also add handy aliases | ||
if [ -x /usr/bin/dircolors ]; then | ||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | ||
alias ls='ls --color=auto' | ||
#alias dir='dir --color=auto' | ||
#alias vdir='vdir --color=auto' | ||
|
||
alias grep='grep --color=auto' | ||
alias fgrep='fgrep --color=auto' | ||
alias egrep='egrep --color=auto' | ||
fi | ||
|
||
# colored GCC warnings and errors | ||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | ||
|
||
# some more ls aliases | ||
#alias ll='ls -l' | ||
#alias la='ls -A' | ||
#alias l='ls -CF' | ||
|
||
# Alias definitions. | ||
# You may want to put all your additions into a separate file like | ||
# ~/.bash_aliases, instead of adding them here directly. | ||
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | ||
|
||
if [ -f ~/.bash_aliases ]; then | ||
. ~/.bash_aliases | ||
fi | ||
|
||
# enable programmable completion features (you don't need to enable | ||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | ||
# sources /etc/bash.bashrc). | ||
if ! shopt -oq posix; then | ||
if [ -f /usr/share/bash-completion/bash_completion ]; then | ||
. /usr/share/bash-completion/bash_completion | ||
elif [ -f /etc/bash_completion ]; then | ||
. /etc/bash_completion | ||
fi | ||
fi | ||
alias ll='ls -al' |
This file contains 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,25 @@ | ||
# ~/.profile: executed by the command interpreter for login shells. | ||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | ||
# exists. | ||
# see /usr/share/doc/bash/examples/startup-files for examples. | ||
# the files are located in the bash-doc package. | ||
|
||
# the default umask is set in /etc/profile; for setting the umask | ||
# for ssh logins, install and configure the libpam-umask package. | ||
#umask 022 | ||
|
||
# if running bash | ||
if [ -n "$BASH_VERSION" ]; then | ||
# include .bashrc if it exists | ||
if [ -f "$HOME/.bashrc" ]; then | ||
. "$HOME/.bashrc" | ||
fi | ||
fi | ||
|
||
# set PATH so it includes user's private bin if it exists | ||
if [ -d "$HOME/bin" ] ; then | ||
PATH="$HOME/bin:$PATH" | ||
fi | ||
echo `setterm -blank 0 -powerdown 0` >> /dev/tty1 | ||
echo `setterm -cursor off` >>/dev/tty1 | ||
|
This file contains 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,70 @@ | ||
# PiAIZU | ||
This is the build system to compile a SD card image of the Raspian. | ||
This image will be preconfigured already to be ready to run the PiAIZU setup. | ||
The PiAIZU setup consists of the following: | ||
- RbPi (Raspberry Pi), [3 or Zero] | ||
- PCB sheild that connects to the RbPi | ||
- PCB that connects to the LMX-001 display | ||
- Cable that connects the two PCBs | ||
|
||
[![N|Solid](https://www.raspberrypi.org/app/uploads/2012/02/Raspian_SD-150x150.png)](https://www.raspberrypi.org/downloads/raspbian/) | ||
|
||
# Software | ||
|
||
The software needed that is added into the rootfs of the Raspbian is the following: | ||
- LMX I2C initalisation scripts | ||
- Demo (TBD) | ||
- Brightness | ||
- I2C Tools (added std package) | ||
|
||
# Configuration | ||
The PiAIZU related files are all being set-up in the stage2 directory. | ||
|
||
# Dependencies | ||
The same as for the original plus doxygen with doxygen. | ||
``` | ||
apt-get install quilt parted realpath qemu-user-static debootstrap zerofree pxz zip dosfstools bsdtar libcap2-bin grep rsync doxygen graphviz qemu-user-binfmt | ||
``` | ||
The orignal RPi-Distro/pi-gen repository can be found at github. | ||
``` | ||
https://github.com/RPi-Distro/pi-gen | ||
``` | ||
Current tag is: | ||
**2017-04-10-raspbian-jessie** | ||
|
||
# Building | ||
|
||
Once all the prerequisite is in place, you start a build by executing the | ||
build.sh script in the root of this project. You must be sudo to do it. | ||
``` | ||
sudo -s | ||
./build.sh | ||
``` | ||
When its done you will find your binaries in the deploy/ folder. | ||
|
||
# Flashing | ||
|
||
You need have and microSD card, insert it into your computer and find out what | ||
device name it has. | ||
``` | ||
sudo -s | ||
unzip -p image_2017-06-29-PiAIZU-lite.zip | dd of=/dev/sd[X] bs=20M && sync | ||
``` | ||
When this command is done, just take the card out and put it in the Raspberry. | ||
Make sure you have the PiAIZU hardware attached. | ||
|
||
When the Raspberry boots, you will get more instructions inte screen of the | ||
LMX-001. | ||
|
||
### Encountered issues | ||
At some points it has been seen that the qemu-arm hasn't been properly installed. | ||
if debootstart fails due to something similiar to: | ||
``` | ||
chroot: failed to run command ‘/bin/bash’: Exec format error | ||
``` | ||
try to remove and reinstall: | ||
``` | ||
apt-get remove qemu-user-static | ||
apt-get install qemu-user-static | ||
``` | ||
|
Oops, something went wrong.