Re: [PATCH 14/16] defaultenv: base: add new devboot script

Ahmad Fatoum
2026-03-18T10:51:22Z

On 3/18/26 10:50, Sascha Hauer wrote:
> On Thu, Mar 12, 2026 at 03:44:57PM +0100, Ahmad Fatoum wrote:
>> +The devboot script
>> +------------------
>> +
>> +The ``devboot`` command (``/env/bin/devboot``) automates the override
>> +workflow for network-based development:
>> +
>> +1. Brings up the network (``ifup -a1``).
>> +2. Changes into the fetch directory
>> + (:ref:`global.net.fetchdir <magicvar_global_net_fetchdir>`, default
>> + ``/mnt/tftp``).
>
> Is this default actually set somewhere? I can't find it.

global.net.fetchdir is defined in net/net.c since commit
4f328e47e5c6 ("net: make default netboot artifact directory configurable")

>
>> +3. Sources a configuration script named
>> + ``${global.user}-devboot-${global.hostname}``. If that file does not
>> + exist, it falls back to ``${global.user}-devboot-${global.arch}``.
>> +4. Translates the variables set by the script into ``boot -o`` arguments.
>> +5. Passes any extra arguments through to the ``boot`` command.
>> +
>> +.. note::
>> +
>> + TFTP is not a real file system, e.g., listing of directories is not
>> + possible. Keep that in mind if the devboot script does more than
>> + just fetch files by name from TFTP.
>> +
>> +Usage
>> +^^^^^
>> +
>> +.. code-block:: sh
>> +
>> + # Boot from MMC with devboot overrides
>> + devboot mmc
>> +
>> + # Boot from the default boot entry
>> + devboot
>> +
>> + # Make devboot the default for subsequent boots
>> + nv.boot.default=devel
>
> So that would be equivalent to a permanent "devboot". Is there also a
> way to specifiy permanent "devboot mmc"?

No, but it's clear to me this is a non-sense boot target as boot would
refer to boot.default... I'd just drop it from v2.

Please let me know when you are done with the review and I can resend.

Cheers,
Ahmad

>
> Sascha
>

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