Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
pwgen committed Dec 5, 2013
1 parent c08537a commit d031c01
Show file tree
Hide file tree
Showing 87 changed files with 28,088 additions and 0 deletions.
9 changes: 9 additions & 0 deletions conf/layer.conf
@@ -0,0 +1,9 @@
# We have a conf and classes directory, add to BBPATH
BBPATH := "${BBPATH}:${LAYERDIR}"

# We have a packages directory, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb"

BBFILE_COLLECTIONS += "pwgen"
BBFILE_PATTERN_pwgen := "^${LAYERDIR}/"
BBFILE_PRIORITY_pwgen = "7"
49 changes: 49 additions & 0 deletions conf/machine/include/ia32/arch-ia32.inc
@@ -0,0 +1,49 @@
#
# IA32 Architecture definition
#

DEFAULTTUNE ?= "x86"
TARGET_FPU ?= ""
X86ARCH32 ?= "i586"
X86ARCH64 ?= "x86_64"

# ELF32 ABI
TUNEVALID[m32] = "IA32 ELF32 standard ABI"
TUNECONFLICTS[m32] = "m64 mx32"
TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "m32", ":x86", "" ,d)}"

# x32 ABI
TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
TUNECONFLICTS[mx32] = "m64 m32"
TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "${X86ARCH64}", "" ,d)}"
ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "x32", "" ,d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-mx32", "", d)}"
TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"

# ELF64 ABI
TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
TUNECONFLICT[m64] = "m32 mx32"
TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"

TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"

# Default Tune configurations
AVAILTUNES += "x86"
TUNE_FEATURES_tune-x86 ?= "m32"
BASE_LIB_tune-x86 ?= "lib"
PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"

AVAILTUNES += "x86-64"
TUNE_FEATURES_tune-x86-64 ?= "m64"
BASE_LIB_tune-x86-64 ?= "lib64"
PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"

AVAILTUNES += "x86-64-x32"
TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
BASE_LIB_tune-x86-64-x32 ?= "libx32"
PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64-x32"
TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
17 changes: 17 additions & 0 deletions conf/machine/include/qemu.inc
@@ -0,0 +1,17 @@
PCMCIA_MANAGER = "pcmciautils"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive"

MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen"

IMAGE_FSTYPES ?= "tar.bz2 ext3"

ROOT_FLASH_SIZE = "280"

# Don't include kernels in standard images
RDEPENDS_kernel-base = ""

# Use a common kernel recipe for all QEMU machines
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"

EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
16 changes: 16 additions & 0 deletions conf/machine/include/tune-i586.inc
@@ -0,0 +1,16 @@
DEFAULTTUNE ?= "i586"
TUNE_PKGARCH_TMP = "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "i586", "i586", TUNE_PKGARCH_TMP, d)}"

require conf/machine/include/ia32/arch-ia32.inc

# Extra tune features
TUNEVALID[i586] = "Enable i586 specific processor optimizations"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "i586", "-march=i586", "", d)}"

# Extra tune selections
AVAILTUNES += "i586"
TUNE_FEATURES_tune-i586 ?= "${TUNE_FEATURES_tune-x86} i586"
BASE_LIB_tune-i586 ?= "lib"
PACKAGE_EXTRA_ARCHS_tune-i586 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586"

35 changes: 35 additions & 0 deletions conf/machine/ouya.conf
@@ -0,0 +1,35 @@
#@TYPE: Machine
#@Name: tf201
#@DESCRIPTION: Machine configuration for the ASUS tf201

require conf/machine/include/tune-cortexa8.inc
PREFERRED_PROVIDER_virtual/libgl = "mesa-dri"
PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim"

PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \
xf86-input-evdev \
xf86-input-mouse \
xf86-input-keyboard"


# has DVI connector for external screen
GUI_MACHINE_CLASS = "bigscreen"
MACHINE_DISPLAY_WIDTH_PIXELS = "1280"
MACHINE_DISPLAY_HEIGHT_PIXELS = "800"

#PREFERRED_PROVIDER_virtual/kernel = "linux-tf201"
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"

MACHINE_FEATURES = "kernel26 usbhost ext2 alsa"

#don't try to access tty1
USE_VT = "0"
IMAGE_DEVICE_TABLES = ""
SERIAL_CONSOLE = "115200 ttymxc0"
#UBOOT_ENTRYPOINT = "0x90008000"
#UBOOT_LOADADDRESS = "0x90008000"

#PREFERRED_PROVIDER_virtual/bootloader = "u-boot-efikamx"

#tune for ARMv7/Cortex A8
15 changes: 15 additions & 0 deletions recipes-erics/erics/erics/COPYRIGHT
@@ -0,0 +1,15 @@
Sysvinit is Copyright (C) 1991-2004 Miquel van Smoorenburg

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1 change: 1 addition & 0 deletions recipes-erics/erics/erics/all-feed.conf
@@ -0,0 +1 @@
src/gz all http://10.128.0.1/oe-core/ipk/all
1 change: 1 addition & 0 deletions recipes-erics/erics/erics/armv6-hf-feed.conf
@@ -0,0 +1 @@
src/gz armv6-hf http://10.128.0.1/ipk/armv6hf-vfp
1 change: 1 addition & 0 deletions recipes-erics/erics/erics/armv6-vfp-feed.conf
@@ -0,0 +1 @@
src/gz armv6-vfp http://10.128.0.1/oe-core/ipk/armv6-vfp
Binary file added recipes-erics/erics/erics/bootcode.bin
Binary file not shown.
Binary file added recipes-erics/erics/erics/dvb-ttpci-01.fw
Binary file not shown.
196 changes: 196 additions & 0 deletions recipes-erics/erics/erics/erics
@@ -0,0 +1,196 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: erics
# Required-Start: $local_fs
# Should-Start:
# Required-Stop: $local_fs
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d
### END INIT INFO

# The definition of actions: (From LSB 3.1.0)
# start start the service
# stop stop the service
# restart stop and restart the service if the service is already running,
# otherwise start the service
# try-restart restart the service if the service is already running
# reload cause the configuration of the service to be reloaded without
# actually stopping and restarting the service
# force-reload cause the configuration to be reloaded if the service supports
# this, otherwise restart the service if it is running
# status print the current status of the service

# The start, stop, restart, force-reload, and status actions shall be supported
# by all init scripts; the reload and the try-restart actions are optional

# Common steps to convert this skeleton into a real init script
# 1) cp skeleton <the_real_name>
# 2) Set DESC and NAME
# 3) Check whether the daemon app is /usr/sbin/$NAME, if not, set it.
# 4) Set DAEMON_ARGS if there is any
# 5) Remove the useless code

# NOTE: The skeleton doesn't support the daemon which is a script unless the
# pidof supports "-x" option, please see more comments for pidofproc ()
# in /etc/init.d/functions

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin

DESC="erics"
NAME="erics-test"
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid




. /etc/init.d/functions || exit 1

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

#
# Function that starts the daemon/service
#
do_start() {
local status pid

status=0
pid=`pidofproc $NAME` || status=$?
case $status in
0)
echo "$DESC already running ($pid)."
exit 1
;;
*)
echo "Starting $DESC ..."
exec $DAEMON $DAEMON_ARGS >/dev/null 2>&1 || status=$?
echo "ERROR: Failed to start $DESC."
exit $status
;;
esac

# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}

#
# Function that stops the daemon/service
#
do_stop() {
local pid status

status=0
pid=`pidofproc $NAME` || status=$?
case $status in
0)
# Exit when fail to stop, the kill would complain when fail
kill -s 15 $pid >/dev/null && rm -f $PIDFILE && \
echo "Stopped $DESC ($pid)." || exit $?
;;
*)
echo "$DESC is not running; none killed." >&2
;;
esac

# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
return $status
}

#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
local pid status

status=0
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
pid=`pidofproc $NAME` || status=$?
case $status in
0)
echo "Reloading $DESC ..."
kill -s 1 $pid || exit $?
;;
*)
echo "$DESC is not running; none reloaded." >&2
;;
esac
exit $status
}


#
# Function that shows the daemon/service status
#
status_of_proc () {
local pid status

status=0
# pidof output null when no program is running, so no "2>/dev/null".
pid=`pidofproc $NAME` || status=$?
case $status in
0)
echo "$DESC is running ($pid)."
exit 0
;;
*)
echo "$DESC is not running." >&2
exit $status
;;
esac
}

case "$1" in
start)
do_start
;;
stop)
do_stop || exit $?
;;
status)
status_of_proc
;;
restart)
# Always start the service regardless the status of do_stop
do_stop
do_start
;;
try-restart|force-reload)
# force-reload is the same as reload or try-restart according
# to its definition, the reload is not implemented here, so
# force-reload is the alias of try-restart here, but it should
# be the alias of reload if reload is implemented.
#
# Only start the service when do_stop succeeds
do_stop && do_start
;;
#reload)
# If the "reload" action is implemented properly, then let the
# force-reload be the alias of reload, and remove it from
# try-restart|force-reload)
#
#do_reload
#;;
*)
echo "Usage: $0 {start|stop|status|restart|try-restart|force-reload}" >&2
exit 3
;;
esac

17 changes: 17 additions & 0 deletions recipes-erics/erics/erics/erics.service
@@ -0,0 +1,17 @@
[Unit]
Description=erics
OnFailure=emergency.target
DefaultDependencies=no

[Service]
Type=oneshot
ExecStart=/usr/bin/erics.sh
RemainAfterExit=yes
#Before=local-fs.target

#[erics]
#foo=bar

[Install]
WantedBy=erics.target

0 comments on commit d031c01

Please sign in to comment.