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)
Mon, Dec 23, 7:03 AM
Unknown Object (File)
Mon, Dec 23, 6:36 AM
Unknown Object (File)
Sun, Dec 22, 5:56 AM
Unknown Object (File)
Sat, Dec 21, 3:05 AM
Unknown Object (File)
Sat, Dec 21, 2:53 AM
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

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 Passed
Unit
No Test Coverage
Build Status
Buildable 5916
Build 6201: arc lint + arc unit

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.