From b294f7bd556fb724296aa68599bddc5e52ca2557 Mon Sep 17 00:00:00 2001 From: Matt Reimer Date: Fri, 15 Dec 2006 02:02:05 +0000 Subject: Add a bb for python gstreamer bindings. --- packages/python/python-gstreamer_0.10.6.bb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/python/python-gstreamer_0.10.6.bb diff --git a/packages/python/python-gstreamer_0.10.6.bb b/packages/python/python-gstreamer_0.10.6.bb new file mode 100644 index 0000000000..28dba93cb5 --- /dev/null +++ b/packages/python/python-gstreamer_0.10.6.bb @@ -0,0 +1,16 @@ +LICENSE = "GPL" +DESCRIPTION = "Python gstreamer Bindings" +SECTION = "devel/python" +HOMEPAGE = "http://gstreamer.freedesktop.org" +PRIORITY = "optional" +#DEPENDS = "gstreamer" +#RDEPENDS = "gstreamer" + +SRC_URI = "http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.gz" +S = "${WORKDIR}/gst-python-${PV}" + +inherit autotools pkgconfig + +do_configure() { + oe_runconf +} -- cgit v1.2.3 From f532a6bdb19dc50a6f50c1205adb00a5615faa8b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 7 Mar 2007 09:02:58 +0000 Subject: angstrom: add feed arch for the neo1973 --- conf/distro/angstrom-2007.1.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/angstrom-2007.1.conf b/conf/distro/angstrom-2007.1.conf index d6766bedbc..b0d5f83768 100644 --- a/conf/distro/angstrom-2007.1.conf +++ b/conf/distro/angstrom-2007.1.conf @@ -35,6 +35,7 @@ FEED_ARCH ?= "${TARGET_ARCH}" FEED_ARCH_ep93xx = "armv4t" FEED_ARCH_h6300 = "armv4t" +FEED_ARCH_fic-gta01 = "armv4t" #armv5t machines -- cgit v1.2.3 From 221e619658f21c0c01f318959509ef432d656aff Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 7 Mar 2007 09:13:49 +0000 Subject: xserver-kdrive-common: add GTA01 support --- packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver | 3 +++ packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver b/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver index 983b875830..1753f82c88 100644 --- a/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver +++ b/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver @@ -94,6 +94,9 @@ case `module_id` in modprobe mbxfb ARGS="$ARGS -fb /dev/fb1" ;; + "GTA01") + #we set 100 dpi for the time being, should the -dpi 285 + ARGS="$ARGS -dpi 100 -screen 480x640" *) # Its a device we dont know about - in which case force # kdrive to use the current framebuffer geometry otherwise diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb index c076a3435a..e382d79ae5 100644 --- a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb +++ b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts" LICENSE = "GPL" SECTION = "x11" RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit" -PR = "r9" +PR = "r10" SRC_URI = "file://etc" S = ${WORKDIR} @@ -15,4 +15,4 @@ do_install() { rm -fR ${D}/etc/*/.svn rm -fR ${D}/etc/*/*/.svn chmod -R 755 ${D}/etc -} \ No newline at end of file +} -- cgit v1.2.3 From 81f5b137a2f606ba7d95137fd18d501e8f67ca6b Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 7 Mar 2007 09:24:51 +0000 Subject: uboot-gta01: fix parse error --- packages/uboot/uboot-gta01_svn.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uboot/uboot-gta01_svn.bb b/packages/uboot/uboot-gta01_svn.bb index b78b81dd17..0775bfcc91 100644 --- a/packages/uboot/uboot-gta01_svn.bb +++ b/packages/uboot/uboot-gta01_svn.bb @@ -1,5 +1,5 @@ DESCRIPTION = "U-boot bootloader w/ Neo1973 (GTA01) support" -AUTHOR = "Harald Welte +AUTHOR = "Harald Welte " LICENSE = "GPL" SECTION = "bootloader" PRIORITY = "optional" -- cgit v1.2.3 From 42f9ffa88b51752842deb20797feafd528b8e7b9 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 7 Mar 2007 09:38:37 +0000 Subject: u-boot-mkimage-gta01: build uboot-mkimage needed for Neo1973 kernel - same tool is built with uboot-gta01_svn.bb recipe but Neo1973 u-boot require OABI toolchain --- packages/uboot/u-boot-mkimage-gta01_svn.bb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/uboot/u-boot-mkimage-gta01_svn.bb diff --git a/packages/uboot/u-boot-mkimage-gta01_svn.bb b/packages/uboot/u-boot-mkimage-gta01_svn.bb new file mode 100644 index 0000000000..ad98bea30e --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01_svn.bb @@ -0,0 +1,18 @@ +require uboot-gta01_svn.bb + +PROVIDES = "" +TARGET_LDFLAGS = "" + +do_compile () { + chmod +x board/neo1973/split_by_variant.sh + oe_runmake gta01bv3_config + oe_runmake clean + oe_runmake tools +} + +do_deploy () { + install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage +} + +do_deploy[dirs] = "${S}" +addtask deploy before do_build after do_compile -- cgit v1.2.3 From 45a14d8d7ddd343a723964e81c38d5ed87e23a55 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 7 Mar 2007 09:40:43 +0000 Subject: u-boot-mkimage-gta01: renamed to u-boot-mkimage-gta01-native --- packages/uboot/u-boot-mkimage-gta01-native_svn.bb | 18 ++++++++++++++++++ packages/uboot/u-boot-mkimage-gta01_svn.bb | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 packages/uboot/u-boot-mkimage-gta01-native_svn.bb delete mode 100644 packages/uboot/u-boot-mkimage-gta01_svn.bb diff --git a/packages/uboot/u-boot-mkimage-gta01-native_svn.bb b/packages/uboot/u-boot-mkimage-gta01-native_svn.bb new file mode 100644 index 0000000000..ad98bea30e --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native_svn.bb @@ -0,0 +1,18 @@ +require uboot-gta01_svn.bb + +PROVIDES = "" +TARGET_LDFLAGS = "" + +do_compile () { + chmod +x board/neo1973/split_by_variant.sh + oe_runmake gta01bv3_config + oe_runmake clean + oe_runmake tools +} + +do_deploy () { + install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage +} + +do_deploy[dirs] = "${S}" +addtask deploy before do_build after do_compile diff --git a/packages/uboot/u-boot-mkimage-gta01_svn.bb b/packages/uboot/u-boot-mkimage-gta01_svn.bb deleted file mode 100644 index ad98bea30e..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01_svn.bb +++ /dev/null @@ -1,18 +0,0 @@ -require uboot-gta01_svn.bb - -PROVIDES = "" -TARGET_LDFLAGS = "" - -do_compile () { - chmod +x board/neo1973/split_by_variant.sh - oe_runmake gta01bv3_config - oe_runmake clean - oe_runmake tools -} - -do_deploy () { - install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage -} - -do_deploy[dirs] = "${S}" -addtask deploy before do_build after do_compile -- cgit v1.2.3 From 384f31e220fa3f0cccf700fff06c079f197904ee Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 7 Mar 2007 09:42:10 +0000 Subject: linux-gta01: depend on u-boot-mkimage-gta01-native so kernel can be built with EABI --- packages/linux/linux-gta01_2.6.20.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/linux/linux-gta01_2.6.20.bb b/packages/linux/linux-gta01_2.6.20.bb index 406369d81f..a041877c55 100644 --- a/packages/linux/linux-gta01_2.6.20.bb +++ b/packages/linux/linux-gta01_2.6.20.bb @@ -3,7 +3,7 @@ SECTION = "kernel" AUTHOR = "Harald Welte " HOMEPAGE = "N/A" LICENSE = "GPL" -DEPENDS += "uboot-gta01" +DEPENDS += "u-boot-mkimage-gta01-native" MOKOR = "moko8" PR = "${MOKOR}-r1" -- cgit v1.2.3 From 21be67cddd40050298bd28670a91cbd1df3955e5 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Wed, 7 Mar 2007 11:39:45 +0000 Subject: goffice: fix QA issue, add all debug files to -dbg package. --- packages/gnome/goffice_0.3.2.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/gnome/goffice_0.3.2.bb b/packages/gnome/goffice_0.3.2.bb index 90586ffbd6..59503a7b43 100644 --- a/packages/gnome/goffice_0.3.2.bb +++ b/packages/gnome/goffice_0.3.2.bb @@ -6,6 +6,8 @@ DEFAULT_PREFERENCE = "-1" DEPENDS="glib-2.0 gtk+ pango cairo libgnomeprint libgsf libglade libxml2 libart-lgpl" +FILES_${PN}-dbg += "${libdir}/goffice/0.2.1/plugins/*/.debug" + inherit gnome pkgconfig do_stage() { -- cgit v1.2.3 From 9c99469b7739b771ba4057f5dfa1f128747e2630 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 7 Mar 2007 12:08:37 +0000 Subject: cups: we do not want web interface so do not check for PHP, Perl, Python, Java --- packages/cups/cups_1.2.7.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cups/cups_1.2.7.bb b/packages/cups/cups_1.2.7.bb index 22034f9a23..24249fa3b1 100644 --- a/packages/cups/cups_1.2.7.bb +++ b/packages/cups/cups_1.2.7.bb @@ -2,7 +2,7 @@ DESCRIPTION = "An Internet printing system for Unix." SECTION = "console/utils" LICENSE = "GPL LGPL" DEPENDS = "gnutls jpeg dbus dbus-glib libpng zlib install-native fakeroot-native" -PR = "r0" +PR = "r1" SRC_URI = "ftp://ftp3.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \ " @@ -17,6 +17,10 @@ EXTRA_OECONF = " \ --enable-browsing \ --disable-openssl \ --disable-tiff \ + --without-php \ + --without-perl \ + --without-python \ + --without-java \ " -- cgit v1.2.3 From f4cac954543e82b74b661bfcfb15a4ca7d3df336 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Wed, 7 Mar 2007 09:46:10 +0000 Subject: confuse: Library for parsing configuration files. --- packages/confuse/.mtn2git_empty | 0 packages/confuse/confuse-native_2.5.bb | 3 +++ packages/confuse/confuse_2.5.bb | 17 +++++++++++++++++ packages/confuse/files/.mtn2git_empty | 0 packages/confuse/files/exclude-tests.patch | 13 +++++++++++++ 5 files changed, 33 insertions(+) create mode 100644 packages/confuse/.mtn2git_empty create mode 100644 packages/confuse/confuse-native_2.5.bb create mode 100644 packages/confuse/confuse_2.5.bb create mode 100644 packages/confuse/files/.mtn2git_empty create mode 100644 packages/confuse/files/exclude-tests.patch diff --git a/packages/confuse/.mtn2git_empty b/packages/confuse/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/confuse/confuse-native_2.5.bb b/packages/confuse/confuse-native_2.5.bb new file mode 100644 index 0000000000..6a5dd797b5 --- /dev/null +++ b/packages/confuse/confuse-native_2.5.bb @@ -0,0 +1,3 @@ +require confuse_${PV}.bb + +inherit native diff --git a/packages/confuse/confuse_2.5.bb b/packages/confuse/confuse_2.5.bb new file mode 100644 index 0000000000..a04aa1926c --- /dev/null +++ b/packages/confuse/confuse_2.5.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Library for parsing configuration files." +HOMEPAGE = "http://www.nongnu.org/confuse/" +LICENSE = "LGPL" +SECTION = "libs" + +SRC_URI = "http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/confuse-${PV}.tar.gz \ + file://exclude-tests.patch;patch=1" +S = "${WORKDIR}/confuse-${PV}" + +inherit autotools lib_package + +EXTRA_OECONF = "--enable-shared" + +do_stage() { + autotools_stage_all +} + diff --git a/packages/confuse/files/.mtn2git_empty b/packages/confuse/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/confuse/files/exclude-tests.patch b/packages/confuse/files/exclude-tests.patch new file mode 100644 index 0000000000..1e32ceba9b --- /dev/null +++ b/packages/confuse/files/exclude-tests.patch @@ -0,0 +1,13 @@ +Index: confuse-2.5/Makefile.am +=================================================================== +--- confuse-2.5/Makefile.am ++++ confuse-2.5/Makefile.am +@@ -4,7 +4,7 @@ + AUTOMAKE_OPTIONS = foreign + CLEANFILES=*~ '\#*\#' + EXTRA_DIST=libconfuse.spec.in libconfuse.spec +-SUBDIRS = m4 po src examples tests doc ++SUBDIRS = m4 po src examples doc + + if HAVE_PKGCONFIG + pkgconfigdir = $(libdir)/pkgconfig -- cgit v1.2.3 From 391e97e4cba6b62ff6b8e9c4360f96fbab18cb4f Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Wed, 7 Mar 2007 10:12:38 +0000 Subject: confuse: Imported and merged recipe from OpenMoko --- packages/confuse/confuse_2.5.bb | 6 +++--- packages/confuse/files/build-only-library.patch | 13 +++++++++++++ packages/confuse/files/exclude-tests.patch | 13 ------------- 3 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 packages/confuse/files/build-only-library.patch delete mode 100644 packages/confuse/files/exclude-tests.patch diff --git a/packages/confuse/confuse_2.5.bb b/packages/confuse/confuse_2.5.bb index a04aa1926c..572bcd334c 100644 --- a/packages/confuse/confuse_2.5.bb +++ b/packages/confuse/confuse_2.5.bb @@ -3,11 +3,11 @@ HOMEPAGE = "http://www.nongnu.org/confuse/" LICENSE = "LGPL" SECTION = "libs" -SRC_URI = "http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/confuse-${PV}.tar.gz \ - file://exclude-tests.patch;patch=1" +SRC_URI = "http://download.savannah.gnu.org/releases/confuse/confuse-${PV}.tar.gz \ + file://build-only-library.patch;patch=1" S = "${WORKDIR}/confuse-${PV}" -inherit autotools lib_package +inherit autotools binconfig pkgconfig lib_package EXTRA_OECONF = "--enable-shared" diff --git a/packages/confuse/files/build-only-library.patch b/packages/confuse/files/build-only-library.patch new file mode 100644 index 0000000000..43c46e0bf8 --- /dev/null +++ b/packages/confuse/files/build-only-library.patch @@ -0,0 +1,13 @@ +Index: confuse-2.5/Makefile.am +=================================================================== +--- confuse-2.5.orig/Makefile.am ++++ confuse-2.5/Makefile.am +@@ -4,7 +4,7 @@ + AUTOMAKE_OPTIONS = foreign + CLEANFILES=*~ '\#*\#' + EXTRA_DIST=libconfuse.spec.in libconfuse.spec +-SUBDIRS = m4 po src examples tests doc ++SUBDIRS = m4 po src + + if HAVE_PKGCONFIG + pkgconfigdir = $(libdir)/pkgconfig diff --git a/packages/confuse/files/exclude-tests.patch b/packages/confuse/files/exclude-tests.patch deleted file mode 100644 index 1e32ceba9b..0000000000 --- a/packages/confuse/files/exclude-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: confuse-2.5/Makefile.am -=================================================================== ---- confuse-2.5/Makefile.am -+++ confuse-2.5/Makefile.am -@@ -4,7 +4,7 @@ - AUTOMAKE_OPTIONS = foreign - CLEANFILES=*~ '\#*\#' - EXTRA_DIST=libconfuse.spec.in libconfuse.spec --SUBDIRS = m4 po src examples tests doc -+SUBDIRS = m4 po src examples doc - - if HAVE_PKGCONFIG - pkgconfigdir = $(libdir)/pkgconfig -- cgit v1.2.3 From 73e97e891a9f43b5267e3e0d2a2160a45a6816fe Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Wed, 7 Mar 2007 12:18:42 +0000 Subject: xserver-common: Add 1.15 --- packages/xserver-common/xserver-common_1.15.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/xserver-common/xserver-common_1.15.bb diff --git a/packages/xserver-common/xserver-common_1.15.bb b/packages/xserver-common/xserver-common_1.15.bb new file mode 100644 index 0000000000..d608231348 --- /dev/null +++ b/packages/xserver-common/xserver-common_1.15.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Common X11 scripts and support files" +LICENSE = "GPL" +SECTION = "x11" +RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo" +PR = "r1" + +PACKAGE_ARCH = "all" + +# we are using a gpe-style Makefile +inherit gpe + +SRC_URI_append = " file://setDPI.sh \ + file://xserver-imageon.patch;patch=1" + +do_install_append() { + install -m 0755 "${WORKDIR}/setDPI.sh" "${D}/etc/X11/Xinit.d/50setdpi" +} -- cgit v1.2.3 From 194d199ab544750cce2c407925c83ad31edb6fa6 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Wed, 7 Mar 2007 12:26:59 +0000 Subject: turbostation: Add a kernel-feed for the turbostation --- conf/machine/turbostation.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/machine/turbostation.conf b/conf/machine/turbostation.conf index 7184958664..3bffe593f5 100644 --- a/conf/machine/turbostation.conf +++ b/conf/machine/turbostation.conf @@ -4,6 +4,8 @@ TARGET_FPU = "hard" PACKAGE_EXTRA_ARCHS = "ppc ppc603e" MACHINE_TASK_PROVIDER = "task-base" +FEED_URIS += "turbostation##http://ipkg.kynisk.com/opents/cross/1.0-dev/" + # terminal specs - console, but no other ports SERIAL_CONSOLE="115200 console" USE_VT="0" -- cgit v1.2.3 From eb9be1ad3f63ea123ba6c9e560580b6b10aeb2e2 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Wed, 7 Mar 2007 12:32:41 +0000 Subject: turbostation: Remove feed. --- conf/machine/turbostation.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/machine/turbostation.conf b/conf/machine/turbostation.conf index 3bffe593f5..7184958664 100644 --- a/conf/machine/turbostation.conf +++ b/conf/machine/turbostation.conf @@ -4,8 +4,6 @@ TARGET_FPU = "hard" PACKAGE_EXTRA_ARCHS = "ppc ppc603e" MACHINE_TASK_PROVIDER = "task-base" -FEED_URIS += "turbostation##http://ipkg.kynisk.com/opents/cross/1.0-dev/" - # terminal specs - console, but no other ports SERIAL_CONSOLE="115200 console" USE_VT="0" -- cgit v1.2.3 From 4953856a1bde6f8635cf92caff2889a439254b85 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Wed, 7 Mar 2007 12:34:58 +0000 Subject: openturbostation: Initial commit of distro --- conf/distro/openturbostation.conf | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 conf/distro/openturbostation.conf diff --git a/conf/distro/openturbostation.conf b/conf/distro/openturbostation.conf new file mode 100644 index 0000000000..e545514f94 --- /dev/null +++ b/conf/distro/openturbostation.conf @@ -0,0 +1,68 @@ +# +# Open TurboStation distribution - based on openprotium +# +DISTRO_NAME = "openturbostation" +DISTRO_VERSION = ".dev-snapshot-${SRCDATE}" +DISTRO_TYPE = "alpha" + +# +# Naming schemes +# +INHERIT += "debian" + +# +# Packaging and output format +# +INHERIT += "package_ipk" +IMAGE_BASENAME = "openturbostation" +IMAGE_FSTYPES = "jffs2" +FEED_URIS = "openturbostation##http://ipkg.kynisk.com/opents/cross/1.0-dev" + +# For protium on the turbostation + +# +# 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" + +PREFERRED_VERSION_binutils = "2.16" +PREFERRED_VERSION_binutils-cross = "2.16" + +PREFERRED_VERSION_gcc = "4.1.2" +PREFERRED_VERSION_gcc-cross = "4.1.2" +PREFERRED_VERSION_gcc-cross-initial = "4.1.2" + +PREFERRED_VERSION_glibc = "2.5" +PREFERRED_VERSION_glibc-intermediate = "2.5" +PREFERRED_VERSION_glibc-initial = "2.3.2" + +# +# Target OS & FPU system +# +USE_NLS ?= "no" +TARGET_OS = "linux" +HOTPLUG = "udev" +PREFERRED_PROVIDER_virtual/libiconv = "glibc" +PREFERRED_PROVIDER_virtual/libintl = "glibc" + +# +# Bootstrap & Init +# +#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" + +CMDLINE_DEBUG = "noirqdebug" -- cgit v1.2.3 From cac873881c1bf9cf124b5f7766b3fdb1d7d3825f Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Wed, 7 Mar 2007 12:41:17 +0000 Subject: openturbostation: Add image generation --- packages/images/openturbostation-image.bb | 135 ++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 packages/images/openturbostation-image.bb diff --git a/packages/images/openturbostation-image.bb b/packages/images/openturbostation-image.bb new file mode 100644 index 0000000000..31f39c9f95 --- /dev/null +++ b/packages/images/openturbostation-image.bb @@ -0,0 +1,135 @@ +DESCRIPTION = "Turbostation image" +HOMEPAGE = "http://www.kynisk.com/opents" +LICENSE = "MIT" +PR = "r0" + +DEPENDS = "${MACHINE_TASK_PROVIDER}" +EXTRA_IMAGECMD_jffs2 = "--big-endian --eraseblock=${ERASEBLOCK_SIZE} -D ${SLUGOS_DEVICE_TABLE}" +IMAGE_LINGUAS = "" + +# Setting USE_DEVFS prevents *any* entries being created initially +# in /dev +#USE_DEVFS = "1" + +# 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')}" + +# 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 += "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;" + +# 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" +# +TURBOSTATION_SUPPORT ?= "diffutils cpio findutils uboot-utils udev" + +# 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!) + +# this gets /lib/modules made.... + +TURBOSTATION_KERNEL = "" + +RDEPENDS = " \ + kernel base-files base-passwd netbase \ + busybox initscripts-openturbostation openturbostation-init \ + update-modules sysvinit tinylogin \ + module-init-tools modutils-initscripts \ + ipkg-collateral ipkg ipkg-link \ + libgcc1 \ + portmap \ + dropbear \ + e2fsprogs-blkid \ + mdadm \ + hdparm \ + mtd-utils \ + sccd \ + util-linux-mount \ + util-linux-umount \ + util-linux-swaponoff \ + util-linux-losetup \ + udev \ + ${OPENTURBOSTATION_SUPPORT} \ + ${OPENTURBOSTATION_KERNEL} " + +PACKAGE_INSTALL = "${RDEPENDS}" + +inherit image + +turbostation_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-turbostation 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=200000 + DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc ` + HEX_MAX_ROOT_SIZE=C80000 + 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 +} -- cgit v1.2.3 From 7d14765f8a9935fbb46dadd6da34ebfa0a03d603 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Wed, 7 Mar 2007 12:46:19 +0000 Subject: turbostation: initscripts --- .../openturbostation/.mtn2git_empty | 0 .../initscripts-1.0/openturbostation/checkroot.sh | 212 +++++++++++++++++++++ .../initscripts-1.0/openturbostation/devices | 70 +++++++ .../initscripts-1.0/openturbostation/domainname.sh | 5 + .../initscripts-1.0/openturbostation/halt | 27 +++ .../initscripts-1.0/openturbostation/reboot | 12 ++ .../initscripts-openturbostation_1.0.bb | 175 +++++++++++++++++ 7 files changed, 501 insertions(+) create mode 100644 packages/initscripts/initscripts-1.0/openturbostation/.mtn2git_empty create mode 100755 packages/initscripts/initscripts-1.0/openturbostation/checkroot.sh create mode 100755 packages/initscripts/initscripts-1.0/openturbostation/devices create mode 100644 packages/initscripts/initscripts-1.0/openturbostation/domainname.sh create mode 100755 packages/initscripts/initscripts-1.0/openturbostation/halt create mode 100755 packages/initscripts/initscripts-1.0/openturbostation/reboot create mode 100644 packages/initscripts/initscripts-openturbostation_1.0.bb diff --git a/packages/initscripts/initscripts-1.0/openturbostation/.mtn2git_empty b/packages/initscripts/initscripts-1.0/openturbostation/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/initscripts/initscripts-1.0/openturbostation/checkroot.sh b/packages/initscripts/initscripts-1.0/openturbostation/checkroot.sh new file mode 100755 index 0000000000..c69a773482 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openturbostation/checkroot.sh @@ -0,0 +1,212 @@ +# +# checkroot.sh Check to root filesystem. +# +# Version: @(#)checkroot.sh 2.84 25-Jan-2002 miquels@cistron.nl +# + +. /etc/default/rcS + +# +# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to be spawned +# from this script *before anything else* with a timeout, like SCO does. +# +test "$SULOGIN" = yes && sulogin -t 30 $CONSOLE + +# +# Ensure that bdflush (update) is running before any major I/O is +# performed (the following fsck is a good example of such activity :). +# +test -x /sbin/update && update + +# +# Read /etc/fstab. +# +exec 9>&0 &9 9>&- + +# +# Activate the swap device(s) in /etc/fstab. This needs to be done +# before fsck, since fsck can be quite memory-hungry. +# +doswap=no +test -d /proc/1 || mount -n /proc +case "`uname -r`" in + 2.[0123].*) + if test $swap_on_md = yes && grep -qs resync /proc/mdstat + then + test "$VERBOSE" != no && echo "Not activating swap - RAID array resyncing" + else + doswap=yes + fi + ;; + *) + doswap=yes + ;; +esac +if test $doswap = yes +then + test "$VERBOSE" != no && echo "Activating swap" + swapon -a 2> /dev/null +fi + +# +# Check the root filesystem. +# +if test -f /fastboot || test $rootcheck = no +then + test $rootcheck = yes && echo "Fast boot, no filesystem check" +else + # + # Ensure that root is quiescent and read-only before fsck'ing. + # + mount -n -o remount,ro / + if test $? = 0 + then + if test -f /forcefsck + then + force="-f" + else + force="" + fi + if test "$FSCKFIX" = yes + then + fix="-y" + else + fix="-a" + fi + spinner="-C" + case "$TERM" in + dumb|network|unknown|"") spinner="" ;; + esac + test `uname -m` = s390 && spinner="" # This should go away + test "$VERBOSE" != no && echo "Checking root filesystem..." + fsck $spinner $force $fix / + # + # If there was a failure, drop into single-user mode. + # + # NOTE: "failure" is defined as exiting with a return code of + # 2 or larger. A return code of 1 indicates that filesystem + # errors were corrected but that the boot may proceed. + # + + echo "RETURNCODE: [$RTC]" + + if test "$RTC" -gt 3 + then + + # Since this script is run very early in the boot-process, it should be safe to assume that the + # output is printed to VT1. However, some distributions use a bootsplash to hide the "ugly" boot + # messages and having the bootsplash "hang" due to a waiting fsck prompt is less than ideal + chvt 1 + + # Surprise! Re-directing from a HERE document (as in + # "cat << EOF") won't work, because the root is read-only. + echo + echo "fsck failed. Please repair manually and reboot. " + echo "Please note that the root filesystem is currently " + echo "mounted read-only. To remount it read-write:" + echo + echo " # mount -n -o remount,rw /" + echo + echo "CONTROL-D will exit from this shell" + echo "and REBOOT the system." + echo + # Start a single user shell on the console + /sbin/sulogin $CONSOLE + reboot -f + fi + else + echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!" + echo + fi +fi + +devrootfound=$(grep "/dev/root" /proc/mounts | \ + awk '{if ($4 = /rw/) print "found";}' ) + +if [ -n "$devrootfound" -a "$devrootfound" = "found" ]; then + echo "Read/write /dev/root found." + exit 0 +fi + +if mount -vf -o remount / 2> /dev/null | \ + awk '{if ($6 ~ /rw/) exit 0; else exit 1; }' && \ + ! touch -c / 2> /dev/null + then + echo " Remounting root filesystem read/write" + mount -n -o remount,$rootmode / +fi + +if test "$rootmode" = rw +then + if test ! -L /etc/mtab + then + rm -f /etc/mtab~ /etc/nologin + : > /etc/mtab + fi + mount -f -o remount / + mount -f /proc + test "$devfs" && grep -q '^devfs /dev' /proc/mounts && mount -f "$devfs" +fi + +: exit 0 diff --git a/packages/initscripts/initscripts-1.0/openturbostation/devices b/packages/initscripts/initscripts-1.0/openturbostation/devices new file mode 100755 index 0000000000..f83ea63598 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openturbostation/devices @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Devfs handling script. Since we arent running devfsd due to various reasons +# which I will not lay out here, we need to create some links for compatibility. + +. /etc/default/rcS + +# exit without doing anything if udev is active +if test -e /dev/.udev -o -e /dev/.udevdb; then + exit 0 +fi + +if test -e /dev/.devfsd +then + if test "$VERBOSE" != "no"; then echo -n "Setting up device links for devfs: "; fi + [ -e /dev/.linksmade ] && exit 0 + + ln -s /dev/tts/0 /dev/ttySA0 + ln -s /dev/tts/1 /dev/ttySA1 + + ln -s /dev/sound/dsp /dev/dsp + ln -s /dev/sound/mixer /dev/mixer + + ln -s /dev/misc/rtc /dev/rtc + + # + # some friendly disk links + # + ln -s /dev/discs/disc0/disc /dev/hda + ln -s /dev/discs/disc1/disc /dev/hdb + for i in 1 2 3 4; do + ln -s /dev/discs/disc0/part$i /dev/hda$i + ln -s /dev/discs/disc1/part$i /dev/hdb$i + done + + ## need this so that ppp will autoload the ppp modules + mknod /dev/ppp c 108 0 + ln -s /dev/zero /dev/.linksmade + + if test "$VERBOSE" != "no"; then echo "done"; fi +else + if test "$VERBOSE" != "no"; then echo -n "Mounting /dev ramdisk: "; fi + mount -t ramfs ramfs /dev || mount -t tmpfs ramfs /dev + if test $? -ne 0; then + if test "$VERBOSE" != "no"; then echo "failed"; fi + else + if test "$VERBOSE" != "no"; then echo "done"; fi + fi + if test "$VERBOSE" != "no"; then echo -n "Populating /dev: "; fi + cd / + mkdir -p dev/input + mkdir -p dev/msys + mkdir -p dev/pts + mkdir -p dev/vc + mkdir -p dev/snd + mkdir -p dev/tts + for i in 0 1 2 3 4 5 6 7 8 9; do + ln -s /dev/tty$i /dev/vc/$i + done + ln -sf /proc/self/fd /dev/fd + ln -sf /proc/kcore /dev/core + /sbin/makedevs -r / -D /etc/device_table + if test $? -ne 0; then + if test "$VERBOSE" != "no"; then echo "failed"; fi + else + if test "$VERBOSE" != "no"; then echo "done"; fi + fi +fi + +exit 0 diff --git a/packages/initscripts/initscripts-1.0/openturbostation/domainname.sh b/packages/initscripts/initscripts-1.0/openturbostation/domainname.sh new file mode 100644 index 0000000000..7113467d8c --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openturbostation/domainname.sh @@ -0,0 +1,5 @@ +# +# domainname.sh Set the domainname. +# +test -r /etc/defaultdomain && + cat /etc/defaultdomain >/proc/sys/kernel/domainname diff --git a/packages/initscripts/initscripts-1.0/openturbostation/halt b/packages/initscripts/initscripts-1.0/openturbostation/halt new file mode 100755 index 0000000000..f22d892d46 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openturbostation/halt @@ -0,0 +1,27 @@ +#! /bin/sh +# +# halt Execute the halt command. +# +# Version: @(#)halt 2.84-2 07-Jan-2002 miquels@cistron.nl +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# See if we need to cut the power. +if test -x /etc/init.d/ups-monitor +then + /etc/init.d/ups-monitor poweroff +fi + +# Don't shut down drives if we're using RAID. +hddown="-h" +if grep -qs '^md.*active' /proc/mdstat +then + hddown="" +fi + +echo "Powering down..." +scc -p off +halt -d -f -i -p $hddown + +: exit 0 diff --git a/packages/initscripts/initscripts-1.0/openturbostation/reboot b/packages/initscripts/initscripts-1.0/openturbostation/reboot new file mode 100755 index 0000000000..05a82be4c0 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/openturbostation/reboot @@ -0,0 +1,12 @@ +#! /bin/sh +# +# reboot Execute the reboot command. +# +# Version: @(#)reboot 2.75 22-Jun-1998 miquels@cistron.nl +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +echo -n "Rebooting... " +scc -p restart +reboot -d -f -i diff --git a/packages/initscripts/initscripts-openturbostation_1.0.bb b/packages/initscripts/initscripts-openturbostation_1.0.bb new file mode 100644 index 0000000000..3fc98fa12b --- /dev/null +++ b/packages/initscripts/initscripts-openturbostation_1.0.bb @@ -0,0 +1,175 @@ +# +# OpenTurbostation stuff sorta specific for the turbostation +# +# This is, in effect, an extended patch to fix various +# problems in the initscripts on SlugOS. The problems +# mostly come down to the order the scripts are executed +# in. +include initscripts_${PV}.bb + +RCONFLICTS = "initscripts" +# All other standard definitions inherited from initscripts +# Except the PR which is hacked here. The format used is +# a suffix +PR := "${PR}.11" + +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" + +PACKAGES = "${PN}" + +SRC_URI += "file://openturbostation/domainname.sh" +SRC_URI += "file://openturbostation/devices" +SRC_URI += "file://openturbostation/halt" +SRC_URI += "file://openturbostation/reboot" +SRC_URI += "file://openturbostation/checkroot.sh" + +# 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 + + # openprotium specific scripts + # install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openturbostation/domainname.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openturbostation/devfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openturbostation/halt ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openturbostation/reboot ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openturbostation/devices ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/openturbostation/checkroot.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.) + # This is a copy of the ln -sf lines from the initscripts + # do_install. + rm ${D}${sysconfdir}/rc2.d/S99rmnologin + rm ${D}${sysconfdir}/rc3.d/S99rmnologin + rm ${D}${sysconfdir}/rc4.d/S99rmnologin + rm ${D}${sysconfdir}/rc5.d/S99rmnologin + rm ${D}${sysconfdir}/rc6.d/S20sendsigs +# rm ${D}${sysconfdir}/rc6.d/S30urandom + rm ${D}${sysconfdir}/rc6.d/S31umountnfs.sh + rm ${D}${sysconfdir}/rc6.d/S40umountfs + rm ${D}${sysconfdir}/rcS.d/S30ramdisk + rm ${D}${sysconfdir}/rc6.d/S90reboot + rm ${D}${sysconfdir}/rc0.d/S20sendsigs +# rm ${D}${sysconfdir}/rc0.d/S30urandom + rm ${D}${sysconfdir}/rc0.d/S31umountnfs.sh + rm ${D}${sysconfdir}/rc0.d/S40umountfs + rm ${D}${sysconfdir}/rc0.d/S90halt + rm ${D}${sysconfdir}/rcS.d/S02banner + rm ${D}${sysconfdir}/rcS.d/S10checkroot.sh +# rm ${D}${sysconfdir}/rcS.d/S30checkfs.sh + rm ${D}${sysconfdir}/rcS.d/S35mountall.sh + rm ${D}${sysconfdir}/rcS.d/S39hostname.sh + rm ${D}${sysconfdir}/rcS.d/S45mountnfs.sh + rm ${D}${sysconfdir}/rcS.d/S55bootmisc.sh +# rm ${D}${sysconfdir}/rcS.d/S55urandom + rm ${D}${sysconfdir}/rcS.d/S99finish + rm ${D}${sysconfdir}/rcS.d/S05devices + # udev will run at S04 if installed + rm ${D}${sysconfdir}/rcS.d/S03sysfs + rm ${D}${sysconfdir}/rcS.d/S38devpts.sh + rm -f ${D}${sysconfdir}/rcS.d/S06alignment + rm ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh + rm ${D}${sysconfdir}/rc0.d/S25save-rtc.sh + rm ${D}${sysconfdir}/rc6.d/S25save-rtc.sh + + + + # Check the result + find ${D}${sysconfdir}/rc?.d ! -type d -print | { + status=0 + while read d + do + oenote "initscripts-openturbostation: unexpected link $d" + status=1 + done + test $status -eq 0 || + oefatal "initscripts-openturbostation: new links break do_install" + } + + # Set the run-level links + # + # Startup (S) links - UNCHANGED + # + # Keep these in order of startup - S, then 1, 2-5, 0,6 + # according to the level in which the script starts (or stops) first. + update-rc.d -r ${D} banner start 2 S . + update-rc.d -r ${D} sysfs.sh start 3 S . + # udev runs at S 04 . + update-rc.d -r ${D} devices start 5 S . + # update-rc.d -r ${D} alignment.sh start 7 S . + # busybox hwclock.sh (slugos-init) starts here (08) + # slugos-init umountinitrd runs here (09) + + update-rc.d -r ${D} checkroot.sh start 10 S . + # slugos buffer syslog starts here (11) + # sysconfsetup runs at S 12 + # modutils.sh runs at S 20 + # checkfs.sh is currently disabled from S 30 (and won't work on SlugOS) + # ramdisk is not used on SlugOS, would run at S 30 + update-rc.d -r ${D} mountall.sh start 35 S . + # base-files populate-volatile.sh runs at S37 + update-rc.d -r ${D} devpts.sh start 38 S . + # slugos file syslog starts here (39) + update-rc.d -r ${D} populate-volatile.sh start 37 S . + + # set hostname and domainname before the network script works (by + # entering them at level 40), networking may reset them. + update-rc.d -r ${D} domainname.sh start 40 S . + update-rc.d -r ${D} hostname.sh start 40 S . + # network runs at S 40 + # 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 . + # urandom is currently disabled from S 55 (and won't work with tmpfs /var) + + # ipkg-cl configure runs at S 98 + update-rc.d -r ${D} finish start 99 S . + + # + # User (2-5) links - UNCHANGED + # rmnologin is the only thing added to user levels + update-rc.d -r ${D} rmnologin start 99 2 3 4 5 . + + # + # Shutdown (0,6) links - !!!CHANGED!!! + # + # The problem here is that netbase installs K40networking but portmap + # installs S32portmap. One of these has to change! The safe change + # is to make the networking stop at S40, so all network related shutdown + # must be in a K script or Date: Wed, 7 Mar 2007 12:48:51 +0000 Subject: turbostation: More init-stuff --- packages/openturbostation-init/.mtn2git_empty | 0 .../openturbostation-init/files/.mtn2git_empty | 0 .../files/boot/.mtn2git_empty | 0 packages/openturbostation-init/files/conffiles | 55 ++ packages/openturbostation-init/files/functions | 413 ++++++++++ .../files/initscripts/.mtn2git_empty | 0 packages/openturbostation-init/files/links.conf | 6 + .../openturbostation-init/files/modulefunctions | 39 + packages/openturbostation-init/files/reflash | 163 ++++ packages/openturbostation-init/files/sysconf | 793 +++++++++++++++++++ packages/openturbostation-init/files/turnup | 861 +++++++++++++++++++++ .../openturbostation-init/openprotium-init_0.10.bb | 148 ++++ 12 files changed, 2478 insertions(+) create mode 100644 packages/openturbostation-init/.mtn2git_empty create mode 100644 packages/openturbostation-init/files/.mtn2git_empty create mode 100644 packages/openturbostation-init/files/boot/.mtn2git_empty create mode 100644 packages/openturbostation-init/files/conffiles create mode 100644 packages/openturbostation-init/files/functions create mode 100644 packages/openturbostation-init/files/initscripts/.mtn2git_empty create mode 100644 packages/openturbostation-init/files/links.conf create mode 100644 packages/openturbostation-init/files/modulefunctions create mode 100644 packages/openturbostation-init/files/reflash create mode 100644 packages/openturbostation-init/files/sysconf create mode 100644 packages/openturbostation-init/files/turnup create mode 100644 packages/openturbostation-init/openprotium-init_0.10.bb diff --git a/packages/openturbostation-init/.mtn2git_empty b/packages/openturbostation-init/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/openturbostation-init/files/.mtn2git_empty b/packages/openturbostation-init/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/openturbostation-init/files/boot/.mtn2git_empty b/packages/openturbostation-init/files/boot/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/openturbostation-init/files/conffiles b/packages/openturbostation-init/files/conffiles new file mode 100644 index 0000000000..e1408a3227 --- /dev/null +++ b/packages/openturbostation-init/files/conffiles @@ -0,0 +1,55 @@ +# conffiles +# Known SlugOS configuration files. These files are preserved on +# a flash upgrade. Other configuration files, found from: +# +# /usr/lib/ipkg/*.conffiles +# /etc/*.conf +# +# are preserved too with an operation of 'diff' if they have been +# changed since /etc/.configured was created. +# +# Lines starting with # are comments, other lines have +# two fields: +# +# operation file +# +# The file must *NOT* have a leading / +# +# operation may be: +# ignore Do not preserve this file +# preserve Preserve this file unconditionally +# diff Compare file with the new version, ask if different +# +preserve linuxrc +preserve etc/.configured +preserve etc/TZ +diff etc/default/conffiles +diff etc/default/devpts +preserve etc/default/rcS +preserve etc/default/sysconf +diff etc/default/usbd +preserve etc/defaultdomain +preserve etc/dropbear/dropbear_dss_host_key +preserve etc/dropbear/dropbear_rsa_host_key +preserve etc/ssh/ssh_host_dsa_key +preserve etc/ssh/ssh_host_dsa_key.pub +preserve etc/ssh/ssh_host_rsa_key +preserve etc/ssh/ssh_host_rsa_key.pub +preserve etc/fstab +preserve etc/group +preserve etc/gshadow +preserve etc/hostname +preserve etc/hosts +preserve etc/localtime +ignore etc/modules +ignore etc/modules.conf +preserve etc/motd +preserve etc/network/interfaces +preserve etc/ntp.drift +preserve etc/passwd +preserve etc/profile +preserve etc/resolv.conf +preserve etc/shadow +preserve etc/syslog.conf +preserve etc/timezone +preserve root/.ssh/authorized_keys diff --git a/packages/openturbostation-init/files/functions b/packages/openturbostation-init/files/functions new file mode 100644 index 0000000000..2108288ab5 --- /dev/null +++ b/packages/openturbostation-init/files/functions @@ -0,0 +1,413 @@ +#!/bin/sh +# . this file to load the following utility functions +# +# hardware +# the 'Hardware' string from cpuinfo, or, if not found +# try a little harder with 'machine' +hardware(){ + local hdw + hdw=`sed -n 's!^Hardware *: !!p' /proc/cpuinfo` + test -n "$hdw" || { + hdw=`sed -n 's!^machine *: !!p' /proc/cpuinfo` + } + echo $hdw +} +# +# machine +# outputs an identifier of the current machine - i.e. the board +# slugos is running on. +machine(){ + case "$(hardware)" in + *Coyote*) echo coyote;; + *IXDPG425*) echo ixdpg425;; + *WRV54G*) echo wrv54g;; + *IXDP425*) echo ixdp425;; + *IXDP465*) echo ixdp465;; + *IXCDP1100*) echo ixcdp1100*;; + *Avila*) echo avila;; + *Loft*) echo loft;; + *NAS?100d*) echo nas100d;; + *NSLU2*) echo nslu2;; + *StorCenter*) echo storcenter;; + *) echo unknown;; + esac +} +# +# single_user_ok +# if the machine is capable of single user interaction return +# true, else return false. The result of this function is +# preempted by setting SULOGIN to 'yes' or 'ok' in /etc/default/rcS +single_user_ok() { + # list known good machines in the 'case' + test "$SULOGIN" = yes -o "$SULOGIN" = ok || + case "$(machine)" in + ixdp*|avila|loft) + test "$SULOGIN" != never;; + *) return 1;; + esac +} +# +# load_functions "source" +# load the functions in '/sbin/source' - relies on /sbin/source being +# a shell script and having support for this function. +load_functions(){ + test -n "$1" -a -x "/sbin/$1" && . "/sbin/$1" || { + echo "$0: /sbin/$1: script not found" >&2 + return 1 + } +} +# +# mtdev "name" +# return (output) the character device name for flash parition "name" +# /proc/mtd has the general form: +# dev: size erasesize name +# mtd5: 00020000 00020000 "FIS directory" +# 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" +# the size of the partition as a hexadecimal value (with 0x at the front) +mtsize(){ + sed -n 's!^mtd[0-9][0-9]*: \([^ ]*\)[^"]*"'"$1"'"$!0x\1!p' /proc/mtd +} +# +# sysvalmatch "section" "name" 'pattern' "configuration file" +# sysvalof "section" "name" "configuration file" +# sysval "section" "name" +# outputs the value of the SysConf variable 'name' from section 'section', +# if there are multiple definitions only the last is output +# NOTE: these functions should only be used internally, add entries to 'config' +# below if necessary. This is because 'config' does the defaulting. +sysvalmatch(){ + sed -n '/^\['"$1"'\]$/,/^\[.*\]$/s/^'"$2"'=\('"$3"'\)$/\1/p' "$4" | sed -n '$p' +} +sysvalof(){ + sysvalmatch "$1" "$2" '.*' "$3" +} +sysval(){ + test -r "$config_root/etc/default/sysconf" && + sysvalof "$1" "$2" "$config_root/etc/default/sysconf" +} +# +# syssection "section" +# outputs all the values from the given section changed to the format "name value" +# (i.e. the '=' is dropped). +syssection(){ + test -r "$config_root/etc/default/sysconf" && + sed -n '/^\['"$1"'\]$/,/^\[.*\]$/s/^\([^=]*\)=\(.*\)$/\1 \2/p' "$config_root/etc/default/sysconf" +} +# +# config "value" +# convenience callers for specific values to avoid mis-typing in scripts +# NOTE: this function does the defaulting, 'sysval' does not! +# config_root: if set this will override the root where config/sysval +# looks for /etc/default/sysconf +config(){ + local mac + mac="$(test -r /proc/net/maclist && + sed -n '/^[0-9A-Za-z][0-9A-Za-z]:[0-9A-Za-z][0-9A-Za-z]:[0-9A-Za-z][0-9A-Za-z]:[0-9A-Za-z][0-9A-Za-z]:[0-9A-Za-z][0-9A-Za-z]:[0-9A-Za-z][0-9A-Za-z]$/p' /proc/net/maclist | + sed -n 1p)" + # + case "$1" in + mac) test -n "$mac" && echo "$mac";; + host) if test -n "$(sysval network disk_server_name)" + then + sysval network disk_server_name + elif test -n "$(sysval network default_server_name)" + then + sysval network default_server_name + elif test -n "$mac" + then + echo "$mac" | sed -n 's/^\(..\):\(..\):\(..\):\(..\):\(..\):\(..\)$/slug\1\2\3\4\5\6/p' + else + # because we want the name to remain constant: + echo "turbostation" + fi;; + domain) sysval network w_d_name;; + iface) if test -n "$(sysval network lan_interface)" + then + sysval network lan_interface + else + echo eth0 + fi;; + ip) if test -n "$(sysval network ip_addr)" + then + sysval network ip_addr + else + echo 192.168.1.16 + fi;; + netmask)sysval network netmask;; + gateway)sysval network gateway;; + dns) sysval network dns_server1;; + dns2) sysval network dns_server2;; + dns3) sysval network dns_server3;; + boot) if test -n "$(sysval network bootproto)" + then + sysval network bootproto + else + echo dhcp + fi;; + valid) test -r "$config_root/etc/default/sysconf" -a -n "$mac";; + *) return 1;; + esac +} +# +# checkif "iface" +# Validate an interface name by making sure that it exists +# in /proc/net/dev (and is not lo). The listing outputs the +# interface followed by a :, the check function looks for +# something of the form '$1[a-zA-Z0-9]*:' and outputs the +# part preceding the ':' +checkif(){ + sed -n '/^[ ]*lo:/d;s/^[ ]*\('"$1"'[a-zA-Z0-9]*\):.*$/\1/p;tE;d;:E;q' /proc/net/dev +} +# +# checkmount "mountpoint" +# tests an already mounted mountpoint to see whether to attempt to +# boot with this as root. Returns success if it appears ok. +checkmount(){ + # basic test for init (the kernel will try to load this) + # but require a shell in bin/sh too + test \( -d "$1/mnt" \) -a \ + \( -x "$1/bin/sh" -o -h "$1/bin/sh" \) -a \ + \( -x "$1/usr/sbin/chroot" -o -h "$1/usr/sbin/chroot" -o \ + -x "$1/sbin/chroot" -o -h "$1/sbin/chroot" \) -a \ + \( -x "$1/sbin/init" -o -h "$1/sbin/init" -o \ + -x "$1/etc/init" -o -h "$1/etc/init" -o \ + -x "$1/bin/init" -o -h "$1/bin/init" \) +} +# +# swivel "new root" "old root" +# NOTE: the arguments must be paths relative to /, bad things +# will happen if the arguments themselves start with / +# Pivot to a new root. This does all the fancy pivot_root stuff +# including closing streams and does a umount /proc - it doesn't +# matter if this fails (failure codes are ignored), but if /proc +# was mounted it must be restored by the caller on return. +# Normally this function never returns! +# On return 0,1,2 are connected to /dev/console - this may not +# have been true before! +swivel(){ + cd "$1" + exec <&- >&- 2>&- + # This is just-in-case the called mounted /proc and was + # unable to close it because of the streams + umount /proc 2>/dev/null + if pivot_root . "$2" + then + # everything must move out of the old root, this process + # is $2/bin/sh so it must die, IO is redirected + # just in case - typically it will be to a device so it + # won't hold the old root open. + # the exec here is the first point at which the old root + # is unused - before the exec regardless of the close of + # 0,1,2 above ash still has *this* shell script open! + # (it's on fd 10). + # init closes all file descriptors, there's no point + # supplying it with fds. + # NOTE: this used to use $2/usr/sbin/chroot, however on + # linux / is already . when the command is executed + # therefore it is essential to use the local (new root) + # chroot to ensure it gets the correct shared libraries. + if test -x usr/sbin/chroot -o -h usr/sbin/chroot + then + chroot=usr/sbin/chroot + elif test -x sbin/chroot -o -h sbin/chroot + then + chroot=sbin/chroot + else + chroot=chroot + fi + # + exec "$chroot" . bin/sh -c "\ + test -x sbin/init && exec sbin/init + test -x etc/init && exec etc/init + test -x bin/init && exec bin/init + mount -t sysfs sysfs /mnt + umount /mnt + sync;sync;sync + exit 1" + fi + # + # recovery - must restore the old root + cd "$2" + sbin/pivot_root . "$1" + # cd is back to $1 - either pivot_root doesn't change it and the + # chroot above was not executed, or pivot_root does change it and + # has just changed it back! + exec <>/dev/console >&0 2>&0 +} +# +# ifup "interface" +# bring that interface up with the configured ip and other +# information +ifup(){ + local ip hostname router subnet iface HOSTNAME NETMASK BROADCAST + + iface="$1" + ip="$(config ip)" + hostname="$(config host)" + router="$(config gateway)" + broadcast= + + if test -n "$ip" + then + # only if an ip was specified + subnet="$(config netmask)" + else + ip=192.168.1.77 + fi + + # First try udhcpc - note that the /boot/udhcpc.script + # simply records the values returned and the udhcpc + # is not left running so this will only work for + # the lease length time! + ifconfig "$iface" up + if test "$(config boot)" != static + then + test -n "$hostname" && HOSTNAME="-H $hostname" + # The script writes the required shell variable assignments + # to file descriptor 9 + eval $(udhcpc -i "$iface" -n -q -r "$ip" $HOSTNAME -s /boot/udhcpc.script 9>&1 >/dev/null) + fi + + test -n "$broadcast" && BROADCAST="broadcast $broadcast" + test -n "$subnet" && NETMASK="netmask $subnet" + + if ifconfig "$iface" "$ip" $NETMASK $BROADCAST + then + for route in $router + do + route add default gw "$route" dev "$iface" + done + return 0 + else + ifconfig "$iface" down + return 1 + fi +} +# +# ifdown "interface" +# take the interface down +ifdown(){ + ifconfig "$1" down +} +# +# mountflash "flash device" "flash root directory" {mount options} +# Finds and mounts the flash file system on the given directory +mountflash(){ + local ffsdev ffsdir + + ffsdev="$1" + test -n "$ffsdev" -a -b "$ffsdev" || { + echo "$0: unable to find flash file system to copy ($ffsdev)" >&2 + return 1 + } + shift + + ffsdir="$1" + test -n "$ffsdir" -a -d "$ffsdir" || { + echo "$0: mountflash $ffsdir: not a directory (internal error)" >&2 + return 1 + } + shift + + mount -t jffs2 "$@" "$ffsdev" "$ffsdir" || { + echo "$0: $ffsdev: unable to mount flash file system on $ffsdir" >&2 + return 1 + } + return 0 +} +# +# umountflash [-r] "flash device" +# unmount any instance of the given flash device, if -r is specified a mount on +# root is an error, otherwise a mount on root is ignored (and remains). +umountflash(){ + local rootok ffsno ffsdev + rootok=1 + case "$1" in + -r) rootok= + shift;; + esac + # + # The argument is ffsdev + ffsdev="$1" + ffsno="$(devio "<<$ffsdev" prd)" + test -n "$ffsno" -a "$ffsno" -ge 0 || { + echo "$0: $ffsdev: device number $ffsno is not valid, cannot continue." >&2 + return 1 + } + # + # Make sure that Flashdisk isn't mounted on / + if test -z "$rootok" -a "$(devio "<&2 + return 1 + fi + # + # The function is currently always used interactively, so output + echo "$0: umounting any existing mount of $ffsdev" >&2 + # + # check each mount point, do this last first because otherwise nested + # mounts of ffsdev cannot be umounted. + ffs_umount() { + local device mp type options stuff + + read device mp type options stuff + test -z "$device" && return 0 + + # handle following entries first + ffs_umount || return 1 + + # handle this entry, since this is currently only used for unmounting + # the flash root partition we know a file which must exist... + case "$mp/$type" in + //jffs2);; # skip / + */jffs2)test "$(devio "<<$mp/etc/init.d/sysconfsetup" prd 2>/dev/null)" -ne "$ffsno" || + umount "$mp" || { + echo "$0: $mp: unable to umount $ffsdev" >&2 + return 1 + };; + esac + + return 0 + } + # + ffs_umount &2 + return 1 + } + + return 0 +} + +# +# uuid_by_partition +# output a list of partitions and their UUIDs +uuid_by_partition() { + blkid -c /dev/null -s UUID | sed -n 's/^\([^:]*\): .*UUID="\([^"]*\)".*$/\1 \2/p' +} + +# +# partition_of uuid +# return the partition corresponding to the UUID +partition_of() { + sed -n 's/^\([^ ]*\) '"$1"'$/\1/p' +} diff --git a/packages/openturbostation-init/files/initscripts/.mtn2git_empty b/packages/openturbostation-init/files/initscripts/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/openturbostation-init/files/links.conf b/packages/openturbostation-init/files/links.conf new file mode 100644 index 0000000000..fdd1f3ce23 --- /dev/null +++ b/packages/openturbostation-init/files/links.conf @@ -0,0 +1,6 @@ +# This file does not exist. Please do not ask the debian maintainer about it. +# You may use it to do strange and wonderful things, at your risk. + +# The new RTC class does not create the /dev/rtc symlink, and udev rules don't get run for built-in modules. +# So it looks like we have to do this here for the moment, until someone comes up with a better idea ... +L rtc rtc0 diff --git a/packages/openturbostation-init/files/modulefunctions b/packages/openturbostation-init/files/modulefunctions new file mode 100644 index 0000000000..430e376ad8 --- /dev/null +++ b/packages/openturbostation-init/files/modulefunctions @@ -0,0 +1,39 @@ +#!/bin/sh +# "." this file, then call the appropriate routines to load modules +# you might need. This is run from /etc/rcS.d/S21loadmodules.sh +# at boot time. Possible examples are commented out, none of which +# are needed on openprotium since they are already in the kernel. + +. /etc/default/functions + + +loaddiskmods(){ + : +# modprobe scsi_mod +# modprobe sd_mod +# modprobe usbcore +# case "$(machine)" in +# nslu2) +# modprobe ehci-hcd +# modprobe ohci-hcd +# ;; +# esac +# modprobe usb-storage +} + +loadnetmods(){ + : +# modprobe af_packet +# case "$(machine)" in +# ixdp425|nslu2|nas100d) +# modprobe ixp4xx_mac +# ;; +# esac +} + +loadmiscmods(){ + : +# modprobe ixp4xx_rng +# modprobe i2c_dev +} + diff --git a/packages/openturbostation-init/files/reflash b/packages/openturbostation-init/files/reflash new file mode 100644 index 0000000000..f2947822f6 --- /dev/null +++ b/packages/openturbostation-init/files/reflash @@ -0,0 +1,163 @@ +#!/bin/sh +# +# Open Protium Reflash. This script will take a firmware image consisting +# of a compressed linux kernel image, concatentated with a jffs2 root +# filesystem image. The kernel MTD device is discovered by locating +# the MTD partition with the tag "kernel" and the filesystem MTD device +# is dicovered by locating the MTD partition with the tag "filesystem." +# There is no TOC inside the firmware images so there is no direct way +# to validate that the sizes of the parts in the firmware match the +# existing MTD partitions. So there could be a mismatch. However, a +# a mismatch size will be detect as this script mounts the newly laid +# done filesystem, a mismatch guarantees this to fail. That being said +# the script does validate the total size to prevent overwriting +# uboot. Furthermore the script makes sure the fsdev is not in use and +# that the various images are block aligned. + +flimg=$1 +if [ -z "$flimg" ]; then + echo "Usage: reflash " + exit 1 +fi + +if [ \! -f $flimg -o \! -r $flimg ]; then + # + # not a file or not readable + # + echo "error: Image file [$flimg] not available" + exit 1 +fi + +dmesg | grep StorCenter >/dev/null 2>&1 +if [ $? -ne 0 ]; then + exit 0 +fi + +blksize=512 +mtd=/proc/mtd +mtab=/proc/mounts +mntdir=/tmp/fs.$$ + +ktag=kernel +fstag=filesystem + +kdev=` grep $ktag $mtd | awk -F: '{print $1}' | sed -e 's?mtd?/dev/mtdblock/?g'` +fsdev=`grep $fstag $mtd | awk -F: '{print $1}' | sed -e 's?mtd?/dev/mtdblock/?g'` + +flsize=`ls -l $flimg | awk '{print $5}'` +ksize=`grep $ktag $mtd | awk '{print "0x" $2}'` +fssize=`grep $fstag $mtd | awk '{print "0x" $2}'` + +# +# Size comes out of dc in exp notation and test wont accept a hex number +# so dumo it in hex then use awk to convert to decimal +# +size=0x`dc 16 o $ksize $fssize + p` +size=`echo $size | awk '{printf ("%d",$1)}'` + +# +# Make sure we are block aligned +# +kblks=`dc $ksize $blksize / p` +r=`dc $ksize $blksize % p` +if [ $r -ne 0 ]; then + echo "error: Kernel partition is not block aligned." + exit 1 +fi + +# +# Make sure we are block aligned +# +fsblks=`dc $fssize $blksize / p` +r=`dc $fssize $blksize % p` +if [ $r -ne 0 ]; then + echo "error: Filesystem partition is not block aligned." + exit 1 +fi + +# +# Check to see that we have enough room +# +if [ $flsize -gt $size ]; then + echo "error: Image size is bigger then available space." + exit 1 +fi + +# +# Is fsdev mounted? +# +grep $fsdev $mtab > /dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "error: $fsdev mounted" + exit 1 +fi + +#