Home | History | Annotate | Download | only in boot
History log of /src/sys/arch/amiga/stand/bootblock/boot/Makefile
RevisionDateAuthorComments
 1.63  08-Jun-2024  mlelstv Enable and use debug printfs to get some output into the build log.
 1.62  29-Apr-2022  rin Enable SA_HARDCODED_SECSIZE to shrink loaders slightly.
 1.61  29-Apr-2022  rin Now, cread.c can be built with -Os.

It was not a compiler bug actually; object code generated with
"-Os -Wa,-l" contains R_68K_16, which is not supported by elf2bb(1).

We should have fixed elf2bb(1), but the problem is gone at the moment.
 1.60  29-Apr-2022  rin Compile boot.amiga without -l option for gas(1).

Fix build failure due to relocation overflows for R_68K_PC16.
 1.59  27-Apr-2022  rin Revert previous.

On 2022/04/27 21:10, Rin Okuyama wrote:
> Module Name: src
> Committed By: rin
> Date: Wed Apr 27 12:10:47 UTC 2022
>
> Modified Files:
> src/sys/arch/amiga/stand/bootblock/boot: Makefile
>
> Log Message:
> Sprinkle SA_HARDCODED_SECSIZE; now everything fits into
> +/-32KB range visible for PC relative addressing mode.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.57 -r1.58 src/sys/arch/amiga/stand/bootblock/boot/Makefile
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
 1.58  27-Apr-2022  rin Sprinkle SA_HARDCODED_SECSIZE; now everything fits into
+/-32KB range visible for PC relative addressing mode.
 1.57  25-Feb-2021  rin Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.56  09-Apr-2017  christos branches: 1.56.26;
make this work again.
 1.55  08-Apr-2017  christos centralize vers.c building for standalone programs.
 1.54  17-Sep-2016  christos branches: 1.54.2;
NOPIE
 1.53  15-Jan-2016  mlelstv branches: 1.53.2;
Add 'C' option to bootblock to enable serial console.
 1.52  19-Apr-2014  tsutsui branches: 1.52.4;
No need to use annoying HAVE_GCC to handle gcc48 m68k behavior chnages.
 1.51  19-Apr-2014  christos unbreak gcc4.5
 1.50  29-Mar-2014  mlelstv branches: 1.50.2;
Use different option (-mcpu=68030) to select target cpu for the assembler.
The old option (-m68030) causes it to complain about features used that
are not provided by the target cpu.
 1.49  21-Aug-2013  matt Use <bsd.klinks.mk>
Use ${_MKTARGET_*}
Use correct arguments to ${AR}
Fix entry symbol.
 1.48  18-Jul-2013  joerg Explicitly disable unwind tables for the boot loader.
 1.47  04-Oct-2011  chs branches: 1.47.2; 1.47.12; 1.47.16; 1.47.24;
build cread.c with -O1 to work around a gcc 4.5 bug.
 1.46  12-Jul-2011  mrg fix previous and only force the failure if reloc2bb already failed.
 1.45  11-Jul-2011  mrg improve the error message if elf2bb finds we are too large. if elf2bb
fails, make sure that the following nm -u's success doesn't cause make
to believe the target was built. now amiga builds with HAVE_GCC=45
actually fail here, rather than fail at sets time due to missing files.
 1.44  22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.43  06-Jul-2010  mrg branches: 1.43.2; 1.43.4;
use elf2bb / elf2bb.h instead of the old, now gone aout2bb version.
 1.42  14-Mar-2010  mrg branches: 1.42.2;
update all of these makefiles for the .so -> .pico change.

most of them are most harmless, but the libgcc parts are quite essential.
before this change, all the special rules for .pico files were not applied,
and exception handling wasn't enabled. this caused c++ exceptions not to
work on sparc64.


this fixes the build of boost-headers (it was correctly calling exception
support broken!), which in turn makes all the things that depend upon it
to actually work again on sparc64.
 1.41  29-Dec-2009  elad branches: 1.41.2;
Don't abuse INSECURE for allowing exec() to load files not owned by uid 0.

Adjust references where this has been used.
 1.40  17-Oct-2009  mlelstv Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
 1.39  12-Jan-2009  tsutsui - WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- add src/common/dist/zlib to INCPATH and remove unnecessary options
- remove -I${DESTDIR}/usr/include from INCPATH
 1.38  25-Jan-2006  is branches: 1.38.72; 1.38.76; 1.38.84;
Compile new zlib; compile it in a way that it doesn't inflate the bootblock
by 50% with tables. While we're here: use our own memmove().
 1.37  24-Jan-2006  is Use our own s(n)printf.
 1.36  02-Jan-2006  is Make the bootblocks compile again using the shared libc functions.
 1.35  11-Dec-2005  christos branches: 1.35.2;
merge ktrace-lwp.
 1.34  26-Oct-2003  lukem branches: 1.34.16;
Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.33  25-Oct-2003  mhitch Use -Os to shrink bootblock code a little more. Now bootxx_fd builds with
gcc 3.3.2.
 1.32  24-Aug-2003  he Adapt to new ufs.c needing memcmp and memmove.
 1.31  01-Apr-2003  he branches: 1.31.2;
The adler32.c file previously from libz is no longer needed.
 1.30  03-Feb-2003  mhitch Add 64 bit div/mod for 64 bit daddr_t changes and snprintf.
 1.29  31-May-2002  thorpej Add -ffreestanding.
 1.28  15-Apr-2002  mhitch branches: 1.28.2;
Don't copy boot.amiga to ${DESTDIR}/ - it is now done by the install/update
script, sysinst, or manually when the bootblock is installed.
 1.27  26-Mar-2002  mhitch Need to include files.o for the file descriptor table used by open().

The -S flag to indicate secondary boot no longer takes a size - size is
computed from input image.
 1.26  26-Jan-2002  aymeric include ${.CURDIR}/../Makefile.booters
 1.25  26-Jan-2002  aymeric s/BOOT_ELF/BOOT_ELF32/ inside a comment
 1.24  17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.23  10-Dec-2001  mhitch Add a left shift routine needed by changes in lib/libsa/ufs.c.
 1.22  02-Mar-2001  mhitch branches: 1.22.4; 1.22.8;
Use ${NM} and ${SIZE} so cross-compiling works. The machine and m68k include
directories still need to be fixed.
 1.21  17-Sep-2000  is Make this build again. Fixes by Michael Hitch.
 1.20  15-Apr-2000  is branches: 1.20.4;
Don't use runtime systems' includes.
 1.19  03-Apr-1999  is branches: 1.19.2;
make the Amiga bootblocks link again.
 1.18  03-Mar-1999  tron branches: 1.18.2;
Include "bsd.prog.mk" earlier so that "CFLAGS" doesn't get clobbered.
 1.17  06-Feb-1999  is Define _STANDALONE instead of STANDALONE.
 1.16  03-Jan-1999  veego Enable fdboot again.
 1.15  13-Nov-1998  is Simplify program structure to save a few bytes.
 1.14  08-May-1998  chopps remove -Z (load from chipmem) flag
fix copier code (startit) to work bi-directionally.
change compiler optimization options to save some bytes
 1.13  14-Jul-1997  veego s/BOOTBLOCKS/FILES/, remove the no longer needed install: rule and set the
BINDIR to /usr/mdec.
 1.12  23-Jun-1997  is fdboot is too big again. leave it out.
 1.11  19-May-1997  veego Make the install rule nicer.
 1.10  19-May-1997  is Yet another try to sanitize the bootblock build. Each major target has now
its own subdirectory.
Smaller changes involved:
- installboot installs to /usr/mdec
- installboot.8 installs to /usr/share/man/cat8/amiga/
 1.9  14-May-1997  veego Remove a : which is too much. fix pr#3621
 1.8  07-May-1997  mycroft Clean up weirdness.
 1.7  24-Apr-1997  veego remove a duplicated : for the install rule.
 1.6  24-Apr-1997  is - Minor brushup of man page.
- Try to fix manual installation.
 1.5  24-Mar-1997  mycroft Build fdboot.
 1.4  05-Feb-1997  is The last few libsa/open.c changes gradually increased code size, until fdboot
became too big. Disable its building, til we can squeeze a couple of bytes
out of the code again.
XXX Yes, this is a disgusting hack.
 1.3  23-Jan-1997  is Added libboot.a to the CLEANFILES.
 1.2  21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.1  29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1  29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.18.2.1  03-Apr-1999  is branches: 1.18.2.1.2;
From -current: add errno.c (to define the errno variable). This makes
the bootblocks link again.
 1.18.2.1.2.1  21-Jun-1999  thorpej Sync w/ -current.
 1.19.2.2  12-Mar-2001  bouyer Sync with HEAD.
 1.19.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.20.4.2  09-Feb-2002  he Pull up revision 1.23 (requested by mhitch):
Add a left-shift routine needed by lib/libsa/ufs.c due to changes
in fs.h.
 1.20.4.1  19-Sep-2000  is Pullup from -current, requested by is, granted by thorpej:
Changes by mhitch, needed for those directories to compile.
 1.22.8.5  20-Jun-2002  nathanw Catch up to -current.
 1.22.8.4  17-Apr-2002  nathanw Catch up to -current.
 1.22.8.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.22.8.2  28-Feb-2002  nathanw Catch up to -current.
 1.22.8.1  08-Jan-2002  nathanw Catch up to -current.
 1.22.4.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.22.4.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.22.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.28.2.1  09-Jul-2002  gehenna catch up with -current.
 1.31.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1  03-Aug-2004  skrll Sync with HEAD
 1.34.16.1  21-Jun-2006  yamt sync with head.
 1.35.2.2  01-Feb-2006  yamt sync with head.
 1.35.2.1  15-Jan-2006  yamt sync with head.
 1.38.84.1  19-Jan-2009  skrll Sync with HEAD.
 1.38.76.3  11-Aug-2010  yamt sync with head.
 1.38.76.2  11-Mar-2010  yamt sync with head
 1.38.76.1  04-May-2009  yamt sync with head.
 1.38.72.1  17-Jan-2009  mjf Sync with HEAD.
 1.41.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.41.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.42.2.1  05-Mar-2011  rmind sync with head
 1.43.4.1  08-Feb-2011  bouyer Sync with HEAD
 1.43.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.47.24.1  23-Jul-2013  riastradh sync with HEAD
 1.47.16.2  18-May-2014  rmind sync with head
 1.47.16.1  28-Aug-2013  rmind sync with head
 1.47.12.2  03-Dec-2017  jdolecek update from HEAD
 1.47.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.47.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.50.2.1  10-Aug-2014  tls Rebase.
 1.52.4.3  28-Aug-2017  skrll Sync with HEAD
 1.52.4.2  05-Oct-2016  skrll Sync with HEAD
 1.52.4.1  19-Mar-2016  skrll Sync with HEAD
 1.53.2.2  26-Apr-2017  pgoyette Sync with HEAD
 1.53.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.54.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.56.26.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed