From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 09 Jun 2023 08:27:10 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q7VaZ-00GpiQ-GZ for lore@lore.pengutronix.de; Fri, 09 Jun 2023 08:27:10 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q7VaX-00019N-0G; Fri, 09 Jun 2023 08:27:09 +0200 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q7VaM-000194-Hb; Fri, 09 Jun 2023 08:26:58 +0200 Message-ID: <549a953f-bfd4-69e1-a7dd-2db703313a35@pengutronix.de> Date: Fri, 9 Jun 2023 08:26:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US, de-DE To: Ahmad Fatoum , distrokit@pengutronix.de References: <20230606-default_enable_fastboot_rock3a-v1-0-42195d538df2@pengutronix.de> <20230606-default_enable_fastboot_rock3a-v1-4-42195d538df2@pengutronix.de> <7345e97d-79b8-87cd-80c1-3bc6f8cca4b2@pengutronix.de> <9d97074b-09ff-3d46-331c-e3f41b956588@pengutronix.de> From: Johannes Zink In-Reply-To: <9d97074b-09ff-3d46-331c-e3f41b956588@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [DistroKit] [PATCH 4/5] v8a: barebox: enable loading kernel, dtb and initrd via fastboot X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patchwork-jzi@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On 6/8/23 09:36, Ahmad Fatoum wrote: > 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 >>>> --- >>>>   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. ack > >> >>> 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 ack, gonna add that for v2. Johannes > > 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. | Johannes Zink | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 |