DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Johannes Zink <j.zink@pengutronix.de>, distrokit@pengutronix.de
Cc: patchwork-jzi@pengutronix.de
Subject: Re: [DistroKit] [PATCH 4/5] v8a: barebox: enable loading kernel, dtb and initrd via fastboot
Date: Thu, 8 Jun 2023 09:36:52 +0200	[thread overview]
Message-ID: <9d97074b-09ff-3d46-331c-e3f41b956588@pengutronix.de> (raw)
In-Reply-To: <c99cabdf-cf1f-7e80-cd0f-74f323f006ca@pengutronix.de>

On 06.06.23 16:54, Johannes Zink wrote:
> Hi Ahmad,
> 
> On 6/6/23 16:44, Ahmad Fatoum wrote:
>> On 06.06.23 16:31, Johannes Zink wrote:
>>> This allows to load kernel, dtb and initrd as sparse images to
>>> RAM-files.
>>>
>>> While at it, also enable the acm gadget, which exposes the barebox shell
>>> as an USB gadget and autostart the usb gadgets.
>>>
>>> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
>>> ---
>>>   configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.acm        | 1 +
>>>   configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.bbu        | 1 +
>>>   configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.partitions | 1 +
>>>   configs/platform-v8a/barebox-common-defaultenv/nv/usbgadget.autostart | 1 +
>>>   4 files changed, 4 insertions(+)
>>>
>>> diff --git a/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.acm b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.acm
>>> new file mode 100644
>>> index 000000000000..d00491fd7e5b
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.acm
>>> @@ -0,0 +1 @@
>>> +1
>>> diff --git a/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.bbu b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.bbu
>>> new file mode 100644
>>> index 000000000000..d00491fd7e5b
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.bbu
>>> @@ -0,0 +1 @@
>>> +1
>>> diff --git a/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.partitions b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.partitions
>>> new file mode 100644
>>> index 000000000000..a67f90305dd6
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.partitions
>>> @@ -0,0 +1 @@
>>> +/dev/mmc0(sd)o,/dev/mmc1(emmc)o,/tmp/kernel(kernel)c,/tmp/initramfs(initramfs)c,/tmp/oftree(oftree)c
>>
>> 1) Why not export the barebox update handler?
> 
> simple: I forgot to add it... will add it in v2.

You didn't. I now see fastboot.bbu above, which I missed the first time.

> 
>> 2) Is sd also mmc0 and emmc mmc1 on the i.MX8M boards? Because those use the
>>     same environment
> 
> not in general, no. Maybe use /dev/mmc0(mmc0)o,/dev/mmc1(mmc1)o,/dev/mmc2(mmc2)o instead?

Yes, this should do for now. Generally, I think barebox should just support exporting all
devices a user might be interested in. I submitted a patch for that:

https://lore.barebox.org/barebox/20230608072418.3275633-2-a.fatoum@pengutronix.de/T/#u

We could switch over to using this, once the patch is accepted and DistroKit is
updated to a release that has it (unless you want to pick it earlier).


Keep in mind that with either approach, only devices are functional
that barebox has detected. If you boot from SD, barebox might
not need to eMMC at all and thus it would not be detected unless you
(i.e. some init script) do 

  detect mmc0 mmc1 mmc2

Cheers,
Ahmad

>
> Johannes
> 
>>
>>> diff --git a/configs/platform-v8a/barebox-common-defaultenv/nv/usbgadget.autostart b/configs/platform-v8a/barebox-common-defaultenv/nv/usbgadget.autostart
>>> new file mode 100644
>>> index 000000000000..d00491fd7e5b
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/nv/usbgadget.autostart
>>> @@ -0,0 +1 @@
>>> +1
>>>
>>
> 

-- 
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-5555 |




  reply	other threads:[~2023-06-08  7:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 14:31 [DistroKit] [PATCH 0/5] enable uploading kernel, dtb and initramfs over fastboot and boot it on Rock3A Johannes Zink
2023-06-06 14:31 ` [DistroKit] [PATCH 1/5] v8a: enable initrd generation Johannes Zink
2023-06-06 14:37   ` Ahmad Fatoum
2023-06-06 14:44     ` Johannes Zink
2023-06-06 14:59       ` Jan Lübbe
2023-06-06 15:02         ` Johannes Zink
2023-06-06 14:31 ` [DistroKit] [PATCH 2/5] v8a: kernel: enable initramfs in kernel config Johannes Zink
2023-06-06 14:37   ` Ahmad Fatoum
2023-06-06 14:31 ` [DistroKit] [PATCH 3/5] v8a: images: generate sparse images from rock3a initramfs, kernel and dtb Johannes Zink
2023-06-06 14:41   ` Ahmad Fatoum
2023-06-06 14:42     ` Ahmad Fatoum
2023-06-06 14:49       ` Johannes Zink
2023-06-06 14:54         ` Ahmad Fatoum
2023-06-06 14:47     ` Johannes Zink
2023-06-06 14:51       ` Ahmad Fatoum
2023-06-06 15:04         ` Johannes Zink
2023-06-06 15:26           ` Ahmad Fatoum
2023-06-08  7:28             ` Ahmad Fatoum
2023-06-06 14:31 ` [DistroKit] [PATCH 4/5] v8a: barebox: enable loading kernel, dtb and initrd via fastboot Johannes Zink
2023-06-06 14:44   ` Ahmad Fatoum
2023-06-06 14:54     ` Johannes Zink
2023-06-08  7:36       ` Ahmad Fatoum [this message]
2023-06-09  6:26         ` Johannes Zink
2023-06-06 15:04     ` Jan Lübbe
2023-06-06 15:14       ` Johannes Zink
2023-06-06 15:16         ` Jan Lübbe
2023-06-06 14:31 ` [DistroKit] [PATCH 5/5] v8a: barebox: add a boot target for fastboot loaded image files Johannes Zink
2023-06-06 14:47   ` Ahmad Fatoum
2023-06-06 15:07     ` Jan Lübbe
2023-06-06 15:13       ` Johannes Zink
2023-06-09  9:53       ` Johannes Zink

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=9d97074b-09ff-3d46-331c-e3f41b956588@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=j.zink@pengutronix.de \
    --cc=patchwork-jzi@pengutronix.de \
    /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