[oe-commits] org.oe.dev Numerous openprotium fixes as we transition to udev based root

awilcox commit openembedded-commits at lists.openembedded.org
Wed Jan 16 08:53:43 UTC 2008


Numerous openprotium fixes as we transition to udev based root 
and task based build

Author: awilcox at openembedded.org
Branch: org.openembedded.dev
Revision: 3caac13a21da93a3af0a8093fe60883fccd0399f
ViewMTN: http://monotone.openembedded.org/revision/info/3caac13a21da93a3af0a8093fe60883fccd0399f
Files:
1
packages/base-files/base-files/openprotium
files/device_table-minimal-add-md.txt
packages/base-files/base-files/openprotium/fstab
packages/initscripts/initscripts-1.0/openprotium/mountall.sh
packages/initscripts/initscripts-1.0/openprotium/umountfs
packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh
packages/openprotium-init/files/initscripts/zleds
packages/tasks/task-openprotium.bb
conf/distro/openprotium.conf
packages/images/openprotium-image.bb
packages/initscripts/initscripts-1.0/openprotium/checkroot.sh
packages/initscripts/initscripts-openprotium_1.0.bb
packages/meta/openprotium-packages.bb
packages/openprotium-init/files/boot/disk
packages/openprotium-init/files/functions
packages/openprotium-init/openprotium-init_0.10.bb
mtn:execute
true
Diffs:

#
# mt diff -r6dc2b7f1365ad315ef735865c2808ec95c79047f -r3caac13a21da93a3af0a8093fe60883fccd0399f
#
# 
# 
# add_dir "packages/base-files/base-files/openprotium"
# 
# add_file "files/device_table-minimal-add-md.txt"
#  content [ae6bd8642d9e518aab41355d5c27bdec63bafc6c]
# 
# add_file "packages/base-files/base-files/openprotium/fstab"
#  content [a3a9a408f7e276985ac09ed6e14bf3e672676856]
# 
# add_file "packages/initscripts/initscripts-1.0/openprotium/mountall.sh"
#  content [d53ec5b8db4e854e32ae7bc9a2c949e2bb0d38cc]
# 
# add_file "packages/initscripts/initscripts-1.0/openprotium/umountfs"
#  content [749892a0259d793808e7b662b57ea68b0f8fe9c6]
# 
# add_file "packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh"
#  content [a3fa7aecc33c8f0216c2504ac53f053501e30697]
# 
# add_file "packages/openprotium-init/files/initscripts/zleds"
#  content [3d4888975ea9811709433fbce07f001e26d19d28]
# 
# add_file "packages/tasks/task-openprotium.bb"
#  content [7090386f8c1b7a38d12c4fdb13407565d809e031]
# 
# patch "conf/distro/openprotium.conf"
#  from [d345e4ef53818feb39363427341b7abc8cfc6c1b]
#    to [675a168a57ce9b21aa838b950b5ae0da07243da2]
# 
# patch "packages/images/openprotium-image.bb"
#  from [738026dd8e8a9e3fe4c7be21ad6fad4da91da8a3]
#    to [ab2373e1108751ee0b8e734687d6d4b87be44c6d]
# 
# patch "packages/initscripts/initscripts-1.0/openprotium/checkroot.sh"
#  from [be2c20e222501bc76ef7036e5fda2919945c459d]
#    to [764ae12dffbfe2adf0892cb451a8bab8dd388bc9]
# 
# patch "packages/initscripts/initscripts-openprotium_1.0.bb"
#  from [f52645d9a73aa94d16e2d4624e3fbf409d7369c4]
#    to [425b3202077871f3552305e98cd10aa8e644fa6f]
# 
# patch "packages/meta/openprotium-packages.bb"
#  from [8bb8ff3b1e2bf980e7c838dccfd08ab50c2aea53]
#    to [950069360e5b3d79719a0f164a9ee2837f936142]
# 
# patch "packages/openprotium-init/files/boot/disk"
#  from [9013d8fc4ac2debd474c52e9d86794b9d64cca74]
#    to [83a37d36cafcd58705933a00ae01f29dc6ea504a]
# 
# patch "packages/openprotium-init/files/functions"
#  from [4b0704488f3f4dcbc4d79d07888c4d57870921e9]
#    to [1fde4b0325e7b2ee523d41e8733c5c6176f0579c]
# 
# patch "packages/openprotium-init/openprotium-init_0.10.bb"
#  from [a82f9e20c41b709f3ffb67651d5ac9cb4951ea19]
#    to [1aec976cda95b20c26da75d8c111432f03177fb1]
# 
#   set "packages/initscripts/initscripts-1.0/openprotium/umountfs"
#  attr "mtn:execute"
# value "true"
# 
============================================================
--- files/device_table-minimal-add-md.txt	ae6bd8642d9e518aab41355d5c27bdec63bafc6c
+++ files/device_table-minimal-add-md.txt	ae6bd8642d9e518aab41355d5c27bdec63bafc6c
@@ -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
============================================================
--- packages/base-files/base-files/openprotium/fstab	a3a9a408f7e276985ac09ed6e14bf3e672676856
+++ packages/base-files/base-files/openprotium/fstab	a3a9a408f7e276985ac09ed6e14bf3e672676856
@@ -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
+
============================================================
--- packages/initscripts/initscripts-1.0/openprotium/mountall.sh	d53ec5b8db4e854e32ae7bc9a2c949e2bb0d38cc
+++ packages/initscripts/initscripts-1.0/openprotium/mountall.sh	d53ec5b8db4e854e32ae7bc9a2c949e2bb0d38cc
@@ -0,0 +1,27 @@
+#
+# mountall.sh	Mount all filesystems.
+#
+# Version:	@(#)mountall.sh  2.83-2  01-Nov-2001  miquels at 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
+
============================================================
--- packages/initscripts/initscripts-1.0/openprotium/umountfs	749892a0259d793808e7b662b57ea68b0f8fe9c6
+++ packages/initscripts/initscripts-1.0/openprotium/umountfs	749892a0259d793808e7b662b57ea68b0f8fe9c6
@@ -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
============================================================
--- packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh	a3fa7aecc33c8f0216c2504ac53f053501e30697
+++ packages/initscripts/initscripts-1.0/openprotium/umountinitrd.sh	a3fa7aecc33c8f0216c2504ac53f053501e30697
@@ -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
============================================================
--- packages/openprotium-init/files/initscripts/zleds	3d4888975ea9811709433fbce07f001e26d19d28
+++ packages/openprotium-init/files/initscripts/zleds	3d4888975ea9811709433fbce07f001e26d19d28
@@ -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
============================================================
--- packages/tasks/task-openprotium.bb	7090386f8c1b7a38d12c4fdb13407565d809e031
+++ packages/tasks/task-openprotium.bb	7090386f8c1b7a38d12c4fdb13407565d809e031
@@ -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}"
============================================================
--- conf/distro/openprotium.conf	d345e4ef53818feb39363427341b7abc8cfc6c1b
+++ conf/distro/openprotium.conf	675a168a57ce9b21aa838b950b5ae0da07243da2
@@ -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"
+# Providers...
+#
+# binutils and compilers
+#
+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"
+PREFERRED_PROVIDER_virtual/libintl  = "glibc"
 
+#silence a warning message...
+PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
+
 #
-# Bootstrap & Init
+# Misc items.
 #
-#PREFERRED_PROVIDER_task-bootstrap = "task-bootstrap"
-require conf/distro/include/sane-srcdates.inc
-#
-#
-# 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"
 
+require conf/distro/include/sane-srcdates.inc
+require conf/distro/include/sane-srcrevs.inc
-CMDLINE_DEBUG = "noirqdebug"
============================================================
--- packages/images/openprotium-image.bb	738026dd8e8a9e3fe4c7be21ad6fad4da91da8a3
+++ packages/images/openprotium-image.bb	ab2373e1108751ee0b8e734687d6d4b87be44c6d
@@ -1,128 +1,28 @@ HOMEPAGE = "http://www.openprotium.com"
 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, $%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list