Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 1999 17:40:29 -0800
From:      "Carlos C. Tapang" <ctapang@easystreet.com>
To:        <freebsd-current@FreeBSD.ORG>
Subject:   Re: aout-to-elf and bootblocks Success
Message-ID:  <004001be3783$35dcf870$0d787880@apex.tapang>

next in thread | raw e-mail | index | archive | help
Same here. I upgraded from RELENG_3_0_0_RELEASE (the cd 3.0 release) to a
cvsup done on 1/1/1999. It works, but see below.

(I've worked in large commercial software projects, and your accomplishments
here make me somewhat embarrassed to have been paid so well. I know that for
some of you this is "just a hobby" you love to do.)

Carlos C. Tapang
http://www.genericwindows.com


>I just completed an upgrade from a 9/1998 -current to 1/2/1999 elf
>-current.  The new bootblocks work and the elf kernel works.
>
>Thanks to the core team for the hard work, and especially Mike Smith
>for all the help he gave me, and, to Robert Nordier for the bootblock
>help.
>
>tomdean
>
>====================================================
>
>The steps were:
>
>1.  Upgrade to the latest -current
>    cvsup
>    make world
>      Note:  I used make -DNOGAMES -DNOPERL world to save time and
>             to get around a missing gv.h.  I will look for this
>             when I do the last make world.

Another note: make sure you already have Perl installed. If you don't, and
you use NOPERL, then compilation of ficl fails.

>    rebuild and install a new kernel
>
>2.  make -DNOGAMES -DNOPERL aout-to-elf
>    Again, time and gv.h
>    actually, I used aout-to-elf-build and aout-to-elf-install
>    It would be nice if Makefile.upgrade told the world it was
>    successful, after touching the /usr/obj/do* file.
>
>3.  reboot.
>
>4.  install the new bootblocks.
>    cd /sys/boot
>    make sure 'objformat' returns elf
>      if necessary, setenv OBJFORMAT elf
>    make all install
>    disklabel -B -b /boot/boot1 -s /boot/boot2 da1

This was the most tricky part. There's no way to tell that what you really
have in /boot are the elf capable boot blocks. Test it first on a floppy. In
my case, I disklabeled a floppy and pointed boot.config to 1:da(0,a)kernel
because my elf kernel is in my SCSI drive.

>
>5.  reboot
>
>6.  build a new kernel and install it
>    cd /sys/compile/<kernel name>
>    make clean
>    make KERNFORMAT=elf depend
>    make KERNFORMAT=elf
>    mv kernel kernel.elf
>    install -c -m 555 -o root -g wheel -fschg kernel.elf /

My kernel would not fit in a floppy, so I could not test this first using a
floppy. But I was able to try the 3 stage boot using boot/loader.

>
>7.  reboot
>    The first time through, I booted kernel
>    reboot
>    This time, I booted kernel.elf
>
>I can build and execute elf's.
># g++ hello.cpp -o hello
># file hello
>hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD),\
>       dynamically linked, not stripped
>
>I have 3 steps left, but, they should be easier.  At least I
>understand these.
>
>8.  make world to be sure all the problems are out of the sources.
>
>9.  rebuild and install an elf kernel, to catch-up after 8.
>
>10. rebuild all the ports and applications... to convert to elf.
>    Are there any tools to catch all the ports that are installed
>    and rebuild them?  I planned to go through /var/db/pkg.  There
>    are some duplications, like XFree86-3.3.1 and XFree86-3.3.2.
>    If I create a tool, based on /var/db/pkg or pkg_info, I will
>    send it along.
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-current" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004001be3783$35dcf870$0d787880>