9
0
Fork 0
Commit Graph

135 Commits

Author SHA1 Message Date
Sascha Hauer 666f12e0c1 introduce runtime loglevel
With this the verbosity of barebox can be controlled during runtime
using the 'loglevel' globalvar.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-29 12:15:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD 892c005849 login/passwd: add default password support
even if the env is broken you will have a password

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-19 08:49:51 +02:00
Sascha Hauer b986f4f1ee remove remaining references of CONFIG_BOARDINFO
With this all code uses barebox_get_model() and no longer
a compile time generated string.

Also this renames barebox_boardinfo() to barebox_get_model()
since we are going to add the corresponding _set_ function
and 'model' corresponds to the devicetree notion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:37 +02:00
Sascha Hauer 9ebb0554cd Merge branch 'for-next/misc' 2013-08-05 12:49:58 +02:00
Antony Pavlov e3399d713f resurrect CONFIG_PANIC_HANG option
The CONFIG_PANIC_HANG a part of the U-Boot heritage.
It is used in the barebox code, but there is no mention
of this option in Kconfig files.

Sometimes this option is very helpful, so
let's resurrect it.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-05 12:14:03 +02:00
Sascha Hauer 10920b6fe2 ARM: i.MX: Fix i.MX27 debug uart Kconfig entries
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 10:05:59 +02:00
Sascha Hauer 1e382ad1c4 Merge branch 'for-next/debug' 2013-07-01 09:32:05 +02:00
Sascha Hauer 4674fd7b6c startup: Add initcall tracing debug option
Being able to trace initcall is very useful when trying to
find out where startup hangs. This adds a kconfig option for
it to make it easier to access.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 11:52:36 +02:00
Sascha Hauer 549ccf4d0c ARM: i.MX: Make debug UART selectable from Kconfig
To make early debugging on i.MX a bit simpler. This uses a similar
magic than the kernel does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 11:52:36 +02:00
Sascha Hauer 2e6bbb4065 remove unused debug Kconfig options
ENABLE_DEVICE_NOISE is used only in two network drivers and is
otherwise unused. ENABLE_FLASH_NOISE is completely unused.
ENABLE_PARTITION_NOISE enables DEBUG in the partition command,
but this code has no debug messages at all.

Remove all this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-23 21:37:12 +02:00
Sascha Hauer 7d58f3f346 bootm: factor out code to make it usable from C
Much of the bootm code is implemented in the command itself. Move
it to a common place to be able to call it from C aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 22:57:39 +02:00
Sascha Hauer dd9f6d08a2 Merge branch 'for-next/relocate'
Conflicts:
	arch/arm/lib/barebox.lds.S
2013-04-04 14:20:42 +02:00
Sascha Hauer a81ec0225f ARM: Add relocatable binary support
For making the same binary executable on different SoCs which have
different DRAM addresses we have to be independent of the compile
time link address.

This patch adds relocatable binary support for the ARM architecture.
With this two new functions are available. relocate_to_current_adr
will fixup the binary to continue executing from the current position.
relocate_to_adr will copy the binary to a given address, fixup the
binary and continue executing from there.

For the PBL and the real image relocatable support can be enabled
independently. This is done to (hopefully) better cope with setups
where the PBL runs from SRAM or ROM and the real binary does not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-07 12:38:01 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8be08d9cf2 defaultenv-2: add boot sequence
This allows to boot a sequence of boot entries until one succeeds.

boot sources can be passed in $global.boot.default, which is now treated
as a list. Also a list of boot entries can be specified as arguments
to the boot script. The entries can be:

- a plain filename from /env/boot/
- a full path to an arbitrary file
- a directory containing boot entries

With this this command:

boot net nand-ubi /env/boot.d

would first use the /env/boot/net entry, if this fails the /env/boot/nand-ubi
entry and if this also fails the files from /env/boot.d/ (which could also
be links to boot scripts)

To make the above the default, global.boot.default would be specified as:

global.boot.default="net nand-ubi /env/boot.d"

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-05 11:51:35 +01:00
Jean-Christophe PLAGNIOL-VILLARD 263bb23ed2 partitons: add framework
so we can support multiple format

use filetpye to detect the parser to use

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-16 23:39:08 +01:00
Sascha Hauer b7bcba8b65 ARM: Enable mmu early
This optionally enabled the MMU in the PBL or during early startup for
the non PBL case. The regular MMU init code will pickup the already enabled
MMU later. This might complicate debugging early code, so this has been
made optional.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 91493b1b5d ARM: remove now unused MACH_[HAS|DO]_LOWLEVEL_INIT
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:40 +01:00
Sascha Hauer 56325edd79 Merge branch 'for-next/pbl' 2013-02-04 15:49:07 +01:00
Sascha Hauer da5fe0ba47 Merge branch 'for-next/misc' 2013-02-04 15:49:00 +01:00
Sascha Hauer 22e2544809 Merge branch 'for-next/compile-log-level'
Conflicts:
	drivers/usb/host/ehci-hcd.c
2013-02-04 15:48:51 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2d553ae51b menu: the dependancy on process escape is wrong drop it
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-31 19:16:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 36db2a0f05 pbl: move configs to pbl/Kconfig
so it more easy to add new entry and to maintain

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-30 22:27:19 +01:00
Sascha Hauer f331ac288f introduce compile time loglevel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD b1da925c8a introduce console none support
this will allow to have no console support

Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and
3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple

As on bootstrap we have often very limited size.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:34:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2bdc28c475 console: switch select to choice
so we can add easly the console_none support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:34:16 +01:00
Sascha Hauer 7b4d66ab28 startup: call a barebox_main function pointer at the end of the startup
Currently Kconfig dependencies are used to allow non-interactive builds.
This leads to problems in Kconfig getting the dependencies right.

This patch adds a barebox_main function pointer which is called at the
end of the startup process. This defaults to run_shell when a shell is
enabled.

With this the HAVE_NOSHELL Kconfig variable can be removed. Non interactive
builds can now be enabled for every board allowing to compile a binary
without further Kconfig dependencies. This also allows for more flexibility,
for example boards may decide to try non-interactive startup first and
call run_shell if that fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 16:30:20 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer 4845ffaf0f debug_ll: Add some usage comments
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:48:53 +01:00
Sascha Hauer bf38ac7b89 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/guf-neso/lowlevel.c
	arch/arm/boards/pcm038/lowlevel.c
	commands/Makefile
2012-11-16 14:01:09 +01:00
Sascha Hauer bed8fb6de1 Add in-system barebox update infrastructure
Currently in-system update means to write an arbitrary file to
an arbitrary device. There is no sanity check if the flashed image
is of the right type or will fit onto the device. Furthermore some
SoCs need a special preparation step for their images before
flashing them.

This adds a barebox in-system update infrastructure. Boards can
register update handlers which know how to make the board bootable.
The available handlers can be listed to be able to select one,
different force levels give the user the chance to know it better.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:23:41 +02:00
Sascha Hauer b3dbaa9a60 console: cleanup Kconfig
Use a choice for the CONSOLE_ACTIVATE_* variables, which is the natural
way of specifying mutually exclusive variabled in Kconfig. Also update
the help texts a bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-09 08:57:15 +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 4517b5980f Merge branch 'for-next/misc' 2012-10-03 21:10:57 +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 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
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
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
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
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
Sascha Hauer a6ce65b121 uimage: introduce UIMAGE Kconfig symbol
Both the uimage command and the bootm command need uImage support, so
add a Kconfig symbol for it to be able to select it properly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Juergen Beisert 1069567830 Enable a way to provide the reason for "being here"
Many architectures support a way to detect why the bootloader is running.
This patch adds a global variable to be able to use the cause in some kind of
shell code to do special things on demand. For example to do an emergency boot,
when the last boot fails and the watchdog reactivate the hanging system.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-18 16:21:43 +02:00
Sascha Hauer 4604923f0c defenv-2: improve boot script
- add usage information
- add option parsing:
  -v verbose
  -v -v more verbose
  -l list b´possible boot sources
  -d dryrun

The dryrun option sets the global variables necessary for booting
but does not actually boot the system. This way it is possible to
make additional adjustments to the boot variables and then invoke
bootm manually.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:50:45 +02:00
Alan Ott a9eef6a7b9 common: Make MENU depend on PROCESS_ESCAPE_SEQUENCE
print_menu_entry() in common/menu.c depeneds on process_escape_sequence().

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 22:03:50 +02:00
Sascha Hauer 0e8155229a Add next generation default environment template
This adds a new environment template which aims to be more flexible
and configurable. Instead of having mainly two scripts (a config script
and a boot script) this template uses initscripts which control the
startup behaviour and configuration. Also we have boot scripts in
/env/boot which configure a single boot configuration. Additional
boot entries can be added by board specific entries or during runtime
by copying and editing a template entry.

Some more helpers handle for example network interfaces which can now
be brought up with 'ifup'. We use the automount feature to configure
mountpoints together with the commands to bring up the devices behind
these mountpoints.

Optionally menu support is available which hides many details behind
a nice looking interface.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-18 12:26:52 +02:00