Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2025 19:58:44 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Karl Denninger <karl@denninger.net>
Cc:        freebsd-embedded <freebsd-embedded@freebsd.org>
Subject:   Re: Where/how to submit proposed patches to Nanobsd provided files?
Message-ID:  <CANCZdfqgsW_Li5yr50nRXmZWdJhrdtyXee44CCTf52bSzPC8rQ@mail.gmail.com>
In-Reply-To: <5887b3f9-8820-47fb-8d26-94e184cdafeb@denninger.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Github pull request. Though there may be one or two there I've not yet
processed.

Warner

On Tue, May 13, 2025, 7:40 AM Karl Denninger <karl@denninger.net> wrote:

> I've put some time in on the "Nanobsd" build process files that do a few
> things:
>
> 1. Support efi dual-boot mode (EFI or not) while keeping an MBR partition
> layout so older devices can still boot the media and also keep the data
> partition.  Basically, set up Partition 4 as an extended "BSD" partition
> with "a" (cfg) and "d" (data, if non-zero size) so they both work.  This
> involved essentially a rewrite of the "legacy" file entirely since the
> partition creation was done through awk basically emitting a script it then
> executed; it was much easier to, due to the different types involved, just
> do "nah", make a calculation for the code segments, subtract off space for
> the EFI partition and cfg area and then use what's left for data.
>
> 2. Put the EFI partition in slot 3 thus the "dual image, online update"
> capacity is unperturbed.  Place the loader in
> EFI/BOOT/{architecture-specific-name} as defined in the config file.  This
> is harmless if the machine is CSM boot but if its EFI it will find it and
> boot using it.
>
> 3. Update the "updatepx" files distributed to look for an EFI partition on
> the NanoBSD device and, if found, set loader.env which should then cause
> the EFI loader to use the correct load partition since the "active" flag is
> ignored otherwise.
>
> Should I put these up somewhere for possible review and inclusion?  I use
> this to build bootable sticks or SD cards for firewall appliances that run
> "read-only" and thus are power-fail safe, and have tested against both a
> commodity EFI-boot-only dual-NIC "NUC" style PC and also the older
> pcEngines apu2 series.
> --
> Karl Denninger
> karl@denninger.net
> *The Market Ticker*
> *[S/MIME encrypted email preferred]*
>

[-- Attachment #2 --]
<div dir="auto">Github pull request. Though there may be one or two there I&#39;ve not yet processed.<div dir="auto"><br></div><div dir="auto">Warner</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, May 13, 2025, 7:40 AM Karl Denninger &lt;<a href="mailto:karl@denninger.net">karl@denninger.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  

    
  
  <div>
    <p>I&#39;ve put some time in on the &quot;Nanobsd&quot; build process files that
      do a few things:</p>
    <p>1. Support efi dual-boot mode (EFI or not) while keeping an MBR
      partition layout so older devices can still boot the media and
      also keep the data partition.  Basically, set up Partition 4 as an
      extended &quot;BSD&quot; partition with &quot;a&quot; (cfg) and &quot;d&quot; (data, if non-zero
      size) so they both work.  This involved essentially a rewrite of
      the &quot;legacy&quot; file entirely since the partition creation was done
      through awk basically emitting a script it then executed; it was
      much easier to, due to the different types involved, just do
      &quot;nah&quot;, make a calculation for the code segments, subtract off
      space for the EFI partition and cfg area and then use what&#39;s left
      for data.<br>
    </p>
    <p>2. Put the EFI partition in slot 3 thus the &quot;dual image, online
      update&quot; capacity is unperturbed.  Place the loader in
      EFI/BOOT/{architecture-specific-name} as defined in the config
      file.  This is harmless if the machine is CSM boot but if its EFI
      it will find it and boot using it.</p>
    <p>3. Update the &quot;updatepx&quot; files distributed to look for an EFI
      partition on the NanoBSD device and, if found, set loader.env
      which should then cause the EFI loader to use the correct load
      partition since the &quot;active&quot; flag is ignored otherwise.</p>
    <p>Should I put these up somewhere for possible review and
      inclusion?  I use this to build bootable sticks or SD cards for
      firewall appliances that run &quot;read-only&quot; and thus are power-fail
      safe, and have tested against both a commodity EFI-boot-only
      dual-NIC &quot;NUC&quot; style PC and also the older pcEngines apu2 series.<br>
    </p>
    <div>-- <br>
      Karl Denninger<br>
      <a href="mailto:karl@denninger.net" target="_blank" rel="noreferrer">karl@denninger.net</a><br>
      <i>The Market Ticker</i><br>
      <font size="-2"><i>[S/MIME encrypted email preferred]</i></font></div>
  </div>

</blockquote></div>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqgsW_Li5yr50nRXmZWdJhrdtyXee44CCTf52bSzPC8rQ>