Commit Graph

1023 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD d1034bc8db cmd_eeprom: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD bf5a7710ec env_eeprom: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD bb1f8b4f8b rename CFG_ENV_IS_IN_EEPROM in CONFIG_ENV_IS_IN_EEPROM
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 32628c5008 cmd_mac: Move conditional compilation to Makefile
finish remaning CFG_ID_EEPROM in CONFIG_ID_EEPROM
start in commit ad8f8687b7

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD e5648acab1 cmd_fdc: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2d02d91d53 common/Makefile: add core command section
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0d92d4a699 cmd_vfd: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Petri Lehtinen 3591293509 autoscr: Fix one-character lines and non-newline terminated scripts
When not using hush, the autoscr command now executes lines that are
only one character long. It also runs the last line of scripts even if
it does not end in a newline.

Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
2008-09-10 11:09:39 +02:00
Wolfgang Denk f6808c48a5 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2008-09-10 11:07:35 +02:00
Andrew Klossner 5251469943 Fix printf errors under -DDEBUG
Fix printf format-string/arg mismatches under -DDEBUG.

These warnings occur with DEBUG defined for a platform using
cpu/mpc85xx.  Users of other architectures can unearth similar
problems by adding the line "CFLAGS += -DDEBUG=1" in config.mk right
after "CFLAGS += $(call cc-option,-fno-stack-protector)".

Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-09-09 17:02:41 -05:00
Jean-Christophe PLAGNIOL-VILLARD 54b4ab3c96 bootm_load_os: fix load_end debug message
print load_end value not pointer

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09 23:38:15 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1d9af0be76 bootm: enable fdt support only on ppc, m68k and sparc
...as done in image.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09 23:37:50 +02:00
Markus Heidelberg 748b5274e7 common/cmd_mem.c: remove nested #if defined(CONFIG_CMD_MEMORY)
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
2008-09-09 23:35:53 +02:00
Ryan CHEN 3b20fd83c7 Correct drv_usb_kbd_init function
The patch is that check if usb_get_dev_index() function return valid
pointer. If valid, continue. Otherwise return -1.

Signed-off-by: Ryan Chen <ryan.chen@st.com>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-09-09 17:02:59 +02:00
Remy Bohmer eba1f2fc75 Make usb-stop() safe to call multiple times in a row.
A recent commit (936897d4d1)
enabled the usb_stop() command in common/cmd_bootm.c which was
not enabled for some time, because no board did actually set the
CFG_CMD_USB flag. So, now the usb_stop() is executed before
loading the linux kernel.

However, the usb_ohci driver hangs up (at least on AT91SAM) if the
driver is stopped twice (e.g. the peripheral clock is stopped on AT91).
If some other piece of code calls usb_stop() before the bootm command,
this command will hangup the system during boot.
(usb start and stop is typically used while booting from usb memory stick)

But, stopping the usb stack twice is useless anyway, and a flag already
existed that kept track on the usb_init()/usb_stop() calls.
So, we now check if the usb stack is really started before we stop it.

This problem is now fixed in both the upper as low-level layer.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-09-09 16:59:25 +02:00
Wolfgang Denk 2c8ccf2728 Makefile: fix bug introduced by commit 47ffd6c2 2008-09-09 16:55:47 +02:00
Bartlomiej Sieka a4f243452c FIT: make iminfo check hashes of all images in FIT, return 1 on failed check
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-09-09 15:58:57 +02:00
Bartlomiej Sieka 919f550dc1 FIT: add ability to check hashes of all images in FIT, improve output
- add function fit_all_image_check_hashes() that verifies if all
  hashes of all images in the FIT are valid
- improve output of fit_image_check_hashes() when the hash check fails

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-09-09 15:58:11 +02:00
Peter Tyser f5ed9e3908 Add support for booting of INTEGRITY operating system uImages
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-09-09 15:54:10 +02:00
Kumar Gala 9ba2e2c819 Remove support for booting ARTOS images
Pantelis Antoniou stated:
	AFAIK, it is still used but the products using PPC are long gone.
	Nuke it plz (from orbit).

So remove it since it cleans up a usage of env_get_char outside of
the environment code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-09 15:52:35 +02:00
Wolfgang Denk 47ffd6c2fc Makefile: compile and link each module just once
Several source files need to be compiled and linked when one or more
config options are selected. To allow for easy selection in the
Makefiles yet to avoild multiple compilation (which costs build time)
and especially multiple linking (which causes errors), we use
"COBJS = $(sort COBJS-y)" which eliminates duplicates.

By courtesy of Detlev Zundel who suggested this approach.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-09 15:45:18 +02:00
Wolfgang Denk 9863a15a98 common/cmd_bootm.c: fix printf() format warnings
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-08 22:39:23 +02:00
Jean-Christophe PLAGNIOL-VILLARD d1e2319414 rtc: allow rtc_set to return an error and use it in cmd_date
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-07 00:56:36 +02:00
Kumar Gala ea86b9e64b Prevent crash if random/invalid ramdisks are passed to bootm
Adds returning an error from the ramdisk detection code if
its not a real ramdisk (invalid).  There is no reason we can't
just return back to the console if we detect an invalid
ramdisk or CRC error.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-07 00:18:50 +02:00
Anatolij Gustschin 8e02494e8f Prevent crash if random DTB address is passed to bootm
This patch adds bootm_start() return value check. If
error status is returned, we do not proceed further to
prevent board reset or crash as we still can recover
at this point.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-07 00:17:32 +02:00
Kyungmin Park 1a7f8ccec9 Add JFFS2 command support on OneNAND
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-09-06 22:50:08 +02:00
Mark Jackson f5c3ba7978 Allow console input to be disabled
Added new CONFIG_DISABLE_CONSOLE define and GD_FLG_DISABLE_CONSOLE.

When CONFIG_DISABLE_CONSOLE is defined, setting
GD_FLG_DISABLE_CONSOLE disables all console input and output.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-09-06 22:36:54 +02:00
Ricardo Ribalda Delgado 2b22d608f3 loads: allow negative offsets
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
2008-09-06 01:57:18 +02:00
Stefan Roese 3e3c026ed7 devices: Use list_add_tail() instead of list_add() to register a device
This patch fixes a problem spotted on Glacier/Canyonlands (and most
likely lots of other board ports), that no serial output was seen
after console initialization in console_init_r(). This is because the
last added console device was used instead of the first added.

This patch fixes this problem by using list_add_tail() instead of
list_add() to register a device. This way the first added console
is used again.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-09-05 13:27:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD 628ffd73bc device: make device_register() clone the device
This is expected by the callers, but this fact was hidden well within
the old list implementation.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-02 01:28:18 +02:00
Jean-Christophe PLAGNIOL-VILLARD c1de7a6daf devices: merge to list_head
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-31 04:24:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3de7bf0e6b cmd_terminal: remove no need ifdef
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD 578118bdf1 common/Makefile: order by functionality
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD ba7b5b2348 miiphyutil: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 81789c39db autoscript: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD bbf52df9aa crc16: move to lib_generic
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55195773ea miiphybb: move to drivers/net/phy
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD e831403599 soft_spi: move to drivers/spi
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4d75e0aa9c soft_i2c: move to drivers/i2c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 717a222229 gunzip: move to lib_generic
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:01 +02:00
Peter Tyser a1573db0c0 Standardize bootp, tftpboot, rarpboot, dhcp, and nfs command descriptions
cmd_net.c command descriptions were updated to describe the optional
hostIPaddr argument.  The dhcp command help message was also updated
to more closely reflect the other commands in cmd_net.c

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-08-26 22:46:23 -07:00
James Yang 0f2cbe3f5e Add proper SPD definitions for DDR1/2/3
Also adds helper functions for DDR1/2 to verify the checksum.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 02:05:53 +02:00
Gururaja Hebbar K R 322098bff3 common/cmd_load.c cleanup - remove unused variables
- Remove unused global variable os_data_count.
- Remove unused variable z.

Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in>
2008-08-27 00:57:17 +02:00
Kumar Gala 40d7e99d37 bootm: refactor do_reset and os boot function args
There is no need for each OS specific function to call do_reset() we
can just do it once in bootm. This means its feasible on an error for
the OS boot function to return.

Also, remove passing in cmd_tbl_t as its not needed by the OS boot
functions.  flag isn't currently used but might be in the future so
we left it alone.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:48:01 +02:00
Kumar Gala 40afac22a9 fdt: Added resize command
Resize the fdt to size + padding to 4k boundary

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:45:47 +02:00
Kumar Gala 2a1a2cb6e2 fdt: refactor initrd related code
Created a new fdt_initrd() to deal with setting the initrd properties
in the device tree and fixing up the mem reserve.  We can use this
both in the choosen node handling and lets us remove some duplicated
code when we fixup the initrd info in bootm on PPC.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:45:20 +02:00
Kumar Gala 3082d2348c fdt: refactor fdt resize code
Move the fdt resizing code out of ppc specific boot code and into
common fdt support code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:43:36 +02:00
Kumar Gala 396f635b8f bootm: refactor image detection and os load steps
Created a bootm_start() that handles the parsing and detection of all
the images that will be used by the bootm command (OS, ramdisk, fdt).
As part of this we now tract all the relevant image offsets in the
bootm_headers_t struct. This will allow us to have all the needed
state for future sub-commands and lets us reduce a bit of arch
specific code on SPARC.

Created a bootm_load_os() that deals with decompression and loading
the OS image.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:41:43 +02:00
Kumar Gala e906cfae08 bootm: move lmb into the bootm_headers_t structure
To allow for persistent state between future bootm subcommands we
need the lmb to exist in a global state.
Moving it into the bootm_headers_t allows us to do that.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:38:48 +02:00
Kumar Gala 54f9c86691 bootm: Set working fdt address as part of the bootm flow
Set the fdt working address so "fdt FOO" commands can be used as part
of the bootm flow.  Also set an the environment variable "fdtaddr"
with the value.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:37:54 +02:00