r1063 - trunk/src/target/u-boot/patches
werner at sita.openmoko.org
werner at sita.openmoko.org
Wed Feb 21 01:02:01 CET 2007
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 <werner at openmoko.org>
+
+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 <werner at openmoko.org>
+
+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 <werner at openmoko.org>
+
+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 <werner at openmoko.org>
+
+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 <werner at openmoko.org>
+
+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 <werner at openmoko.org>
-
-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 */
More information about the commitlog
mailing list