Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Apr 2025 13:06:42 +0200
From:      mike new <mike@reifenberger.com>
To:        Warner Losh <imp@bsdimp.com>, Michael Reifenberger <mr@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: adad92981419 - main - Fix build under current.
Message-ID:  <23c7faa0-9691-471f-a888-ab25472fec3b@reifenberger.com>
In-Reply-To: <CANCZdfp4HPNUnKgK-d22j9iR6%2B6u7i0UBLWRfcDW=tsSWauT7Q@mail.gmail.com>
References:  <202504101341.53ADfEP0023340@gitrepo.freebsd.org> <CANCZdfrJ77fjoaeGXXUUbCMkLisGJERKKCwSt_S7eN-HOSUX4A@mail.gmail.com> <CANCZdfp4HPNUnKgK-d22j9iR6%2B6u7i0UBLWRfcDW=tsSWauT7Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------Z09Q7yBuiD001XQkUOdkWEPp
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Warner,

sorry for the disturbance.

In the first place I was astonished because of the revertion request.

The commit is a WIP which was meant to get the rescue image to a 
buildable state.

The final goal is to get a rescue image which works for BIOS and UEFI.


While the I found that in its current state nanobsd.sh unmodified 
doesn't produce a image at all because the FS is too big for the 
defasult NANO_MEDIASIZE.

So I would propose at least:

- decrease the size and speed up the build
- increase the image size  to fit the build


diff --git a/tools/tools/nanobsd/defaults.sh 
b/tools/tools/nanobsd/defaults.sh
index 4ba35ffeb04d..8877ee3bb3b5 100755
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -79,7 +79,11 @@ CONF_BUILD=' '
  CONF_INSTALL=' '

  # Options to put in make.conf during both build- & installworld.
-CONF_WORLD=' '
+CONF_WORLD='
+WITHOUT_TESTS=true
+WITHOUT_DEBUG_FILES=true
+WITHOUT_KERNEL_SYMBOLS=true
+'

  # Kernel config file to use
  NANO_KERNEL=GENERIC
@@ -104,7 +108,7 @@ NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"
  NANO_DRIVE=ada0

  # Target media size in 512 bytes sectors
-NANO_MEDIASIZE=2000000
+NANO_MEDIASIZE=6000000

  # Number of code images on media (1 or 2)
  NANO_IMAGES=2


Greetings

---

Michael


On 4/11/25 00:17, Warner Losh wrote:
> So after some experiments, I've concluded that I misread this commit.
> It's for a different file than I thought. My apologies.
> While the commit log isn't great, the change didn't break what I
> thought it would break, so I withdraw my request to revert.
> The worst that Isee this doing is that it does break a convention that
> I have for NANO_OBJ that's set automatically, but
> that convention isn't universal (though often followed in historical
> nanobsd config files).
>
> Warner
>
> On Thu, Apr 10, 2025 at 12:33 PM Warner Losh<imp@bsdimp.com> wrote:
>> Please revert this.
>>
>> (1) It includes things that are bogus (clearly not intended)
>> (2) it wasn't reviewed. we're trying to review things in phab for nanobsd
>> (3) The only possible valid change in here is the size bump, but even
>> it doesn't make sense.
>> (4) the t->true changes are gratuitous.
>>
>> Warner
>>
>> On Thu, Apr 10, 2025 at 7:41 AM Michael Reifenberger<mr@freebsd.org> wrote:
>>> The branch main has been updated by mr:
>>>
>>> URL:https://cgit.FreeBSD.org/src/commit/?id=adad9298141964ca38e21a05c0b8951efbcb70b2
>>>
>>> commit adad9298141964ca38e21a05c0b8951efbcb70b2
>>> Author:     Michael Reifenberger<mr@FreeBSD.org>
>>> AuthorDate: 2025-04-10 13:39:12 +0000
>>> Commit:     Michael Reifenberger<mr@FreeBSD.org>
>>> CommitDate: 2025-04-10 13:41:02 +0000
>>>
>>>      Fix build under current.
>>> ---
>>>   tools/tools/nanobsd/rescue/common | 34 ++++++++++++++++++----------------
>>>   1 file changed, 18 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/tools/tools/nanobsd/rescue/common b/tools/tools/nanobsd/rescue/common
>>> index 5fcf5c19b882..15bf10f5e67d 100644
>>> --- a/tools/tools/nanobsd/rescue/common
>>> +++ b/tools/tools/nanobsd/rescue/common
>>> @@ -1,15 +1,15 @@
>>>   #
>>>   #
>>> -NANO_SRC=$(pwd)
>>> -NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/rescue}
>>> -NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj
>>> +#NANO_SRC=$(pwd)
>>> +#NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/rescue}
>>> +#NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj
>>>   NANO_TOOLS=`pwd`
>>>   NANO_PACKAGE_DIR=`pwd`/Pkg
>>>   NANO_RAM_TMPVARSIZE=40960
>>>   NANO_PMAKE="make -j 8"
>>>   NANO_LABEL="rescue"
>>>   NANO_RAM_TMPVARSIZE=40960
>>> -NANO_MEDIASIZE="3932160"
>>> +NANO_MEDIASIZE="6000000"
>>>   NANO_SECTS="63"
>>>   NANO_HEADS="16"
>>>   NANO_IMAGES="2" @@ -31,10 +31,12 @@ CONF_INSTALL=' CONF_WORLD=' CFLAGS=-O -pipe # 
>>> We do not need these for rescue -WITHOUT_LIB32=true 
>>> WITHOUT_TESTS=true -WITHOUT_DEBUG_FILES=t -WITHOUT_KERNEL_SYMBOLS=t 
>>> +WITHOUT_DEBUG_FILES=true +WITHOUT_KERNEL_SYMBOLS=true 
>>> +WITHOUT_CLANG_FULL=true +WITH_CLANG_EXTRAS=true +WITHOUT_LIB32=true 
>>> ' # Functions @@ -50,14 +52,14 @@ toUpper() { customize_cmd 
>>> cust_allow_ssh_root customize_cmd cust_install_files -cust_ld32_cfg 
>>> () ( - cd ${NANO_WORLDDIR}/libexec - if [ \! -f ld-elf32.so.1 ]; 
>>> then - ln -s ld-elf.so.1 ld-elf32.so.1 - fi -) -customize_cmd 
>>> cust_ld32_cfg - +#cust_ld32_cfg () ( +# cd ${NANO_WORLDDIR}/libexec 
>>> +# if [ \! -f ld-elf32.so.1 ]; then +# ln -s ld-elf.so.1 
>>> ld-elf32.so.1 +# fi +#) +#customize_cmd cust_ld32_cfg +# 
>>> #cust_boot_cfg () ( # cd ${NANO_WORLDDIR} # echo "-S115200 -h" > boot.config
>>> @@ -67,7 +69,7 @@ customize_cmd cust_ld32_cfg
>>>   #)
>>>   #customize_cmd cust_boot_cfg
>>>
>>> -customize_cmd cust_pkgng
>>> +#customize_cmd cust_pkgng
>>>
>>>   cust_etc_cfg () (
>>>     cd ${NANO_WORLDDIR}
--------------Z09Q7yBuiD001XQkUOdkWEPp
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font size="2">Hi Warner,</font></p>
    <p><font size="2">sorry for the disturbance.</font></p>
    <p><font size="2">In the first place I was astonished because of the
        revertion request.</font></p>
    <p><font size="2">The commit is a WIP which was meant to get the
        rescue image to a buildable state.</font></p>
    <p><font size="2">The final goal is to get a rescue image which
        works for BIOS and UEFI.</font></p>
    <p><font size="2"><br>
      </font></p>
    <p><font size="2">While the I found that in its current state
        nanobsd.sh unmodified doesn't produce a image at all because the
        FS is too big for the defasult NANO_MEDIASIZE.</font></p>
    <p><font size="2">So I would propose at least:</font></p>
    <p><font size="2">- decrease </font><font size="2">the size </font><font
        size="2">and speed up the build<br>
        - increase the image size  to fit the build</font></p>
    <p><font size="2"><br>
      </font></p>
    <p><font size="2">diff --git a/tools/tools/nanobsd/defaults.sh
        b/tools/tools/nanobsd/defaults.sh<br>
        index 4ba35ffeb04d..8877ee3bb3b5 100755<br>
        --- a/tools/tools/nanobsd/defaults.sh<br>
        +++ b/tools/tools/nanobsd/defaults.sh<br>
        @@ -79,7 +79,11 @@ CONF_BUILD=' '<br>
         CONF_INSTALL=' '<br>
         <br>
         # Options to put in make.conf during both build- &amp;
        installworld.<br>
        -CONF_WORLD=' '<br>
        +CONF_WORLD='<br>
        +WITHOUT_TESTS=true<br>
        +WITHOUT_DEBUG_FILES=true<br>
        +WITHOUT_KERNEL_SYMBOLS=true<br>
        +'<br>
         <br>
         # Kernel config file to use<br>
         NANO_KERNEL=GENERIC<br>
        @@ -104,7 +108,7 @@ NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"<br>
         NANO_DRIVE=ada0<br>
         <br>
         # Target media size in 512 bytes sectors<br>
        -NANO_MEDIASIZE=2000000<br>
        +NANO_MEDIASIZE=6000000<br>
         <br>
         # Number of code images on media (1 or 2)<br>
         NANO_IMAGES=2<br>
        <br>
        <br>
      </font></p>
    <p><font size="2">Greetings</font></p>
    <p><font size="2">---</font></p>
    <p><font size="2">Michael</font></p>
    <br>
    <div class="moz-cite-prefix">On 4/11/25 00:17, Warner Losh wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANCZdfp4HPNUnKgK-d22j9iR6+6u7i0UBLWRfcDW=tsSWauT7Q@mail.gmail.com">
      <pre wrap="" class="moz-quote-pre">So after some experiments, I've concluded that I misread this commit.
It's for a different file than I thought. My apologies.
While the commit log isn't great, the change didn't break what I
thought it would break, so I withdraw my request to revert.
The worst that Isee this doing is that it does break a convention that
I have for NANO_OBJ that's set automatically, but
that convention isn't universal (though often followed in historical
nanobsd config files).

Warner

On Thu, Apr 10, 2025 at 12:33 PM Warner Losh <a class="moz-txt-link-rfc2396E" href="mailto:imp@bsdimp.com">&lt;imp@bsdimp.com&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">
Please revert this.

(1) It includes things that are bogus (clearly not intended)
(2) it wasn't reviewed. we're trying to review things in phab for nanobsd
(3) The only possible valid change in here is the size bump, but even
it doesn't make sense.
(4) the t-&gt;true changes are gratuitous.

Warner

On Thu, Apr 10, 2025 at 7:41 AM Michael Reifenberger <a class="moz-txt-link-rfc2396E" href="mailto:mr@freebsd.org">&lt;mr@freebsd.org&gt;</a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">
The branch main has been updated by mr:

URL: <a class="moz-txt-link-freetext" href="https://cgit.FreeBSD.org/src/commit/?id=adad9298141964ca38e21a05c0b8951efbcb70b2">https://cgit.FreeBSD.org/src/commit/?id=adad9298141964ca38e21a05c0b8951efbcb70b2</a>;

commit adad9298141964ca38e21a05c0b8951efbcb70b2
Author:     Michael Reifenberger <a class="moz-txt-link-rfc2396E" href="mailto:mr@FreeBSD.org">&lt;mr@FreeBSD.org&gt;</a>
AuthorDate: 2025-04-10 13:39:12 +0000
Commit:     Michael Reifenberger <a class="moz-txt-link-rfc2396E" href="mailto:mr@FreeBSD.org">&lt;mr@FreeBSD.org&gt;</a>
CommitDate: 2025-04-10 13:41:02 +0000

    Fix build under current.
---
 tools/tools/nanobsd/rescue/common | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/tools/tools/nanobsd/rescue/common b/tools/tools/nanobsd/rescue/common
index 5fcf5c19b882..15bf10f5e67d 100644
--- a/tools/tools/nanobsd/rescue/common
+++ b/tools/tools/nanobsd/rescue/common
@@ -1,15 +1,15 @@
 #
 #
-NANO_SRC=$(pwd)
-NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/rescue}
-NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj
+#NANO_SRC=$(pwd)
+#NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/rescue}
+#NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj
 NANO_TOOLS=`pwd`
 NANO_PACKAGE_DIR=`pwd`/Pkg
 NANO_RAM_TMPVARSIZE=40960
 NANO_PMAKE="make -j 8"
 NANO_LABEL="rescue"
 NANO_RAM_TMPVARSIZE=40960
-NANO_MEDIASIZE="3932160"
+NANO_MEDIASIZE="6000000"
 NANO_SECTS="63"
 NANO_HEADS="16"
 NANO_IMAGES="2<a class="moz-txt-link-rfc2396E" href="mailto:@@-31,10+31,12@@CONF_INSTALL='CONF_WORLD='CFLAGS=-O-pipe#Wedonotneedtheseforrescue-WITHOUT_LIB32=trueWITHOUT_TESTS=true-WITHOUT_DEBUG_FILES=t-WITHOUT_KERNEL_SYMBOLS=t+WITHOUT_DEBUG_FILES=true+WITHOUT_KERNEL_SYMBOLS=true+WITHOUT_CLANG_FULL=true+WITH_CLANG_EXTRAS=true+WITHOUT_LIB32=true'#Functions@@-50,14+52,14@@toUpper(){customize_cmdcust_allow_ssh_rootcustomize_cmdcust_install_files-cust_ld32_cfg()(-cd${NANO_WORLDDIR}/libexec-if[\!-fld-elf32.so.1];then-ln-sld-elf.so.1ld-elf32.so.1-fi-)-customize_cmdcust_ld32_cfg-+#cust_ld32_cfg()(+#cd${NANO_WORLDDIR}/libexec+#if[\!-fld-elf32.so.1];then+#ln-sld-elf.so.1ld-elf32.so.1+#fi+#)+#customize_cmdcust_ld32_cfg+##cust_boot_cfg()(#cd${NANO_WORLDDIR}#echo">"
@@ -31,10 +31,12 @@ CONF_INSTALL='
 CONF_WORLD='
 CFLAGS=-O -pipe
 # We do not need these for rescue
-WITHOUT_LIB32=true
 WITHOUT_TESTS=true
-WITHOUT_DEBUG_FILES=t
-WITHOUT_KERNEL_SYMBOLS=t
+WITHOUT_DEBUG_FILES=true
+WITHOUT_KERNEL_SYMBOLS=true
+WITHOUT_CLANG_FULL=true
+WITH_CLANG_EXTRAS=true
+WITHOUT_LIB32=true
 '

 # Functions
@@ -50,14 +52,14 @@ toUpper() {
 customize_cmd cust_allow_ssh_root
 customize_cmd cust_install_files

-cust_ld32_cfg () (
-       cd ${NANO_WORLDDIR}/libexec
-       if [ \! -f ld-elf32.so.1 ]; then
-       ln -s ld-elf.so.1 ld-elf32.so.1
-       fi
-)
-customize_cmd cust_ld32_cfg
-
+#cust_ld32_cfg () (
+#      cd ${NANO_WORLDDIR}/libexec
+#      if [ \! -f ld-elf32.so.1 ]; then
+#      ln -s ld-elf.so.1 ld-elf32.so.1
+#      fi
+#)
+#customize_cmd cust_ld32_cfg
+#
 #cust_boot_cfg () (
 #      cd ${NANO_WORLDDIR}
 #      echo "</a>-S115200 -h" &gt; boot.config
@@ -67,7 +69,7 @@ customize_cmd cust_ld32_cfg
 #)
 #customize_cmd cust_boot_cfg

-customize_cmd cust_pkgng
+#customize_cmd cust_pkgng

 cust_etc_cfg () (
   cd ${NANO_WORLDDIR}
</pre>
        </blockquote>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
</pre>
    </blockquote>
  </body>
</html>

--------------Z09Q7yBuiD001XQkUOdkWEPp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23c7faa0-9691-471f-a888-ab25472fec3b>