9
0
Fork 0
Commit Graph

1177 Commits

Author SHA1 Message Date
Sascha Hauer b36cc0f884 memory: return error in barebox_add_memory_bank
When a memory bank is already registered, return an error code
instead of throwing a bug. This can happen if a board has registered
a memory bank and the same bank is then probed from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-08 00:33:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 90d92b359d Merge branch 'for-next/defaultenv-deps' 2012-10-03 21:18:10 +02:00
Sascha Hauer 6021818e3d Merge branch 'for-next/arm-remove-arch-init-ll'
Conflicts:
	arch/arm/include/asm/barebox-arm.h
2012-10-03 21:13:31 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer cd323c0224 Merge branch 'for-next/png'
Conflicts:
	common/filetype.c
	include/filetype.h
2012-10-03 21:12:19 +02:00
Sascha Hauer 6a64024148 Merge branch 'for-next/openrisc' 2012-10-03 21:11:53 +02:00
Sascha Hauer bee8dddbfc Merge branch 'for-next/omap'
Conflicts:
	Makefile
2012-10-03 21:11:48 +02:00
Sascha Hauer 4517b5980f Merge branch 'for-next/misc' 2012-10-03 21:10:57 +02:00
Sascha Hauer 3b02a1ac3a Merge branch 'for-next/fat-detection' 2012-10-03 21:10:37 +02:00
Sascha Hauer ed4645cf13 Merge branch 'for-next/boot-sequence-dhcp'
Conflicts:
	drivers/net/miidev.c
2012-10-03 21:10:30 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4676721b30 defaultenv: enable glovalvar support
This will allow to do not have 2 set of var for defaultenv and the new
defaultenv-2.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-02 08:57:07 +02:00
Sascha Hauer c8c49c14ae environment generation: Fix dependencies
The dependencies for generating the environment do not work properly:

- If files are removed from the defaultenv, a subsequent make will not
  update the default environment.
- If CONFIG_DEFAULT_ENVIRONMENT_PATH changes, the default environment
  also will not be regenerated.

This patch fixes this by introducing a cmd_env which has the content of
$(ENV_FILES) in the command so that the if_changed mechanism recognizes
a change when $(ENV_FILE) changes. This also results in a nice "  ENV "
string in the build process.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:44 +02:00
Sascha Hauer 1bc0a26188 environment generation: remove unused CLEAN_FILES
The CLEAN_FILES in common/Makefile are unused. All generated files
are removed from the toplevel Makefile.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:38 +02:00
Sascha Hauer fd5cd6084a ARM: remove ARCH_HAS_LOWLEVEL_INIT
This is unused now and not needed. We have a board_init_lowlevel. If a
board needs some architecture setup it can always call it from its
board_init_lowlevel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-25 09:40:55 +02:00
Franck Jullien 010ee209b7 filetype: Improve FAT detection
We may have some disk with MBR as a first sector. In this case, the
current FAT check returns an error. However, the FAT sector exist and
the MBR can tell us where it is.

This patch add to file_name_detect_type function the ability to find
the FAT boot sector on the first sector of the first partition in case
it is not on sector 0.

It also introduce is_fat_or_mbr to check if a buffer is a FAT boot
or MBR sector

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:57:58 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer 58f3457f4f of: add devicetree probing support
This adds code to probe devices from a devicetree. Most helper
functions are directly imported from Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Franck Jullien 83507f2891 Add OpenRISC Image type
This patch sync the image type list with the kernel in order to add
openrisc support.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 08:39:33 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4732c27030 globalvar: add support to set a value to of all globalvars beginning with 'match'
via c global_set_match and global -r

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-14 00:46:00 +08:00
Jean-Christophe PLAGNIOL-VILLARD 50239e0195 filetype: add PNG support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:23:34 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2dfb4028b4 filetype: add BMP support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:22:43 +02:00
Jan Weitzel 75831d1687 xload: get barebox size from barebox_arm_head
Add functions to read the barebox_arm_head, check barebox magicword
and read out the barebox image size.
Create a inital partion of 1Mb to access the barebox image on nand.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-07 10:31:54 +02:00
Jan Luebbe ef01e97f6c common: split out meminfo output and make it optional
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-06 12:43:36 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Sascha Hauer d79712f82e Merge branch 'for-next/menu' 2012-09-05 12:59:29 +02:00
Sascha Hauer e5a927883e Merge branch 'for-next/link' 2012-09-05 12:59:29 +02:00
Sascha Hauer 4c9d8da6fe Merge branch 'for-next/hush' 2012-09-05 12:59:29 +02:00
Jean-Christophe PLAGNIOL-VILLARD b65e607923 defautenv: add support of symlink
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD acef08abb7 envfs: add support of symlink
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD d3cbc61596 envfs: add support of variable inode size
Introduce a struct envfs_inode_end with more data.
Today this will just containt the file mode to be able to add the symlink
support.

But this is compatible with the previous envfs version as they will do not
care about the extra as the previous version is just reading the filename and
then consume the extra data without using them.

Increase the envfs version to 1.0

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD ff3058e3bb envfs: introduce version major and minor
they are store in the super block at byte 16th and 17th.

set the verison at 0.1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD 653c767213 filetype: add fat filesystem support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-04 09:08:39 +02:00
Jean-Christophe PLAGNIOL-VILLARD d9cefaed51 uimage_laod: fix ramdisk support
ramdisk U-Boot expect to ignore the compression type

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-13 14:48:16 +08:00
Jean-Christophe PLAGNIOL-VILLARD 3120585df8 uimage_sdram_flush: fix resource start
The start is the start of the previous resource nor the size of it.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-13 14:48:15 +08:00
Sascha Hauer 4d902142a5 hush: catch errors from execute_binfmt
execute_binfmt may return negative return values which hush interprets
as 'exit'. Catch this and print an error message instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 20:59:58 +02:00
Sascha Hauer 16edced39e hush: Make exit a shell builtin
'exit' used to do its job by returning value < 0. This is a sign
for hush that 'exit' is executed. This has problems:

- Often commands accidently return a negative value. This causes
  the shell to exit.
- execute_binfmt returns a negative value when it does not find
  a binary to execute. This again causes the shell to exit.
  Returning a negative error value seems to be the right thing
  to do, but catching this in the shell would mean that the exit
  command does not work anymore.
- if called without arguments exit is supposed to return the code
  of the last command. As a command exit has no access to this code.

This patch changes exit to be a builtin and also fixes the last return
code problem. While at it, update the help text.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 20:59:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0e21e17614 menu: add number key support
Allow to use the number key to jump to entry.
if already on a entry % number_key jump to the next +10 one if exit

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-09 08:40:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 104c39fe82 compressed image: add gzip support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 5c3db111da Add compressed image support
This allows for creating a lzo compressed binary unsing the pbl.

Only copy the piggydata if needed.

Add CONFIG_PBL_FORCE_PIGGYDATA_COPY option
In some case we need to copy the PIGGYDATA as the link address
as example we run from SRAM and shutdown the SDRAM/DDR for
reconfiguration but most of the time we just need to copy the
executable code.

based on Sascha Hauer
Add compressed image support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 78867e2bbd Add pre-bootloader (pbl) image support
This allows for creating a pre-bootloader binary for
 - nand boot
 - mmc boot
 - compressed image

The pbl will be incharge of the lowlevel init if needed.
The barebox will skip it.

Import string functions from linux 3.4 (arch/arm/boot/compressed/string.c) and
implement a dummy panic.

For now on introduce dummy zbarebox* targets and c code that will contain later
the decompressor. This only implemeted on ARM.

This patch is based on Sascha Hauer <s.hauer@pengutronix.de>
Add compressed image support patch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:13 +08:00
Sascha Hauer 2935411dea Merge branch 'for-next/reset-source' 2012-08-01 17:49:27 +02:00
Sascha Hauer 88107f6e12 Merge branch 'for-next/randconfig' 2012-08-01 17:49:27 +02:00
Sascha Hauer 9204bf87d6 Merge branch 'for-next/misc' 2012-08-01 17:49:27 +02:00
Sascha Hauer bff2e86495 Merge branch 'for-next/defenv-2' 2012-08-01 17:49:27 +02:00
Jean-Christophe PLAGNIOL-VILLARD d6a50c915f stddev: make it selectable via Kconfig
enable is by default for simple and hush
we do not need to NO_SHELL

this allow to save 1KiB

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 10:06:30 +02:00
Jean-Christophe PLAGNIOL-VILLARD 14c8c60ac6 command: add missing EXPORT_SYMBOL for find_cmd
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:50:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD e7abb188f5 version: add missing EXPORT_SYMBOL for version_string
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:50:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8bc0b0a008 complete: add missing EXPORT_SYMBOL for {command, device, empty, command}_var_complete
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:50:00 +02:00
Sascha Hauer 0daaf9e4c4 uimage: select uncompress and crc32 support
uImage support needs both.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00