From b2baa20455ce4ddd908c8e95b62a40465c7000a5 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 27 Mar 2007 16:24:49 +0000 Subject: ipkg-collateral: Should be marked as machine specific since it uses machine specific file overrides --- packages/ipkg/ipkg-collateral.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/ipkg/ipkg-collateral.bb b/packages/ipkg/ipkg-collateral.bb index cfe7d71c2d..244d29d08a 100644 --- a/packages/ipkg/ipkg-collateral.bb +++ b/packages/ipkg/ipkg-collateral.bb @@ -1,8 +1,8 @@ DESCRIPTION = "ipkg configuration files" SECTION = "base" LICENSE = "MIT" -PR = "r6" -PACKAGE_ARCH = "all" +PR = "r7" +PACKAGE_ARCH = "${MACHINE_ARCH}" SRC_URI = " \ file://ipkg.conf.comments \ -- cgit v1.2.3 From b566a6e647b2c769a2e3c431ab7d76727bc77243 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Tue, 27 Mar 2007 17:56:24 +0000 Subject: openpbx: Update openpbx.org, thanks to hillct --- packages/openpbx/openpbx.org_1.2_rc3.bb | 35 +++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'packages') diff --git a/packages/openpbx/openpbx.org_1.2_rc3.bb b/packages/openpbx/openpbx.org_1.2_rc3.bb index 76c1f0c7bd..e343eb8729 100644 --- a/packages/openpbx/openpbx.org_1.2_rc3.bb +++ b/packages/openpbx/openpbx.org_1.2_rc3.bb @@ -1,6 +1,10 @@ DESCRIPTION = "A flexible VOIP soft switch/PBX." +DESCRIPTION_${PN}-ogi = "OpenPBX Gateway Inerface for scripted PBX call processing" +DESCRIPTION_${PN}-fax = "Fax send/receive file and T.38 support for OpenPBX" +DESCRIPTION_${PN}-ldap = "LDAP Directory services interface for OpenPBX" +DESCRIPTION_${PN}-sounds = "Standard set of audio prompts for OpenPBX" HOMEPAGE = "http://www.openpbx.org" -#RDEPENDS = "ssmtp" +RDEPENDS = "ssmtp" SECTION = "voip" LICENSE = "GPL" DEPENDS = "openssl zlib tiff libcap spandsp speex readline js \ @@ -9,7 +13,7 @@ DEPENDS_${PN}-ldap = "openldap" RRECOMMENDS = "logrotate" RRECOMMENDS_${PN}-ogi = "perl perl-module-strict openpbx.org-perl" PV = "1.2_rc3" -PR = "r1" +PR = "r2" SRC_URI = "http://www.openpbx.org/releases/${P}.tar.gz \ svn://svn.openpbx.org/openpbx-sounds/trunk/sounds/en_US;module=MelanieTaylor;proto=svn \ @@ -26,10 +30,10 @@ INITSCRIPT_PARAMS = "defaults 60" inherit autotools update-rc.d EXTRA_OECONF = " --with-ssl=${STAGING_DIR}/${HOST_SYS} --enable-low_memory \ - --disable-zaptel --with-directory-layout=lsb --with-chan_fax \ + --disable-zaptel --with-directory-layout=lsb --enable-t38 \ --with-codec-speex=${STAGING_DIR}/${HOST_SYS} --with-app_ldap \ --with-perl-shebang='#!${bindir}/perl' --with-jabber --with-res_jabber \ - --enable-t38 --with-javascript --with-res_js \ + --with-javascript --with-res_js \ --bindir=${bindir} --datadir=${datadir} --sysconfdir=${sysconfdir} \ --includedir=${includedir} --infodir=${infodir} --mandir=${mandir} \ --localstatedir=${localstatedir} --libdir=${libdir}" @@ -69,11 +73,10 @@ FILES_${PN}-sounds = "${datadir}/openpbx.org/sounds/*" FILES_${PN}-dev = "${libdir}/openpbx.org/modules/*.la \ ${libdir}/openpbx.org/*.la \ ${includedir}/openpbx/*" -FILES_${PN}-fax = "${libdir}/openpbx.org/modules/chan_fax.so \ - ${libdir}/openpbx.org/modules/app_rxfax.so \ - ${libdir}/openpbx.org/modules/app_txfax.so \ +FILES_${PN}-fax = "${libdir}/openpbx.org/modules/app_backgrounddetect.so \ ${libdir}/openpbx.org/modules/app_faxdetect.so \ - ${sysconfdir}/openpbx.org/chan_fax.conf" + ${libdir}/openpbx.org/modules/app_rxfax.so \ + ${libdir}/openpbx.org/modules/app_txfax.so" FILES_${PN}-ogi = "${libdir}/openpbx.org/modules/res_ogi.so \ ${datadir}/openpbx.org/ogi/*" FILES_${PN}-ldap = "${libdir}/openpbx.org/modules/app_ldap.*" @@ -81,11 +84,22 @@ FILES_${PN}-ldap = "${libdir}/openpbx.org/modules/app_ldap.*" pkg_postinst_prepend() { grep -q openpbx ${sysconfdir}/group || addgroup --system openpbx grep -q openpbx ${sysconfdir}/passwd || adduser --system --home ${localstatedir}/run/openpbx.org --no-create-home --disabled-password --ingroup openpbx -s ${base_bindir}/false openpbx - chown -R openpbx:openpbx ${localstatedir}/lib/openpbx.org ${localstatedir}/spool/openpbx.org ${localstatedir}/log/openpbx.org ${localstatedir}/run/openpbx.org ${sysconfdir}/openpbx.org ${datadir}/openpbx.org + chown -R openpbx:openpbx ${libdir}/openpbx.org ${localstatedir}/lib/openpbx.org ${localstatedir}/spool/openpbx.org ${localstatedir}/log/openpbx.org ${localstatedir}/run/openpbx.org ${sysconfdir}/openpbx.org ${datadir}/openpbx.org /etc/init.d/populate-volatile.sh update } -CONFFILES_${PN}-fax += "${sysconfdir}/openpbx.org/chan_fax.conf" +pkg_postinst_${PN}-fax () { + chown -R openpbx:openpbx ${libdir}/openpbx.org +} + +pkg_postinst_${PN}-ldap () { + chown -R openpbx:openpbx ${libdir}/openpbx.org +} + +pkg_postinst_${PN}-sounds () { + chown -R openpbx:openpbx ${datadir}/openpbx.org +} + CONFFILES_${PN} += "${sysconfdir}/openpbx.org/musiconhold.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/adsi.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/adtranvofr.conf" @@ -99,6 +113,7 @@ CONFFILES_${PN} += "${sysconfdir}/openpbx.org/dnsmgr.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/dundi.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/enum.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/extconfig.conf" +CONFFILES_${PN} += "${sysconfdir}/openpbx.org/extensions.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/extensions.ael" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/features.conf" CONFFILES_${PN} += "${sysconfdir}/openpbx.org/iax.conf" -- cgit v1.2.3 From 09b18d1fff43cef84dcaa8fa0723f0e38b92d5d1 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 27 Mar 2007 17:58:00 +0000 Subject: apt-package.inc: disable magic that doesn't work and causes builds to fail. Disable oe_libinstall as well, since lib* got built statically * people that care about and/or know apt internals should fix this --- packages/apt/apt-package.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/apt/apt-package.inc b/packages/apt/apt-package.inc index 43f54cadab..8bf2b56739 100644 --- a/packages/apt/apt-package.inc +++ b/packages/apt/apt-package.inc @@ -77,11 +77,11 @@ do_install () { install -m 0755 bin/apt-sortpkgs ${D}${bindir}/ install -m 0755 bin/apt-extracttemplates ${D}${bindir}/ - eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` - oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/ - ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so - oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/ - ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so + #eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` + #oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/ || true + #ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so + #oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/ || true + #ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so install -d ${D}${libdir}/apt/methods install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/ -- cgit v1.2.3 From 1566696e78ee5757811d43ef5eae09bad406d050 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 27 Mar 2007 18:27:43 +0000 Subject: apt.inc: provide an example on how to provide the glibc version to configure --- packages/apt/apt.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages') diff --git a/packages/apt/apt.inc b/packages/apt/apt.inc index b18ed93782..dbf5765205 100644 --- a/packages/apt/apt.inc +++ b/packages/apt/apt.inc @@ -8,3 +8,8 @@ S = "${WORKDIR}/apt-${PV}" inherit autotools gettext EXTRA_AUTORECONF = "--exclude=autopoint,autoheader" + +# Apt wants to know the glibc version by running a binary file, which will fail, so we have to tell configure which version to use +# Since I don't know the impliations of setting a wrong value I only provide one for angstrom, which uses glibc 2.5 (which claims to be 2.4) +# Koen - 20070327 +EXTRA_OECONF_angstrom += " ac_cv_glibc_ver=libc6.4" -- cgit v1.2.3 From 84475325fed1cf7e271ac66b0fd9cb36532e4d4f Mon Sep 17 00:00:00 2001 From: Manuel Teira Date: Tue, 27 Mar 2007 18:31:20 +0000 Subject: xserver-kdrive: update imageon patch, closes #2052 --- .../xserver-kdrive/kdrive-imageon.patch | 66 +++++----------------- .../xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb | 2 +- 2 files changed, 16 insertions(+), 52 deletions(-) (limited to 'packages') diff --git a/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch b/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch index 86ab49e1b2..f4272f80e0 100644 --- a/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch +++ b/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch @@ -6,6 +6,7 @@ # -XV Extension # -Internal and External Imageon offscreen memory support # -Hardware RandR rotation (without using a shadow framebuffer) +# -Support for RandR mode changing # # Patch managed by http://www.holgerschurig.de/patcher.html @@ -128,7 +129,7 @@ + $(FBDEV_LIBS) --- /dev/null +++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon.c -@@ -0,0 +1,607 @@ +@@ -0,0 +1,606 @@ +/* + * Copyright © 2007 Manuel Teira + * @@ -419,14 +420,13 @@ + + w100c->hw_window.offset = W100_HOST2CARD(screen->fb[0].frameBuffer); + -+ -+ W100ComputeMouseMatrix(&m, screen->randr, -+ w100StartupInfo.portrait ? -+ W100_MIN(screen->width, screen->height) : -+ W100_MAX(screen->width, screen->height), -+ w100StartupInfo.portrait ? -+ W100_MAX(screen->width, screen->height) : -+ W100_MIN(screen->width, screen->height)); ++ KdComputeMouseMatrix(&m, screen->randr, ++ w100StartupInfo.portrait ? ++ W100_MIN(screen->width, screen->height) : ++ W100_MAX(screen->width, screen->height), ++ w100StartupInfo.portrait ? ++ W100_MAX(screen->width, screen->height) : ++ W100_MIN(screen->width, screen->height)); + + KdSetMouseMatrix(&m); + @@ -527,7 +527,7 @@ + screen->randr = randr; + screen->width = pScreen->width; + screen->height = pScreen->height; -+ w100c->hw_window.randr = KdAddRotation(randr, w100StartupInfo.randr); ++ w100c->hw_window.randr = KdSubRotation(w100StartupInfo.randr, randr); + w100c->hw_window.mode = W100GetBestMode(w100c, pScreen->width, pScreen->height); + + KdOffscreenSwapOut(screen->pScreen); @@ -902,7 +902,7 @@ +#endif --- /dev/null +++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_cursor.c -@@ -0,0 +1,563 @@ +@@ -0,0 +1,566 @@ +/* + * Copyright © 2007 Manuel Teira + * @@ -1157,6 +1157,7 @@ + (CARD32*) tmpCursor0, + (CARD32*) tmpCursor1); + ++ DUMP_CURSOR((CARD32*)tmpCursor1); + /* Correct endianness */ + src = (CARD32*) tmpCursor1; + dst = (CARD32*) (pCurPriv->area->vidmem->base + pCurPriv->area->offset); @@ -1275,6 +1276,7 @@ + W100CardInfo(pScreenPriv); + W100ScreenInfo(pScreenPriv); + W100Cursor *pCurPriv = &w100s->cursor; ++ DBG_IMAGEON(("W100RealizeCursor\n")); + + if (!pScreenPriv->enabled) { + return TRUE; @@ -1293,6 +1295,7 @@ +static Bool +W100UnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +{ ++ DBG_IMAGEON(("W100UnrealizeCursor\n")); + return TRUE; +} + @@ -6228,7 +6231,7 @@ +} --- /dev/null +++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_support.c -@@ -0,0 +1,1477 @@ +@@ -0,0 +1,1438 @@ +/* + * Copyright © 2007 Manuel Teira + * @@ -7656,45 +7659,6 @@ + return TRUE; +} + -+void -+W100ComputeMouseMatrix(KdMouseMatrix *m, Rotation randr, int width, int height) -+{ -+ int x_dir = 1, y_dir = 1; -+ int i, j; -+ int size[2]; -+ -+ size[0] = width; size[1] = height; -+ if (randr & RR_Reflect_X) -+ x_dir = -1; -+ if (randr & RR_Reflect_Y) -+ y_dir = -1; -+ switch (randr & (RR_Rotate_All)) { -+ case RR_Rotate_0: -+ m->matrix[0][0] = x_dir; m->matrix[0][1] = 0; -+ m->matrix[1][0] = 0; m->matrix[1][1] = y_dir; -+ break; -+ case RR_Rotate_90: -+ m->matrix[0][0] = 0; m->matrix[0][1] = x_dir; -+ m->matrix[1][0] = -y_dir; m->matrix[1][1] = 0; -+ break; -+ case RR_Rotate_180: -+ m->matrix[0][0] = -x_dir; m->matrix[0][1] = 0; -+ m->matrix[1][0] = 0; m->matrix[1][1] = -y_dir; -+ break; -+ case RR_Rotate_270: -+ m->matrix[0][0] = 0; m->matrix[0][1] = -x_dir; -+ m->matrix[1][0] = y_dir; m->matrix[1][1] = 0; -+ break; -+ } -+ for (i = 0; i < 2; i++) -+ { -+ m->matrix[i][2] = 0; -+ for (j = 0 ; j < 2; j++) -+ if (m->matrix[i][j] < 0) -+ m->matrix[i][2] = size[j] - 1; -+ } -+} -+ +void W100TransformTsLibCoordinates(long *x, long *y, void *closure) +{ + W100CardInfo *w100c = closure; diff --git a/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb b/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb index e3fd09f602..fafad38b1a 100644 --- a/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb +++ b/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb @@ -1,7 +1,7 @@ LICENSE = "MIT" DEPENDS = "tslib virtual/libsdl xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto" -PR = "r8" +PR = "r9" PROVIDES = "virtual/xserver" RPROVIDES = "virtual/xserver" -- cgit v1.2.3 From 4ff882fcb5831da2b573900d295724e87eb5b954 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 27 Mar 2007 18:44:25 +0000 Subject: xserver-kdrive-imageon: bump PR of the right xserver --- packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb b/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb index 75b4a9956b..106d5405a6 100644 --- a/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb +++ b/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb @@ -11,7 +11,7 @@ DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext PROVIDES = "virtual/xserver" RPROVIDES = "virtual/xserver" -PR = "r0" +PR = "r1" FILESPATH = "${FILE_DIRNAME}/xserver-kdrive" -- cgit v1.2.3 From 1944b83357f5afec7e0560124ddfcf81b8fc07a5 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Tue, 27 Mar 2007 21:53:18 +0000 Subject: linux-linkstationppc: Upgrade to 2.6.21-rc5 --- packages/linux/linux-linkstationppc_2.6.21-rc4.bb | 43 ----------------------- packages/linux/linux-linkstationppc_2.6.21-rc5.bb | 42 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 43 deletions(-) delete mode 100644 packages/linux/linux-linkstationppc_2.6.21-rc4.bb create mode 100644 packages/linux/linux-linkstationppc_2.6.21-rc5.bb (limited to 'packages') diff --git a/packages/linux/linux-linkstationppc_2.6.21-rc4.bb b/packages/linux/linux-linkstationppc_2.6.21-rc4.bb deleted file mode 100644 index 0410c86706..0000000000 --- a/packages/linux/linux-linkstationppc_2.6.21-rc4.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "Linux Kernel for the Buffalo Linkstation HG 2.6.21-rc4" -SECTION = "kernel" -LICENSE = "GPL" -PR = "r0" - -DEPENDS = "dtc-native" - -COMPATIBLE_MACHINE = "linkstationppc" - -SRC_URI = "http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 \ - http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.21-rc4.bz2;patch=1 \ - file://defconfig \ - " - -S = "${WORKDIR}/linux-2.6.20" - -inherit kernel - -export ARCH="powerpc" - -KERNEL_IMAGETYPE = "uImage" - -FILES_kernel += "/boot/kuroboxHG.dtb \ - /boot/kuroboxHD.dtb" - -do_configure() { - install -m 0644 ${WORKDIR}/defconfig ${S}/.config - ARCH=${ARCH} oe_runmake oldconfig -} - -do_install_append() { - dtc -f -I dts -O dtb -o ${D}/boot/kuroboxHG.dtb -V 16 arch/${ARCH}/boot/dts/kuroboxHG.dts - dtc -f -I dts -O dtb -o ${D}/boot/kuroboxHD.dtb -V 16 arch/${ARCH}/boot/dts/kuroboxHD.dts -} - -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/vmlinux.UBoot -} - -do_deploy[dirs] = "${S}" - -addtask deploy before do_build after do_compile diff --git a/packages/linux/linux-linkstationppc_2.6.21-rc5.bb b/packages/linux/linux-linkstationppc_2.6.21-rc5.bb new file mode 100644 index 0000000000..7a6efb0059 --- /dev/null +++ b/packages/linux/linux-linkstationppc_2.6.21-rc5.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "Linux Kernel for the Buffalo Linkstation HG 2.6.21-rc5" +SECTION = "kernel" +LICENSE = "GPL" +PR = "r0" + +DEPENDS = "dtc-native" +COMPATIBLE_MACHINE = "(lsppchd|lsppchg)" + +SRC_URI = "http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 \ + http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.21-rc5.bz2;patch=1 \ + file://defconfig \ + " + +S = "${WORKDIR}/linux-2.6.20" + +inherit kernel + +export ARCH="powerpc" + +KERNEL_IMAGETYPE = "uImage" + +FILES_kernel-image += "/boot/kuroboxHG.dtb \ + /boot/kuroboxHD.dtb" + +do_configure() { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + ARCH=${ARCH} oe_runmake oldconfig +} + +do_install_append() { + dtc -f -I dts -O dtb -o ${D}/boot/kuroboxHG.dtb -V 16 arch/${ARCH}/boot/dts/kuroboxHG.dts + dtc -f -I dts -O dtb -o ${D}/boot/kuroboxHD.dtb -V 16 arch/${ARCH}/boot/dts/kuroboxHD.dts +} + +do_deploy() { + install -d ${DEPLOY_DIR_IMAGE} + install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/vmlinux.UBoot +} + +do_deploy[dirs] = "${S}" + +addtask deploy before do_build after do_compile -- cgit v1.2.3 From e55d052b8fe7279f2fc23944fd5dd75e743d1a4b Mon Sep 17 00:00:00 2001 From: Matthias Hentges Date: Tue, 27 Mar 2007 22:22:45 +0000 Subject: altboot: Update to latest version --- .../altboot/files/altboot-menu/Advanced/55-bin-sh | 4 +- packages/altboot/files/altboot.func | 2 +- packages/altboot/files/init.altboot | 13 +- packages/altboot/files/nslu2le/.mtn2git_empty | 0 packages/altboot/files/nslu2le/altboot-2.6.cfg | 55 +++++++ .../files/nslu2le/altboot-handlers/.mtn2git_empty | 0 .../files/nslu2le/altboot-handlers/05-USB-Storage | 90 +++++++++++ .../nslu2le/altboot-handlers/10-Onboard-Flash | 18 +++ .../files/nslu2le/altboot-menu/.mtn2git_empty | 0 .../altboot/files/nslu2le/altboot-menu/00-Default | 17 ++ .../files/nslu2le/altboot-menu/30-bootUSB-Stick | 174 +++++++++++++++++++++ .../altboot/files/nslu2le/altboot-menu/55-bin-sh | 27 ++++ .../files/nslu2le/altboot.rc/.mtn2git_empty | 0 packages/altboot/files/set-bootdev | 150 ++++++++++++++++++ 14 files changed, 546 insertions(+), 4 deletions(-) create mode 100644 packages/altboot/files/nslu2le/.mtn2git_empty create mode 100644 packages/altboot/files/nslu2le/altboot-2.6.cfg create mode 100644 packages/altboot/files/nslu2le/altboot-handlers/.mtn2git_empty create mode 100644 packages/altboot/files/nslu2le/altboot-handlers/05-USB-Storage create mode 100644 packages/altboot/files/nslu2le/altboot-handlers/10-Onboard-Flash create mode 100644 packages/altboot/files/nslu2le/altboot-menu/.mtn2git_empty create mode 100644 packages/altboot/files/nslu2le/altboot-menu/00-Default create mode 100644 packages/altboot/files/nslu2le/altboot-menu/30-bootUSB-Stick create mode 100644 packages/altboot/files/nslu2le/altboot-menu/55-bin-sh create mode 100644 packages/altboot/files/nslu2le/altboot.rc/.mtn2git_empty create mode 100755 packages/altboot/files/set-bootdev (limited to 'packages') diff --git a/packages/altboot/files/altboot-menu/Advanced/55-bin-sh b/packages/altboot/files/altboot-menu/Advanced/55-bin-sh index 6c9aef3f3e..e4fe99ebae 100644 --- a/packages/altboot/files/altboot-menu/Advanced/55-bin-sh +++ b/packages/altboot/files/altboot-menu/Advanced/55-bin-sh @@ -7,7 +7,7 @@ run_module() { test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - test "$ASK_PW_ON_BOOT" != "yes" && verify_master_pw >/dev/tty0 + test "$ASK_PW_ON_BOOT" != "yes" && verify_master_pw >/dev/$OUT_TTY # Mount /proc, etc init_rootfs @@ -15,7 +15,7 @@ run_module() { echo -e "\nBoot system with 'exec /sbin/init 5'\n" while true do - exec $SH_SHELL /dev/tty0 2>&1 + exec $SH_SHELL /dev/$OUT_TTY 2>&1 echo "WARNING: Shell was killed!" done } diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index e990a06862..ae38c5b437 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -392,7 +392,7 @@ verify_master_pw() { test -e /etc/altboot.pwd && . /etc/altboot.pwd - if ! test -z "$MASTER_PASSWORD" + if test -n "$MASTER_PASSWORD" -a "$MASTER_PASSWORD" != "[none]" then auth_timeout="3" diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index 30868024b8..74200d1ec9 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -90,7 +90,7 @@ show_menu() { if ! test -d "$1/$file" then # NOTE: It is important to use "." here so that the script inherits - # the shell environment / all set variables! + # the shell environment / all set variables! M_TITLE="`. $1/$file title`" FLAGS="`$1/$file flags`" @@ -109,6 +109,8 @@ show_menu() { fi done +# debug_echo "FILES READ" + # Display directories below /etc/altboot-menu as menu-item # and add all scripts inside the directory to m_entry for dir in `ls -1` @@ -159,6 +161,8 @@ show_menu() { fi done +# debug_echo "DIRS READ" + echo "" } @@ -491,6 +495,7 @@ fi # The NSLU2 is an exception as it uses the way-ugly busybox "ps" # +mount | grep -q "^/proc" || mount -t proc proc /proc MACHINE="`cat /proc/cpuinfo | sed -n "/^Hardware/s/.*\:\ \(.*\)/\1/p"`" case "$MACHINE" in @@ -507,6 +512,12 @@ case "$MACHINE" in ;; esac +if test "`basename "$0"`" = "altboot" +then + show_menu /etc/altboot-menu + exit 0 +fi + if test "$user_called" = "1" then echo "altboot: Using real init [$REAL_INIT] [$*] [`ps |wc -l|tr -d " "`] *" >"$OUT_TTY" diff --git a/packages/altboot/files/nslu2le/.mtn2git_empty b/packages/altboot/files/nslu2le/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/altboot/files/nslu2le/altboot-2.6.cfg b/packages/altboot/files/nslu2le/altboot-2.6.cfg new file mode 100644 index 0000000000..626c543085 --- /dev/null +++ b/packages/altboot/files/nslu2le/altboot-2.6.cfg @@ -0,0 +1,55 @@ +# +# Altboot machine configuration for: NSLU2 / Kernel 2.6 +# + +# Handled by /sbin/init.altboot +# Allow booting images from SD or CF instead of booting +# the ROM. +ENABLE_ALTBOOT="yes" + +# If set to "0" the menu will always be shown, if set to +# "[none]" there will be no menu and no delay +TIMEOUT="[none]" + +REAL_INIT="/sbin/init.sysvinit" +SH_SHELL="/bin/sh" + +ENABLE_SOUND="no" + +IMAGE_PATH="boot-images" +IMAGE_TYPE="ext2" +FSCK_IMAGES="yes" + + +# Can't do that due to missing console +ENABLE_IMAGECONF="no" + +SD_DEVICE="" +SD_KERNEL_MODULE="" + + +USB_HOST_AVAILABLE="yes" +USB_STORAGE_MODULES="ohci_hcd usb_storage sd_mod" +USB_STORAGE_PARTITION="/dev/sda1" +USB_STORAGE_WAIT="4" + +USB_NETWORKING_AVAILABLE="no" +USB_NW_MODULES="usbcore pxa27x_udc ohci-hcd g_ether" +USB_NW_DEVICE="usb0" + +INIT_RUNLEVEL="3" +NO_GUI_RL="" + +# The if set to "", altboot will force you to set a master password on +# first-boot +MASTER_PASSWORD="[none]" +ASK_PW_ON_BOOT="no" + +SD_MOUNTPOINT="/media/card" +CF_MOUNTPOINT="/media/cf" + +DISABLE_SD_BOOT="yes" +DISABLE_CF_BOOT="yes" +DISABLE_NOGUI_BOOT="yes" +DISABLE_BINSH_BOOT="yes" +DISABLE_INSTTGZ_BOOT="yes" diff --git a/packages/altboot/files/nslu2le/altboot-handlers/.mtn2git_empty b/packages/altboot/files/nslu2le/altboot-handlers/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/altboot/files/nslu2le/altboot-handlers/05-USB-Storage b/packages/altboot/files/nslu2le/altboot-handlers/05-USB-Storage new file mode 100644 index 0000000000..50d35ed542 --- /dev/null +++ b/packages/altboot/files/nslu2le/altboot-handlers/05-USB-Storage @@ -0,0 +1,90 @@ +#!/bin/sh +# NOTE: Ported to altboot by CoreDump +# Based on the original turnup helper script. +# +# All parts by Matthias 'CoreDump' Hentges are hereby placed +# under the terms of the GPL +# +# boot from the hard disk partition "$1" (which +# must be given) using options from the rest of +# the command line. +# + +M_TITLE="Boot USB Storage" +test "$USB_HOST_AVAILABLE" = "yes" || exit 0 + +run_module() { + x=x +} + +case "$1" in +title) echo "$M_TITLE" ; exit 0 ;; +run) run_module "$2";; +esac + +nslu2_feeback heartbeat + +bootdev_data="$*" +bootdev_mode="`echo "$bootdev_data" | awk '{print $1}'`" +bootdev_name="`echo "$bootdev_data" | awk '{print $2}'`" +bootdev_uuid="`echo "$bootdev_data" | awk '{print $3}'`" + + +# Use the standard init path (see /etc/init.d/rcS) +export PATH=/sbin:/bin:/usr/sbin:/usr/bin +# +# Load the helper functions +. /etc/default/functions +. /etc/default/modulefunctions +# +leds boot system +# +if test -n "$1" +then + device="$bootdev_name" + UUID="$bootdev_uuid" + + shift + # proc is needed for UUID mount and module load + mount -t proc proc /proc + # load USB & SCSI storage modules (/proc required!) + echo "boot: loading modules required for disk boot" + loaddiskmods + # waiting for disk (FIXME) + sleep=6 + test "$sleep" -gt 0 && sleep "$sleep" + # + # fire the boot + echo "boot: rootfs: mount $* $device [$UUID]" + # + # Mount read-write because before exec'ing init + # If a UUID is given (in the environment) this + # is used in preference to the device, but if + # the UUID mount fails a standard device mount + # is attempted. + if test -n "$UUID" && + mount "$@" -U "$UUID" /mnt || + mount "$@" "$device" /mnt + then + # checkmount checks for sh, chroot, init + # and /mnt (i.e. /mnt/mnt in this case) + if checkmount /mnt + then + # pivot to /initrd if available, else /mnt + cd / + if test -d /mnt/initrd + then + swivel mnt initrd + else + swivel mnt mnt + fi + # swivel failed + fi + # Failure: unmount the partition + umount /mnt + fi +fi + +# fallback - use the flash boot +nslu2_feeback failure +exec /boot/flash diff --git a/packages/altboot/files/nslu2le/altboot-handlers/10-Onboard-Flash b/packages/altboot/files/nslu2le/altboot-handlers/10-Onboard-Flash new file mode 100644 index 0000000000..394279c2af --- /dev/null +++ b/packages/altboot/files/nslu2le/altboot-handlers/10-Onboard-Flash @@ -0,0 +1,18 @@ +#! /bin/sh +# +# Copyright Matthias Hentges (c) 2007 +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# +# Filename: 10-Onboard-Flash +# Date: 20070218 (YMD) + +leds beep +. /etc/default/functions +leds boot system +test -x /sbin/init && exec /sbin/init +# fallback if /sbin/init has been deleted (bad!) +leds boot system panic +exec <>/dev/console >&0 2>&0 +test -x /sbin/sulogin && exec /sbin/sulogin +test -x /bin/sh && exec /bin/sh +exit 1 diff --git a/packages/altboot/files/nslu2le/altboot-menu/.mtn2git_empty b/packages/altboot/files/nslu2le/altboot-menu/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/altboot/files/nslu2le/altboot-menu/00-Default b/packages/altboot/files/nslu2le/altboot-menu/00-Default new file mode 100644 index 0000000000..cb06661d72 --- /dev/null +++ b/packages/altboot/files/nslu2le/altboot-menu/00-Default @@ -0,0 +1,17 @@ +# !/bin/sh +M_TITLE="Flash" + + +run_module() { + leds beep + leds boot system + exec $REAL_INIT "$INIT_RUNLEVEL" + exit 0 +} + +case "$1" in +title) echo "$M_TITLE";; +run) run_module;; +*) echo "Unknown parameter [$1]";; +esac + diff --git a/packages/altboot/files/nslu2le/altboot-menu/30-bootUSB-Stick b/packages/altboot/files/nslu2le/altboot-menu/30-bootUSB-Stick new file mode 100644 index 0000000000..c6c215ecc4 --- /dev/null +++ b/packages/altboot/files/nslu2le/altboot-menu/30-bootUSB-Stick @@ -0,0 +1,174 @@ +# !/bin/sh +# +# Copyright Matthias Hentges (c) 2005 +# +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) + + +M_TITLE="USB Attached Storage" + +test "$USB_HOST_AVAILABLE" = "yes" || exit 0 + +# This function is activated by init.altboot by calling this script with the "run" option +run_module() { + + test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" + + # Mount /proc, etc + init_rootfs + + echo -e "\nStarting USB..." + + for module in $USB_STORAGE_MODULES + do + echo -en "\t - $module: " + modprobe "$module" >/dev/null 2>&1 && echo ok || die "Failed to modprobe [$module]" + done + + echo "" + scan_devices + usb_show_menu + +# echo -n "Mounting $USB_STORAGE_PARTITION..." >/dev/tty0 +# +# mkdir -p /media/usb-storage >/dev/null 2>&1 +# +# sleep "$USB_STORAGE_WAIT" +# +# /bin/mount -t auto -o defaults,noatime $USB_STORAGE_PARTITION /media/usb-storage >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed" +# +# echo "" +# +# # Check for a real fs and loop-images. +# check_target "/media/usb-storage" >/dev/tty0 +} + +scan_devices() { + reset_pref "available_devices" + + cnt=1 + + for scsi_disk in `ls -1 /sys/block/ | grep ^sd` + do + scsi_disk_name="`echo "$scsi_disk" | awk '{printf("%s\n",toupper($0))}'`" + test -e /sys/block/$scsi_disk/device/vendor && HDD_VENDOR="`cat /sys/block/$scsi_disk/device/vendor | sed "s/\ $//"`" + test -z "$HDD_VENDOR" && HDD_VENDOR="Unknown Vendor" + + test -e /sys/block/$scsi_disk/device/model && HDD_MODEL="`cat /sys/block/$scsi_disk/device/model`" + test -z "$HDD_MODEL" && HDD_MODEL="Unknown Model" + + scsi_disk_partition_cnt="`ls -1 /sys/block/$scsi_disk | grep ^$scsi_disk | wc -l | tr -d " "`" + test "$scsi_disk_partition_cnt" -gt 1 && scsi_disk_partition_cnt="$scsi_disk_partition_cnt partitions" || scsi_disk_partition_cnt="$scsi_disk_partition_cnt partition" + + set_pref "available_devices" "$cnt" "$scsi_disk_name ( $HDD_VENDOR $HDD_MODEL with $scsi_disk_partition_cnt)" + set_pref "available_devices_short" "$cnt" "$scsi_disk" + set_pref "available_devices_type" "$cnt" "usb" + + let cnt=$cnt+1 + done + +} + +usb_show_menu() { + + cnt2=0 ; let cnt=$cnt-1 + while test "$cnt" != "$cnt2" + do + let cnt2=$cnt2+1 + get_pref "available_devices" "$cnt2" dev + + echo -e "\t[$cnt2] - $dev" + done + + while test -z "$selected_dev" + do + echo -en "\nYour choice: " + read junk + get_pref "available_devices" "$junk" selected_dev + get_pref "available_devices_type" "$junk" part_mode + +# debug_echo "show_menu(): selected: [$selected_dev]" + done + + if ( echo "$selected_dev" | grep -q "^Flash" ) + then + boot_from flash + else + get_pref "available_devices_short" "$junk" selected_dev +# debug_echo "show_menu(): selected_devices_short: [$selected_dev]" + + partitions="`ls -1 /sys/block/$selected_dev|grep ^$selected_dev`" + test -z "$partitions" && die "No partitions found on /dev/$selected_dev!" + + + echo -e "\nPlease select a partition on $selected_dev to boot from:\n" + + cnt=1 + for partition in $partitions + do + # We assume that partitions with a "size" < 10 are extended partitions + # and should not be listed. TYPE=swap is blacklisted as well. + part_size="`cat /sys/block/$selected_dev/$partition/size`" + part_type="`blkid -s TYPE -o value /dev/$partition`" + + if test "$part_size" -gt 10 -a "$part_type" != "swap" + then + let part_size="($part_size/2)/1000" + echo -e "\t[$cnt] $partition (~ ${part_size}Mb, $part_type)" + set_pref "available_partitions" "$cnt" "$partition" + + let cnt=$cnt+1 + fi + done + + while test -z "$selected_partition" + do + echo -en "\nYour choice: " + read junk + get_pref "available_partitions" "$junk" selected_partition + done + + part_uuid="`blkid -c /dev/null -s UUID -o value /dev/$selected_partition`" + + boot_from "$part_mode" "$selected_partition" "$part_uuid" + fi +} + +boot_from() { + debug_echo "boot_from() [$*]" + + part_mode="$1" + part_name="$2" + part_uuid="$3" + + case "$part_mode" in + usb) umount /tmp/mnt.set-bootdev >/dev/null 2>&1 + rm -rf /tmp/mnt.set-bootdev ; mkdir -p /tmp/mnt.set-bootdev + + if ! ( mount -U "$part_uuid" /tmp/mnt.set-bootdev ) + then + echo "** Note: UUID mount for $part_name failed" + mount /dev/$part_name /tmp/mnt.set-bootdev && echo "** Note: Normal mount for $part_name successful" + fi + + if ! test -e /tmp/mnt.set-bootdev/sbin/init.sysvinit + then + copy_rootfs /tmp/mnt.set-bootdev/ + else + umount /tmp/mnt.set-bootdev + echo -e "\nSetting /dev/$part_name as boot-partition" + echo "3 $part_name $part_uuid" > /etc/altboot.last + fi + ;; + esac +} + +copy_rootfs() { + debug_echo "copy_rootfs() [$*]" +} + +case "$1" in +title) echo "$M_TITLE";; +run) run_module "$2";; +esac + diff --git a/packages/altboot/files/nslu2le/altboot-menu/55-bin-sh b/packages/altboot/files/nslu2le/altboot-menu/55-bin-sh new file mode 100644 index 0000000000..1c3fccd9d9 --- /dev/null +++ b/packages/altboot/files/nslu2le/altboot-menu/55-bin-sh @@ -0,0 +1,27 @@ +# !/bin/sh +M_TITLE="init=/bin/sh" + +test "$DISABLE_BINSH_BOOT" = yes && exit 0 + +run_module() { + + test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" + + test "$ASK_PW_ON_BOOT" != "yes" && verify_master_pw >$OUT_TTY + + # Mount /proc, etc + init_rootfs + + echo -e "\nBoot system with 'exec /sbin/init 5'\n" + while true + do + exec $SH_SHELL <$OUT_TTY >$OUT_TTY 2>&1 + echo "WARNING: Shell was killed!" + done +} + +case "$1" in +title) echo "$M_TITLE";; +run) run_module;; +esac + diff --git a/packages/altboot/files/nslu2le/altboot.rc/.mtn2git_empty b/packages/altboot/files/nslu2le/altboot.rc/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/altboot/files/set-bootdev b/packages/altboot/files/set-bootdev new file mode 100755 index 0000000000..60d0283dc4 --- /dev/null +++ b/packages/altboot/files/set-bootdev @@ -0,0 +1,150 @@ +#!/bin/sh + +VERSION="0.0.1" +ENABLE_DEBUG="yes" + +die() { + echo -e "ERROR: $1" + exit 1 +} + +. /etc/altboot.func || die "/etc/altboot.func is missing!" +test -d /sys/block || die "Sysfs problem? (/sys/block not found)" + +debug_echo() { + test "$ENABLE_DEBUG" = "yes" && echo -e "${C_YELLOW}DEBUG:${C_RESET}${C_WHITE} $1 ${C_RESET}" +} + +scan_devices() { + reset_pref "available_devices" + + cnt=1 + set_pref "available_devices" "$cnt" "Flash" ; let cnt=$cnt+1 + + for scsi_disk in `ls -1 /sys/block/ | grep ^sd` + do + scsi_disk_name="`echo "$scsi_disk" | awk '{printf("%s\n",toupper($0))}'`" + test -e /sys/block/$scsi_disk/device/vendor && HDD_VENDOR="`cat /sys/block/$scsi_disk/device/vendor | sed "s/\ $//"`" + test -z "$HDD_VENDOR" && HDD_VENDOR="Unknown Vendor" + + test -e /sys/block/$scsi_disk/device/model && HDD_MODEL="`cat /sys/block/$scsi_disk/device/model`" + test -z "$HDD_MODEL" && HDD_MODEL="Unknown Model" + + scsi_disk_partition_cnt="`ls -1 /sys/block/$scsi_disk | grep ^$scsi_disk | wc -l | tr -d " "`" + test "$scsi_disk_partition_cnt" -gt 1 && scsi_disk_partition_cnt="$scsi_disk_partition_cnt partitions" || scsi_disk_partition_cnt="$scsi_disk_partition_cnt partition" + + set_pref "available_devices" "$cnt" "$scsi_disk_name ( $HDD_VENDOR $HDD_MODEL with $scsi_disk_partition_cnt)" + set_pref "available_devices_short" "$cnt" "$scsi_disk" + set_pref "available_devices_type" "$cnt" "usb" + + let cnt=$cnt+1 + done + +} + +show_menu() { + echo -e "\nset-bootdev v$VERSION\n" + + echo -e "Please select the device you wish to boot from:\n" + + cnt2=0 ; let cnt=$cnt-1 + while test "$cnt" != "$cnt2" + do + let cnt2=$cnt2+1 + get_pref "available_devices" "$cnt2" dev + + echo -e "\t[$cnt2] - $dev" + done + + while test -z "$selected_dev" + do + echo -en "\nYour choice: " + read junk + get_pref "available_devices" "$junk" selected_dev + get_pref "available_devices_type" "$junk" part_mode + +# debug_echo "show_menu(): selected: [$selected_dev]" + done + + if ( echo "$selected_dev" | grep -q "^Flash" ) + then + boot_from flash + else + get_pref "available_devices_short" "$junk" selected_dev +# debug_echo "show_menu(): selected_devices_short: [$selected_dev]" + + partitions="`ls -1 /sys/block/$selected_dev|grep ^$selected_dev`" + test -z "$partitions" && die "No partitions found on /dev/$selected_dev!" + + + echo -e "\nPlease select a partition on $selected_dev to boot from:\n" + + cnt=1 + for partition in $partitions + do + # We assume that partitions with a "size" < 10 are extended partitions + # and should not be listed. TYPE=swap is blacklisted as well. + part_size="`cat /sys/block/$selected_dev/$partition/size`" + part_type="`blkid -s TYPE -o value /dev/$partition`" + + if test "$part_size" -gt 10 -a "$part_type" != "swap" + then + let part_size="($part_size/2)/1000" + echo -e "\t[$cnt] $partition (~ ${part_size}Mb, $part_type)" + set_pref "available_partitions" "$cnt" "$partition" + + let cnt=$cnt+1 + fi + done + + while test -z "$selected_partition" + do + echo -en "\nYour choice: " + read junk + get_pref "available_partitions" "$junk" selected_partition + done + + part_uuid="`blkid -c /dev/null -s UUID -o value /dev/$selected_partition`" + + boot_from "$part_mode" "$selected_partition" "$part_uuid" + fi +} + +boot_from() { + debug_echo "boot_from() [$*]" + + part_mode="$1" + part_name="$2" + part_uuid="$3" + + case "$part_mode" in + usb) umount /tmp/mnt.set-bootdev >/dev/null 2>&1 + rm -rf /tmp/mnt.set-bootdev ; mkdir -p /tmp/mnt.set-bootdev + + if ! ( mount -U "$part_uuid" /tmp/mnt.set-bootdev ) + then + echo "** Note: UUID mount for $part_name failed" + mount /dev/$part_name /tmp/mnt.set-bootdev && echo "** Note: Normal mount for $part_name successful" + fi + + if ! test -e /tmp/mnt.set-bootdev/sbin/init.sysvinit + then + copy_rootfs /tmp/mnt.set-bootdev/ + else + umount /tmp/mnt.set-bootdev + echo -e "\nSetting /dev/$part_name as boot-partition" + echo "$part_mode $part_name $part_uuid" > /etc/set-bootdev.conf + fi + ;; + flash) echo "Setting the onboard flash as boot-partition" + echo "$part_mode $part_name $part_uuid" > /etc/set-bootdev.conf + ;; + esac +} + +copy_rootfs() { + debug_echo "copy_rootfs() [$*]" +} + +scan_devices +show_menu -- cgit v1.2.3