Re: git: adad92981419 - main - Fix build under current.
- In reply to: Warner Losh : "Re: git: adad92981419 - main - Fix build under current."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 13 Apr 2025 11:06:42 UTC
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}