Re: imx-usb-loader on imx8mq/mm

2019-12-12 Thread Sascha Hauer
On Fri, Dec 13, 2019 at 07:20:15AM +, Yazdani, Reyhaneh wrote:
> Thanks Lucas.
> 
> So, if I have a board which has only eMMC (no SD card). What would be your
> recommendation about programming it with Barebox?
> 
> Currently, I program U-Boot via uuu utility and then from Kernel, I program
> Barebox on boot1 partition of eMMC (boot0 is not possible).
> 
> I am trying at least to program Barebox in U-boot via ums, mmc write , ... but
> until now I am not successful. Do you have any experience or idea?

The image as it's falling out of the barebox build should be written
straight to the eMMC. The eMMC itself has a setting which specifies
where the i.MX will boot from, valid setting are user area, boot0 or
boot1. It can be that this setting doesn't match the area you are
writing to.

Another way would be to start barebox from U-Boot and let the
barebox-update command do the job of writing barebox to the eMMC.

Sascha

-- 
Pengutronix e.K.   | |
Steuerwalder Str. 21   | http://www.pengutronix.de/  |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: imx-usb-loader on imx8mq/mm

2019-12-12 Thread Yazdani, Reyhaneh
Thanks Lucas.

So, if I have a board which has only eMMC (no SD card). What would be your
recommendation about programming it with Barebox?

Currently, I program U-Boot via uuu utility and then from Kernel, I program
Barebox on boot1 partition of eMMC (boot0 is not possible).

I am trying at least to program Barebox in U-boot via ums, mmc write , ... but
until now I am not successful. Do you have any experience or idea?

(I had forgotten to reply-all and Barebox mailing list was not on my previous
Email, so I send the Email again)

Best,
Reyhaneh


On 12/12/19 11:24 AM, Lucas Stach wrote:
> Hi Reyhaneh,
>
> On Do, 2019-12-12 at 10:13 +, Yazdani, Reyhaneh wrote:
>> Hello everyone,
>>
>> I am trying to load Barebox to the imx8mm board via imx-usb-loader, but it 
>> stops
>> in the middle. I think maybe it is because we do not have a flash-header file
>> with the static RAM configuration. Does someone have any idea about that?
>
> Currently it's impossible to load Barebox on the i.MX8M via the imx-
> usb-loader. The basic issue is that the DRAM setup happens in the PBL,
> so there is no way to play the DCD and load a complete Barebox image
> into DRAM like we do on the older SoCs.
>
> For boards that do the DRAM setup in the PBL we would need to implement
> a 2 step loading approach in imx-usb-loader:
> First load the PBL part (max_load_size in the flash-header) into SRAM,
> execute the DRAM setup, then have a implementation of the imx serial
> load USB protocol in the PBL, so imx-usb-loader can load the complete
> image into DRAM.
>
> There's quite a bit of implementation work to be done here, but it
> would be a very welcome addition to Barebox.
>
> Regards,
> Lucas
>

--
Reyhaneh Yazdani
Data Modul AGTEL:+49-89-56017-154
Embedded development FAX:+49-89-56017-119
Linux - Development  RG: HR-Muenchen B-85591
Landsberger Str. 322 D-80687 Muenchen - http://www.data-modul.com

Vertrauliche E-Mail von / Confidential e-mail from: DATA MODUL AG
Vorstand / CEO: Dr. Florian Pesahl
Vorsitzende des Aufsichtsrates / Chairwoman of the Supervisory Board: Kristin 
D. Russell
Sitz der Gesellschaft / Registered Office: München
Registergericht / Registration Court: München Handelsregister B 85 591



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] commands: led: print actual error code when led_set fails

2019-12-12 Thread Ahmad Fatoum
If led_set fails, the error code is the return value, not errno.
Fix this. While at replace the magic value in the command return code.

Signed-off-by: Ahmad Fatoum 
---
 commands/led.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/led.c b/commands/led.c
index a53f0df6a200..b608fcfa2cdb 100644
--- a/commands/led.c
+++ b/commands/led.c
@@ -101,8 +101,8 @@ static int do_led(int argc, char *argv[])
 
ret = led_set(led, value);
if (ret < 0) {
-   perror("led");
-   return 1;
+   printf("led: %s\n", strerror(-ret));
+   return COMMAND_ERROR;
}
 
return 0;
-- 
2.24.0


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] led: pca955x: remove ineffectual assignment

2019-12-12 Thread Ahmad Fatoum
the .num member of struct led is a 'private' member populated by
led_register. Populating it has no effect because it's always
overwritten. Remove the assignment.

Signed-off-by: Ahmad Fatoum 
---
 drivers/led/led-pca955x.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/led/led-pca955x.c b/drivers/led/led-pca955x.c
index 9c4f7967fb28..27fefce8d524 100644
--- a/drivers/led/led-pca955x.c
+++ b/drivers/led/led-pca955x.c
@@ -316,7 +316,6 @@ led_pca955x_pdata_of_init(struct device_node *np, struct 
pca955x *pca955x)
 
pca955x_led->led_cdev.name = pca955x_led->name;
pca955x_led->led_cdev.set = pca955x_led_set;
-   pca955x_led->led_cdev.num = pca955x_led->led_num;
pca955x_led->led_cdev.max_value = 255;
 
err = led_register(_led->led_cdev);
-- 
2.24.0


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: imx-usb-loader on imx8mq/mm

2019-12-12 Thread Lucas Stach
Hi Reyhaneh,

On Do, 2019-12-12 at 10:13 +, Yazdani, Reyhaneh wrote:
> Hello everyone,
> 
> I am trying to load Barebox to the imx8mm board via imx-usb-loader, but it 
> stops
> in the middle. I think maybe it is because we do not have a flash-header file
> with the static RAM configuration. Does someone have any idea about that?

Currently it's impossible to load Barebox on the i.MX8M via the imx-
usb-loader. The basic issue is that the DRAM setup happens in the PBL,
so there is no way to play the DCD and load a complete Barebox image
into DRAM like we do on the older SoCs.

For boards that do the DRAM setup in the PBL we would need to implement
a 2 step loading approach in imx-usb-loader:
First load the PBL part (max_load_size in the flash-header) into SRAM,
execute the DRAM setup, then have a implementation of the imx serial
load USB protocol in the PBL, so imx-usb-loader can load the complete
image into DRAM.

There's quite a bit of implementation work to be done here, but it
would be a very welcome addition to Barebox.

Regards,
Lucas


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


imx-usb-loader on imx8mq/mm

2019-12-12 Thread Yazdani, Reyhaneh
Hello everyone,

I am trying to load Barebox to the imx8mm board via imx-usb-loader, but it stops
in the middle. I think maybe it is because we do not have a flash-header file
with the static RAM configuration. Does someone have any idea about that?

Best,
Reyhaneh
--
Reyhaneh Yazdani
Data Modul AGTEL:+49-89-56017-154
Embedded development FAX:+49-89-56017-119
Linux - Development  RG: HR-Muenchen B-85591
Landsberger Str. 322 D-80687 Muenchen - http://www.data-modul.com

Vertrauliche E-Mail von / Confidential e-mail from: DATA MODUL AG
Vorstand / CEO: Dr. Florian Pesahl
Vorsitzende des Aufsichtsrates / Chairwoman of the Supervisory Board: Kristin 
D. Russell
Sitz der Gesellschaft / Registered Office: München
Registergericht / Registration Court: München Handelsregister B 85 591



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox