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)
Wed, Dec 4, 9:36 AM
Unknown Object (File)
Wed, Dec 4, 9:36 AM
Unknown Object (File)
Wed, Dec 4, 9:35 AM
Unknown Object (File)
Wed, Dec 4, 9:11 AM
Unknown Object (File)
Nov 11 2024, 12:56 AM
Unknown Object (File)
Nov 4 2024, 6:45 PM
Unknown Object (File)
Oct 24 2024, 2:29 PM
Unknown Object (File)
Oct 3 2024, 2:09 PM

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.