[oe-commits] org.oe.dev merge of '28e2872ee9420efa1c6785b37d88314496a12175'

oe commit openembedded-commits at lists.openembedded.org
Thu Dec 27 17:32:40 UTC 2007


merge of '28e2872ee9420efa1c6785b37d88314496a12175'
     and '2c1b6fa0891e86d61e015c51b2b0fc0690789b70'

Author: oe at openembedded.org
Branch: org.openembedded.dev
Revision: a6e121fbba4316c79e9de7fe22dfa94b77931fdf
ViewMTN: http://monotone.openembedded.org/revision/info/a6e121fbba4316c79e9de7fe22dfa94b77931fdf
Files:
1
packages/qt4/qtopia-core/build-tools.patch
packages/qt4/files/0008-backport-qt-lib-infix.patch
packages/qt4/qt_packaging.inc
packages/qt4/qt_staging.inc
packages/qt4/qtopia-core.inc
packages/kexec/kexec-tools-1.101/kexec-arm-atags.patch
conf/distro/angstrom-2008.1.conf
packages/kexec/kexec-tools_1.101.bb
packages/mtd/mtd-utils_1.0.0+git.bb
Diffs:

#
# mt diff -r28e2872ee9420efa1c6785b37d88314496a12175 -ra6e121fbba4316c79e9de7fe22dfa94b77931fdf
#
# 
# 
# add_file "packages/qt4/qtopia-core/build-tools.patch"
#  content [6612f0ee0a17e0dbc12ea3bed6fa66232e887240]
# 
# patch "packages/qt4/files/0008-backport-qt-lib-infix.patch"
#  from [38b864fb3010c2de2fe5c5a47fa3bae0247094b0]
#    to [4d071a20c1c343cfcae88bbb9c4c6ff6153db11f]
# 
# patch "packages/qt4/qt_packaging.inc"
#  from [fe6ac1892555890ed97bb2e3b8cb75239b6a442b]
#    to [49645ec215cac92b25eb2867013540ce7d7bd328]
# 
# patch "packages/qt4/qt_staging.inc"
#  from [1e20c2e834a2fdefaabe874c5cb9f9602a6325ef]
#    to [7cfc32182e50d232e37d0c6ff7a596d8ec467cc7]
# 
# patch "packages/qt4/qtopia-core.inc"
#  from [27e955f9b1f75f8581de52f9d083dd2df2ec13fa]
#    to [afdef9632312a739952146a0359c30d1fc64c12f]
# 
============================================================
--- packages/qt4/qtopia-core/build-tools.patch	6612f0ee0a17e0dbc12ea3bed6fa66232e887240
+++ packages/qt4/qtopia-core/build-tools.patch	6612f0ee0a17e0dbc12ea3bed6fa66232e887240
@@ -0,0 +1,28 @@
+Do not disable tools, examples and demos for the QWS build. Use brute-force
+to do this.
+
+Index: qtopia-core-opensource-src-4.3.3/configure
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/configure	2007-12-27 16:30:36.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/configure	2007-12-27 16:30:52.000000000 +0100
+@@ -2265,13 +2265,13 @@
+     CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
+ 
+     # don't build tools by default when cross-compiling
+-    if [ "$PLATFORM" != "$XPLATFORM" ]; then
+-	CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
+-    fi
+-fi
+-for nobuild in $CFG_NOBUILD_PARTS; do
+-    CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
+-done
++    #if [ "$PLATFORM" != "$XPLATFORM" ]; then
++    #	CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
++    #fi
++fi
++#for nobuild in $CFG_NOBUILD_PARTS; do
++#    CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
++#done
+ if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
+ #    echo
+ #    echo "WARNING: libs is a required part of the build."
============================================================
--- packages/qt4/files/0008-backport-qt-lib-infix.patch	38b864fb3010c2de2fe5c5a47fa3bae0247094b0
+++ packages/qt4/files/0008-backport-qt-lib-infix.patch	4d071a20c1c343cfcae88bbb9c4c6ff6153db11f
@@ -1,8 +1,8 @@
-diff --git a/configure b/configure
-index c5bdc34..a52607f 100755
---- a/configure
-+++ b/configure
-@@ -782,6 +782,11 @@ while [ "$#" -gt 0 ]; do
+Index: qtopia-core-opensource-src-4.3.3/configure
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/configure	2007-12-27 17:26:19.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/configure	2007-12-27 17:26:19.000000000 +0100
+@@ -782,6 +782,11 @@
          VAR=endian
          VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
          ;;
@@ -14,7 +14,7 @@ index c5bdc34..a52607f 100755
      -D?*|-D)
          VAR="add_define"
          if [ "$1" = "-D" ]; then
-@@ -903,6 +908,9 @@ while [ "$#" -gt 0 ]; do
+@@ -903,6 +908,9 @@
      libdir)
          QT_INSTALL_LIBS="$VAL"
          ;;
@@ -24,7 +24,7 @@ index c5bdc34..a52607f 100755
      translationdir)
          QT_INSTALL_TRANSLATIONS="$VAL"
          ;;
-@@ -2606,6 +2614,8 @@ fi
+@@ -2606,6 +2614,8 @@
      -no-sse ............ Do not compile with use of SSE instructions.
      -no-sse2 ........... Do not compile with use of SSE2 instructions.
  
@@ -33,7 +33,7 @@ index c5bdc34..a52607f 100755
      -D <string> ........ Add an explicit define to the preprocessor.
      -I <string> ........ Add an explicit include path.
      -L <string> ........ Add an explicit library path.
-@@ -5273,6 +5283,8 @@ QT_MAJOR_VERSION = $QT_MAJOR_VERSION
+@@ -5273,6 +5283,8 @@
  QT_MINOR_VERSION = $QT_MINOR_VERSION
  QT_PATCH_VERSION = $QT_PATCH_VERSION
  
@@ -42,11 +42,11 @@ index c5bdc34..a52607f 100755
  EOF
  if [ "$CFG_RPATH" = "yes" ]; then
      echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
-diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 32a7fd5..48d584f 100644
---- a/mkspecs/features/qt_functions.prf
-+++ b/mkspecs/features/qt_functions.prf
-@@ -28,7 +28,7 @@ defineTest(qtAddLibrary) {
+Index: qtopia-core-opensource-src-4.3.3/mkspecs/features/qt_functions.prf
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/mkspecs/features/qt_functions.prf	2007-12-04 18:07:53.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/mkspecs/features/qt_functions.prf	2007-12-27 17:26:19.000000000 +0100
+@@ -28,7 +28,7 @@
               INCLUDEPATH -= $$FRAMEWORK_INCLUDE
               INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
             }
@@ -55,7 +55,7 @@ index 32a7fd5..48d584f 100644
          } else:!qt_no_framework { #detection
             for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/Frameworks)) {
         	      exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
-@@ -46,15 +46,15 @@ defineTest(qtAddLibrary) {
+@@ -46,15 +46,15 @@
      }
      isEmpty(LINKAGE) {
         CONFIG(debug, debug|release) {
@@ -75,11 +75,11 @@ index 32a7fd5..48d584f 100644
      }
      LIBS += $$LINKAGE
      export(LIBS)
-diff --git a/src/qbase.pri b/src/qbase.pri
-index 4db7e70..278e011 100644
---- a/src/qbase.pri
-+++ b/src/qbase.pri
-@@ -138,7 +138,7 @@ DEFINES += QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS QT_44_API_QSQLQUERY_FINISH
+Index: qtopia-core-opensource-src-4.3.3/src/qbase.pri
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/src/qbase.pri	2007-12-04 18:08:13.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/src/qbase.pri	2007-12-27 17:26:19.000000000 +0100
+@@ -138,7 +138,7 @@
  contains(QT_CONFIG, qt3support):DEFINES *= QT3_SUPPORT
  DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
  
@@ -88,11 +88,11 @@ index 4db7e70..278e011 100644
  
  moc_dir.name = moc_location
  moc_dir.variable = QMAKE_MOC
-diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro
-index c121f28..83c3ed7 100644
---- a/tools/assistant/lib/lib.pro
-+++ b/tools/assistant/lib/lib.pro
-@@ -52,7 +52,7 @@ mac:!static:contains(QT_CONFIG, qt_framework) {
+Index: qtopia-core-opensource-src-4.3.3/tools/assistant/lib/lib.pro
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/tools/assistant/lib/lib.pro	2007-12-04 18:08:19.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/tools/assistant/lib/lib.pro	2007-12-27 17:26:19.000000000 +0100
+@@ -52,7 +52,7 @@
     }
  }
  
@@ -101,19 +101,19 @@ index c121f28..83c3ed7 100644
  
  target.path=$$[QT_INSTALL_LIBS]
  INSTALLS        += target
-diff --git a/tools/designer/src/components/component.pri b/tools/designer/src/components/component.pri
-index 15c0cf2..78b075d 100644
---- a/tools/designer/src/components/component.pri
-+++ b/tools/designer/src/components/component.pri
+Index: qtopia-core-opensource-src-4.3.3/tools/designer/src/components/component.pri
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/tools/designer/src/components/component.pri	2007-12-04 18:08:43.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/tools/designer/src/components/component.pri	2007-12-27 17:26:19.000000000 +0100
 @@ -1,2 +1,2 @@
  
 -TARGET = $$qtLibraryTarget($$TARGET)
 +TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX)
-diff --git a/tools/qdbus/src/src.pro b/tools/qdbus/src/src.pro
-index 47ef100..0669a46 100644
---- a/tools/qdbus/src/src.pro
-+++ b/tools/qdbus/src/src.pro
-@@ -70,7 +70,7 @@ mac:!static:contains(QT_CONFIG, qt_framework) {
+Index: qtopia-core-opensource-src-4.3.3/tools/qdbus/src/src.pro
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/tools/qdbus/src/src.pro	2007-12-04 18:08:18.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/tools/qdbus/src/src.pro	2007-12-27 17:26:19.000000000 +0100
+@@ -70,7 +70,7 @@
     }
  }
  
@@ -122,11 +122,11 @@ index 47ef100..0669a46 100644
  
  # Input
  
-diff --git a/tools/qtestlib/src/src.pro b/tools/qtestlib/src/src.pro
-index 5120a29..7d2082e 100644
---- a/tools/qtestlib/src/src.pro
-+++ b/tools/qtestlib/src/src.pro
-@@ -61,7 +61,7 @@ mac:!static:contains(QT_CONFIG, qt_framework) {
+Index: qtopia-core-opensource-src-4.3.3/tools/qtestlib/src/src.pro
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/tools/qtestlib/src/src.pro	2007-12-04 18:08:18.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/tools/qtestlib/src/src.pro	2007-12-27 17:26:19.000000000 +0100
+@@ -61,7 +61,7 @@
     }
  }
  
@@ -135,3 +135,32 @@ index 5120a29..7d2082e 100644
  
  # Input
  HEADERS = qtest_global.h qtestcase.h qtestdata.h qtesteventloop.h
+Index: qtopia-core-opensource-src-4.3.3/tools/designer/src/uitools/uitools.pro
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/tools/designer/src/uitools/uitools.pro	2007-12-04 18:08:43.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/tools/designer/src/uitools/uitools.pro	2007-12-27 17:26:19.000000000 +0100
+@@ -1,5 +1,5 @@
+ TEMPLATE = lib
+-TARGET = $$qtLibraryTarget(QtUiTools)
++TARGET = $$qtLibraryTarget(QtUiTools$$QT_LIBINFIX)
+ QT += xml
+ CONFIG += qt staticlib
+ DESTDIR = ../../../../lib
+Index: qtopia-core-opensource-src-4.3.3/mkspecs/features/uitools.prf
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/mkspecs/features/uitools.prf	2007-12-27 17:32:57.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/mkspecs/features/uitools.prf	2007-12-27 17:33:56.000000000 +0100
+@@ -2,10 +2,10 @@
+ qt:load(qt)
+ 
+ # Include the correct version of the UiLoader library
+-QTUITOOLS_LINKAGE = -lQtUiTools
++QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}
+ CONFIG(debug, debug|release) {
+-    mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug
+-    win32: QTUITOOLS_LINKAGE = -lQtUiToolsd
++    mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug
++    win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d
+ }
+ LIBS += $$QTUITOOLS_LINKAGE
+ 
============================================================
--- packages/qt4/qt_packaging.inc	fe6ac1892555890ed97bb2e3b8cb75239b6a442b
+++ packages/qt4/qt_packaging.inc	49645ec215cac92b25eb2867013540ce7d7bd328
@@ -109,7 +109,7 @@ FILES_${QT_BASE_LIB}opengl4-dbg         
 FILES_${QT_BASE_LIB}opengl4                 = "${libdir}/libQtOpenGL${QT_LIBINFIX}.so.*"
 FILES_${QT_BASE_LIB}opengl4-dev             = "${@qt_default_dev('OpenGL')}"
 FILES_${QT_BASE_LIB}opengl4-dbg             = "${libdir}/.debug/libQtOpenGL*"
-FILES_${QT_BASE_LIB}uitools4-dev            = "${libdir}/libQtUiTools* ${includedir}/${QT_DIR_NAME}/QtUiTools* ${libdir}/pkgconfig/${QT_LIBRARY_NAME}UiTools.pc"
+FILES_${QT_BASE_LIB}uitools4-dev            = "${libdir}/libQtUiTools* ${includedir}/${QT_DIR_NAME}/QtUiTools* ${libdir}/pkgconfig/QtUiTools${QT_LIBINFIX}.pc"
 
 
 FILES_${QT_BASE_NAME}-plugins-accessible   = "${libdir}/${QT_DIR_NAME}/plugins/accessible/*.so"
============================================================
--- packages/qt4/qt_staging.inc	1e20c2e834a2fdefaabe874c5cb9f9602a6325ef
+++ packages/qt4/qt_staging.inc	7cfc32182e50d232e37d0c6ff7a596d8ec467cc7
@@ -20,8 +20,17 @@ do_stage() {
     do
         sed -i s,installed=yes,installed=no, $i
         cp -fpPR $i ${STAGING_LIBDIR}/${QT_DIR_NAME}/
+        cp -fpPR ${STAGE_TEMP}/${libdir}/$(basename $i .la).prl ${STAGING_LIBDIR}/${QT_DIR_NAME}
         oe_libinstall -C ${STAGE_TEMP}/${libdir} -so $(basename $i .la) ${STAGING_LIBDIR}/${QT_DIR_NAME}
     done
 
+    for i in libQtAssistantClient${QT_LIBINFIX} libQtDesignerComponents${QT_LIBINFIX} libQtUiTools${QT_LIBINFIX} libQtUiTools${QT_LIBINFIX} libQtDesigner${QT_LIBINFIX}
+    do
+        cp ${STAGE_TEMP}/${libdir}/$i.prl ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
+        cp ${STAGE_TEMP}/${libdir}/$i.la  ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
+        oe_libinstall -C ${STAGE_TEMP}/${libdir} -so $i ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
+        oe_libinstall -C ${STAGE_TEMP}/${libdir} -a $i ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
+    done
+
     rm -rf ${STAGE_TEMP}
 }
============================================================
--- packages/qt4/qtopia-core.inc	27e955f9b1f75f8581de52f9d083dd2df2ec13fa
+++ packages/qt4/qtopia-core.inc	afdef9632312a739952146a0359c30d1fc64c12f
@@ -10,7 +10,8 @@ SRC_URI = "ftp://ftp.trolltech.com/qt/so
            file://0001-cross-compile.patch;patch=1 \
            file://0003-no-tools.patch;patch=1 \
            file://0004-no-qmake.patch;patch=1 \
-           file://0005-fix-mkspecs.patch;patch=1"
+           file://0005-fix-mkspecs.patch;patch=1 \
+           file://build-tools.patch;patch=1"
 S = "${WORKDIR}/qtopia-core-opensource-src-${PV}"
 
 


#
# mt diff -r2c1b6fa0891e86d61e015c51b2b0fc0690789b70 -ra6e121fbba4316c79e9de7fe22dfa94b77931fdf
#
# 
# 
# add_file "packages/kexec/kexec-tools-1.101/kexec-arm-atags.patch"
#  content [5979f478f97d3d977f2cc97804b69580432cbfc4]
# 
# patch "conf/distro/angstrom-2008.1.conf"
#  from [db7d798ae0bfb0247447e34639d0beebb064abc6]
#    to [13f3d678fe8a5316bdf4bf2448984ad0f7fbc69e]
# 
# patch "packages/kexec/kexec-tools_1.101.bb"
#  from [90e71612793cff1e87109dcec8aa5c8a1894465f]
#    to [ca02155fb0738f03ed10922ed0662ff62515da42]
# 
# patch "packages/mtd/mtd-utils_1.0.0+git.bb"
#  from [28c59a29a8f4cc26b7723edd88cd3ee953be98f4]
#    to [db38f6e2d20f70fbb76af8a5fd01ade273c67858]
# 
============================================================
--- packages/kexec/kexec-tools-1.101/kexec-arm-atags.patch	5979f478f97d3d977f2cc97804b69580432cbfc4
+++ packages/kexec/kexec-tools-1.101/kexec-arm-atags.patch	5979f478f97d3d977f2cc97804b69580432cbfc4
@@ -0,0 +1,294 @@
+---
+ kexec/arch/arm/kexec-zImage-arm.c |  259 ++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 252 insertions(+), 7 deletions(-)
+
+Index: kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c
+===================================================================
+--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c	2007-12-26 21:17:07.000000000 +0000
++++ kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c	2007-12-27 01:24:25.000000000 +0000
+@@ -1,11 +1,83 @@
++/*
++ * - 08/21/2007 ATAG support added by Uli Luckas <u.luckas at road.de>
++ *
++ */
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <limits.h>
++#include <stdint.h>
++#include <getopt.h>
++#include <arch/options.h>
++#include <asm/page.h>
+ #include "../../kexec.h"
+ 
++#define COMMAND_LINE_SIZE 1024
++#define BOOT_PARAMS_SIZE 1536
++
++struct tag_header {
++	uint32_t size;
++	uint32_t tag;
++};
++
++/* The list must start with an ATAG_CORE node */
++#define ATAG_CORE       0x54410001
++
++struct tag_core {
++	uint32_t flags;	    /* bit 0 = read-only */
++	uint32_t pagesize;
++	uint32_t rootdev;
++};
++
++/* it is allowed to have multiple ATAG_MEM nodes */
++#define ATAG_MEM	0x54410002
++
++struct tag_mem32 {
++	uint32_t   size;
++	uint32_t   start;  /* physical start address */
++};
++
++/* describes where the compressed ramdisk image lives (virtual address) */
++/*
++ * this one accidentally used virtual addresses - as such,
++ * it's deprecated.
++ */
++#define ATAG_INITRD     0x54410005
++
++/* describes where the compressed ramdisk image lives (physical address) */
++#define ATAG_INITRD2    0x54420005
++
++struct tag_initrd {
++        uint32_t start;    /* physical start address */
++        uint32_t size;     /* size of compressed ramdisk image in bytes */
++};
++
++/* command line: \0 terminated string */
++#define ATAG_CMDLINE    0x54410009
++
++struct tag_cmdline {
++	char    cmdline[1];     /* this is the minimum size */
++};
++
++/* The list ends with an ATAG_NONE node. */
++#define ATAG_NONE       0x00000000
++
++struct tag {
++	struct tag_header hdr;
++	union {
++		struct tag_core	 core;
++		struct tag_mem32	mem;
++		struct tag_initrd       initrd;
++		struct tag_cmdline      cmdline;
++	} u;
++};
++
++#define tag_next(t)     ((struct tag *)((uint32_t *)(t) + (t)->hdr.size))
++#define byte_size(t)    ((t)->hdr.size << 2)
++#define tag_size(type)  ((sizeof(struct tag_header) + sizeof(struct type) + 3) >> 2)
++
+ int zImage_arm_probe(const char *buf, off_t len)
+ {
+ 	/* 
+@@ -14,21 +86,194 @@ int zImage_arm_probe(const char *buf, of
+ 	 */	
+ 	return 0;
+ }
++
+ void zImage_arm_usage(void)
+ {
++	printf(	"     --command-line=STRING Set the kernel command line to STRING.\n"
++		"     --append=STRING       Set the kernel command line to STRING.\n"
++		"     --initrd=FILE         Use FILE as the kernel's initial ramdisk.\n"
++		"     --ramdisk=FILE        Use FILE as the kernel's initial ramdisk.\n"
++		);
+ }
+-int zImage_arm_load(int argc, char **argv, const char *buf, off_t len, 
++
++static
++struct tag * atag_read_tags(void)
++{
++	static unsigned long buf[BOOT_PARAMS_SIZE];
++	const char fn[]= "/proc/atags";
++	FILE *fp;
++	fp = fopen(fn, "r");
++	if (!fp) {
++		fprintf(stderr, "Cannot open %s: %s\n", 
++			fn, strerror(errno));
++		return NULL;
++	}
++
++	fread(buf, sizeof(buf[1]), BOOT_PARAMS_SIZE, fp);
++	if (ferror(fp)) {
++		fprintf(stderr, "Cannot read %s: %s\n",
++			fn, strerror(errno));
++		fclose(fp);
++		return NULL;
++	}
++
++	fclose(fp);
++	return (struct tag *) buf;
++}
++
++
++static
++int atag_arm_load(struct kexec_info *info, unsigned long base,
++	const char *command_line, off_t command_line_len,
++	const char *initrd, off_t initrd_len)
++{
++	struct tag *saved_tags = atag_read_tags();
++	char *buf;
++	off_t len;
++	struct tag *params;
++	uint32_t *initrd_start;
++	
++	buf = xmalloc(getpagesize());
++	if (!buf) {
++		fprintf(stderr, "Compiling ATAGs: out of memory\n");
++		return -1;
++	}
++
++	memset(buf, 0xff, getpagesize());
++	params = (struct tag *)buf;
++
++	if (saved_tags) {
++		// Copy tags
++		saved_tags = (struct tag *) saved_tags;
++		while(byte_size(saved_tags)) {
++			switch (saved_tags->hdr.tag) {
++			case ATAG_INITRD:
++			case ATAG_INITRD2:
++			case ATAG_CMDLINE:
++			case ATAG_NONE:
++				// skip these tags
++				break;
++			default:
++				// copy all other tags
++				memcpy(params, saved_tags, byte_size(saved_tags));
++				params = tag_next(params);
++			}
++			saved_tags = tag_next(saved_tags);
++		}
++	} else {
++		params->hdr.size = 2;
++		params->hdr.tag = ATAG_CORE;
++		params = tag_next(params);
++	}
++
++	if (initrd) {
++		params->hdr.size = tag_size(tag_initrd);
++		params->hdr.tag = ATAG_INITRD2;
++		initrd_start = &params->u.initrd.start;
++		params->u.initrd.size = initrd_len;
++		params = tag_next(params);
++	}
++
++	if (command_line) {
++		params->hdr.size = (sizeof(struct tag_header) + command_line_len + 3) >> 2;
++		params->hdr.tag = ATAG_CMDLINE;
++		memcpy(params->u.cmdline.cmdline, command_line,
++			command_line_len);
++		params->u.cmdline.cmdline[command_line_len - 1] = '\0';
++		params = tag_next(params);
++	}
++
++	params->hdr.size = 0;
++	params->hdr.tag = ATAG_NONE;
++
++	len = ((char *)params - buf) + sizeof(struct tag_header);
++
++	add_segment(info, buf, len, base, len);
++
++	if (initrd) {
++		struct memory_range *range;
++		int ranges;
++		get_memory_ranges(&range, &ranges);
++		*initrd_start = locate_hole(info, initrd_len, getpagesize(), range[0].start + 0x800000, ULONG_MAX, INT_MAX);
++		if (*initrd_start == ULONG_MAX)
++			return -1;
++		add_segment(info, initrd, initrd_len, *initrd_start, initrd_len);
++	}
++
++	return 0;
++}
++
++int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
+ 	struct kexec_info *info)
+ {
+ 	unsigned long base;
+-	unsigned int offset = 0x8000; /* 32k offset from memory start */
++	unsigned int atag_offset = 0x1000; /* 4k offset from memory start */
++	unsigned int offset = 0x8000;      /* 32k offset from memory start */
++	const char *command_line;
++	off_t command_line_len;
++	const char *ramdisk;
++	char *ramdisk_buf;
++	off_t ramdisk_length;
++	int opt;
++#define OPT_APPEND	'a'
++#define OPT_RAMDISK	'r'
++	static const struct option options[] = {
++		KEXEC_ARCH_OPTIONS
++		{ "command-line",	1, 0, OPT_APPEND },
++		{ "append",		1, 0, OPT_APPEND },
++		{ "initrd",		1, 0, OPT_RAMDISK },
++		{ "ramdisk",		1, 0, OPT_RAMDISK },
++		{ 0, 			0, 0, 0 },
++	};
++	static const char short_options[] = KEXEC_ARCH_OPT_STR "a:r:";
++
++	/*
++	 * Parse the command line arguments
++	 */
++	command_line = 0;
++	command_line_len = 0;
++	ramdisk = 0;
++	ramdisk_buf = 0;
++	ramdisk_length = 0;
++	while((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
++		switch(opt) {
++		default:
++			/* Ignore core options */
++			if (opt < OPT_ARCH_MAX) {
++				break;
++			}
++		case '?':
++			usage();
++			return -1;
++		case OPT_APPEND:
++			command_line = optarg;
++			break;
++		case OPT_RAMDISK:
++			ramdisk = optarg;
++			break;
++		}
++	}
++	if (command_line) {
++		command_line_len = strlen(command_line) + 1;
++		if (command_line_len > COMMAND_LINE_SIZE)
++			command_line_len = COMMAND_LINE_SIZE;
++	}
++	if (ramdisk) {
++		ramdisk_buf = slurp_file(ramdisk, &ramdisk_length);
++	}
++
+ 	base = locate_hole(info,len+offset,0,0,ULONG_MAX,INT_MAX);
+ 	if (base == ULONG_MAX)
+-	{
+ 		return -1;
+-	}
+-	base += offset;
+-	add_segment(info,buf,len,base,len);
+-	info->entry = (void*)base;
++
++	if (atag_arm_load(info, base + atag_offset,
++			 command_line, command_line_len,
++			 ramdisk_buf, ramdisk_length)    == -1)
++		return -1;
++
++	add_segment(info, buf, len, base + offset, len);
++
++	info->entry = (void*)base + offset;
++
+ 	return 0;
+ }
============================================================
--- conf/distro/angstrom-2008.1.conf	db7d798ae0bfb0247447e34639d0beebb064abc6
+++ conf/distro/angstrom-2008.1.conf	13f3d678fe8a5316bdf4bf2448984ad0f7fbc69e
@@ -53,7 +53,7 @@ PCMCIA_MANAGER = "pcmciautils"
 PCMCIA_MANAGER = "pcmciautils"
 
 #Preferred version for the kernel on various machines
-PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh19"
+PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20"
 
 #This is unrelated to the kernel version, but userspace apps (e.g. HAL) require a recent version to build against
 PREFERRED_VERSION_linux-libc-headers 	= "2.6.23"
============================================================
--- packages/kexec/kexec-tools_1.101.bb	90e71612793cff1e87109dcec8aa5c8a1894465f
+++ packages/kexec/kexec-tools_1.101.bb	ca02155fb0738f03ed10922ed0662ff62515da42
@@ -1,15 +1,16 @@ LICENSE = "GPL"
 DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
 AUTHOR = "Eric Biederman"
 HOMEPAGE = "http://www.xmission.com/~ebiederm/files/kexec/"
 SECTION = "kernel/userland"
 DEPENDS = "virtual/kernel zlib"
 LICENSE = "GPL"
-PR = "r1"
+PR = "r3"
 
 inherit autotools
 
-EXTRA_OEMAKE = "LDFLAGS=-L${STAGING_LIBDIR} -Wl,--rpath-link,${STAGING_LIBDIR} "
-EXTRA_OECONF = " --with-zlib=${STAGING_LIBDIR}/.."
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
 
 SRC_URI = "http://www.xmission.com/~ebiederm/files/kexec/kexec-tools-${PV}.tar.gz \
+           file://kexec-tools-arm.patch;patch=1 \
+           file://kexec-arm-atags.patch;patch=1"
-           file://kexec-tools-arm.patch;patch=1 "
============================================================
--- packages/mtd/mtd-utils_1.0.0+git.bb	28c59a29a8f4cc26b7723edd88cd3ee953be98f4
+++ packages/mtd/mtd-utils_1.0.0+git.bb	db38f6e2d20f70fbb76af8a5fd01ade273c67858
@@ -1,9 +1,9 @@ LICENSE = "GPLv2"
 DESCRIPTION = "Tools for managing memory technology devices."
 SECTION = "base"
 DEPENDS = "zlib lzo"
 HOMEPAGE = "http://www.linux-mtd.infradead.org/"
 LICENSE = "GPLv2"
-PR = "r6"
+PR = "r7"
 
 # This is the default package, thus we lock to a specific git version so 
 # upstream changes will not break builds.
@@ -40,3 +40,7 @@ do_install () {
 		install -m 0755 $binary ${D}${bindir}
 	done
 }
+
+PACKAGES =+ "mkfs-jffs mkfs-jffs2"
+FILES_mkfs-jffs = "${bindir}/mkfs.jffs"
+FILES_mkfs-jffs2 = "${bindir}/mkfs.jffs2"






More information about the Openembedded-commits mailing list