Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r1838 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
   2. r1839 - in trunk/src/target/OM-2007/openmoko-libs: .
      libmokoui ([EMAIL PROTECTED])
   3. r1840 -
      trunk/src/target/OM-2007/applications/openmoko-dialer/src
      ([EMAIL PROTECTED])
   4. r1841 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
   5. r1842 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
--- Begin Message ---
Author: rob
Date: 2007-04-25 16:29:30 +0200 (Wed, 25 Apr 2007)
New Revision: 1838

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
   trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h
Log:
2007-04-25  Rob Bradford  <[EMAIL PROTECTED]>

        * src/contacts-omoko.c: (create_main_window):
        * src/contacts-omoko.h:
        Switch to using MokoScrolledPane rather than MokoDetailsWindow.
        Pack the top navigation area into MokoScrolledPane.



Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-25 14:12:36 UTC (rev 1837)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-25 14:29:30 UTC (rev 1838)
@@ -1,3 +1,10 @@
+2007-04-25  Rob Bradford  <[EMAIL PROTECTED]>
+
+       * src/contacts-omoko.c: (create_main_window):
+       * src/contacts-omoko.h:
+       Switch to using MokoScrolledPane rather than MokoDetailsWindow.
+       Pack the top navigation area into MokoScrolledPane.
+
 2007-04-19  Thomas Wood  <[EMAIL PROTECTED]>
 
        * src/contacts-callbacks-ebook.c: (contacts_added_cb),

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c    
    2007-04-25 14:12:36 UTC (rev 1837)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c    
    2007-04-25 14:29:30 UTC (rev 1838)
@@ -108,9 +108,12 @@
 void
 create_main_window (ContactsData *contacts_data)
 {
-       GtkWidget *contacts_menu_menu, *scrolledwindow3, *widget;
+       GtkWidget *contacts_menu_menu, *widget;
        GtkAccelGroup *accel_group;
        GtkWidget *moko_tool_box;
+       GtkWidget *details_pane;
+       GtkWidget *navigation_pane;
+
        ContactsUI *ui = contacts_data->ui;
 
        accel_group = gtk_accel_group_new ();
@@ -182,8 +185,10 @@
        widget = create_contacts_list (contacts_data);
        g_object_unref (contacts_data->contacts_liststore);
 
-       moko_paned_window_set_navigation_pane (MOKO_PANED_WINDOW 
(ui->main_window),
-      moko_tree_view_put_into_scrolled_window (MOKO_TREE_VIEW (widget)));
+       navigation_pane = moko_scrolled_pane_new ();
+       moko_scrolled_pane_pack (MOKO_SCROLLED_PANE (navigation_pane), widget);
+       moko_paned_window_set_navigation_pane (MOKO_PANED_WINDOW 
(ui->main_window), 
+                       navigation_pane);
 
        ui->contacts_treeview = widget;
 
@@ -235,9 +240,11 @@
 
        /* note book for switching between view/edit mode */
        ui->main_notebook = gtk_notebook_new ();
-       scrolledwindow3 = (GtkWidget*) moko_details_window_new();
-       gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW 
(scrolledwindow3), GTK_WIDGET (ui->main_notebook));
-       moko_paned_window_set_details_pane (MOKO_PANED_WINDOW 
(ui->main_window), GTK_WIDGET(moko_details_window_put_in_box 
(MOKO_DETAILS_WINDOW (scrolledwindow3))));
+
+       details_pane = moko_scrolled_pane_new ();
+       moko_scrolled_pane_pack_with_viewport (MOKO_SCROLLED_PANE 
(details_pane), GTK_WIDGET(ui->main_notebook));
+       moko_paned_window_set_details_pane (MOKO_PANED_WINDOW 
(ui->main_window), details_pane);
+
        GTK_WIDGET_UNSET_FLAGS (ui->main_notebook, GTK_CAN_FOCUS);
        gtk_notebook_set_show_tabs (GTK_NOTEBOOK (ui->main_notebook), FALSE);
        gtk_notebook_set_show_border (GTK_NOTEBOOK (ui->main_notebook), FALSE);

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h    
    2007-04-25 14:12:36 UTC (rev 1837)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h    
    2007-04-25 14:29:30 UTC (rev 1838)
@@ -28,6 +28,7 @@
 #include <libmokoui/moko-paned-window.h>
 #include <libmokoui/moko-tool-box.h>
 #include <libmokoui/moko-navigation-list.h>
+#include <libmokoui/moko-scrolled-pane.h>
 
 
 #ifndef OMOKO_H




--- End Message ---
--- Begin Message ---
Author: rob
Date: 2007-04-25 17:42:26 +0200 (Wed, 25 Apr 2007)
New Revision: 1839

Modified:
   trunk/src/target/OM-2007/openmoko-libs/ChangeLog
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c
Log:
2007-04-25  Rob Bradford  <[EMAIL PROTECTED]>

        * libmokoui/moko-paned-window.c: (moko_paned_window_init),
        (moko_paned_window_set_ratio):
        Improve the moko_paned_window_set_ratio function. It's just the ratio
        of the top half (including menu area and toolbox) to the bottom half.
        No need to be try and be clever about considering the menu and toolbox
        because its not clear what the ratio means in that case.
        Set a default ratio of 1:1.



Modified: trunk/src/target/OM-2007/openmoko-libs/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/ChangeLog    2007-04-25 14:29:30 UTC 
(rev 1838)
+++ trunk/src/target/OM-2007/openmoko-libs/ChangeLog    2007-04-25 15:42:26 UTC 
(rev 1839)
@@ -1,5 +1,15 @@
 2007-04-25  Rob Bradford  <[EMAIL PROTECTED]>
 
+       * libmokoui/moko-paned-window.c: (moko_paned_window_init),
+       (moko_paned_window_set_ratio):
+       Improve the moko_paned_window_set_ratio function. It's just the ratio
+       of the top half (including menu area and toolbox) to the bottom half.
+       No need to be try and be clever about considering the menu and toolbox
+       because its not clear what the ratio means in that case.
+       Set a default ratio of 1:1.
+
+2007-04-25  Rob Bradford  <[EMAIL PROTECTED]>
+
        * libmokoui/moko-scrolled-pane.c:
        (moko_scrolled_pane_pack_with_viewport):
        * libmokoui/moko-scrolled-pane.h:

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c        
2007-04-25 14:29:30 UTC (rev 1838)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c        
2007-04-25 15:42:26 UTC (rev 1839)
@@ -86,6 +86,8 @@
     gtk_paned_add2( GTK_PANED(priv->outerframe), priv->lower );
     priv->menubox = NULL;
     priv->toolbox = NULL;
+
+    moko_paned_window_set_ratio (self, 50);
 }
 
 GtkWidget* moko_paned_window_new() /* Construction */
@@ -136,9 +138,11 @@
 {
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
     moko_debug( "moko_paned_window_set_ratio" );
-    //FIXME calculate this correctly, need to subtract the height of tool box 
and menu box
-    //      which is probably not 120 ;-)
-    gtk_paned_set_position( GTK_PANED(priv->outerframe), 
ratio*(gdk_screen_height()-120)/100 );
+    guint height;
+
+    gtk_window_get_size (GTK_WIDGET (self), NULL, &height);
+
+    gtk_paned_set_position( GTK_PANED(priv->outerframe), ratio * height / 100 
);
 }
 
 void moko_paned_window_set_navigation_pane(MokoPanedWindow* self, GtkWidget* 
child)




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-25 18:00:49 +0200 (Wed, 25 Apr 2007)
New Revision: 1840

Added:
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
Modified:
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
Log:
* Add callbacks skeleton for MokoGsmdConnection
* Remove final libgsmd code


Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am       
2007-04-25 15:42:26 UTC (rev 1839)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am       
2007-04-25 16:00:49 UTC (rev 1840)
@@ -4,7 +4,9 @@
 
 bin_PROGRAMS = openmoko-dialer
 
-openmoko_dialer_SOURCES = openmoko-dialer-main.c\
+openmoko_dialer_SOURCES = \
+dialer-callbacks-connection.c\
+openmoko-dialer-main.c\
 moko-digit-button.c\
 moko-dialer-panel.c\
 moko-dialer-textview.c\

Added: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
     2007-04-25 15:42:26 UTC (rev 1839)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
     2007-04-25 16:00:49 UTC (rev 1840)
@@ -0,0 +1,20 @@
+#include "dialer-callbacks-connection.h"
+
+
+void
+network_registration_cb (MokoGsmdConnection *self, int type, int lac, int cell)
+{
+  /* network registration */
+}
+
+void
+incoming_call_cb (MokoGsmdConnection *self, int type)
+{
+  /* incoming call */
+}
+
+void
+incoming_clip_cb (MokoGsmdConnection *self, const char *number)
+{
+  /* caller id */
+}

Added: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
     2007-04-25 15:42:26 UTC (rev 1839)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
     2007-04-25 16:00:49 UTC (rev 1840)
@@ -0,0 +1,6 @@
+
+#include <libmokogsmd/moko-gsmd-connection.h>
+
+void network_registration_cb (MokoGsmdConnection *self, int type, int lac, int 
cell);
+void incoming_call_cb (MokoGsmdConnection *self, int type);
+void incoming_clip_cb (MokoGsmdConnection *self, const char *number);

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
    2007-04-25 15:42:26 UTC (rev 1839)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
    2007-04-25 16:00:49 UTC (rev 1840)
@@ -20,14 +20,10 @@
 #include <libmokoui/moko-finger-window.h>
 #include <libmokoui/moko-finger-wheel.h>
 
-#include <gtk/gtkalignment.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkvbox.h>
+#include <libmokogsmd/moko-gsmd-connection.h>
+
+
+#include <gtk/gtk.h>
 #include <signal.h>
 #include <unistd.h>
 #include <sys/stat.h>
@@ -45,6 +41,8 @@
 #include "openmoko-dialer-window-pin.h"
 #include "openmoko-dialer-window-history.h"
 
+#include "dialer-callbacks-connection.h"
+
 MokoDialerData *p_dialer_data = 0;
 MokoDialerData *
 moko_get_app_data ()
@@ -52,135 +50,6 @@
   return p_dialer_data;
 }
 
-void
-gsm_pin_require (struct lgsm_handle *lh)
-{
-  MokoDialerData *appdata = moko_get_app_data ();
-
-  if (appdata)
-  {
-    appdata->lh = lh;
-    gtk_widget_show (appdata->window_pin);
-  }
-  else
-  {
-    DBG_ERROR ("gui failed to initialize.try another time.");
-  }
-
-
-}
-void
-gsm_incoming_call (gchar * number)
-{
-
-  MokoDialerData *appdata = moko_get_app_data ();
-
-  if (appdata)
-  {
-//first, we should remove the "" from the number.
-    char *temp = NULL;
-    int start = 0;
-    int end = strlen (number) - 1;
-    while (number[start] == '\"' && start < end)
-      start++;
-    if (end > 0)
-      while (number[end] == '\"' && start < end)
-        end--;
-
-    g_return_if_fail (start <= end);
-
-    DBG_MESSAGE ("START=%d,END=%d", start, end);
-    temp = g_strndup (number + start, end - start + 1);
-
-    g_return_if_fail (temp != NULL);
-
-    DBG_MESSAGE ("%s", temp);
-
-//got the number;
-    g_stpcpy (appdata->g_peer_info.number, temp);
-
-    g_free (temp);
-//retrieve the contact information if any.
-    contact_get_peer_info_from_number (appdata->g_contactlist.contacts,
-                                       &(appdata->g_peer_info));
-// contact_get_peer_info_from_number
-
-
-//transfer the contact info
-    window_incoming_prepare (appdata);
-
-    gtk_widget_show (appdata->window_incoming);
-  }
-  else
-  {
-    DBG_ERROR ("gui failed to initialize.try another time.");
-  }
-
-
-}
-
-void
-gsm_peer_accept ()
-{
-  MokoDialerData *appdata = moko_get_app_data ();
-  DBG_ENTER ();
-//moko_dialer_status_update_icon(appdata->status_outgoing);
-
-
-  appdata->g_state.callstate = STATE_TALKING;
-
-  gtk_widget_hide (appdata->window_outgoing);
-
-
-//transfer the contact info
-  window_talking_prepare (appdata);
-
-//start talking.
-
-  gtk_widget_show (appdata->window_talking);
-
-
-  DBG_LEAVE ();
-}
-
-void
-gsm_peer_refuse ()
-{
-  MokoDialerData *appdata = moko_get_app_data ();
-  window_outgoing_fails (appdata);
-}
-
-void
-gsm_peer_abort ()
-{
-
-  MokoDialerData *appdata = moko_get_app_data ();
-  if (appdata->window_incoming)
-    gtk_widget_hide (appdata->window_incoming);
-
-
-}
-
-void
-gsm_peer_disconnect ()
-{
-
-  MokoDialerData *appdata = moko_get_app_data ();
-  /* TODO: MokoGsmdConnection->hangup 
-   * gsm_hangup ();
-   */
-
-  if (appdata->window_talking)
-    gtk_widget_hide (appdata->window_talking);
-  if (appdata->window_outgoing)
-    gtk_widget_hide (appdata->window_outgoing);
-  if (appdata->window_incoming)
-    gtk_widget_hide (appdata->window_incoming);
-
-}
-
-
-
 static void
 handle_sigusr1 (int value)
 {
@@ -305,7 +174,7 @@
   setlock ("/tmp/dialer.lock");
 
 
-  p_dialer_data = calloc (1, sizeof (MokoDialerData));
+  p_dialer_data = g_new0 (MokoDialerData, 1);
 
   //init application data
   contact_init_contact_data (&(p_dialer_data->g_contactlist));
@@ -316,6 +185,11 @@
 //    MokoApplication* app = MOKO_APPLICATION(moko_application_get_instance());
   g_set_application_name ("OpenMoko Dialer");
 
+  /* Set up gsmd connection object */
+  MokoGsmdConnection* conn = p_dialer_data->connection = 
moko_gsmd_connection_new ();
+  g_signal_connect (G_OBJECT (conn), "network-registration", (GCallback) 
network_registration_cb, NULL);
+  g_signal_connect (G_OBJECT (conn), "incoming-call", (GCallback) 
incoming_call_cb, NULL);
+  g_signal_connect (G_OBJECT (conn), "incoming-clip", (GCallback) 
incoming_clip_cb, NULL);
 
   signal (SIGUSR1, handle_sigusr1);
 

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
    2007-04-25 15:42:26 UTC (rev 1839)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
    2007-04-25 16:00:49 UTC (rev 1840)
@@ -16,6 +16,7 @@
  *  Current Version: $Rev$ ($Date) [$Author: Tony Guan $]
  */
 #include "moko-dialer-includes.h"
+#include <libmokogsmd/moko-gsmd-connection.h>
 /*
 
 typedef struct _window_outgoing
@@ -33,7 +34,7 @@
 typedef struct _dialer_data
 {
   //the global data area begins here
-  struct lgsm_handle *lh;
+  MokoGsmdConnection *connection;
 
   char str_sim_pin[MOKO_DIALER_MAX_PIN_LEN + 1];
   gint int_sim_pin_end_point;

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
      2007-04-25 15:42:26 UTC (rev 1839)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
      2007-04-25 16:00:49 UTC (rev 1840)
@@ -57,7 +57,7 @@
 
     DBG_MESSAGE ("here we send the pin:%s", appdata->str_sim_pin);
     //FIXME:why this call will cause segment fault?
-    lgsm_pin (appdata->lh, appdata->str_sim_pin);
+    //lgsm_pin (appdata->lh, appdata->str_sim_pin);
     //lgsm_pin (appdata->lh, "1234");
     DBG_MESSAGE ("pin:%s sent", appdata->str_sim_pin);
     gtk_widget_hide (appdata->window_pin);




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-04-26 05:01:43 +0200 (Thu, 26 Apr 2007)
New Revision: 1841

Modified:
   trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
Log:
drivers/nand/nand_bbt.c: added blank line after #if to make it easier to spot
drivers/nand/nand_bbt.c:dynpart_size, dynpart_names: don't declare arrays as
  pointers
drivers/nand/nand_bbt.c:MTDPARTS_MAX_SIZE: new #define for the size of the
  mtdparts string
drivers/nand/nand_bbt.c:nand_create_mtd_dynpart: removed bogus zeroing of
  *mtdparts
drivers/nand/nand_bbt.c:nand_create_mtd_dynpart: added missing colon after
  CFG_NAND_DYNPART_MTD_KERNEL_NAME
drivers/nand/nand_bbt.c:nand_create_mtd_dynpart: removed bogus mtdparts 
  termination, which is unnecessary anyway, since strncat, unlike strncpy, 
  always NUL-terminates



Modified: trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
===================================================================
--- trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch       
2007-04-25 16:00:49 UTC (rev 1840)
+++ trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch       
2007-04-26 03:01:43 UTC (rev 1841)
@@ -19,7 +19,7 @@
 ===================================================================
 --- u-boot.orig/drivers/nand/nand_bbt.c
 +++ u-boot/drivers/nand/nand_bbt.c
-@@ -1044,9 +1044,83 @@
+@@ -1044,9 +1044,85 @@ int nand_isbad_bbt (struct mtd_info *mtd
        switch ((int)res) {
        case 0x00:      return 0;
        case 0x01:      return 1;
@@ -30,10 +30,13 @@
  }
  
 +#if defined(CONFIG_NAND_DYNPART)
-+extern unsigned int *dynpart_size;
-+extern char **dynpart_names;
 +
++extern unsigned int dynpart_size[];
++extern char *dynpart_names[];
 +
++#define MTDPARTS_MAX_SIZE 512
++
++
 +static int skip_offs(const struct nand_chip *this, unsigned int offs)
 +{
 +      int block = (int) (offs >> (this->bbt_erase_shift - 1));
@@ -49,12 +52,11 @@
 +      char *mtdparts;
 +      unsigned int cur_offs = 0;
 +
-+      mtdparts = malloc(512); /* FIXME: bounds checking */
++      mtdparts = malloc(MTDPARTS_MAX_SIZE); /* FIXME: bounds checking */
 +      if (!mtdparts)
 +              return -ENOMEM;
 +
-+      memset(mtdparts, 0, sizeof(mtdparts));
-+      sprintf(mtdparts, "mtdparts=" CFG_NAND_DYNPART_MTD_KERNEL_NAME);
++      sprintf(mtdparts, "mtdparts=" CFG_NAND_DYNPART_MTD_KERNEL_NAME ":");
 +
 +      for (part = 0; dynpart_size[part] != 0; part++) {
 +              unsigned int bb_delta = 0;
@@ -90,10 +92,10 @@
 +              sprintf(mtdpart, "0x%.8x(%.16s),", dynpart_size[part] + 
bb_delta,
 +                      dynpart_names[part]);
 +              mtdpart[sizeof(mtdpart)-1] = '\0';
-+              strncat(mtdparts, mtdpart, sizeof(mtdparts)-strlen(mtdparts)-1);
++              strncat(mtdparts, mtdpart,
++                  MTDPARTS_MAX_SIZE-strlen(mtdparts)-1);
 +      }
 +
-+      mtdparts[strlen(mtdparts)-1] = '\0';
 +      printf("mtdparts %s\n", mtdparts);
 +      setenv("mtdparts", mtdparts);
 +
@@ -147,7 +149,7 @@
 ===================================================================
 --- u-boot.orig/common/cmd_jffs2.c
 +++ u-boot/common/cmd_jffs2.c
-@@ -1841,6 +1841,29 @@
+@@ -1841,6 +1841,29 @@ static struct part_info* jffs2_part_info
        return NULL;
  }
  
@@ -177,7 +179,7 @@
  /***************************************************/
  /* U-boot commands                               */
  /***************************************************/
-@@ -2132,6 +2155,24 @@
+@@ -2132,6 +2155,24 @@ int do_jffs2_mtdparts(cmd_tbl_t *cmdtp, 
        printf ("Usage:\n%s\n", cmdtp->usage);
        return 1;
  }
@@ -202,7 +204,7 @@
  #endif /* #ifdef CONFIG_JFFS2_CMDLINE */
  
  /***************************************************/
-@@ -2197,6 +2238,15 @@
+@@ -2197,6 +2238,15 @@ U_BOOT_CMD(
        "<name>     := '(' NAME ')'\n"
        "<ro-flag>  := when set to 'ro' makes partition read-only (not used, 
passed to kernel)\n"
  );
@@ -222,7 +224,7 @@
 ===================================================================
 --- u-boot.orig/common/cmd_nand.c
 +++ u-boot/common/cmd_nand.c
-@@ -101,7 +101,7 @@
+@@ -101,7 +101,7 @@ static inline int str2long(char *p, ulon
  }
  
  int
@@ -231,7 +233,7 @@
  {
        int idx = nand_curr_device;
  #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
-@@ -122,10 +122,17 @@
+@@ -122,10 +122,17 @@ arg_off_size(int argc, char *argv[], nan
                                        printf("'%s' is not a number\n", 
argv[1]);
                                        return -1;
                                }
@@ -252,7 +254,7 @@
                        }
                        idx = dev->id->num;
                        *nand = nand_info[idx];
-@@ -261,7 +268,7 @@
+@@ -261,7 +268,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag,
  
                printf("\nNAND %s: ", scrub ? "scrub" : "erase");
                /* skip first two or three arguments, look for offset and size 
*/
@@ -261,7 +263,7 @@
                        return 1;
  
                memset(&opts, 0, sizeof(opts));
-@@ -323,7 +330,7 @@
+@@ -323,7 +330,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag,
  
                read = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */
                printf("\nNAND %s: ", read ? "read" : "write");
@@ -270,7 +272,7 @@
                        return 1;
  
                s = strchr(cmd, '.');
-@@ -445,7 +452,7 @@
+@@ -445,7 +452,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag,
        }
  
        if (strcmp(cmd, "unlock") == 0) {
@@ -283,7 +285,7 @@
 ===================================================================
 --- u-boot.orig/common/cmd_dynenv.c
 +++ u-boot/common/cmd_dynenv.c
-@@ -60,7 +60,7 @@
+@@ -60,7 +60,7 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag
                buf[2] = 'V';
                buf[3] = '0';
  
@@ -308,7 +310,7 @@
 ===================================================================
 --- u-boot.orig/board/neo1973/neo1973.c
 +++ u-boot/board/neo1973/neo1973.c
-@@ -375,3 +375,14 @@
+@@ -382,3 +382,14 @@ int neo1973_911_key_pressed(void)
                return 0;
        return 1;
  }
@@ -327,7 +329,7 @@
 ===================================================================
 --- u-boot.orig/board/qt2410/qt2410.c
 +++ u-boot/board/qt2410/qt2410.c
-@@ -126,3 +126,9 @@
+@@ -126,3 +126,9 @@ int dram_init (void)
  
        return 0;
  }




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-04-26 05:38:14 +0200 (Thu, 26 Apr 2007)
New Revision: 1842

Modified:
   trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
Log:
drivers/nand/nand_bbt.c:nand_create_mtd_dynpart: mtdparts termination was
  correct. I misunderstood what it did, sorry.



Modified: trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
===================================================================
--- trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch       
2007-04-26 03:01:43 UTC (rev 1841)
+++ trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch       
2007-04-26 03:38:14 UTC (rev 1842)
@@ -19,7 +19,7 @@
 ===================================================================
 --- u-boot.orig/drivers/nand/nand_bbt.c
 +++ u-boot/drivers/nand/nand_bbt.c
-@@ -1044,9 +1044,85 @@ int nand_isbad_bbt (struct mtd_info *mtd
+@@ -1044,9 +1044,86 @@ int nand_isbad_bbt (struct mtd_info *mtd
        switch ((int)res) {
        case 0x00:      return 0;
        case 0x01:      return 1;
@@ -96,6 +96,7 @@
 +                  MTDPARTS_MAX_SIZE-strlen(mtdparts)-1);
 +      }
 +
++      mtdparts[strlen(mtdparts)-1] = '\0';
 +      printf("mtdparts %s\n", mtdparts);
 +      setenv("mtdparts", mtdparts);
 +




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to