Page MenuHomeFreeBSD

Add Forth script capability and fix compilation of loader install command
ClosedPublic

Authored by stevek on Nov 10 2016, 10:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 8:43 AM
Unknown Object (File)
Tue, Apr 2, 12:35 AM
Unknown Object (File)
Mar 1 2024, 10:00 PM
Unknown Object (File)
Jan 11 2024, 3:09 PM
Unknown Object (File)
Dec 25 2023, 6:14 PM
Unknown Object (File)
Dec 20 2023, 1:52 AM
Unknown Object (File)
Dec 1 2023, 3:39 AM
Unknown Object (File)
Nov 21 2023, 12:36 AM

Details

Summary

Add support for LOADER_RC setting in the pkgfs manifest (defaults to /loader.rc) to specify a Forth file to read from the pkgfs tarball and process by Ficl.
This allows for the tarball to do runtime things like load a platform-specific FDT blob, among other things.
The file_loadraw function grew an argument, but sys/boot/common/install.c did not get updated.

Test Plan

Used by Juniper Networks for network install images on non-x86 platforms.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

stevek retitled this revision from to Add Forth script capability and fix compilation of loader install command.
stevek updated this object.
stevek edited the test plan for this revision. (Show Details)
imp added a reviewer: imp.

Looks good to me, but maybe you'd do the file_loadraw() one first...

This revision is now accepted and ready to land.Nov 11 2016, 12:03 AM
In D8494#176527, @imp wrote:

Looks good to me, but maybe you'd do the file_loadraw() one first...

The kernel often has to get loaded first in order to do other operations.
For example, in the case of having the loader.rc file load a FDT blob, it will not let you do that if the kernel has not been loaded already.

Or did you mean the mfs_root and kernel modules load before the loader.rc?

In D8494#176527, @imp wrote:

Looks good to me, but maybe you'd do the file_loadraw() one first...

The kernel often has to get loaded first in order to do other operations.
For example, in the case of having the loader.rc file load a FDT blob, it will not let you do that if the kernel has not been loaded already.

Or did you mean the mfs_root and kernel modules load before the loader.rc?

I'm afraid I wasn't clear because it wasn't either of those things.

I'm thinking you should separate this change into two changes. One that's the file_loadraw() change. And a second one that's the rest of this diff. The code itself is fine. Sorry for the confusion.

In D8494#176547, @imp wrote:

I'm afraid I wasn't clear because it wasn't either of those things.

I'm thinking you should separate this change into two changes. One that's the file_loadraw() change. And a second one that's the rest of this diff. The code itself is fine. Sorry for the confusion.

Oh, okay, sure. I'll do those as separate commits.

This revision was automatically updated to reflect the committed changes.