Hi,
I haven't tried building an i386 image with nanobsd since 8.x or 9.x,
so apologies if this is a known issue
I've tried to build an i386 nanobsd using nanobsd on an amd64 host,
and when that didn't work in an i386 jail on an amd64 host, and
now in an i386 vm.
The i386 vm is failing with the logs at the end of the message,
taken from _.bw in the nanobsd build directory. I think similar
errors were seen in the other environments also. A "make buildworld"
in /usr/src passes, so it looks like something specific to nanobsd
is tickling the problem.
I included the first few lines from the start of boot2.s also.
The nanobsd config file has been stripped down to remove any
options that should affect the build
== begin =NANO_PMAKE="make -j 1"
NANO_NAME=net5501-nopkg
NANO_SRC=/usr/src
NANO_OBJ=/mnt/space/obj/nanobsd.${NANO_NAME}
NANO_KERNEL=NET5501
NANO_IMAGES=2
NANO_INIT_IMG2=0
# The following are in 512 byte sectors. The "2" is to convert from
# sectors to kilobytes
NANO_CONFSIZE=48195 # 32 MB
NANO_DATASIZE=1975932
NANO_RAM_ETCSIZE=$(( 2 * 1024 * 64 )) # 64 MB
NANO_RAM_TMPVARSIZE=$(( 2 * 1024 * 32 )) # 32 MB
FlashDevice generic 2048m
== end =
No /etc/src.conf or /etc/make.conf present.
Any ideas?
Thanks,
Gary
===> sys/boot/i386/boot2 (all)
cc -target i386-unknown-freebsd11.1
--sysroot=/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp
-B/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp/usr/bin -fomit-frame-pointer
-mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8
-DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
-Winline -march=i386 -ffreestanding -mno-mmx -mno-sse -mno-avx -msoft-float -g
-std=gnu99 -Oz -mstack-alignment=8 -mllvm -inline-threshold=3 -mllvm
-simplifycfg-dup-ret -mllvm -enable-load-pre=false -Qunused-arguments
-no-integrated-as -c /usr/src/sys/boot/i386/boot2/boot1.S -o boot1.o
ld -static -N --gc-sections -e start -Ttext 0x7c00 -o boot1.out boot1.o
nm -t d boot1.out | awk '/([0-9])+ T xread/ { x = $1 - ORG1;
printf("#define XREADORG %#x\n", REL1 + x) }' ORG1=`printf
"%d" 0x7c00` REL1=`printf "%d" 0x700` > boot2.h
objcopy -S -O binary boot1.out boot1
dd status=none if=/dev/zero of=boot2.ldr bs=512 count=1
cc -target i386-unknown-freebsd11.1
--sysroot=/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp
-B/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp/usr/bin -fomit-frame-pointer
-mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8
-DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
-Winline -march=i386 -ffreestanding -mno-mmx -mno-sse -mno-avx -msoft-float -g
-std=gnu99 -Oz -mstack-alignment=8 -mllvm -inline-threshold=3 -mllvm
-simplifycfg-dup-ret -mllvm -enable-load-pre=false -Qunused-arguments -S -o
boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c
/usr/src/sys/boot/i386/boot2/boot2.c:328:4: warning: cast from 'caddr_t'
(aka 'char *') to 'Elf32_Word *' (aka 'unsigned int *')
increases required alignment from 1 to 4 [-Wcast-align]
*(Elf32_Word *)p = es[i].sh_size;
^~~~~~~~~~~~~~~
/usr/src/sys/boot/i386/boot2/boot2.c:606:8: warning: cast from 'caddr_t'
(aka 'char *') to 'uint32_t *' (aka 'unsigned int *')
increases required alignment from 1 to 4 [-Wcast-align]
t1 = *(uint32_t *)PTOV(0x46c);
^~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
rm -f boot2.s.tmp
cc -target i386-unknown-freebsd11.1
--sysroot=/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp
-B/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp/usr/bin -fomit-frame-pointer
-mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8
-DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
-Winline -march=i386 -ffreestanding -mno-mmx -mno-sse -mno-avx -msoft-float -g
-std=gnu99 -Oz -mstack-alignment=8 -mllvm -inline-threshold=3 -mllvm
-simplifycfg-dup-ret -mllvm -enable-load-pre=false -Qunused-arguments -c
/usr/src/sys/boot/i386/boot2/sio.S -o sio.o
cc -target i386-unknown-freebsd11.1
--sysroot=/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp
-B/mnt/space/obj/nanobsd.net5501-nopkg/usr/src/tmp/usr/bin -c boot2.s
boot2.s:11351:1: error: unassigned file number: 2 for .file directives
^
boot2.s:11351:1: error: unassigned file number: 3 for .file directives
^
boot2.s:11351:1: error: unassigned file number: 4 for .file directives
^
boot2.s:11351:1: error: unassigned file number: 5 for .file directives
^
*** [boot2.o] Error code 1
make[6]: stopped in /usr/src/sys/boot/i386/boot2
Start of boot2.s:
.text
.file "/usr/src/sys/boot/i386/boot2/boot2.c"
# Start of file scope inline assembly
.ident "$FreeBSD: releng/11.1/sys/boot/i386/boot2/boot2.c 294925
2016-01-27 16:36:18Z imp $"
.ident "$FreeBSD: releng/11.1/sys/boot/common/ufsread.c 294493
2016-01-21 08:58:39Z smh $"
# End of file scope inline assembly
.file 1 "/usr/src/sys/boot/i386/boot2" "boot2.c"
.file 6 "/usr/src/sys/boot/i386/boot2/../../common"
"ufsread.c"
.globl main
.type main, at function
main: # @main
.Lfunc_begin0:
.loc 1 197 0 #
/usr/src/sys/boot/i386/boot2/boot2.c:197:0
.cfi_sections .debug_frame
.cfi_startproc
# BB#0:
.loc 1 202 23 prologue_end #
/usr/src/sys/boot/i386/boot2/boot2.c:202:23
pushl %ebx