DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Johannes Zink <j.zink@pengutronix.de>
To: "Jan Lübbe" <jlu@pengutronix.de>,
	"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
	distrokit@pengutronix.de
Cc: patchwork-jzi@pengutronix.de
Subject: Re: [DistroKit] [PATCH 5/5] v8a: barebox: add a boot target for fastboot loaded image files
Date: Fri, 9 Jun 2023 11:53:40 +0200	[thread overview]
Message-ID: <23f6a23c-0145-b5b6-ede8-9d265a668c42@pengutronix.de> (raw)
In-Reply-To: <fb585f8e045f4b17aef8eeaef7546d3dcbb5397c.camel@pengutronix.de>

Hi Jan,

On 6/6/23 17:07, Jan Lübbe wrote:
> On Tue, 2023-06-06 at 16:47 +0200, Ahmad Fatoum wrote:
>> On 06.06.23 16:31, Johannes Zink wrote:
>>> This allows to boot a kernel with dtb and initrd entirely from RAM after
>>> loading it via Android Fastboot by simply calling 'boot fastboot'.
>>>
>>> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
>>> ---
>>>   configs/platform-v8a/barebox-common-defaultenv/boot/fastboot | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/configs/platform-v8a/barebox-common-defaultenv/boot/fastboot b/configs/platform-v8a/barebox-common-defaultenv/boot/fastboot
>>> new file mode 100755
>>> index 000000000000..a06414d582bf
>>> --- /dev/null
>>> +++ b/configs/platform-v8a/barebox-common-defaultenv/boot/fastboot
>>> @@ -0,0 +1,7 @@
>>> +#!/bin/sh
>>> +
>>> +global.bootm.image=/tmp/kernel
>>> +global.bootm.initrd=/tmp/initramfs
>>> +global.bootm.oftree=/tmp/oftree
>>> +
>>> +global.linux.bootargs.dyn.root="rdinit=/sbin/init root=/dev/ram"
>>
>> Isn't rdinit=/sbin/init the default?
> 
> rd=/init is the defaut. root=/dev/ram is not needed, AFAIR, it's for initrd, not
> initramfs.
> 
> Also, we could add a symlink /init -> /sbin/init, which would simplify using
> this initramfs with a bootloaders not passing the correct cmdline.
> 
> Jan

I have tested the different permutations:

+-------------------+---------------+-----------+
| rdinit=/sbin/init | root=/dev/ram | result    |
+===================+===============+===========+
| set               | set           | boots     |
+-------------------+---------------+-----------+
| set               | not set       | boots     |
+-------------------+---------------+-----------+
| not set           | set           | fails [1] |
+-------------------+---------------+-----------+
| not set           | not set       | fails [1] |
+-------------------+---------------+-----------+


[1] kernel panic after
[    2.545914] /dev/root: Can't open blockdev
[    2.546279] VFS: Cannot open root device "ram" or unknown-block(1,0): error -6

Thus, we can drop the root=/dev/ram, as you suggested. Gonna change it in v2.

Johannes


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




      parent reply	other threads:[~2023-06-09  9:53 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
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 [this message]

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=23f6a23c-0145-b5b6-ede8-9d265a668c42@pengutronix.de \
    --to=j.zink@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=jlu@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