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. r1062 - in developers/werner: . notes ([EMAIL PROTECTED])
   2. r1063 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
   3. r1064 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
   4. r1065 - in trunk/src/host: . splash ([EMAIL PROTECTED])
   5. r1066 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2007-02-21 00:19:02 +0100 (Wed, 21 Feb 2007)
New Revision: 1062

Added:
   developers/werner/notes/
   developers/werner/notes/openocd
Log:
My OpenOCD setup and usage notes.



Added: developers/werner/notes/openocd
===================================================================
--- developers/werner/notes/openocd     2007-02-20 20:38:52 UTC (rev 1061)
+++ developers/werner/notes/openocd     2007-02-20 23:19:02 UTC (rev 1062)
@@ -0,0 +1,75 @@
+# Quick OpenOCD setup and usage notes (for JTAGkey - will need updating for
+# debug v2)
+
+###  SETUP  ###################################################################
+
+# Build libftdi (don't need to do this if you already have a recent version)
+
+cd $OMDIR
+wget 
http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-0.8.tar.gz
+tar xfz libftdi-0.8.tar.gz
+cd libftdi-0.8
+automake
+autoconf
+./configure
+make
+# ignore the error when trying to make the documentation
+make install
+ldconfig
+
+# Build openocd (don't need to do this if you already have it)
+
+cd $OMDIR
+svn -r 130 co svn://svn.berlios.de/openocd/trunk openocd
+cd openocd
+./bootstrap
+# enable parport_dev and ft2232, so that we stay compatible with the wiggler.
+# use libftdi since we don't want no binary-only code.
+./configure --enable-parport_ppdev --enable-ft2232_libftdi
+make
+make install
+
+# Convenience script to load u-boot via JTAG, then run it.
+# Remove the "resume" at the end if you prefer u-boot to be stopped.
+
+cat <<EOF >u-boot.ocd
+reset halt
+wait_halt
+load_binary ../lowlevel_foo.bin 0
+bp 0x33f80000 4 hw
+resume
+wait_halt
+load_binary ../u-boot/u-boot.bin 0x33f80000
+# takes about one minute
+resume
+EOF
+
+# Get the config file. (JTAGkey version)
+
+wget http://people.openmoko.org/laforge/misc/openocd.cfg
+wget http://people.openmoko.org/werner/openocd-jtagkey.patch
+patch -p1 -s <openocd-jtagkey.patch
+
+# Run openocd
+
+openocd &
+
+# If it doesn't come up, check
+# http://wiki.openmoko.org/wiki/OpenOCD#Known_Bugs_and_Troubleshooting
+
+# Get the low-level initializer
+
+cd $OMDIR
+wget http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.bin
+
+# Build a version of u-boot that can boot from JTAG
+# WARNING: you need to undo this if you want to build one that boots from NAND 
!
+
+echo 'PLATFORM_RELFLAGS += -DBUILD_FOR_RAM' >> u-boot/board/neo1973/config.tmp
+make -C u-boot ARCH=arm
+
+
+###  USAGE  ###################################################################
+
+telnet localhost 4444
+script u-boot.ocd




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-21 01:01:54 +0100 (Wed, 21 Feb 2007)
New Revision: 1063

Added:
   trunk/src/target/u-boot/patches/cmd-unzip.patch
   trunk/src/target/u-boot/patches/enable-splash-bmp.patch
   trunk/src/target/u-boot/patches/raise-limits.patch
   trunk/src/target/u-boot/patches/set-hwswp.patch
   trunk/src/target/u-boot/patches/splashimage-command.patch
Removed:
   trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch
Modified:
   trunk/src/target/u-boot/patches/series
Log:
split uboot-s3c2410-splash.patch into its components: raise-limits.patch,
  set-hwswp.patch, enable-splash-bmp.patch, splashimage-command.patch, and
  cmd-unzip.patch



Added: trunk/src/target/u-boot/patches/cmd-unzip.patch
===================================================================
--- trunk/src/target/u-boot/patches/cmd-unzip.patch     2007-02-20 23:19:02 UTC 
(rev 1062)
+++ trunk/src/target/u-boot/patches/cmd-unzip.patch     2007-02-21 00:01:54 UTC 
(rev 1063)
@@ -0,0 +1,58 @@
+common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from
+  memory to memory, and option CONFIG_UNZIP to enable it
+
+- Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: u-boot/common/cmd_mem.c
+===================================================================
+--- u-boot.orig/common/cmd_mem.c
++++ u-boot/common/cmd_mem.c
+@@ -1185,6 +1185,34 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int fl
+ }
+ #endif        /* CONFIG_CRC32_VERIFY */
+ 
++
++#ifdef CONFIG_UNZIP
++int  gunzip (void *, int, unsigned char *, unsigned long *);
++
++int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++      unsigned long src, dst;
++      unsigned long src_len = ~0UL, dst_len = ~0UL;
++      int err;
++
++      switch (argc) {
++              case 4:
++                      dst_len = simple_strtoul(argv[3], NULL, 16);
++                      /* fall through */
++              case 3:
++                      src = simple_strtoul(argv[1], NULL, 16);
++                      dst = simple_strtoul(argv[2], NULL, 16);
++                      break;
++              default:
++                      printf ("Usage:\n%s\n", cmdtp->usage);
++                      return 1;
++      }
++
++      return !!gunzip((void *) dst, dst_len, (void *) src, &src_len);
++}
++#endif /* CONFIG_UNZIP */
++
++
+ /**************************************************/
+ #if (CONFIG_COMMANDS & CFG_CMD_MEMORY)
+ U_BOOT_CMD(
+@@ -1288,5 +1316,13 @@ U_BOOT_CMD(
+ );
+ #endif /* CONFIG_MX_CYCLIC */
+ 
++#ifdef CONFIG_UNZIP
++U_BOOT_CMD(
++      unzip,  CFG_MAXARGS,    1,      do_unzip,
++      "unzip - unzip a memory region\n",
++      "srcaddr dstaddr [dstsize]\n"
++);
++#endif /* CONFIG_UNZIP */
++
+ #endif
+ #endif        /* CFG_CMD_MEMORY */

Added: trunk/src/target/u-boot/patches/enable-splash-bmp.patch
===================================================================
--- trunk/src/target/u-boot/patches/enable-splash-bmp.patch     2007-02-20 
23:19:02 UTC (rev 1062)
+++ trunk/src/target/u-boot/patches/enable-splash-bmp.patch     2007-02-21 
00:01:54 UTC (rev 1063)
@@ -0,0 +1,56 @@
+drivers/cfb_console.c: include asm/byteorder.h for le32_to_cpu and friends
+  [ shouldn't someone else have found this long ago ? ]
+include/configs/neo1973.h (CONFIG_COMMANDS): add CFG_CMD_BMP
+include/configs/neo1973.h: enable splash screen and BMP support
+include/configs/neo1973.h: remove #if 1 ... #endif around video definitions
+
+- Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: u-boot/drivers/cfb_console.c
+===================================================================
+--- u-boot.orig/drivers/cfb_console.c
++++ u-boot/drivers/cfb_console.c
+@@ -191,6 +191,7 @@ CONFIG_VIDEO_HW_CURSOR:         - Uses the 
+ #if (CONFIG_COMMANDS & CFG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
+ #include <watchdog.h>
+ #include <bmp_layout.h>
++#include <asm/byteorder.h>
+ #endif /* (CONFIG_COMMANDS & CFG_CMD_BMP) || CONFIG_SPLASH_SCREEN */
+ 
+ 
/*****************************************************************************/
+Index: u-boot/include/configs/neo1973.h
+===================================================================
+--- u-boot.orig/include/configs/neo1973.h
++++ u-boot/include/configs/neo1973.h
+@@ -91,6 +91,7 @@
+                       /* CFG_CMD_IRQ   | */  \
+                       CFG_CMD_BOOTD    | \
+                       CFG_CMD_CONSOLE  | \
++                      CFG_CMD_BMP      | \
+                       CFG_CMD_ASKENV   | \
+                       CFG_CMD_RUN      | \
+                       CFG_CMD_ECHO     | \
+@@ -249,19 +250,21 @@
+ /* we have a board_late_init() function */
+ #define BOARD_LATE_INIT                       1
+ 
+-#if 1
+ #define CONFIG_VIDEO
+ #define CONFIG_VIDEO_S3C2410
+ #define CONFIG_CFB_CONSOLE
+ #define CONFIG_VIDEO_LOGO
++#define CONFIG_SPLASH_SCREEN
++#define CFG_VIDEO_LOGO_MAX_SIZE       (640*480+1024+100) /* 100 = slack */
++#define CONFIG_VIDEO_BMP_GZIP
+ #define CONFIG_VGA_AS_SINGLE_DEVICE
++#define CONFIG_UNZIP
+ 
+ #define VIDEO_KBD_INIT_FCT    0
+ #define VIDEO_TSTC_FCT                serial_tstc
+ #define VIDEO_GETC_FCT                serial_getc
+ 
+ #define LCD_VIDEO_ADDR                0x33d00000
+-#endif
+ 
+ #define CONFIG_S3C2410_NAND_BBT                1
+ 

Added: trunk/src/target/u-boot/patches/raise-limits.patch
===================================================================
--- trunk/src/target/u-boot/patches/raise-limits.patch  2007-02-20 23:19:02 UTC 
(rev 1062)
+++ trunk/src/target/u-boot/patches/raise-limits.patch  2007-02-21 00:01:54 UTC 
(rev 1063)
@@ -0,0 +1,31 @@
+include/configs/neo1973.h: increase heap from 128 kB to 400 kB, for BMP image
+  decompression
+  [ note: increasing it to 512 kB trips over something. note sure what.
+    find out. ]
+include/configs/neo1973.h: raise number of command line arguments from 16 to 64
+
+- Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: u-boot/include/configs/neo1973.h
+===================================================================
+--- u-boot.orig/include/configs/neo1973.h
++++ u-boot/include/configs/neo1973.h
+@@ -54,7 +54,8 @@
+ /*
+  * Size of malloc() pool
+  */
+-#define CFG_MALLOC_LEN                (CFG_ENV_SIZE + 128*1024)
++#define CFG_MALLOC_LEN                (CFG_ENV_SIZE + 400*1024)
++                                      /* >> CFG_VIDEO_LOGO_MAX_SIZE */
+ #define CFG_GBL_DATA_SIZE     128     /* size in bytes reserved for initial 
data */
+ 
+ /*
+@@ -142,7 +143,7 @@
+ #endif
+ #define       CFG_CBSIZE              256             /* Console I/O Buffer 
Size      */
+ #define       CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer 
Size */
+-#define       CFG_MAXARGS             16              /* max number of 
command args   */
++#define       CFG_MAXARGS             64              /* max number of 
command args   */
+ #define CFG_BARGSIZE          CFG_CBSIZE      /* Boot Argument Buffer Size    
*/
+ 
+ #define CFG_MEMTEST_START     0x30000000      /* memtest works on     */

Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series      2007-02-20 23:19:02 UTC (rev 
1062)
+++ trunk/src/target/u-boot/patches/series      2007-02-21 00:01:54 UTC (rev 
1063)
@@ -35,4 +35,10 @@
 
 # those have to be implemented fully
 uboot-dfu.patch
-uboot-s3c2410-splash.patch
+
+# splash screen
+raise-limits.patch
+set-hwswp.patch
+enable-splash-bmp.patch
+splashimage-command.patch
+cmd-unzip.patch

Added: trunk/src/target/u-boot/patches/set-hwswp.patch
===================================================================
--- trunk/src/target/u-boot/patches/set-hwswp.patch     2007-02-20 23:19:02 UTC 
(rev 1062)
+++ trunk/src/target/u-boot/patches/set-hwswp.patch     2007-02-21 00:01:54 UTC 
(rev 1063)
@@ -0,0 +1,57 @@
+drivers/cfb_console.c: set SHORTSWAP to swap nibbles
+  [ clean this up when and if HWSWP is confirmed ]
+drivers/s3c2410_fb.c (video_hw_init): set HWSWP in LCDCON5
+drivers/s3c2410_fb.c (video_hw_init): use memset instead of open-coded
+   equivalent
+
+- Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: u-boot/drivers/cfb_console.c
+===================================================================
+--- u-boot.orig/drivers/cfb_console.c
++++ u-boot/drivers/cfb_console.c
+@@ -315,6 +315,11 @@ void      console_cursor (int state);
+ #define SHORTSWAP32(x)         (x)
+ #endif
+ 
++#ifdef CONFIG_VIDEO_S3C2410
++#undef SHORTSWAP32
++#define       SHORTSWAP32(x)  ((((x) & 0xffff) << 16) | (((x) >> 16) & 
0xffff))
++#endif
++
+ #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE)
+ #define PRINTD(x)       printf(x)
+ #else
+Index: u-boot/drivers/s3c2410_fb.c
+===================================================================
+--- u-boot.orig/drivers/s3c2410_fb.c
++++ u-boot/drivers/s3c2410_fb.c
+@@ -47,7 +47,6 @@ void *video_hw_init (void)
+       struct ctfb_res_modes *res_mode;
+       struct ctfb_res_modes var_mode;
+       unsigned char videoout;
+-      unsigned int *vm;
+ 
+       /* Search for video chip */
+       printf("Video: ");
+@@ -148,7 +147,7 @@ void *video_hw_init (void)
+       lcd->LCDCON2 = 0x019fc3c1;
+       lcd->LCDCON3 = 0x0039df67;
+       lcd->LCDCON4 = 0x00000007;
+-      lcd->LCDCON5 = 0x0001cb08;
++      lcd->LCDCON5 = 0x0001cb09;
+       lcd->LPCSEL  = 0x00000000;
+ 
+       lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1;
+@@ -164,10 +163,7 @@ void *video_hw_init (void)
+       }
+ 
+       /* Clear video memory */
+-      i = pGD->memSize/4;
+-      vm = (unsigned int *)pGD->frameAdrs;
+-      while(i--)
+-              *vm++ = 0;
++      memset(pGD->frameAdrs, 0, pGD->memSize);
+ 
+       /* Enable  Display  */
+       lcd->LCDCON1 |= 0x01;   /* ENVID = 1 */

Added: trunk/src/target/u-boot/patches/splashimage-command.patch
===================================================================
--- trunk/src/target/u-boot/patches/splashimage-command.patch   2007-02-20 
23:19:02 UTC (rev 1062)
+++ trunk/src/target/u-boot/patches/splashimage-command.patch   2007-02-21 
00:01:54 UTC (rev 1063)
@@ -0,0 +1,24 @@
+drivers/cfb_console.c (video_logo): if "splashimage" doesn't contain an
+  address, use its content as a command
+
+- Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: u-boot/drivers/cfb_console.c
+===================================================================
+--- u-boot.orig/drivers/cfb_console.c
++++ u-boot/drivers/cfb_console.c
+@@ -1122,7 +1122,13 @@ static void *video_logo (void)
+       ulong addr;
+ 
+       if ((s = getenv ("splashimage")) != NULL) {
+-              addr = simple_strtoul (s, NULL, 16);
++              char *end;
++
++              addr = simple_strtoul (s, &end, 16);
++              if (*end) {
++                      run_command(s, 0);
++                      return video_fb_address;
++              }
+ 
+               if (video_display_bitmap (addr, 0, 0) == 0) {
+                       return ((void *) (video_fb_address));

Deleted: trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch  2007-02-20 
23:19:02 UTC (rev 1062)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410-splash.patch  2007-02-21 
00:01:54 UTC (rev 1063)
@@ -1,207 +0,0 @@
-Note: most of the changes in here are pretty generic and should go to a
-separate patch. Also, some just increase u-boot's limits, and aren't
-specific to splash images per se. I'll keep them all in here for
-convenience until the code it stable.
-
-drivers/cfb_console.c: include asm/byteorder.h for le32_to_cpu and friends
-  [ shouldn't someone else have found this long ago ? ]
-drivers/cfb_console.c: set SHORTSWAP to swap nibbles
-  [ clean this up when and if HWSWP is confirmed ]
-drivers/cfb_console.c (video_logo): if "splashimage" doesn't contain an
-  address, use its content as a command
-drivers/s3c2410_fb.c (video_hw_init): set HWSWP in LCDCON5
-drivers/s3c2410_fb.c (video_hw_init): use memset instead of open-coded
-   equivalent
-include/configs/neo1973.h: increase heap from 128 kB to 400 kB, for BMP image
-  decompression
-  [ note: increasing it to 512 kB trips over something. note sure what.
-    find out. ]
-include/configs/neo1973.h (CONFIG_COMMANDS): add CFG_CMD_BMP
-include/configs/neo1973.h: raise number of command line arguments from 16 to 64
-include/configs/neo1973.h: enable splash screen and BMP support
-include/configs/neo1973.h: remove #if 1 ... #endif around video definitions
-common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from
-  memory to memory, and option CONFIG_UNZIP to enable it
-
-- Werner Almesberger <[EMAIL PROTECTED]>
-
-Index: u-boot/drivers/cfb_console.c
-===================================================================
---- u-boot.orig/drivers/cfb_console.c
-+++ u-boot/drivers/cfb_console.c
-@@ -191,6 +191,7 @@ CONFIG_VIDEO_HW_CURSOR:         - Uses the 
- #if (CONFIG_COMMANDS & CFG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
- #include <watchdog.h>
- #include <bmp_layout.h>
-+#include <asm/byteorder.h>
- #endif /* (CONFIG_COMMANDS & CFG_CMD_BMP) || CONFIG_SPLASH_SCREEN */
- 
- 
/*****************************************************************************/
-@@ -315,6 +316,11 @@ void      console_cursor (int state);
- #define SHORTSWAP32(x)         (x)
- #endif
- 
-+#ifdef CONFIG_VIDEO_S3C2410
-+#undef SHORTSWAP32
-+#define       SHORTSWAP32(x)  ((((x) & 0xffff) << 16) | (((x) >> 16) & 
0xffff))
-+#endif
-+
- #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE)
- #define PRINTD(x)       printf(x)
- #else
-@@ -1116,7 +1122,13 @@ static void *video_logo (void)
-       ulong addr;
- 
-       if ((s = getenv ("splashimage")) != NULL) {
--              addr = simple_strtoul (s, NULL, 16);
-+              char *end;
-+
-+              addr = simple_strtoul (s, &end, 16);
-+              if (*end) {
-+                      run_command(s, 0);
-+                      return video_fb_address;
-+              }
- 
-               if (video_display_bitmap (addr, 0, 0) == 0) {
-                       return ((void *) (video_fb_address));
-Index: u-boot/drivers/s3c2410_fb.c
-===================================================================
---- u-boot.orig/drivers/s3c2410_fb.c
-+++ u-boot/drivers/s3c2410_fb.c
-@@ -47,7 +47,6 @@ void *video_hw_init (void)
-       struct ctfb_res_modes *res_mode;
-       struct ctfb_res_modes var_mode;
-       unsigned char videoout;
--      unsigned int *vm;
- 
-       /* Search for video chip */
-       printf("Video: ");
-@@ -148,7 +147,7 @@ void *video_hw_init (void)
-       lcd->LCDCON2 = 0x019fc3c1;
-       lcd->LCDCON3 = 0x0039df67;
-       lcd->LCDCON4 = 0x00000007;
--      lcd->LCDCON5 = 0x0001cb08;
-+      lcd->LCDCON5 = 0x0001cb09;
-       lcd->LPCSEL  = 0x00000000;
- 
-       lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1;
-@@ -164,10 +163,7 @@ void *video_hw_init (void)
-       }
- 
-       /* Clear video memory */
--      i = pGD->memSize/4;
--      vm = (unsigned int *)pGD->frameAdrs;
--      while(i--)
--              *vm++ = 0;
-+      memset(pGD->frameAdrs, 0, pGD->memSize);
- 
-       /* Enable  Display  */
-       lcd->LCDCON1 |= 0x01;   /* ENVID = 1 */
-Index: u-boot/include/configs/neo1973.h
-===================================================================
---- u-boot.orig/include/configs/neo1973.h
-+++ u-boot/include/configs/neo1973.h
-@@ -54,7 +54,8 @@
- /*
-  * Size of malloc() pool
-  */
--#define CFG_MALLOC_LEN                (CFG_ENV_SIZE + 128*1024)
-+#define CFG_MALLOC_LEN                (CFG_ENV_SIZE + 400*1024)
-+                                      /* >> CFG_VIDEO_LOGO_MAX_SIZE */
- #define CFG_GBL_DATA_SIZE     128     /* size in bytes reserved for initial 
data */
- 
- /*
-@@ -90,6 +91,7 @@
-                       /* CFG_CMD_IRQ   | */  \
-                       CFG_CMD_BOOTD    | \
-                       CFG_CMD_CONSOLE  | \
-+                      CFG_CMD_BMP      | \
-                       CFG_CMD_ASKENV   | \
-                       CFG_CMD_RUN      | \
-                       CFG_CMD_ECHO     | \
-@@ -142,7 +144,7 @@
- #endif
- #define       CFG_CBSIZE              256             /* Console I/O Buffer 
Size      */
- #define       CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer 
Size */
--#define       CFG_MAXARGS             16              /* max number of 
command args   */
-+#define       CFG_MAXARGS             64              /* max number of 
command args   */
- #define CFG_BARGSIZE          CFG_CBSIZE      /* Boot Argument Buffer Size    
*/
- 
- #define CFG_MEMTEST_START     0x30000000      /* memtest works on     */
-@@ -248,19 +250,21 @@
- /* we have a board_late_init() function */
- #define BOARD_LATE_INIT                       1
- 
--#if 1
- #define CONFIG_VIDEO
- #define CONFIG_VIDEO_S3C2410
- #define CONFIG_CFB_CONSOLE
- #define CONFIG_VIDEO_LOGO
-+#define CONFIG_SPLASH_SCREEN
-+#define CFG_VIDEO_LOGO_MAX_SIZE       (640*480+1024+100) /* 100 = slack */
-+#define CONFIG_VIDEO_BMP_GZIP
- #define CONFIG_VGA_AS_SINGLE_DEVICE
-+#define CONFIG_UNZIP
- 
- #define VIDEO_KBD_INIT_FCT    0
- #define VIDEO_TSTC_FCT                serial_tstc
- #define VIDEO_GETC_FCT                serial_getc
- 
- #define LCD_VIDEO_ADDR                0x33d00000
--#endif
- 
- #define CONFIG_S3C2410_NAND_BBT                1
- 
-Index: u-boot/common/cmd_mem.c
-===================================================================
---- u-boot.orig/common/cmd_mem.c
-+++ u-boot/common/cmd_mem.c
-@@ -1185,6 +1185,34 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int fl
- }
- #endif        /* CONFIG_CRC32_VERIFY */
- 
-+
-+#ifdef CONFIG_UNZIP
-+int  gunzip (void *, int, unsigned char *, unsigned long *);
-+
-+int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-+{
-+      unsigned long src, dst;
-+      unsigned long src_len = ~0UL, dst_len = ~0UL;
-+      int err;
-+
-+      switch (argc) {
-+              case 4:
-+                      dst_len = simple_strtoul(argv[3], NULL, 16);
-+                      /* fall through */
-+              case 3:
-+                      src = simple_strtoul(argv[1], NULL, 16);
-+                      dst = simple_strtoul(argv[2], NULL, 16);
-+                      break;
-+              default:
-+                      printf ("Usage:\n%s\n", cmdtp->usage);
-+                      return 1;
-+      }
-+
-+      return !!gunzip((void *) dst, dst_len, (void *) src, &src_len);
-+}
-+#endif /* CONFIG_UNZIP */
-+
-+
- /**************************************************/
- #if (CONFIG_COMMANDS & CFG_CMD_MEMORY)
- U_BOOT_CMD(
-@@ -1288,5 +1316,13 @@ U_BOOT_CMD(
- );
- #endif /* CONFIG_MX_CYCLIC */
- 
-+#ifdef CONFIG_UNZIP
-+U_BOOT_CMD(
-+      unzip,  CFG_MAXARGS,    1,      do_unzip,
-+      "unzip - unzip a memory region\n",
-+      "srcaddr dstaddr [dstsize]\n"
-+);
-+#endif /* CONFIG_UNZIP */
-+
- #endif
- #endif        /* CFG_CMD_MEMORY */




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-21 01:25:23 +0100 (Wed, 21 Feb 2007)
New Revision: 1064

Modified:
   trunk/src/target/u-boot/patches/series
   trunk/src/target/u-boot/patches/splashimage-command.patch
Log:
Changed order of patches: enable CONFIG_UNZIP only after it's actually
  supported.



Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series      2007-02-21 00:01:54 UTC (rev 
1063)
+++ trunk/src/target/u-boot/patches/series      2007-02-21 00:25:23 UTC (rev 
1064)
@@ -39,6 +39,6 @@
 # splash screen
 raise-limits.patch
 set-hwswp.patch
-enable-splash-bmp.patch
 splashimage-command.patch
 cmd-unzip.patch
+enable-splash-bmp.patch

Modified: trunk/src/target/u-boot/patches/splashimage-command.patch
===================================================================
--- trunk/src/target/u-boot/patches/splashimage-command.patch   2007-02-21 
00:01:54 UTC (rev 1063)
+++ trunk/src/target/u-boot/patches/splashimage-command.patch   2007-02-21 
00:25:23 UTC (rev 1064)
@@ -7,7 +7,7 @@
 ===================================================================
 --- u-boot.orig/drivers/cfb_console.c
 +++ u-boot/drivers/cfb_console.c
-@@ -1122,7 +1122,13 @@ static void *video_logo (void)
+@@ -1121,7 +1121,13 @@ static void *video_logo (void)
        ulong addr;
  
        if ((s = getenv ("splashimage")) != NULL) {




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-21 01:58:26 +0100 (Wed, 21 Feb 2007)
New Revision: 1065

Added:
   trunk/src/host/splash/
   trunk/src/host/splash/README
   trunk/src/host/splash/splashimg.pl
Log:
Splash screen image converter with usage and install instructions.



Added: trunk/src/host/splash/README
===================================================================
--- trunk/src/host/splash/README        2007-02-21 00:25:23 UTC (rev 1064)
+++ trunk/src/host/splash/README        2007-02-21 00:58:26 UTC (rev 1065)
@@ -0,0 +1,53 @@
+Splash screen support
+=====================
+
+This is a description of the original splash screen setup process. We
+use the somewhat arcane JTAG upload method. Please check the OpenMoko
+Wiki for the updated and presumably more friendly instructions.
+
+
+Prerequities
+------------
+
+The u-boot running on the Neo must be from SVN revision 1061 or later.
+A reasonably recent version of Netpbm must be installed on the host. We
+assume that you have JTAG and openocd set up.
+
+
+Generating the splash image
+---------------------------
+
+The splash image is a raw dump of the 480x640x16 frame buffer, with RGB
+5:6:5 organization and HWSWP = 1. To save a lot of space and to greatly
+improve speed, we gzip the raw dump.
+
+- Download the official startup screen:
+  wget http://wiki.openmoko.org/images/c/c2/System_boot.png
+
+- Generate the compressed frame buffer dump:
+  ./splashimg.pl | gzip -9 >splash.gz
+
+
+Put the image into NAND Flash
+-----------------------------
+
+We use JTAG to upload the image into memory, then write it to Flash with
+u-boot. (Note: we assume that the image is not larger then 0x5000 bytes.
+If there is a size change, update these instructions accordingly.)
+
+- Start u-boot and enter the prompt.
+
+- With openocd, load the image into memory:
+  halt
+  load_binary wherever/splash.gz 0x32000000
+  resume
+
+- In u-boot, write it to NAND Flash:
+  nand erase splash
+  nand write.e 0x32000000 splash 0x5000
+
+- Set up the environment to load the splash screen:
+  setenv splashimage nand read.e 0x32000000 splash 0x5000\; unzip 0x32000000 
0x33d00000 0x96000
+  saveenv
+
+After a reboot, the splash screen image will be displayed.

Added: trunk/src/host/splash/splashimg.pl
===================================================================
--- trunk/src/host/splash/splashimg.pl  2007-02-21 00:25:23 UTC (rev 1064)
+++ trunk/src/host/splash/splashimg.pl  2007-02-21 00:58:26 UTC (rev 1065)
@@ -0,0 +1,61 @@
+#!/usr/bin/perl
+#
+# splashimg.pl - Convert a 480x640 PNG to a splash screen raw dump 
+#
+# Copyright (C) 2006-2007 by OpenMoko, Inc.
+# Written by Werner Almesberger <[EMAIL PROTECTED]>
+# All Rights Reserved
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+sub usage
+{
+    print STDERR "usage: $0 [System_boot.png]\n";
+    exit(1);
+}
+
+
+&usage unless $#ARGV < 2;
+if ($ARGV[0] eq "") {
+    $file = "System_boot.png";
+}
+else {
+    $file = @ARGV[0];
+}
+
+$cmd = "pngtopnm '$file' | ppmtorgb3";
+
+system($cmd) && die "system \"$cmd\": $?";
+
+for ("red", "grn", "blu") {
+    open(FILE,"noname.$_") || die "noname.$_";
+    $f = join("",<FILE>);
+    close FILE;
+    unlink("noname.$_");
+    $f =~ s/^P5\s+(\d+)\s+(\d+)\s+(\d+)\s//s;
+    ($w,$h,$p) = ($1,$2,$3);
+    $p{$_} = $f;
+}
+
+print STDERR "$w x $h ($p)\n";
+
+for ($i = 0; $i != $w*$h; $i++) {
+    $r = unpack("C",substr($p{"red"},$i,1));
+    $g = unpack("C",substr($p{"grn"},$i,1));
+    $b = unpack("C",substr($p{"blu"},$i,1));
+    $v = ($r >> 3) << 11 | ($g >> 2) << 5 | ($b >> 3);
+    print pack("v",$v) || die "print: $!";
+}


Property changes on: trunk/src/host/splash/splashimg.pl
___________________________________________________________________
Name: svn:executable
   + *




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-21 02:11:02 +0100 (Wed, 21 Feb 2007)
New Revision: 1066

Modified:
   trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch
Log:
http://www.fluff.org/ben/openmoko/uboot-neo1973-resume5.patch



Modified: trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch  2007-02-21 
00:58:26 UTC (rev 1065)
+++ trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch  2007-02-21 
01:11:02 UTC (rev 1066)
@@ -3,7 +3,7 @@
 Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
 
 --- u-boot-1.2.0/board/neo1973/lowlevel_init.S 2007-02-20 00:49:00.000000000 
+0000
-+++ u-boot-1.2.0-bjd1/board/neo1973/lowlevel_init.S    2007-02-20 
01:34:50.000000000 +0000
++++ u-boot-1.2.0-bjd1/board/neo1973/lowlevel_init.S    2007-02-21 
01:06:02.000000000 +0000
 @@ -40,6 +40,8 @@
   *
   */
@@ -40,7 +40,7 @@
  #if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || 
defined(CONFIG_ARCH_GTA01B_v3)
        /* switch on power for NAND */
        ldr     r0, =0x56000010 /* GPBCON */
-@@ -165,7 +178,22 @@ lowlevel_init:
+@@ -165,7 +178,21 @@ lowlevel_init:
        orr     r1, r1, #(1 <<2)
        str     r1, [r0]
  #endif
@@ -52,13 +52,12 @@
 +      bpl     1b
 +      
 +      /* test for resume */
-+      ldr     r0, =0x560000B4         /* gstatus2 */
-+      ldr     r0, [ r0 ]
++      ldr     r1, =0x560000B4         /* gstatus2 */
++      ldr     r0, [ r1 ]
 +      tst     r0, #0x02               /* is this resume from power down */
 +      beq     not_resuming
 +
-+      ldr     r0, =0x560000B4         /* gstatus3 */
-+      ldr     pc, [r0]                /* resume execution */
++      ldr     pc, [r1, #4]            /* gstatus3 */
 +      
 +not_resuming:
        /* everything is fine now */




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

Reply via email to