interpreter that can be run on the system and as such cannot be
compiled against libbstand. On the one hand this means we need to
include the usual headers for system interfaces that we use and
on the the other hand we can only use standard system interfaces.
While here, define local variables only when needed to make this
WARNS=2 clean on amd64.
PR: 172542
Obtained from: peterj@
Pointed out by: Jan Beich <jbeich@tormail.org>
isdir? ( fd -- bool )
freaddir ( fd -- ptr len TRUE | FALSE )
The 'isdir?' word returns `true' if the file descriptor is for a
directory and `false' otherwise.
The 'freaddir' word reads the next directory entry and if successful,
returns its name and 'true'. Otherwise 'false' is returned.
These words give the loader the ability to scan directories and read
files contained in them for 'rc.d'-like flexibility in handling which
modules to load and/or which tunables to set.
Obtained from: Juniper Networks, Inc.
(ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'),
so we need explicit casts to long and unsigned long here to ensure
that the result matches the printf %ld and %lx specifiers.
.. so that consistent compilation algorithms are used for both
architectures as in practice the binaries are expected to be
interchangeable (for time being).
Previously i386 used default setting which were equivalent to
-march=i486 -mtune=generic.
The only difference is using smaller but slower "leave" instructions.
Discussed with: jhb, dim
MFC after: 29 days
often modified directory created symbolic links points to - it cause
unnecessary full rebuilds each time make runs when directory is changed.
So do it only if symbolic link does not exists, which usually means that
objdir is clean anyway.
MFC after: 1 week
This uses the common U-Boot support lib (sys/boot/uboot, already used on
FreeBSD/powerpc), and assumes the underlying firmware has the modern API for
stand-alone apps enabled in the config (CONFIG_API).
Only netbooting is supported at the moment.
Obtained from: Marvell, Semihalf
The relevant changes for FreeBSD (excerpt from the release note):
* Newly implemented CORE EXT words: CASE, OF, ENDOF, and ENDCASE. Also
added FALLTHROUGH, which works like ENDOF but jumps to the instruction
just after the next OF.
* Bugfix: John-Hopkins locals syntax now accepts | and -- in the comment
(between the first -- and the }.)
* Bugfix: Changed vmGetWord0() to make Purify happier. The resulting
code is no slower, no larger, and slightly more robust.
The whole problem seems to be size. Which is odd, because it is said
that size doesn't matter. Anyway... Add -Os to strategic places in the
makefile to have the final loader be as mall as possible. This seems
to be enough to make it work. For now... I think something is more
fundamentally wrong; or something more fundamental is wrong. Potato,
potaato.
very pervasive in this code. This fixes a few of those assumptions and
band-aids over some others.
Tested on: ia32 alpha sparc64
Reviewed by: peter jake (in concept)
- Change the 'fopen' keyword to accept a mode parameter. Note that this
will break existing 4th scripts that use fopen. Thus, the loader
version has been bumped and loader.4th has been changed to check for a
sufficient version on i386 and alpha. Be sure that you either do a full
world build or install or full build and install of sys/boot after this
since loader.old won't work with the new 4th files and vice versa.
PR: kern/32389
Submitted by: Jonathan Mini <mini@haikugeek.com>
Sponsored by: ClickArray, Inc.