diff options
-rw-r--r-- | conf/distro/openprotium.conf | 100 | ||||
-rw-r--r-- | files/device_table-minimal-add-md.txt | 32 | ||||
-rw-r--r-- | packages/base-files/base-files/openprotium/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/base-files/base-files/openprotium/fstab | 11 | ||||
-rw-r--r-- | packages/images/openprotium-image.bb | 134 | ||||
-rwxr-xr-x | packages/initscripts/initscripts-1.0/openprotium/checkroot.sh | 2 | ||||
-rw-r--r-- | packages/initscripts/initscripts-1.0/openprotium/mountall.sh | 27 | ||||
-rwxr-xr-x | packages/initscripts/initscripts-1.0/openprotium/umountfs | 27 | ||||
-rw-r--r-- | packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh | 11 | ||||
-rw-r--r-- | packages/initscripts/initscripts-openprotium_1.0.bb | 16 | ||||
-rw-r--r-- | packages/meta/openprotium-packages.bb | 20 | ||||
-rw-r--r-- | packages/openprotium-init/files/boot/disk | 3 | ||||
-rw-r--r-- | packages/openprotium-init/files/functions | 8 | ||||
-rw-r--r-- | packages/openprotium-init/files/initscripts/zleds | 29 | ||||
-rw-r--r-- | packages/openprotium-init/openprotium-init_0.10.bb | 5 | ||||
-rw-r--r-- | packages/tasks/task-openprotium.bb | 52 |
16 files changed, 286 insertions, 191 deletions
diff --git a/conf/distro/openprotium.conf b/conf/distro/openprotium.conf index 928817d815..03115118ed 100644 --- a/conf/distro/openprotium.conf +++ b/conf/distro/openprotium.conf @@ -1,69 +1,83 @@ # -# Open Iomega distribution - based on openslug and generic confs +# OpenProtium distribution - based upon openslug and generic confs # DISTRO_NAME = "openprotium" -DISTRO_VERSION = ".dev-snapshot-${SRCDATE}" -DISTRO_TYPE = "alpha" +DISTRO_VERSION = "1.3" +DISTRO_TYPE ?= "alpha" +TARGET_OS = "linux" +# +# Basic configuration +# +DISTRO_DEV_MANAGER = "udev" +DISTRO_SSH_DAEMON = "dropbear" +DISTRO_INIT_MANAGER = "sysvinit" +DISTRO_LOGIN_MANAGER = "tinylogin" +MACHINE_TASK_PROVIDER = "task-openprotium" # # Naming schemes # -INHERIT += "debian" +INHERIT += "debian multimachine" # # Packaging and output format # INHERIT += "package_ipk" -IMAGE_BASENAME = "openprotium" -IMAGE_FSTYPES = "jffs2" -FEED_URIS = "openprotium##http://www.openprotium.org/ipkg.ppc.v1.0" +IMAGE_FSTYPES = "jffs2 tar.gz" +OPENPROTIUM_URI = "http://www.openprotium.org" +FEED_ARCH ?= ${PACKAGE_ARCH} +FEED_URIS = "\ + no-arch##${OPENPROTIUM_URI}/releases/${DISTRO_VERSION}/all \ + base##${OPENPROTIUM_URI}/releases/${DISTRO_VERSION}/${FEED_ARCH} \ + ${MACHINE}##${OPENPROTIUM_URI}/releases/${DISTRO_VERSION}/${MACHINE} \ + " # For protium on the turbostation +IMAGE_BASENAME = "openprotium" IMAGE_BASENAME_turbostation = "openprotium-ts" -# -# binutils and compilers -# -PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" -PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc:gcc-cross" -PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}g++:gcc-cross" -#conflict between this and the last below. -#PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}libc-for-gcc:glibc" -# Select 2.6 versions of the depmod support -PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross" -PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}libc-for-gcc:glibc-intermediate" +# versions +PREFERRED_VERSION_binutils ?= "2.18" +PREFERRED_VERSION_binutils-cross ?= "2.18" -PREFERRED_VERSION_binutils = "2.16" -PREFERRED_VERSION_binutils-cross = "2.16" +PREFERRED_VERSION_gcc ?= "4.1.1" +PREFERRED_VERSION_gcc-cross ?= "4.1.2" +PREFERRED_VERSION_gcc-cross-sdk ?= "4.1.2" +PREFERRED_VERSION_gcc-cross-initial ?= "4.1.2" -PREFERRED_VERSION_gcc = "4.1.1" -PREFERRED_VERSION_gcc-cross = "4.1.1" -PREFERRED_VERSION_gcc-cross-initial = "4.1.1" +PREFERRED_VERSION_glibc = "2.6.1" +PREFERRED_VERSION_glibc-intermediate = "2.6.1" +PREFERRED_VERSION_glibc-initial = "2.6.1" -PREFERRED_VERSION_glibc = "2.5" -PREFERRED_VERSION_glibc-intermediate = "2.5" -PREFERRED_VERSION_glibc-initial = "2.3.2" +PREFERRED_VERSION_linux-libc-headers = "2.6.11.1" -# -# Target OS & FPU system # -USE_NLS ?= "no" -TARGET_OS = "linux" -HOTPLUG = "udev" -PREFERRED_PROVIDER_virtual/libiconv = "glibc" -PREFERRED_PROVIDER_virtual/libintl = "glibc" - +# Providers... # -# Bootstrap & Init +# binutils and compilers # -#PREFERRED_PROVIDER_task-bootstrap = "task-bootstrap" -require conf/distro/include/sane-srcdates.inc +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" + +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/powerpc-linux-libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/powerpc-linux-libc-initial = "glibc-initial" + +PREFERRED_PROVIDER_virtual/libc = "glibc" +PREFERRED_PROVIDER_virtual/libiconv = "glibc" +PREFERRED_PROVIDER_virtual/libintl = "glibc" + +#silence a warning message... +PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers" + # +# Misc items. # -# Ensure consistency across all SlugOS builds for the provider of a -# relational database - use the latest version of the SleepyCat -# Berkeley database -PREFERRED_PROVIDER_virtual/db = "db" -PREFERRED_PROVIDER_virtual/db-native = "db-native" +PREFERRED_PROVIDER_virtual/db ?= "db" +PREFERRED_PROVIDER_virtual/db-native ?= "db-native" +PREFERRED_PROVIDER_gconf ?= "gconf" -CMDLINE_DEBUG = "noirqdebug" +require conf/distro/include/sane-srcdates.inc +require conf/distro/include/sane-srcrevs.inc diff --git a/files/device_table-minimal-add-md.txt b/files/device_table-minimal-add-md.txt new file mode 100644 index 0000000000..a78ca76605 --- /dev/null +++ b/files/device_table-minimal-add-md.txt @@ -0,0 +1,32 @@ +#<path> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count> +#/dev/mem c 640 0 0 1 1 0 0 - +# +#type can be one of: +# f A regular file +# d Directory +# c Character special device file +# b Block special device file +# p Fifo (named pipe) + +/dev d 755 0 0 - - - - - +/dev/initctl p 600 0 0 - - - - - +/dev/apm_bios c 660 0 46 10 134 - - - +/dev/fb0 c 600 0 0 29 0 - - - +/dev/hda b 660 0 6 3 0 - - - +/dev/hda b 660 0 6 3 1 1 1 5 +/dev/kmem c 640 0 15 1 2 - - - +/dev/mem c 640 0 15 1 1 - - - +/dev/null c 666 0 0 1 3 - - - +/dev/ram b 640 0 0 1 0 0 1 4 +/dev/tty c 662 0 5 5 0 - - - +/dev/tty c 666 0 5 4 0 0 1 9 +/dev/ttyS c 640 0 5 4 64 0 1 2 +/dev/ttySA c 640 0 5 204 5 0 1 1 +/dev/zero c 644 0 0 1 5 - - - +/dev/mtd c 660 0 6 90 0 0 2 8 +/dev/mtdblock b 640 0 0 31 0 0 1 8 +/dev/console c 662 0 5 5 1 - - - +/dev/random c 644 0 0 1 8 - - - +/dev/urandom c 644 0 0 1 9 - - - +/dev/ptmx c 644 0 0 5 2 - - - +/dev/md b 644 0 0 9 0 0 1 4 diff --git a/packages/base-files/base-files/openprotium/.mtn2git_empty b/packages/base-files/base-files/openprotium/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/base-files/base-files/openprotium/.mtn2git_empty diff --git a/packages/base-files/base-files/openprotium/fstab b/packages/base-files/base-files/openprotium/fstab new file mode 100644 index 0000000000..96b0e2adb8 --- /dev/null +++ b/packages/base-files/base-files/openprotium/fstab @@ -0,0 +1,11 @@ +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbfs /proc/bus/usb usbfs defaults 0 0 +#tmpfs /var/volatile tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +#tmpfs /media/ram tmpfs defaults 0 0 + +# uncomment this if your device has a SD/MMC/Transflash slot +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + diff --git a/packages/images/openprotium-image.bb b/packages/images/openprotium-image.bb index 818fd0b186..0f64ba2052 100644 --- a/packages/images/openprotium-image.bb +++ b/packages/images/openprotium-image.bb @@ -1,128 +1,28 @@ DESCRIPTION = "OpenProtium image" HOMEPAGE = "http://www.openprotium.com" -DEPENDS = "${MACHINE_TASK_PROVIDER}" -EXTRA_IMAGECMD_jffs2 = "--pad --big-endian --eraseblock=0x10000 -D ${SLUGOS_DEVICE_TABLE}" +DEPENDS = "task-openprotium" +IMAGE_INSTALL = "task-openprotium" IMAGE_LINGUAS = "" -# Setting USE_DEVFS prevents *any* entries being created initially -# in /dev -USE_DEVFS = "1" +IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DISTRO_VERSION}" +PACKAGE_REMOVE = "kernel-image-* task-openprotium" -# This is passed to the image command to build the correct /dev -# directory (because only the image program can make actual -# dev entries!) -SLUGOS_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-slugos.txt')}" +USE_DEVFS = "1" +OPENPROTIUM_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal-add-md.txt')}" +EXTRA_IMAGECMD_jffs2 += " -D ${OPENPROTIUM_DEVICE_TABLE}" -# IMAGE_PREPROCESS_COMMAND is run before making the image. -# We use this to do a few things: -# . remove the uImage, which is in a separate part of the flash already. -# . adjust the default run level (sysvinit is 5 by default, we like 3) -# . set a default root password, which is no more secure than a blank one -# (since it is documented, in case you were wondering) -# . make the boot more verbose -# -IMAGE_PREPROCESS_COMMAND += "rm ${IMAGE_ROOTFS}/boot/uImage-*;" -IMAGE_PREPROCESS_COMMAND += "sed -i -es,^id:5:initdefault:,id:3:initdefault:, ${IMAGE_ROOTFS}/etc/inittab;" +IMAGE_PREPROCESS_COMMAND += "install -c -m 644 ${OPENPROTIUM_DEVICE_TABLE} ${IMAGE_ROOTFS}/etc/device_table;" +IMAGE_PREPROCESS_COMMAND += "sed -i -es,^id:5:initdefault:,id:3:initdefault:, ${IMAGE_ROOTFS}/etc/inittab;" IMAGE_PREPROCESS_COMMAND += "sed -i -es,^root::0,root:BTMzOOAQfESg6:0, ${IMAGE_ROOTFS}/etc/passwd;" IMAGE_PREPROCESS_COMMAND += "sed -i -es,^VERBOSE=no,VERBOSE=very, ${IMAGE_ROOTFS}/etc/default/rcS;" +IMAGE_PREPROCESS_COMMAND += "sed -i -es,^VOLATILE_ENABLE_CACHE=yes,VOLATILE_ENABLE_CACHE=no, ${IMAGE_ROOTFS}/etc/default/rcS;" +IMAGE_PREPROCESS_COMMAND += "sed -i -es,/dev/tty0,/dev/console, ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh;" +IMAGE_PREPROCESS_COMMAND += "echo /dev/md >> ${IMAGE_ROOTFS}/etc/udev/mount.blacklist;" +IMAGE_PREPROCESS_COMMAND += "echo /dev/hd >> ${IMAGE_ROOTFS}/etc/udev/mount.blacklist;" +IMAGE_PREPROCESS_COMMAND += "echo /dev/mtd3 0x30000 0x10000 0x10000 > ${IMAGE_ROOTFS}/etc/fw_env.config;" -# Always just make a new flash image. -PACK_IMAGE = 'storcenter_pack_image;' -IMAGE_POSTPROCESS_COMMAND += "${PACK_IMAGE}" -PACK_IMAGE_DEPENDS = "" -#EXTRA_IMAGEDEPENDS += "${PACK_IMAGE_DEPENDS}" - -# This hack removes '${MACHINE}' from the end of the arch.conf for ipk, -# preventing _mach.ipk (with no byte sex) taking precedence over everything -# else. -# but we want 'storcenter' in there so kernel modules work correctly. -# -#ROOTFS_POSTPROCESS_COMMAND += "sed -i '$d' '${IMAGE_ROOTFS}/etc/ipkg/arch.conf';" - -# These depends define native utilities - they do not get put in the flash and -# are not required to build the image. -IMAGE_TOOLS = "" -#EXTRA_IMAGEDEPENDS += "${IMAGE_TOOLS}" - -# CONFIG: -# SLUGOS_EXTRA_RDEPENDS: set in conf, things to add to the image -# SLUGOS_SUPPORT: set to here, see below, added to the image. -# SLUGOS_KERNEL: set here, kernel modules added to the image -# -# Do not override the last two unless you really know what you -# are doing - there is more information below. - -# diff, cpio and find are required for reflash and turnup ram. -# Removing these probably leaves the system bootable, but standard -# openslug and ucslugc stuff won't work, so only take these out in -# very non-standard turnkey slugos builds. -# -# udev is the default way of handling devices, there is no guarantee -# that the static device table is completely correct (it is just -# known to be sufficient for boot.) -# we'ere still on 2.6.12 devfs.... -#OPENPROTIUM_SUPPORT ?= "diffutils cpio findutils udev" -# -OPENPROTIUM_SUPPORT ?= "diffutils cpio findutils uboot-utils" - -# kernel-module-af-packet must be in the image for DHCP to work -# kernel-module-netconsole is here because it is small and is -# highly useful on minimal systems (which really don't have anywhere -# other than the network to output error messages!) -SLUGOS_KERNEL ?= "kernel-module-af-packet kernel-module-netconsole \ - kernel-module-mii " - -# this gets /lib/modules made.... -OPENPROTIUM_KERNEL = "kernel-module-dummy \ - kernel-module-af-packet " - -IMAGE_INSTALL = " \ - kernel base-files base-passwd netbase \ - busybox initscripts-openprotium openprotium-init \ - update-modules sysvinit tinylogin \ - module-init-tools-depmod modutils-initscripts \ - ipkg-collateral ipkg ipkg-link \ - libgcc1 \ - portmap \ - dropbear \ - e2fsprogs-blkid \ - mdadm \ - hdparm \ - mtd-utils \ - ${OPENPROTIUM_SUPPORT} \ - ${OPENPROTIUM_KERNEL} " -# ${SLUGOS_EXTRA_RDEPENDS}" - -inherit image +ROOTFS_POSTPROCESS_COMMAND += "ipkg-cl ${IPKG_ARGS} -force-depends \ + remove ${PACKAGE_REMOVE};" -storcenter_pack_image() { - # find latest kernel - KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` - if [ -z "$KERNEL" ]; then - oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Bitbake linux-storcenter to create one." - exit 1 - fi - ROOTFS=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 - OUTPUT=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flash.img - PADFILE=${DEPLOY_DIR_IMAGE}/padfile.zzz - HEX_MAX_KERN_SIZE=170000 - DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc ` - HEX_MAX_ROOT_SIZE=590000 - DEC_MAX_ROOT_SIZE=`echo "ibase=16; $HEX_MAX_ROOT_SIZE" | bc ` - KERNEL_SIZE=`ls -l $KERNEL | awk '{print $5}'` - if [ $KERNEL_SIZE -gt $DEC_MAX_KERN_SIZE ]; then - oefatal "Kernel too large at $KERNEL_SIZE bytes. Max is $DEC_MAX_KERN_SIZE." - exit 1 - fi - ROOT_SIZE=`ls -l $ROOTFS | awk '{print $5}'` - if [ $ROOT_SIZE -gt $DEC_MAX_ROOT_SIZE ]; then - oefatal "Rootfs is too large at $ROOT_SIZE bytes. Max is $DEC_MAX_ROOT_SIZE." - exit 1 - fi - PAD_SIZE=`echo "$DEC_MAX_KERN_SIZE - $KERNEL_SIZE" | bc ` - dd if=/dev/zero of=$PADFILE bs=$PAD_SIZE count=1 2>>/dev/null - cat $KERNEL $PADFILE $ROOTFS > $OUTPUT - rm -f $PADFILE - ls -l $OUTPUT -} +inherit image concatenated-image diff --git a/packages/initscripts/initscripts-1.0/openprotium/checkroot.sh b/packages/initscripts/initscripts-1.0/openprotium/checkroot.sh index c69a773482..6b63b07188 100755 --- a/packages/initscripts/initscripts-1.0/openprotium/checkroot.sh +++ b/packages/initscripts/initscripts-1.0/openprotium/checkroot.sh @@ -205,7 +205,7 @@ then : > /etc/mtab fi mount -f -o remount / - mount -f /proc + grep -q '^proc /proc' /etc/mtab || mount -f /proc test "$devfs" && grep -q '^devfs /dev' /proc/mounts && mount -f "$devfs" fi diff --git a/packages/initscripts/initscripts-1.0/openprotium/mountall.sh b/packages/initscripts/initscripts-1.0/openprotium/mountall.sh new file mode 100644 index 0000000000..94ea8217fd --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openprotium/mountall.sh @@ -0,0 +1,27 @@ +# +# mountall.sh Mount all filesystems. +# +# Version: @(#)mountall.sh 2.83-2 01-Nov-2001 miquels@cistron.nl +# +. /etc/default/rcS + +# +# Mount local filesystems in /etc/fstab. For some reason, people +# might want to mount "proc" several times, and mount -v complains +# about this. So we mount "proc" filesystems without -v. +# +test "$VERBOSE" != no && echo "Mounting local filesystems..." +mount -at nonfs,nosmbfs,noncpfs 2>/dev/null + +# +# We might have mounted something over /dev, see if /dev/initctl is there. +# +if test ! -p /dev/initctl +then + rm -f /dev/initctl + mknod -m 600 /dev/initctl p +fi +kill -USR1 1 + +: exit 0 + diff --git a/packages/initscripts/initscripts-1.0/openprotium/umountfs b/packages/initscripts/initscripts-1.0/openprotium/umountfs new file mode 100755 index 0000000000..e489c4c1cd --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openprotium/umountfs @@ -0,0 +1,27 @@ +#! /bin/sh +# +# umountfs Turn off swap and unmount all local filesystems. +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +echo "Deactivating swap..." +swapoff -a + +# We leave /proc mounted. +echo "Unmounting local filesystems..." +# umount anything not a pseudo file system, and not root +# doesn't work for nested mounts at a non-root mount point +while read device mountpt fstype options +do + echo "$device" | grep -q "^/" + if [ $? -eq 0 ]; then + if [ "$mountpt" != "/" ] && [ "$mountpt" != "/dev/" ]; then + umount $mountpt + fi + fi +done</proc/mounts + +mount -o remount,ro / + +: exit 0 diff --git a/packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh b/packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh new file mode 100644 index 0000000000..6ee0d50e84 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# umount the static dev - we'd probably never use it. +# +[ -d /dev/.static/dev ] && umount /dev/.static/dev +# +# if a root is found on an ext* filesystem, umount the old initrd +# +grep -q "/ ext" /proc/mounts +if [ $? -eq 0 ]; then + umount /initrd +fi diff --git a/packages/initscripts/initscripts-openprotium_1.0.bb b/packages/initscripts/initscripts-openprotium_1.0.bb index 83e89ef7a1..890bbd756c 100644 --- a/packages/initscripts/initscripts-openprotium_1.0.bb +++ b/packages/initscripts/initscripts-openprotium_1.0.bb @@ -24,16 +24,16 @@ SRC_URI += "file://openprotium/halt" SRC_URI += "file://openprotium/reboot" SRC_URI += "file://openprotium/flashclean" SRC_URI += "file://openprotium/checkroot.sh" +SRC_URI += "file://openprotium/mountall.sh" +SRC_URI += "file://openprotium/umountinitrd.sh" +SRC_URI += "file://openprotium/umountfs" # Without this it is not possible to patch checkroot.sh S = "${WORKDIR}" do_install_append() { - # the image build command now installs this for slugos - # except that mine doesn't. we don't need it, but we turnup - # expects it to at least exist - rm ${D}${sysconfdir}/device_table - touch ${D}${sysconfdir}/device_table + #rm ${D}${sysconfdir}/device_table + #touch ${D}${sysconfdir}/device_table # openprotium specific scripts # install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d @@ -44,6 +44,8 @@ do_install_append() { install -m 0755 ${WORKDIR}/openprotium/devices ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/openprotium/flashclean ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/openprotium/checkroot.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openprotium/mountall.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openprotium/umountinitrd.sh ${D}${sysconfdir}/init.d # Remove the do install links (this detects a change to the # initscripts .bb file - it will cause a build failure here.) @@ -130,7 +132,7 @@ do_install_append() { # slugos network syslog starts here (44) update-rc.d -r ${D} mountnfs.sh start 45 S . - update-rc.d -r ${D} bootmisc.sh start 55 S . + # update-rc.d -r ${D} bootmisc.sh start 55 S . # urandom is currently disabled from S 55 (and won't work with tmpfs /var) # ipkg-cl configure runs at S 98 @@ -158,7 +160,7 @@ do_install_append() { # This is the special, correct, slugos umountnfs.sh (it looks in # the /proc/mounts information, not /etc/fstab) update-rc.d -r ${D} umountnfs.sh start 31 0 6 . - update-rc.d -r ${D} save-rtc.sh start 25 0 6 . + # update-rc.d -r ${D} save-rtc.sh start 25 0 6 . # portmap stops at 32 # slugos network syslog stops here (39) # networking stops at 40 (nothing else does, believe me.) diff --git a/packages/meta/openprotium-packages.bb b/packages/meta/openprotium-packages.bb index 3df2f5e3b2..7d66ee5d61 100644 --- a/packages/meta/openprotium-packages.bb +++ b/packages/meta/openprotium-packages.bb @@ -30,13 +30,14 @@ inherit meta # flac \ # gphoto2 \ # gdb \ -# glib-2.0 \ # lirc \ # masqmail \ # wakelan \ # wireless-tools \ # wpa-supplicant \ +# openldap \ # bluez-utils-nodbus \ +# lcdproc \ # libxml2 \ # libdvb \ # madwifi-ng \ @@ -53,7 +54,13 @@ inherit meta # samba \ # sane-backends \ # vsftpd \ +# syslog-ng \ # zd1211 \ +# cdparanoia \ +# litestream \ +# pvrusb2-mci \ +# pwc \ +# fetchmail \ OPENPROTIUM_PACKAGES = "\ alsa-lib \ @@ -70,7 +77,6 @@ OPENPROTIUM_PACKAGES = "\ bridge-utils \ bzip2 \ ccxstream \ - cdparanoia \ cdstatus \ coreutils \ cron \ @@ -85,7 +91,6 @@ OPENPROTIUM_PACKAGES = "\ e2fsprogs-libs \ expat \ ez-ipupdate \ - fetchmail \ file \ findutils \ flex \ @@ -94,6 +99,7 @@ OPENPROTIUM_PACKAGES = "\ gawk \ gcc \ gdbm \ + glib-2.0 \ gnu-config \ grep \ gtk-doc \ @@ -105,8 +111,6 @@ OPENPROTIUM_PACKAGES = "\ ircp \ joe \ jpeg \ - lcdproc \ - less \ libao \ libid3tag \ liblockfile \ @@ -119,7 +123,6 @@ OPENPROTIUM_PACKAGES = "\ libupnp \ libusb \ libvorbis \ - litestream \ lrzsz \ lsof \ lvm2 \ @@ -144,7 +147,6 @@ OPENPROTIUM_PACKAGES = "\ nmap \ ntp \ openobex-apps \ - openldap \ openntpd \ openobex \ openssh \ @@ -156,8 +158,6 @@ OPENPROTIUM_PACKAGES = "\ pkgconfig \ ppp \ procps \ - pvrusb2-mci \ - pwc \ quilt \ rng-tools \ rsync \ @@ -169,7 +169,6 @@ OPENPROTIUM_PACKAGES = "\ strace \ streamripper \ sysfsutils \ - syslog-ng \ tar \ thttpd \ tiff \ @@ -178,7 +177,6 @@ OPENPROTIUM_PACKAGES = "\ util-linux \ vim \ vlan \ - watchdog \ wget \ zip \ zlib \ diff --git a/packages/openprotium-init/files/boot/disk b/packages/openprotium-init/files/boot/disk index b4bbaf1f3c..e1096e225a 100644 --- a/packages/openprotium-init/files/boot/disk +++ b/packages/openprotium-init/files/boot/disk @@ -25,9 +25,6 @@ then sleep=6 test "$sleep" -gt 0 && sleep "$sleep" else - # make the device links so turnup can use short disk names. - # probably only necessary on devfs based systems. - /etc/init.d/devices start scc -l redflash -f auto fi # diff --git a/packages/openprotium-init/files/functions b/packages/openprotium-init/files/functions index 25832cf3f9..2700551cc4 100644 --- a/packages/openprotium-init/files/functions +++ b/packages/openprotium-init/files/functions @@ -65,21 +65,13 @@ load_functions(){ # use this rather than hard-wiring the device because the partition # table can change - looking in /proc/mtd is more reliable. mtdev(){ - if test $(machine) = storcenter ; then - sed -n 's!^mtd\([0-9][0-9]*\):[^"]*"'"$1"'"$!/dev/mtd/\1!p' /proc/mtd - else sed -n 's!^\(mtd[0-9][0-9]*\):[^"]*"'"$1"'"$!/dev/\1!p' /proc/mtd - fi } # # mtblockdev "name" # as mtdev but output the name of the block (not character) device mtblockdev(){ - if test "$(machine)" = storcenter ; then - sed -n 's!^mtd\([0-9][0-9]*\):[^"]*"'"$1"'"$!/dev/mtdblock/\1!p' /proc/mtd - else sed -n 's!^mtd\([0-9][0-9]*\):[^"]*"'"$1"'"$!/dev/mtdblock\1!p' /proc/mtd - fi } # # mtsize "name" diff --git a/packages/openprotium-init/files/initscripts/zleds b/packages/openprotium-init/files/initscripts/zleds new file mode 100644 index 0000000000..37adb8490e --- /dev/null +++ b/packages/openprotium-init/files/initscripts/zleds @@ -0,0 +1,29 @@ +#!/bin/sh +# +# This script is executed at the start and end of each run-level +# transition. It is the first 'stop' script and the last 'start' +# script. +# +# 'stop' indicates the start of a runlevel change +# 'start' at the end of the runlevel change - we are in the new +# runlevel. +# +# state outputs 'system', 'user' etc according the the nature of +# the runlevel it is passed (the *new* runlevel is used). +state(){ + case "$1" in + S|N) echo system;; + 0|6) echo shutdown;; + 1) echo singleuser;; + 2|3|4|5) echo user;; + *) echo "led change: $runlevel: runlevel unknown" >&2 + echo system;; + esac +} + +case "$1" in +start) scc -l blue -f auto;; +stop) scc -l redflash;; +*) echo "led change: $1: command ignored" >&2 + ;; +esac diff --git a/packages/openprotium-init/openprotium-init_0.10.bb b/packages/openprotium-init/openprotium-init_0.10.bb index 92c9d789cb..f8facbb36f 100644 --- a/packages/openprotium-init/openprotium-init_0.10.bb +++ b/packages/openprotium-init/openprotium-init_0.10.bb @@ -19,6 +19,7 @@ SRC_URI = "file://boot/flash \ file://initscripts/sysconfsetup \ file://initscripts/umountinitrd.sh \ file://initscripts/loadmodules.sh \ + file://initscripts/zleds \ file://functions \ file://modulefunctions \ file://conffiles \ @@ -35,7 +36,7 @@ SCRIPTS = "turnup reflash sysconf" BOOTSCRIPTS = "flash disk nfs network udhcpc.script" INITSCRIPTS = "syslog.buffer syslog.file syslog.network \ rmrecovery sysconfsetup umountinitrd.sh \ - fixfstab loadmodules.sh" + fixfstab loadmodules.sh zleds" # This just makes things easier... @@ -129,6 +130,8 @@ pkg_postinst_openprotium-init() { update-rc.d $opt syslog.file start 39 S . start 47 0 6 . update-rc.d $opt syslog.network start 44 S . start 39 0 6 . update-rc.d $opt rmrecovery start 99 1 2 3 4 5 . + update-rc.d $opt zleds start 99 1 2 3 4 5 . stop 5 0 1 2 3 4 5 6 . + } pkg_postrm_openprotium-init() { diff --git a/packages/tasks/task-openprotium.bb b/packages/tasks/task-openprotium.bb new file mode 100644 index 0000000000..4c5d762f8f --- /dev/null +++ b/packages/tasks/task-openprotium.bb @@ -0,0 +1,52 @@ +DESCRIPTION = "Basic image for openprotium" +HOMEPAGE = "http://www.openprotium.org" +PACKAGE_ARCH = "${MACHINE_ARCH}" +ALLOW_EMPTY = "1" +PR = "r1" + +inherit task + +# be sure to build the kernel: +DEPENDS = "virtual/kernel" + +# always make this one for testing. +DISTRO_KERNEL_MODULES = "kernel-module-dummy" +# do we still need this? +DISTRO_KERNEL_MODULES += "kernel-module-af-packet" +# unused for now +#DISTRO_KERNEL_MODULES += "kernel-module-netconsole" + +# these are listed separately because the are not needed +# for boot, but are needed by reflash, etc. +DISTRO_EXTRA_RDEPENDS += "diffutils cpio findutils" + +# pick up the fw_set/get env utils. +DISTRO_EXTRA_RDEPENDS += "u-boot-utils" + +RDEPENDS = " kernel \ + base-files \ + base-passwd \ + netbase \ + busybox \ + openprotium-init \ + initscripts-openprotium \ + update-modules \ + module-init-tools \ + modutils-initscripts \ + ipkg-collateral ipkg ipkg-link \ + portmap \ + e2fsprogs-blkid \ + mdadm \ + hdparm \ + mtd-utils \ + ${DISTRO_SSH_DAEMON} \ + ${DISTRO_DEV_MANAGER} \ + ${DISTRO_INIT_MANAGER} \ + ${DISTRO_LOGIN_MANAGER} \ + ${DISTRO_KERNEL_MODULES} \ + ${MACHINE_EXTRA_RDEPENDS} \ + ${DISTRO_EXTRA_RDEPENDS} " + +RRECOMMENDS += " \ + ${DISTRO_EXTRA_RRECOMMENDS} \ + ${MACHINE_EXTRA_RRECOMMENDS}" |