]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/uboot/u-boot-1.1.2/cmd-arm-linux.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / uboot / u-boot-1.1.2 / cmd-arm-linux.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- u-boot-1.1.2/include/cmd_confdefs.h~cmd-arm-linux
7 +++ u-boot-1.1.2/include/cmd_confdefs.h
8 @@ -92,6 +92,7 @@
9  #define CFG_CMD_XIMG   0x0400000000000000ULL   /* Load part of Multi Image     */
10  #define CFG_CMD_UNIVERSE 0x0800000000000000ULL /* Tundra Universe Support      */
11  #define CFG_CMD_EXT2    0x1000000000000000ULL  /* EXT2 Support                 */
12 +#define CFG_CMD_LINUX  0x2000000000000000ULL   /* boot zImage directly         */
13  
14  #define CFG_CMD_ALL    0xFFFFFFFFFFFFFFFFULL   /* ALL commands                 */
15  
16 --- u-boot-1.1.2/lib_arm/armlinux.c~cmd-arm-linux
17 +++ u-boot-1.1.2/lib_arm/armlinux.c
18 @@ -271,6 +271,104 @@
19  }
20  
21  
22 +#if (CONFIG_COMMANDS & CFG_CMD_LINUX)
23 +void do_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
24 +{
25 +       DECLARE_GLOBAL_DATA_PTR;
26 +
27 +       ulong initrd_start = 0;
28 +       ulong initrd_end = 0;
29 +       ulong data;
30 +       void (*theKernel)(int zero, int arch, uint params);
31 +       bd_t *bd = gd->bd;
32 +
33 +
34 +#ifdef CONFIG_CMDLINE_TAG
35 +       char cmdline[128];
36 +       char *s;
37 +#endif
38 +
39 +#ifdef CONFIG_CMDLINE_TAG
40 +       if (argc > 1) {
41 +               ulong len;
42 +               int   i;
43 +
44 +               for (i=1, len=0 ; i<argc ; i+=1) {
45 +                       if (i > 1)
46 +                               cmdline[len++] = ' ';
47 +                       strcpy (&cmdline[len], argv[i]);
48 +                       len += strlen(argv[i]);
49 +               }
50 +       } else
51 +       if ((s = getenv("bootargs")) != NULL) {
52 +               strcpy(cmdline, s);
53 +       } else {
54 +               strcpy(cmdline, "");
55 +       }
56 +#endif
57 +
58 +       theKernel = (void (*)(int, int, uint))load_addr;
59 +
60 +       SHOW_BOOT_PROGRESS (14);
61 +
62 +#ifdef DEBUG
63 +       printf ("## Transferring control to Linux (at address %08lx) ...\n",
64 +               (ulong)theKernel);
65 +#endif
66 +
67 +#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
68 +    defined (CONFIG_CMDLINE_TAG) || \
69 +    defined (CONFIG_INITRD_TAG) || \
70 +    defined (CONFIG_SERIAL_TAG) || \
71 +    defined (CONFIG_REVISION_TAG) || \
72 +    defined (CONFIG_LCD) || \
73 +    defined (CONFIG_VFD)
74 +       setup_start_tag(bd);
75 +#ifdef CONFIG_SERIAL_TAG
76 +       setup_serial_tag(&params);
77 +#endif
78 +#ifdef CONFIG_REVISION_TAG
79 +       setup_revision_tag(&params);
80 +#endif
81 +#ifdef CONFIG_SETUP_MEMORY_TAGS
82 +       setup_memory_tags(bd);
83 +#endif
84 +#ifdef CONFIG_CMDLINE_TAG
85 +       setup_commandline_tag(bd, cmdline);
86 +#endif
87 +#ifdef CONFIG_INITRD_TAG
88 +       setup_initrd_tag(bd, initrd_start, initrd_end);
89 +#endif
90 +#if defined (CONFIG_VFD) || defined (CONFIG_LCD)
91 +       setup_videolfb_tag ((gd_t *) gd);
92 +#endif
93 +       setup_end_tag(bd);
94 +#endif
95 +
96 +       /* we assume that the kernel is in place */
97 +       printf("\nStarting kernel ...\n");
98 +
99 +#ifdef CONFIG_USB_DEVICE
100 +       {
101 +               extern void udc_disconnect (void);
102 +               udc_disconnect ();
103 +       }
104 +#endif
105 +       cleanup_before_linux();
106 +
107 +       //TODO: CONFIG_TAG_ADDR is now bd->bi_boot_params ?
108 +       theKernel(0, bd->bi_arch_number, bd->bi_boot_params);
109 +}
110 +
111 +
112 +U_BOOT_CMD(
113 +       linux,  CFG_MAXARGS,    0,      do_linux,
114 +       "linux  - boot Linux zImage directly\n",
115 +        "[arg ...]\n    - boot Linux zImage, passing arguments 'arg ...'\n"
116 +);
117 +#endif
118 +
119 +
120  #if defined (CONFIG_SETUP_MEMORY_TAGS) || \
121      defined (CONFIG_CMDLINE_TAG) || \
122      defined (CONFIG_INITRD_TAG) || \