task-fso2-compliance: add fsoaudiod as dependency
[openembedded.git] / recipes / u-boot / u-boot-1.1.4 / u-boot-install.patch
blob50c149c0a1f82f1e644b62131f2dad67acc37d8d
1 --- u-boot-1.1.2/common/Makefile 2004-12-16 09:35:57.000000000 -0800
2 +++ u-boot-install/common/Makefile 2005-04-12 07:00:25.000000000 -0700
3 @@ -34,7 +34,7 @@
4 cmd_date.o cmd_dcr.o cmd_diag.o cmd_doc.o cmd_dtt.o \
5 cmd_eeprom.o cmd_elf.o cmd_ext2.o \
6 cmd_fat.o cmd_fdc.o cmd_fdos.o cmd_flash.o cmd_fpga.o \
7 - cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \
8 + cmd_i2c.o cmd_ide.o cmd_immap.o cmd_install.o cmd_itest.o cmd_jffs2.o \
9 cmd_load.o cmd_log.o \
10 cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \
11 cmd_nand.o cmd_net.o cmd_nvedit.o \
12 --- u-boot-1.1.2/common/cmd_install.c 1969-12-31 16:00:00.000000000 -0800
13 +++ u-boot-install/common/cmd_install.c 2005-04-12 07:43:10.000000000 -0700
14 @@ -0,0 +1,70 @@
15 +/*
16 + * (C) Copyright 2005
17 + * Craig Hughes, Gumstix Inc. <craig@gumstix.com>
18 + *
19 + * This program is free software; you can redistribute it and/or
20 + * modify it under the terms of the GNU General Public License as
21 + * published by the Free Software Foundation; either version 2 of
22 + * the License, or (at your option) any later version.
23 + *
24 + * This program is distributed in the hope that it will be useful,
25 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 + * GNU General Public License for more details.
28 + *
29 + * You should have received a copy of the GNU General Public License
30 + * along with this program; if not, write to the Free Software
31 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 + * MA 02111-1307 USA
33 + */
35 +/*
36 + * Install command to copy compiled-in binary to flash
37 + *
38 + */
40 +#include <common.h>
41 +#include <command.h>
42 +#if (CONFIG_COMMANDS & CFG_CMD_INSTALL)
44 +#ifdef CONFIG_GUMSTIX_CPUSPEED_400
45 +#include <u-boot-400.h>
46 +#else
47 +#include <u-boot-200.h>
48 +#endif
50 +int do_install ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
52 + int rc;
53 + size_t sect_top;
55 + if (argc != 1) {
56 + printf ("Usage:\n%s\n", cmdtp->usage);
57 + return 1;
58 + }
60 + for(sect_top=0; sect_top<sizeof(u_boot_bin_data); sect_top+=PHYS_FLASH_SECT_SIZE) continue;
61 + sect_top--;
62 + flash_sect_protect(0, CFG_FLASH_BASE, sect_top);
63 + flash_sect_erase(CFG_FLASH_BASE, sect_top);
65 + puts ("Copying to Flash... ");
67 + rc = flash_write ((uchar *)u_boot_bin_data, CFG_FLASH_BASE, sizeof(u_boot_bin_data));
68 + if (rc != 0) {
69 + flash_perror (rc);
70 + return (1);
71 + }
72 + puts ("done\n");
73 + return 0;
77 +/**************************************************/
78 +U_BOOT_CMD(
79 + install, 1, 1, do_install,
80 + "install - install u-boot to flash\n",
81 + "copies a u-boot image to begining of flash\n"
82 +);
84 +#endif /* CFG_CMD_INSTALL */
85 --- u-boot-1.1.2/include/cmd_confdefs.h 2004-12-16 09:59:53.000000000 -0800
86 +++ u-boot-install/include/cmd_confdefs.h 2005-04-12 07:02:59.000000000 -0700
87 @@ -94,6 +94,7 @@
88 #define CFG_CMD_EXT2 0x1000000000000000ULL /* EXT2 Support */
89 #define CFG_CMD_SNTP 0x2000000000000000ULL /* SNTP support */
90 #define CFG_CMD_DISPLAY 0x4000000000000000ULL /* Display support */
91 +#define CFG_CMD_INSTALL 0x2000000000000000ULL /* Install u-boot binary */
93 #define CFG_CMD_ALL 0xFFFFFFFFFFFFFFFFULL /* ALL commands */
95 @@ -121,6 +121,7 @@
96 CFG_CMD_I2C | \
97 CFG_CMD_IDE | \
98 CFG_CMD_IMMAP | \
99 + CFG_CMD_INSTALL | \
100 CFG_CMD_IRQ | \
101 CFG_CMD_JFFS2 | \
102 CFG_CMD_KGDB | \