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 v2 3/4] v8a: barebox: enable loading kernel, dtb and initrd via fastboot
Date: Fri, 9 Jun 2023 16:49:46 +0200 [thread overview]
Message-ID: <ec40dcfc-47f2-2d9c-ab7c-cbc3fd693715@pengutronix.de> (raw)
In-Reply-To: <ec174490-8bbe-4ca3-81a9-eba9dff37213@pengutronix.de>
On 09.06.23 16:38, Johannes Zink wrote:
> On 6/9/23 15:35, Ahmad Fatoum wrote:
>> On 09.06.23 12:28, 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.
>>>
>>> Also expose mmc{0,1,2} as fastboot partitions and add init script to
>>> force barebox to detect these devices and have them available for
>>> fastboot.
>>>
>>> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
>>>
>>> ---
>>>
>>> Changes:
>>>
>>> v1 -> v2:
>>> - worked in Ahmad's and Jan's review findings, thanks for your review:
>>> - use generic names mmc{0,1,2} instead of {sd,emmc, } to allow
>>> generic reuse of the fastboot partitions across multiple boards
>>> - use more obvious partition names ram-{kernel,initramfs,oftree} to
>>> - add init script for detecting /dev/mmc{0,1,2}
>>> ---
>>> configs/platform-v8a/barebox-common-defaultenv/init/detect-mmcs | 3 +++
>>> 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 +
>>> 5 files changed, 7 insertions(+)
>>>
>>> diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/detect-mmcs b/configs/platform-v8a/barebox-common-defaultenv/init/detect-mmcs
>>> new file mode 100755
>>> index 000000000000..e3433f6da09f
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/init/detect-mmcs
>>> @@ -0,0 +1,3 @@
>>> +#!/bin/sh
>>> +
>>> +detect mmc0 mmc1 mmc2
>>
>> We have a CI test that checks that barebox doesn't print errors. The Rock-3A
>> in the Pengutronix remote lab has no eMMC fitted, so detecting the MMC host
>> would throw an error and fail the test, I think. Did you check this?
>
> I did not explicitly check with the CI test. But the barebox error dmesg buffer is empty, so I'd assume there should be no problem with this. tbh, I am also not quite sure how this could be circumvented - either we abstain from detecting the mmcs (which would then cause the fastboot to fail if they have not been detected for any other reason), or we have to somehow deal with it, maybe by adding a filter in the CI tests.
If CI is fine with it, I am too. If not, we can revisit.
>
> Johannes
>
>>
>>
>>> 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..527925e1c58b
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/nv/fastboot.partitions
>>> @@ -0,0 +1 @@
>>> +/dev/mmc0(mmc0)o,/dev/mmc1(mmc1)o,/dev/mmc2(mmc2)o,/tmp/ram-kernel(ram-kernel)c,/tmp/ram-initramfs(ram-initramfs)c,/tmp/ram-oftree(ram-oftree)c
>>> 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 |
next prev parent reply other threads:[~2023-06-09 14:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 10:28 [DistroKit] [PATCH v2 0/4] enable uploading kernel, dtb and initramfs over fastboot and boot it on Rock3A Johannes Zink
2023-06-09 10:28 ` [DistroKit] [PATCH v2 1/4] v8a: enable initrd generation Johannes Zink
2023-06-09 13:30 ` Ahmad Fatoum
2023-06-09 10:28 ` [DistroKit] [PATCH v2 2/4] v8a: kernel: enable initramfs in kernel config Johannes Zink
2023-06-09 13:32 ` Ahmad Fatoum
2023-06-09 14:35 ` Johannes Zink
2023-06-09 14:48 ` Robert Schwebel
2023-06-09 10:28 ` [DistroKit] [PATCH v2 3/4] v8a: barebox: enable loading kernel, dtb and initrd via fastboot Johannes Zink
2023-06-09 13:35 ` Ahmad Fatoum
2023-06-09 14:38 ` Johannes Zink
2023-06-09 14:49 ` Robert Schwebel
2023-06-09 14:49 ` Ahmad Fatoum [this message]
2023-06-09 10:28 ` [DistroKit] [PATCH v2 4/4] v8a: barebox: add a boot target for fastboot loaded image files Johannes Zink
2023-06-09 13:36 ` Ahmad Fatoum
2023-06-09 13:29 ` [DistroKit] [PATCH v2 0/4] enable uploading kernel, dtb and initramfs over fastboot and boot it on Rock3A Ahmad Fatoum
2023-06-09 15:05 ` 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=ec40dcfc-47f2-2d9c-ab7c-cbc3fd693715@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