From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Mihaita Ivascu <mihaita_ivascu@trimble.com>, linux@rempel-privat.de
Cc: barebox@lists.infradead.org, bst@pengutronix.de
Subject: Re: MFGtools support in barebox
Date: Thu, 19 Jul 2018 07:08:49 +0200 [thread overview]
Message-ID: <0520cae6-02f5-349f-50ad-947079618d33@pengutronix.de> (raw)
In-Reply-To: <CAEp+FuA2+n-zFRxsxUkiroDcosO78jPt4dp69t-Z=t+pt26_6A@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 4596 bytes --]
On 18.07.2018 19:56, Mihaita Ivascu wrote:
> Ok, thanks. I will take a look. I think for that scenario I
> do not need fastboot. Once I have barebox in RAM I can do
> barebox_update to flash it in NAND, reboot and then run a script from
> USB
> that created partitions in NAND and copies FIT image(which contains
> kernel+rootfs) on NAND
> Fastboot would be helpful if I could flash the NAND without
> running anything in target's RAM initially( no barebox nor Linux).
> My goal is to have a target with nothing on NAND and be able
> to flash anything is needed(barebox, kernel, etc) by just using one
> tool(MFGtools, fastboot, etc). Not 2 steps approach: to copy the NAND
> first and then to do anything else by running commands/scripts
> commands. This is how I do it now.
> I know that using MFGtools from NXP is possible. But with
> uboot booatloader. NXP says they don't support barebox.
This confusion appears only from end user perspective. one tool is not
equal one step. With MFGtool it works this way:
- iMX SoC will start do some checks and based on $decisions start USB
HID interface.
- MFGtool will upload firmware image over this interface and request
execution of this image. This firmware should contain NAND and USB drivers.
- Old ROM USB interface will be disabled and new firmware USB interface
with more futures will be created
- Over this new interface MFGtool is able to send commands and images so
the firmware can write it down.
The same we usually do by combining imx-usb-loader with fastboot:
- upload barebox with imx-usb-loader over ROM USB interface and start it
- barebox will disable ROM USB interface and create own with fastboot
support.
- use fastboot to send commands and images over fastboot-barebox USB
interface. Or upload barebox and linux over usb so you can do the same
over linux.
If all this steps are hidden behind one script or application, it looks
for end user as single step.
> Aside from this issue, are you aware of any method of
> flashing the barebox on NAND from Linux(after the kernel was loaded
> successfully on the target) ?
> barebox_update does not exist in Linux obviously and porting it is not
> so trivial, on top of that I don't think I am able to access the nand
> device from Linux, but only MTD partitions .
> I have tried nandwrite and kobs-ng commands but I was not successful.
barebox_update is a wrapper to: take a image and write it to predefined
project or board specific location.
If you have access to this location from linux, you can do it from linux
as well.
> Thanks,
> Mihaita
>
> On Wed, Jul 18, 2018 at 6:35 PM Oleksij Rempel <linux@rempel-privat.de> wrote:
>>
>> Am 18.07.2018 um 17:11 schrieb Mihaita Ivascu:
>>> Hi,
>>>
>>> Thanks for answer.
>>> I think I need it to do it from Windows as we have some boards
>>> that need to be updated in the factory by people that do not necessary
>>> have Linux skills or Linux workstation.
>>> That is why we thought we could use MFGtools app.
>>> My problem is that the board we have have only NAND and USB as
>>> boot options. And I need to flash the NAND the first time.
>>> I have already looked at imx-usb-loader solution but it required
>>> a Linux OS which is not possible in my case
>>> I have already used barebox_update successfully but only after I
>>> had a working barebox already.
>>> I was successful into loading barebox image from MFGtools into
>>> RAM and there execute barebox_update to flash on the NAND itself.
>>> But the barebox won't load afterwards the kernel image with
>>> mfgtools support.
>>>
>>> So I have two options I think:
>>>
>>> i) porting barebox_update to Linux. Is there a way to flash the
>>> barebox on NAND from Linux itself(after the board has booted
>>> successfully) ?
>>> ii) adding support for MFGtools in barebox. I do not have toom uch
>>> knowledge about it. I know I should add UTP protocol support in usb
>>> gadget code in barebox but was not successful so far.
>>>
>>> How do you guys see a solution to this scenario?
>>
>> If you can load barebox in to RAM with MFGtools, you can use fastboot
>> tool flash all needed parts. fastboot is available for windows and
>> supported by barebox.
>> --
>> Regards,
>> Oleksij
>>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-07-19 5:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 12:05 Mihaita Ivascu
2018-07-18 13:01 ` Oleksij Rempel
2018-07-18 13:53 ` Bastian Stender
2018-07-18 14:56 ` Jan Lübbe
2018-07-18 15:11 ` Mihaita Ivascu
2018-07-18 16:35 ` Oleksij Rempel
2018-07-18 17:56 ` Mihaita Ivascu
2018-07-19 5:08 ` Oleksij Rempel [this message]
2018-07-19 9:53 ` Jan Lübbe
2018-07-19 10:08 ` Mihaita Ivascu
-- strict thread matches above, loose matches on Subject: below --
2018-07-18 7:39 MFGTools " Mihaita Ivascu
2018-07-20 9:11 ` Uwe Kleine-König
2018-07-20 9:32 ` Mihaita Ivascu
2018-07-20 9:57 ` Oleksij Rempel
2018-07-20 18:14 ` Mihaita Ivascu
2018-08-03 8:21 ` Mihaita Ivascu
2018-08-03 8:37 ` Oleksij Rempel
2018-08-03 16:37 ` Mihaita Ivascu
2018-08-03 17:10 ` Oleksij Rempel
[not found] ` <CAEp+FuBAV20+TJOkGTZkbr=yOOLjR2DFN9sM+ZO+E6CgKkYeFw@mail.gmail.com>
2018-08-06 8:42 ` Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0520cae6-02f5-349f-50ad-947079618d33@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=bst@pengutronix.de \
--cc=linux@rempel-privat.de \
--cc=mihaita_ivascu@trimble.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox