UBOOT2 JMP

2013-02-26 Thread Nathan
“UBOOT2 JMP ” is what displays during bootup using VirtualBox. This is after compiling with: export ARCH=x86 make generic_defconfig make fdisk /dev/sdb...partition...mkfs.ext2 /dev/sdb1 ./scripts/setupmbr/setupmbr –s 32 –m ./barebox.bin –d /dev/sdb I think there may be something I’m missing after

Re: [PATCH 13/29] of: make flatten independent of libfdt

2013-02-26 Thread Alexander Aring
Hi Sascha, On Tue, Feb 26, 2013 at 09:18:40PM +0100, Sascha Hauer wrote: > Signed-off-by: Sascha Hauer > --- > common/oftree.c |8 ++- > drivers/of/base.c | 180 > - > include/of.h |4 +- > 3 files changed, 160 insertions(+), 3

[PATCH 09/29] of: Add root node argument to of_find_node_by_path

2013-02-26 Thread Sascha Hauer
This makes of_find_node_by_path usable with multiple trees. Signed-off-by: Sascha Hauer --- commands/of_node.c |2 +- commands/of_property.c | 10 -- commands/oftree.c | 10 +- drivers/of/base.c | 16 +++- include/of.h |2 +- 5 fi

[PATCH 23/29] of: Add of property write functions for u32

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/of/base.c | 25 + include/of.h | 11 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index 8138a91..6b12979 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -349,6 +

[PATCH 18/29] oftree command: retire CMD_OFTREE_PROBE Kconfig option

2013-02-26 Thread Sascha Hauer
Whether or not the user wishes devicetree probe support can now be decided indepentently of the oftree command, so retire the CMD_OFTREE_PROBE option and use OFDEVICE in the code instead. Signed-off-by: Sascha Hauer --- commands/Kconfig |7 --- commands/oftree.c |2 +- 2 files chang

[PATCH 15/29] oftree command: Use of_print_nodes

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- commands/oftree.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/commands/oftree.c b/commands/oftree.c index 83ffe12..612d01a 100644 --- a/commands/oftree.c +++ b/commands/oftree.c @@ -156,7 +156,14 @@ static int do_oftree(int

[PATCH 14/29] of/fdt: use optimized endianess conversion

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- include/libfdt_env.h |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/libfdt_env.h b/include/libfdt_env.h index e83aa96..6486187 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -3,13 +3,12 @@ #include #inc

[PATCH 16/29] of: move OFTREE Kconfig option to drivers/of/

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/of/Kconfig |4 lib/Kconfig|4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 95f10d0..5e53d25 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -1,2 +1,6 @@ +c

[PATCH 07/29] of: Add of_set_property and of_create_node

2013-02-26 Thread Sascha Hauer
Add functions to create a new device node and to create/set a new property based on the nodepath. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 79 + include/of.h |3 ++ 2 files changed, 82 insertions(+) diff --git a/drivers/o

[PATCH 20/29] of: Pass barebox internal format devicetree to of_get_fixed_tree

2013-02-26 Thread Sascha Hauer
With this every devicetree is first converted to the barebox internal format before it's converted back to dtb again. Signed-off-by: Sascha Hauer --- arch/arm/lib/bootm.c | 10 +- commands/bootm.c |9 - common/oftree.c | 19 +-- include/of.h

[PATCH 05/29] of: remove allnodes list

2013-02-26 Thread Sascha Hauer
The allnodes list makes it hard to handle multiple devicetrees. Having a list to iterate over all nodes of a tree is still good to have though. This patch uses the list_head of the root node as the head of the list. This way the root node is no longer part of the list, but when iterating over a tre

[PATCH 08/29] of_node command: use of_create_node

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- commands/of_node.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/commands/of_node.c b/commands/of_node.c index a370e26..bf9799c 100644 --- a/commands/of_node.c +++ b/commands/of_node.c @@ -39,6 +39,7 @@ static i

[PATCH 22/29] of: move flat devicetree functions to separate file

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/of/Makefile |2 +- drivers/of/base.c | 372 --- drivers/of/dtb.c| 401 +++ 3 files changed, 402 insertions(+), 373 deletions(-) create mode 100644 drive

[PATCH 10/29] of: Add missing prototype for of_device_is_compatible

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- include/of.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/include/of.h b/include/of.h index 82475c3..c324c74 100644 --- a/include/of.h +++ b/include/of.h @@ -107,6 +107,9 @@ int of_get_named_gpio(struct device_node *np, struct device_node *of_find_nod

[PATCH 26/29] of: fixup unflattened devicetree

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/boards/at91sam9x5ek/hw_version.c | 31 +++-- arch/ppc/mach-mpc5xxx/cpu.c | 26 +++ common/memory.c | 48 ++-- common/oftree.c | 70 +--

[PATCH 17/29] of: make OFDEVICE a user selectable option

2013-02-26 Thread Sascha Hauer
OFDEVICE decides whether or not we compile in support for probing devices from the devicetree. Let the user decide this explicitly. This makes the oftree, of_node and of_property commands independent of devicetree device support since being able to manipulate devicetrees has nothing to do with prob

[PATCH 25/29] of: Add missing prototype for size/address counting functions

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- include/of.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/include/of.h b/include/of.h index b2f9ca7..21e5687 100644 --- a/include/of.h +++ b/include/of.h @@ -53,6 +53,9 @@ struct driver_d; int of_match(struct device_d *dev, struct driver_d *drv);

[PATCH 13/29] of: make flatten independent of libfdt

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- common/oftree.c |8 ++- drivers/of/base.c | 180 - include/of.h |4 +- 3 files changed, 160 insertions(+), 32 deletions(-) diff --git a/common/oftree.c b/common/oftree.c index 0df5209..841d2c4 100

[PATCH 28/29] of_* commands: print usage when insufficient arguments are given

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- commands/of_node.c |3 +++ commands/of_property.c |3 +++ 2 files changed, 6 insertions(+) diff --git a/commands/of_node.c b/commands/of_node.c index 27f070d..0249d97 100644 --- a/commands/of_node.c +++ b/commands/of_node.c @@ -53,6 +53,9 @@ static int

[PATCH 24/29] of: make value of property in of_new_property optional

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/of/base.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 6b12979..c47801a 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -676,8 +676,10 @@ struct property *of_new_property(

[PATCH 21/29] bootm: Use of_print_nodes instead of fdt_print

2013-02-26 Thread Sascha Hauer
Now that we use the unflattened tree in bootm we can use of_print_nodes instead of printing the flattened tree. Signed-off-by: Sascha Hauer --- commands/bootm.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/bootm.c b/commands/bootm.c index 38233e7..65a75e2

[PATCH 19/29] of: move oftree Kconfig to the top of the drivers menu

2013-02-26 Thread Sascha Hauer
Using OFDEVICE is a basic decision, so move it to the top of the driver menu. Signed-off-by: Sascha Hauer --- drivers/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 988ec9e..70321ea 100644 --- a/drivers/Kconfig +++ b/drivers

[PATCH 12/29] of: make unflatten independent of libfdt

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/of/base.c | 160 + include/of.h |2 +- 2 files changed, 127 insertions(+), 35 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 9f1f3cf..d6ca949 100644 --- a/drivers/of/base.

[PATCH 02/29] of: export of_find_child

2013-02-26 Thread Sascha Hauer
of_find_child is a useful function. Export it and rename it to of_find_child_by_name. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 16 +++- include/of.h |2 ++ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c inde

[PATCH 29/29] of_property command: Fix crash with empty property value

2013-02-26 Thread Sascha Hauer
the of_property command crashes when an empty property value was given. This is because xrealloc is called with a length argument of 0. Fix this. Signed-off-by: Sascha Hauer --- commands/of_property.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/of_pr

[PATCH 11/29] of: let of_unflatten_dtb return the unflattened tree

2013-02-26 Thread Sascha Hauer
In order to be able to handle multiple devicetrees, do not assume the tree to be unflattened is the barebox internal one. Instead, just return a pointer to it and assign the barebox internal root_node external to the unflatten function. Signed-off-by: Sascha Hauer --- commands/oftree.c | 14 ++

[PATCH] remove libfdt

2013-02-26 Thread Sascha Hauer
In the beginning we only had libfdt to handle devicetrees. With devicetree probing support we gained two parallel universes for handling devicetrees. This series cleans this up by switching to the internal devicetree completely and removing libfdt. The dtb format is now only used while flattening/

[PATCH 01/29] of: unflatten: allocate root node explicitly

2013-02-26 Thread Sascha Hauer
By doing so of_new_node does not depend on the global root_node anymore. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index eaaeaf4..e853add 100644 --- a/drivers/of

[PATCH 04/29] of: Let of_find_node_by_path iterate over tree

2013-02-26 Thread Sascha Hauer
of_find_node_by_path iterates over the allnodes list. Depending on where the node we look for is, this can be significantly slower than using the tree structure to look for a node, so iterate over the tree instead. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 37

[PATCH 03/29] of: removed unused variables

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/of/base.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index f016f90..704ba8e 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -876,10 +876,8 @@ int of_unflatten_dtb(struct fdt_hea

[PATCH 06/29] ARM bootm: Use of_get_fixed_tree

2013-02-26 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/lib/bootm.c |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index dc29004..cf192cf 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -181,13 +181,7 @@ static int do_boo

Re: [PATCH 2/2] driver/serial: add driver for the mxs application uart

2013-02-26 Thread Sascha Hauer
On Tue, Feb 26, 2013 at 07:34:50PM +0100, Marc Kleine-Budde wrote: > Signed-off-by: Marc Kleine-Budde > --- > drivers/serial/Makefile |1 + > drivers/serial/serial_auart.c | 257 > + > 2 files changed, 258 insertions(+) > create mode 100644 dri

[PATCH 1/2] driver/serial: Kconfig: explicitly state that existing mxs driver is for the debug uart

2013-02-26 Thread Marc Kleine-Budde
Signed-off-by: Marc Kleine-Budde --- drivers/serial/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index a8be9cd..b23d17e 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -21,7 +21,7 @@ config DRIVE

[PATCH 0/2] add mxs application uart driver

2013-02-26 Thread Marc Kleine-Budde
Hello, this series adds support for the mxs application uart driver. Lifted from TQS's u-boot patches. regards, Marc ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH 2/2] driver/serial: add driver for the mxs application uart

2013-02-26 Thread Marc Kleine-Budde
Signed-off-by: Marc Kleine-Budde --- drivers/serial/Makefile |1 + drivers/serial/serial_auart.c | 257 + 2 files changed, 258 insertions(+) create mode 100644 drivers/serial/serial_auart.c diff --git a/drivers/serial/Makefile b/drivers/serial/

[PATCH 2/2] cfa10036: Retrieve the RAM size at runtime

2013-02-26 Thread Maxime Ripard
The cfa-10036 comes in two flavours, with either 128MB or 256MB of RAM on it. Since it's not stored anywhere, we need to runtime detect it, thanks to the get_ram_size function. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |3 ++- 1 file changed, 2 insert

[PATCHv2 0/2] cfa10036: Retrieve RAM size at runtime

2013-02-26 Thread Maxime Ripard
Hi, This patch series makes the cfa10036 retrieve its ram size at runtime. Since the get_ram_size function was not safe to use when running from RAM, we had to introduce a first patch that makes the execution of this function from RAM safe. Thanks, Maxime Maxime Ripard (2): memsize: Make get_r

[PATCH 1/2] memsize: Make get_ram_size RAM proof

2013-02-26 Thread Maxime Ripard
get_ram_size cannot be used when running from RAM at the moment, even though it backs up the memory cells it modifies, since it can also modify the get_ram_size function itself. Avoid testing the memory area where barebox is loaded at to prevent this problem. If the memory supposed to host barebox

[PATCH] log2: Fix declaration of __roundup_pow_of_two

2013-02-26 Thread Maxime Ripard
The roundup_pow_of_two function is making use of __roundup_pow_of_two when the call to __builtin_constant_p fails, which is not implemented in barebox. Copied the code from Linux log2.h header. Signed-off-by: Maxime Ripard --- include/linux/log2.h |9 + 1 file changed, 9 insertions(

[PATCH 1/2] cfa-10036: Use the second MMC partition to store the environment

2013-02-26 Thread Maxime Ripard
Since the only storage medium on the cfa-10036 is the MMC card, we need to have a registered environment partition on it if we want to be able to modify at runtime. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |8 +++- 1 file changed, 7 insertions(+),

[PATCH 2/2] cfa10036: Update the environment

2013-02-26 Thread Maxime Ripard
Since we added a new partition in the board, the partitions number of the boot and rootfs partition have changed as well. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |6 +++--- arch/arm/boards/crystalfontz-cfa10036/env/init/automount |4 ++--

[PATCHv2 0/2] ARM: cfa10036: Store the barebox environment on the MMC

2013-02-26 Thread Maxime Ripard
Hi, The cfa-10036 comes only with a SD slot, so there was previously no way to store in a persistent way the environment we could have modified other than by modifying the code source itself. These two patches register a new partition on the SD card to store that environment, and update the defau

Re: [PATCH] ARM: i.MX: Replace numbers with predefined constants in several places

2013-02-26 Thread Sascha Hauer
On Tue, Feb 26, 2013 at 10:33:48AM +0400, Alexander Shiyan wrote: > > Signed-off-by: Alexander Shiyan Applied, thanks Sascha > --- > arch/arm/mach-imx/esdctl.c |2 +- > arch/arm/mach-imx/imx53.c |2 +- > arch/arm/mach-imx/imx6.c |2 +- > 3 files changed, 3 insertions(+), 3 dele

Re: setupmbr: Bad/No Signature

2013-02-26 Thread Sascha Hauer
On Tue, Feb 26, 2013 at 02:40:12AM -0600, Nathan wrote: > I was following > http://barebox.org/documentation/barebox-2011.05.0/x86_bootloader.html > I am getting the error: > “No MBR signature found > barebox image seems not valid: Bad MBR signature” > > At first I was trying it with OpenSuse and

Re: [PATCH 1/1] serial/Makefile: drop out of date comments

2013-02-26 Thread Sascha Hauer
On Tue, Feb 26, 2013 at 10:41:07AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Applied, thanks Sascha > --- > drivers/serial/Makefile |6 -- > 1 file changed, 6 deletions(-) > > diff --git a/drivers/serial/Makefile b/drivers/serial

Re: [PATCH v2] menu: fix remove superfluous newline: change puts() -> printf("%s", )

2013-02-26 Thread Sascha Hauer
On Mon, Feb 25, 2013 at 05:46:48PM +0100, Fabio Porcedda wrote: > Fix previous commit: > 638f91b "fix compiler warnings: use puts() instead of printf()". > > Because puts() function add a newline, use instead printf("%s", ). > > Signed-off-by: Fabio Porcedda > Cc: Jean-Christophe PLAGNIOL-VILLAR

Re: [PATCH] bareboxenv: Return proper exit code on failure.

2013-02-26 Thread Sascha Hauer
Hi Christian, On Tue, Feb 26, 2013 at 01:04:39PM +0100, Christian Kapeller wrote: > In case environment loading/saving failed, the calling program > should be informed about that by returning a non zero exit code. > > Signed-off-by: Christian Kapeller Applied, thanks Sascha > --- > scripts/b

Re: [PATCH 1/1] Makefile: drop duplicate cmd_as_o_S support

2013-02-26 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:09 Tue 26 Feb , Sascha Hauer wrote: > On Wed, Feb 20, 2013 at 03:25:15PM +0100, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > as we have it to in scripts/Makefile.lib > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > --- > > Makefile |8 > > 1 file changed, 8 de

[PATCH] bareboxenv: Return proper exit code on failure.

2013-02-26 Thread Christian Kapeller
In case environment loading/saving failed, the calling program should be informed about that by returning a non zero exit code. Signed-off-by: Christian Kapeller --- scripts/bareboxenv.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/bareboxenv.c

Re: [PATCH] bareboxenv: Return proper exit code on failure.

2013-02-26 Thread Marc Kleine-Budde
On 02/26/2013 12:20 PM, Christian Kapeller wrote: > In case environment loading/saving failed, the calling program > should be informed about that by returning a non zero exit code. > > Signed-off-by: Christian Kapeller > --- > scripts/bareboxenv.c | 16 > 1 file changed, 12 i

[PATCH] bareboxenv: Return proper exit code on failure.

2013-02-26 Thread Christian Kapeller
In case environment loading/saving failed, the calling program should be informed about that by returning a non zero exit code. Signed-off-by: Christian Kapeller --- scripts/bareboxenv.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/bareboxenv.c

Re: [PATCH 1/1] Makefile: drop duplicate cmd_as_o_S support

2013-02-26 Thread Sascha Hauer
On Wed, Feb 20, 2013 at 03:25:15PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > as we have it to in scripts/Makefile.lib > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > Makefile |8 > 1 file changed, 8 deletions(-) > > diff --git a/Makefile b/Makefile > index a27c0

[PATCH 1/2] ARM i.MX pcm043: Switch to new environment

2013-02-26 Thread Sascha Hauer
- switch to new environment - make barebox partitions 512K big - update defconfig for new env: - enable menu support - miitool support - clk commands - oftree support - let/dirname/readlink commands - enable external nand boot support Signed-off-by: Sascha Hauer --- arch/arm/boards/p

[PATCH 2/2] ARM i.MX pcm043: Use imx_bootsource() to detect bootsource

2013-02-26 Thread Sascha Hauer
Also, print out where our environment comes from. Signed-off-by: Sascha Hauer --- arch/arm/boards/pcm043/pcm043.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c index 563a

[PATCH 1/2] ARM i.MX: Fix booting from NOR when external nand boot is enabled

2013-02-26 Thread Sascha Hauer
We cannot jump to SDRAM unconditionally in imx*_barebox_boot_nand_external. When we really boot from NOR flash the binary is not yet copied to SDRAM. Instead, let the return value of imx_barebox_boot_nand_external() indicate whether we really boot from NAND and only jump to SDRAM in this case. Othe

[PATCH 2/2] ARM i.MX35: Let MAX clk be in run-mode-on

2013-02-26 Thread Sascha Hauer
The reset value for the MAX clk gate is 0b10, that is it is turned on in CPU run mode and off in stop mode. Configure it that way during startup. The 0b11 value previously in this field causes some nasty behaviour in the Linux kernel: - The i.MX35 has two bits per clock gate which are decoded as

[PATCH 1/1] serial/Makefile: drop out of date comments

2013-02-26 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/serial/Makefile |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 893e282..16a54c2 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -1,9 +1,3 @@ -# at

setupmbr: Bad/No Signature

2013-02-26 Thread Nathan
I was following http://barebox.org/documentation/barebox-2011.05.0/x86_bootloader.html I am getting the error: “No MBR signature found barebox image seems not valid: Bad MBR signature” At first I was trying it with OpenSuse and thought the problem could have been related to it being 64-bit, howe