Re: Barebox device tree overlay support

2018-01-12 Thread Maxime Ripard
fdt gained support to apply overlays quite some time ago already, so this should be as easy as updating it to a recent enough version, and creating a wrapper around fdt_apply. This is what U-Boot is doing. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-e

Re: [PATCH] Revert "ARM: Use armlinux_bootparams address for DTB"

2013-08-07 Thread Maxime Ripard
e will look for a device tree binary > (DTB) appended to zImage > (e.g. cat zImage .dtb > zImage_w_dtb). > ... > > So, DTB is placed immediately after the kernel. Yes, in the case where you have APPENDED_DTB, the decompressor relocates the DTB before doing the

Re: [PATCH] Revert "ARM: Use armlinux_bootparams address for DTB"

2013-08-07 Thread Maxime Ripard
tomatic option "ARM_APPENDED_DTB". That won't work either, since the DTB will be overwritten by the kernel decompressor. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature __

[PATCH] ARM: cfa10036: Add more board ID for boot time detection

2013-05-23 Thread Maxime Ripard
From: Brian Lilly As new breakout boards are being developped, we need to add their IDs in the device detection code, otherwise they will be treated as regular CFA-10036. Signed-off-by: Brian Lilly Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/hwdetect.c | 16

Re: 2013.05 breaking Linux boot on imx28 CFA-10036

2013-05-23 Thread Maxime Ripard
On Thu, May 23, 2013 at 02:52:00PM +0200, Maxime Ripard wrote: > Hi Jan, > > On Thu, May 23, 2013 at 12:44:16PM +0200, Jan Lübbe wrote: > > On Thu, 2013-05-23 at 11:46 +0200, Maxime Ripard wrote: > > > I've tested lately both 2013.05.0 and the master of Barebox on th

Re: 2013.05 breaking Linux boot on imx28 CFA-10036

2013-05-23 Thread Maxime Ripard
Hi Jan, On Thu, May 23, 2013 at 12:44:16PM +0200, Jan Lübbe wrote: > On Thu, 2013-05-23 at 11:46 +0200, Maxime Ripard wrote: > > I've tested lately both 2013.05.0 and the master of Barebox on the imx28 > > cfa-10036 board we have. > > > > Everything works fine wi

2013.05 breaking Linux boot on imx28 CFA-10036

2013-05-23 Thread Maxime Ripard
0835, boots the kernel, but just before actually booting it, displays the error "fdt_initrd: FDT_ERR_BADLAYOUT", so that might be an hint. The configuration I'm using is cfa10036_defconfig. Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android enginee

Re: [PATCH v2] cfa10036: Retrieve the RAM size at runtime

2013-03-29 Thread Maxime Ripard
; Signed-off-by: Alexandre Belloni > Cc: Maxime Ripard Acked-by: Maxime Ripard -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ___ barebox mailing list barebox@lists.infradead.org http:

Re: [PATCH] cfa10036: Retrieve the RAM size at runtime

2013-03-25 Thread Maxime Ripard
return SZ_128M; >> else >> return SZ_256M; >> > > Yeah, I was also thinking about stripping it. But, for the sake of being > future proof, I finally chose to keep the full version. > > Maybe, we can assume that we will never have less than 128M o

Re: [PATCH] cfa10036: Retrieve the RAM size at runtime

2013-03-25 Thread Maxime Ripard
ar to > get_ram_size. As we run from RAM, we can then use _text and __bss_stop > to prevent poking in the barebox memory which is not supported on other > platforms. Just tested it on my 256MB cfa-10036, and it works fine, you can add my Tested-by Maxime -- Maxime Ripard, Free Electro

Re: New dt-only arm/mach

2013-03-12 Thread Maxime Ripard
nxi... Barebox is not the kernel. And there's already a number of other architectures that are supported in barebox that boot a kernel that supports only the device tree, like Jean-Christophe said, such as imx, mxs, highbank, at91, etc... So, really, there's nothing fancy about supporting an

Re: New dt-only arm/mach

2013-03-10 Thread Maxime Ripard
e tree support: the bootloader has to load the kernel image, the dtb and that's it. > I think about dtb-file in /env, but not sure... Thanks. It can be done as well I guess, but that doesn't sound that familiar from what I've seen in the other barebox boards. Maxime -- Maxi

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

2013-03-07 Thread Maxime Ripard
Hi Juergen, Le 07/03/2013 15:10, Juergen Beisert a écrit : > Maxime Ripard wrote: >>> [] >>> >>> Unfortunately I had to drop this one. It breaks compilation on some >>> architectures which do not have _text and __bss_stop (namely blackfin >>> an

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

2013-03-07 Thread Maxime Ripard
Hi Sascha, Le 04/03/2013 09:02, Sascha Hauer a écrit : > On Tue, Feb 26, 2013 at 05:55:41PM +0100, Maxime Ripard wrote: >> 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 >> mo

[PATCH] ARM: cfa10036: Remove the boot partition and boot from ext

2013-02-27 Thread Maxime Ripard
Support for ext filesystems has been introduced recently. We can now boot directly from our rootfs, loading the kernel and device tree images from /boot. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |6 +++--- arch/arm/configs/cfa10036_defconfig

[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 chang

[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

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

2013-02-26 Thread Maxime Ripard
barebox is not working, we'll have plenty of other problems anyway. Signed-off-by: Maxime Ripard --- common/memsize.c | 21 + 1 file changed, 21 insertions(+) diff --git a/common/memsize.c b/common/memsize.c index d149e41..1d00984 100644 --- a/common/memsize.c +++ b/c

[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
default environment to reflect these changes. Thanks, Maxime Changes from v1: - Make use of the new common envfs_register_partition function Maxime Ripard (2): cfa-10036: Use the second MMC partition to store the environment cfa10036: Update the environment arch/arm/boards/crystalfontz

Re: [PATCH] Add warning above get_ram_size

2013-02-14 Thread Maxime Ripard
Hi Sascha, Le 14/02/2013 12:35, Sascha Hauer a écrit : > On Thu, Feb 14, 2013 at 10:40:38AM +0100, Maxime Ripard wrote: >> Hi Sascha, >> >> Le 13/02/2013 18:16, Sascha Hauer a écrit : >>> Signed-off-by: Sascha Hauer >>> --- >>> common/memsiz

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

2013-02-14 Thread Maxime Ripard
Hi Juergen, Le 14/02/2013 09:16, Juergen Beisert a écrit : > Maxime Ripard wrote: >> 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. >> >

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

2013-02-14 Thread Maxime Ripard
Hi Jean-Christophe, Le 13/02/2013 18:12, Jean-Christophe PLAGNIOL-VILLARD a écrit : > On 17:45 Wed 13 Feb , Maxime Ripard wrote: >> 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

Re: [PATCH] cfa10036: Retrieve the RAM size at runtime

2013-02-14 Thread Maxime Ripard
Hi Jean-Christophe, Le 13/02/2013 18:09, Jean-Christophe PLAGNIOL-VILLARD a écrit : > On 17:50 Wed 13 Feb , Maxime Ripard wrote: >> The cfa-10036 comes in two flavours, with either 128MB or 256MB of RAM >> on it. >> >> Since it's not stored anywhere, we need

Re: [PATCH] Add warning above get_ram_size

2013-02-14 Thread Maxime Ripard
e that would need to be backed up at the end of the function, right? Maxime -- Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH] cfa10036: Retrieve the RAM size at runtime

2013-02-13 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 chang

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

2013-02-13 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 | 44 +- 1 file changed

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

2013-02-13 Thread Maxime Ripard
default environment to reflect these changes. Thanks, Maxime Maxime Ripard (2): cfa-10036: Use the second MMC partition to store the environment cfa10036: Update the environment arch/arm/boards/crystalfontz-cfa10036/cfa10036.c | 44 +++- .../boards/crystalfontz-cfa10036/env

[PATCH 2/2] cfa10036: Update the environment

2013-02-13 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

[PATCH 1/3] ARM: cfa10036: Add the AT24HC02 I2C EEPROM

2012-12-13 Thread Maxime Ripard
ed in and what expansion board it is. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c | 23 ++ arch/arm/configs/cfa10036_defconfig |3 ++- arch/arm/mach-mxs/Kconfig|3 +++ 3 files change

[PATCHv2 0/3] ARM: cfa10036: Load a different DTB depending on variants

2012-12-13 Thread Maxime Ripard
. It first adds support for the AT24, and then the needed bits to retrieve the board variants from the eeprom if any and load the right DTB. Thanks, Maxime Changes from v2: - Changed the environment variable name and change it to a global variable Maxime Ripard (3): ARM: cfa10036: Add the

[PATCH 2/3] ARM: cfa10036: Retrieve the board variant from the AT24

2012-12-13 Thread Maxime Ripard
d-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/Makefile |2 +- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |4 + arch/arm/boards/crystalfontz-cfa10036/hwdetect.c | 96 ++ arch/arm/boards/crystalfontz-cfa10036/hwdetect.h | 22 + 4 files ch

[PATCH 3/3] ARM: cfa10036: Use the board variant to load a different device tree

2012-12-13 Thread Maxime Ripard
The board variant found on the AT24 EEPROM holds the variant ID that we can use to identify which expansion board we are running on and thus which device tree to load and pass to the kernel. Signed-off-by: Maxime Ripard --- .../boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |4 ++-- 1 file

[PATCH 2/3] ARM: cfa10036: Retrieve the board variant from the AT24

2012-12-12 Thread Maxime Ripard
d-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/Makefile |2 +- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |4 + arch/arm/boards/crystalfontz-cfa10036/hwdetect.c | 97 ++ arch/arm/boards/crystalfontz-cfa10036/hwdetect.h | 22 + 4 files ch

[PATCH 3/3] ARM: cfa10036: Use the board variant to load a different device tree

2012-12-12 Thread Maxime Ripard
The board variant found on the AT24 EEPROM holds the variant ID that we can use to identify which expansion board we are running on and thus which device tree to load and pass to the kernel. Signed-off-by: Maxime Ripard --- .../boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |4 ++-- 1 file

[PATCH 1/3] ARM: cfa10036: Add the AT24HC02 I2C EEPROM

2012-12-12 Thread Maxime Ripard
ed in and what expansion board it is. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c | 23 ++ arch/arm/configs/cfa10036_defconfig |3 ++- arch/arm/mach-mxs/Kconfig|3 +++ 3 files change

[PATCH 0/3] ARM: cfa10036: Load a different DTB depending on variants

2012-12-12 Thread Maxime Ripard
. It first adds support for the AT24, and then the needed bits to retrieve the board variants from the eeprom if any and load the right DTB. Thanks, Maxime Maxime Ripard (3): ARM: cfa10036: Add the AT24HC02 I2C EEPROM ARM: cfa10036: Retrieve the board variant from the AT24 ARM: cfa10036: Use

Re: Writing to the OCOTP on mx28 boards

2012-09-28 Thread Maxime Ripard
Hi Sascha, Le 28/09/2012 14:42, Sascha Hauer a écrit : > On Fri, Sep 28, 2012 at 02:23:32PM +0200, Maxime Ripard wrote: >> Le 28/09/2012 14:08, Maxime Ripard a écrit : >>> Hi everyone, >>> >>> I'm trying to write down some data to the /dev/ocotp file, whic

Re: [PATCH] arm: cfa10036: Add proper resource length

2012-09-28 Thread Maxime Ripard
Hi Sascha, Le 28/09/2012 16:32, Sascha Hauer a écrit : > On Fri, Sep 28, 2012 at 03:58:12PM +0200, Maxime Ripard wrote: >> The cfa10036 board file were missing the length parameter when adding >> devices. This made barebox crash early in the boot, in the mxs-mci >> driv

[PATCH] arm: cfa10036: Add the OCOTP device

2012-09-28 Thread Maxime Ripard
Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c index fcb7057..522d2d7 100644 --- a/arch/arm/boards

[PATCH] arm: cfa10036: Add proper resource length

2012-09-28 Thread Maxime Ripard
The cfa10036 board file were missing the length parameter when adding devices. This made barebox crash early in the boot, in the mxs-mci driver. Provide the resources lengths in a consistent format. Signed-off-by: Maxime Ripard --- arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |5

Re: Writing to the OCOTP on mx28 boards

2012-09-28 Thread Maxime Ripard
Le 28/09/2012 14:08, Maxime Ripard a écrit : > Hi everyone, > > I'm trying to write down some data to the /dev/ocotp file, which is > basically a one time programming chip containing four bytes. > > Using the command mw -b -d /dev/ocotp 0-3 0x01020304 writes down only >

Writing to the OCOTP on mx28 boards

2012-09-28 Thread Maxime Ripard
pecting. What's the correct syntax for the mw command? Thanks, Maxime -- Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ___ barebox

[PATCH 2/2] Add support for the Crystalfontz CFA-10036 board

2012-07-04 Thread Maxime Ripard
Signed-off-by: Maxime Ripard Cc: Brian Lilly --- arch/arm/Makefile |1 + arch/arm/boards/crystalfontz-cfa10036/Makefile |1 + arch/arm/boards/crystalfontz-cfa10036/cfa10036.c | 106 arch/arm/boards/crystalfontz-cfa10036

[PATCHv2 0/2] Add support for the Crystalfontz CFA-10036 module

2012-07-04 Thread Maxime Ripard
expansion board. Support for this board and the additional devices will come eventually. Changes from v1: * Switched to the new default environment Maxime Ripard (2): Add bootargs script to boot on ext filesystems Add support for the Crystalfontz CFA-10036 board arch/arm/Makefile

[PATCH 1/2] Add bootargs script to boot on ext filesystems

2012-07-04 Thread Maxime Ripard
Signed-off-by: Maxime Ripard Cc: Brian Lilly --- defaultenv-2/base/bin/bootargs-root-ext | 12 1 file changed, 12 insertions(+) create mode 100644 defaultenv-2/base/bin/bootargs-root-ext diff --git a/defaultenv-2/base/bin/bootargs-root-ext b/defaultenv-2/base/bin/bootargs-root

Re: [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board

2012-07-04 Thread Maxime Ripard
ion of this patch using it once I'll be done, so I guess you'll have to wait a little :) Thanks, Maxime > On Mon, Jul 02, 2012 at 04:14:54PM +0200, Maxime Ripard wrote: >> This patch adds initial support for the CFA-10036 module. >> >> The module basically has a iMX28 So

Re: [PATCH 1/2] Add support for kernel and device tree images stored in a partition

2012-07-03 Thread Maxime Ripard
Hi Sascha, Le 03/07/2012 09:39, Sascha Hauer a écrit : > On Mon, Jul 02, 2012 at 04:14:53PM +0200, Maxime Ripard wrote: >> It is a quite common setup to have a partition with all you need to boot >> from the bootloader, ie the kernel image, the device tree blob, etc. >> >&

[PATCH 1/2] Add support for kernel and device tree images stored in a partition

2012-07-02 Thread Maxime Ripard
he fs type used by mount. Signed-off-by: Maxime Ripard Cc: Brian Lilly --- defaultenv/bin/boot | 12 1 file changed, 12 insertions(+) diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot index 61b893a..26360ed 100644 --- a/defaultenv/bin/boot +++ b/defaultenv/bin/boot @@ -114

[PATCH 2/2] Add support for the Crystalfontz CFA-10036 board

2012-07-02 Thread Maxime Ripard
board and the additional devices will come eventually. For now, only the DUART and the MMC controller are used. Signed-off-by: Maxime Ripard Cc: Brian Lilly --- arch/arm/Makefile|1 + arch/arm/boards/crystalfontz-cfa10036/Makefile |1 + arch/arm/boards

Re: How to start barebox on Freescale iMX28 EVK

2012-06-29 Thread Maxime Ripard
Hi, Le 29/06/2012 11:29, Sascha Hauer a écrit : > On Fri, Jun 29, 2012 at 11:11:59AM +0200, Maxime Ripard wrote: >> Anyone ? >> >> Le 18/06/2012 15:07, Maxime Ripard a écrit : >>> Hi everyone, >>> >>> I'm trying barebox on the imx28 evk evaluat

Re: How to start barebox on Freescale iMX28 EVK

2012-06-29 Thread Maxime Ripard
Anyone ? Le 18/06/2012 15:07, Maxime Ripard a écrit : > Hi everyone, > > I'm trying barebox on the imx28 evk evaluation board from freescale, and > I can't get barebox to boot yet. > > I think I might have a problem with the bootlets used, but I'm not sure. &

How to start barebox on Freescale iMX28 EVK

2012-06-18 Thread Maxime Ripard
nks, Maxime [1] http://code.bulix.org/eavngs-81672 [2] http://code.bulix.org/vzqsiy-81673 -- Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ___ barebox ma