Skip to contentSkip to conversation

imx6 usb update

DISCUSSION Erwin Rol 2 participants 3 messages Nov 30, 2018

lore
Share & tools
lore

Erwin Rol

author
#0 lore raw

Hallo all,

I have my barebox running on a iMx6 (phyBOARD-Segin + phyCORE-i.MX 6UL Modul).

Loading via USB works fine, and via DFU I can upload a barebox image and use barebox_update to flash barebox in NAND.

Is it possible to have DFU correctly flash barebox, without first upload a image to /tmp/barebox and than use barebox_update ?

And a second question is it possible to detect if barebox was booted from NAND or from USB via imx-loader ? I woud like to use that to start the system normal when it boots from NAND but go in DFU update mode when it was started via imx-usb-loader.

As always hints and tips are very welcome,

Erwin

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

author
#1 lore raw

Hey all,

the bootmode detection I figured out, but the using DFU to directly flash barebox bricks my system;

usbgadget -D /dev/nand0.barebox(barebox)s

That doesn't work.

Is there a way to update barebox via DFU?

If not directly is it possible to trigger a script after DFU uploaded a file, so I can call barebox_update ?

Or what would be the "barebox" way to do it ?

TIA,

Erwin

Quoted 18 lines · Erwin Rol

Hallo all,

I have my barebox running on a iMx6 (phyBOARD-Segin + phyCORE-i.MX 6UL Modul).

Loading via USB works fine, and via DFU I can upload a barebox image and use barebox_update to flash barebox in NAND.

Is it possible to have DFU correctly flash barebox, without first upload a image to /tmp/barebox and than use barebox_update ?

And a second question is it possible to detect if barebox was booted from NAND or from USB via imx-loader ? I woud like to use that to start the system normal when it boots from NAND but go in DFU update mode when it was started via imx-usb-loader.

As always hints and tips are very welcome,

Quoted 8 lines

Erwin

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw
Quoted 8 lines · Erwin Rol

Hey all,

the bootmode detection I figured out, but the using DFU to directly flash barebox bricks my system;

usbgadget -D /dev/nand0.barebox(barebox)s

That doesn't work.

Nope, that doesn't work. For boot sources like SD/eMMC that would indeed work, but NAND needs special treatment.
You can add what fastboot does:

	if(filetype_is_barebox_image(data)) {
		...
		barebox_update();
	}

There is currently no way to trigger a script.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox