9
0
Fork 0
Commit Graph

62 Commits

Author SHA1 Message Date
Sascha Hauer 5930f100aa use kernel bunzip implementation
The kernel uncompression functions have a unified API. Switch
to the kernel implementation to unify the different uncompression
APIs. As a bonus the kernel implementation is much smaller.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:12:27 +01:00
Sascha Hauer d4950552f5 bootm: use initrd_address and initrd_size
Make these fields in struct image_data the reference for image handlers

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:03:17 +01:00
Sascha Hauer 351058fa51 bootm: push relocate_image up to the generic command
All handlers used to just relocate the image without any checks, so
we are doomed if we write outside of SDRAM or will overwrite ourselves.
Move the relocation up to the generic part where we have a chance
of catching these issues.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:56 +01:00
Sascha Hauer ec4ee82ca9 bootm relocate_image: honour load_address
the uImage should be relocated to load_address. This is handled correctly
in gzip/bzip2 compressed images, but not in uncompressed images. fix this.
Also, when a variable is not used once without casting to another type it
probably means that its type is wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:54 +01:00
Sascha Hauer 6dbe704263 bootm: fix typo, update help str
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:21 +01:00
Sascha Hauer 19a0c370aa bootm: do not require -L after -r
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 72bdddcca3 bootm: fix various memory leaks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 479c6e9506 bootm: remove image handler options
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 05b1167099 bootm: handle initrds inline
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer ac4854be5e factor out iminfo command
The rests of U-Boots iminfo command are sitting in commands/bootm.c and
are in a nonusable state. Factor it out to its own file and make it work
again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 88611e7448 bootm: remove dead code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:54:55 +01:00
Sascha Hauer 7631e76c0b Merge branch 'work/magicvars' into next 2011-11-29 20:52:03 +01:00
Sascha Hauer f84fb129c7 bootm: Add bootargs magicvar
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:32 +01:00
Sascha Hauer 38884dabbe remove irq support fragments
We never had interrupt support in barebox and we have no plans to
add interrupt support. Even if we do I doubt the current fragments
of irq support are helpful, so remove them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 11:41:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 83cf63d763 bootm: add -L option to specify the initrd load address
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 774f88c79b get_fake_image_handle: set nb_data_entries to 1 and update the header size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 176c244d45 bootm: ensure the uImage is mapped first to allow option to used it
needed for multi image support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:35:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7b49dc335a image: move map_image amd unmap_image to image.c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-28 09:23:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD d1ffab8f0c image: add multi image support for bootm
you can choose the initrd via @<num>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-28 09:23:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD bd7f9b52e2 image: use data base addr for image_print_contents, image_multi_count/getimg
as in barebox the data could be the mapped file or a allocated memory with
just the data (non header)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-28 09:23:45 +02:00
Antony Pavlov 82991fd15f commands/bootm.c: fix unused-but-set-variable gcc warning
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-04 08:59:10 +02:00
Sascha Hauer 8ef2947fff Remove m68k support
The m68k support is compile broken for a long time now and nobody
cared so far. We cannot keep the architecture uptodate with current
development wihtout being able to compile it. It's still in the
archives and can be re-added anytime once somebody cares for.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-17 09:18:25 +01:00
Robert Schwebel 5a1286d696 doc: add documentation for 'bootm'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
2010-11-01 16:23:08 +01:00
Sascha Hauer 968c2e865d bootm: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:25 +02:00
Sascha Hauer a64c756ad9 image: remove confusing image_check_* functions
The function names do not make it clear what return value
is expected and do not save a single line of code. Put
the code inline and unbreak the wrong checks introduced
with a3c1e5d888.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Eric Bénard <eric@eukrea.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-10-13 17:39:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD 24b499f3fe image: factorise image printing contents
Copied from U-Boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-10-08 00:06:23 +08:00
Jean-Christophe PLAGNIOL-VILLARD a3c1e5d888 Replace direct header access with the API routines
Copied from U-Boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-10-08 00:04:28 +08:00
Jean-Christophe PLAGNIOL-VILLARD 2fbdb02b11 image: rename IH_CPU to IH_ARCH to be more concistant
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-10-08 00:03:56 +08:00
Jean-Christophe PLAGNIOL-VILLARD ad4da3a4a1 image: factorise string helper
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-10-08 00:03:22 +08:00
Sascha Hauer 6d2812b93d Revert "image: factorise string helper"
This reverts commit 7bd7d59e60.
2010-10-07 14:13:21 +02:00
Sascha Hauer 6c4b1b6da0 Revert "image: rename IH_CPU to IH_ARCH to be more concistant"
This reverts commit aba80a2d2d.

Conflicts:

	include/image.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-07 14:13:10 +02:00
Sascha Hauer f7403928a9 Revert "Replace direct header access with the API routines"
This reverts commit 0ceafe14be.

Conflicts:

	include/image.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-07 14:11:38 +02:00
Sascha Hauer 884f4d47c6 Revert "image: factorise image printing contents"
This reverts commit d424ce77f5.
2010-10-07 14:09:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD d424ce77f5 image: factorise image printing contents
before we duplicate it between command/bootm.c and scripts/mkimage.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-24 08:46:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0ceafe14be Replace direct header access with the API routines
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-24 08:46:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD aba80a2d2d image: rename IH_CPU to IH_ARCH to be more concistant
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-23 09:55:50 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7bd7d59e60 image: factorise string helper
before we duplicate it between common/bootm.c and scripts/mkimage.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-23 09:55:50 +02:00
Sascha Hauer 922bb41a47 remove typedef cmd_tbl_t and replace it with struct command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Juergen Beisert f522d42597 Some doxygen related fixes
Nishanth Menon wrote:
> no signed off by and no diffstat?

Ups.

> can you use git-format-patch to send please? it is easier to review.

Sure. Here it comes:

jbe

------8<---------8<---------8<---------8<---------8<---------8<----

Subject: [PATCH] Some doxygen related fixes:
  - fix a few doxygen comments that are used in a wrong way
  - move some pages and their content to a better place in the
    generated documentation

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-14 09:43:02 +01:00
Sascha Hauer 420a3173f0 commands: remove maxargs
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:33 +02:00
Sascha Hauer 63e01b4969 call getopt_reset only once
instead of calling getopt_reset in each command,
call it only once before calling the command.

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer 87e01f28cc commands: return COMMAND_ERROR_USAGE
instead of calling u_boot_cmd_usage in each command to safe
space.

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer ee36cf25b5 remove SHOW_BOOT_PROGRESS
Though useful it is currently unsued and broken. Should be reimplemented

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 12:21:40 +01:00
Sascha Hauer b1a8c1897d bootm: Fix verifying of uImages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-02-06 14:44:46 +01:00
Sascha Hauer 949649e3f1 bootm: honour the -n flag again
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 11:37:58 +02:00
Sascha Hauer 2f3211bc25 bootm: memmap now returns (void *)-1 for failure. Test for this instead of NULL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 11:31:32 +02:00
Sascha Hauer 596c845072 [memory layout]: streamline memory layout
Memory layout can now be specified via kconfig options. Two
possibilities exist: default layout means the layout is stack
/ malloc heap / U-Boot. The user can also specify fixed addresses
for each TEXT_BASE / stack / malloc heap.
2008-06-04 11:54:03 +02:00
Sascha Hauer 50cc8c5412 Subject: [PATCH] [general] Fixed constant strings in data section issue
For practical reasons I changed all string literals assumed to be constant
to reside in .rodata subsection at end of .text section.

Signed-off-by: Carsten Schlote <schlote@vahanus.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-04-04 14:45:04 +02:00
Sascha Hauer f95ec8a32d - Add functions to register image handlers for booting uImages 2008-02-20 19:01:54 +01:00