- \--dump
- Print the modules to boot and their parameters. This happens after
- parsing the novaboot script, i.e. after evaluating all _\--scriptmod_
- expressions etc. Exit after reading (and dumping) the script.
+ Print the modules to boot and their parameters after this phase
+ finishes. Then exit. This is useful for seeing the effect of other
+ options in this section.
- \-k, --kernel=`file`
is given multiple times all expressions are evaluated in the command
line order.
-- \--strip-rom
-
- Strip _rom://_ prefix from command lines and generated config files.
- The _rom://_ prefix is used by NUL. For NRE, it has to be stripped.
-
## File generation phase
In this phase, files needed for booting are generated in a so called
-_build directory_ (see TODO). In most cases configuration for a
-bootloader is generated automatically by novaboot. It is also possible
-to generate other files using _heredoc_ or _"<"_ syntax in novaboot
-scripts. Finally, binaries can be generated in this phases by running
-`scons` or `make`.
+_build directory_ (see [--build-dir](https://metacpan.org/pod/--build-dir)). In most cases configuration
+for a bootloader is generated automatically by novaboot. It is also
+possible to generate other files using _heredoc_ or _"<"_ syntax in
+novaboot scripts. Finally, binaries can be generated in this phases by
+running `scons` or `make`.
- \--build-dir=_directory_
Runs `scons` to build files that are not generated by novaboot
itself.
+- \--strip-rom
+
+ Strip _rom://_ prefix from command lines and generated config files.
+ The _rom://_ prefix is used by NUL. For NRE, it has to be stripped.
+
- \--gen-only
Exit novaboot after file generation phase.
# use Data::Dumper;
# print Dumper(\@scripts);
-
foreach my $script (@scripts) {
- $$script{modules}[0] =~ s/^[^ ]*/$kernel_opt/ if $kernel_opt;
- $$script{modules}[0] .= ' ' . join(' ', @append) if @append;
-}
-
+ $modules = $$script{modules};
+ @$modules[0] =~ s/^[^ ]*/$kernel_opt/ if $kernel_opt;
+ @$modules[0] .= ' ' . join(' ', @append) if @append;
+ my $kernel;
+ if (exists $variables->{KERNEL}) {
+ $kernel = $variables->{KERNEL};
+ } else {
+ if ($CFG::hypervisor) {
+ $kernel = $CFG::hypervisor . " ";
+ if (exists $variables->{HYPERVISOR_PARAMS}) {
+ $kernel .= $variables->{HYPERVISOR_PARAMS};
+ } else {
+ $kernel .= $CFG::hypervisor_params;
+ }
+ }
+ }
+ @$modules = ($kernel, @$modules) if $kernel;
+ @$modules = (@chainloaders, @$modules);
+ @$modules = ("bin/boot/bender", @$modules) if ($bender || defined $ENV{'NOVABOOT_BENDER'});
+}
if ($dump_opt) {
foreach my $script (@scripts) {
print "novaboot: Entering directory `$builddir'\n";
}
- my $kernel;
- if (exists $variables->{KERNEL}) {
- $kernel = $variables->{KERNEL};
- } else {
- if ($CFG::hypervisor) {
- $kernel = $CFG::hypervisor . " ";
- if (exists $variables->{HYPERVISOR_PARAMS}) {
- $kernel .= $variables->{HYPERVISOR_PARAMS};
- } else {
- $kernel .= $CFG::hypervisor_params;
- }
- }
- }
- @$modules = ($kernel, @$modules) if $kernel;
- @$modules = (@chainloaders, @$modules);
- @$modules = ("bin/boot/bender", @$modules) if ($bender || defined $ENV{'NOVABOOT_BENDER'});
-
my $prefix;
($prefix = $grub_prefix) =~ s/\$NAME/$config_name/ if defined $grub_prefix;
$prefix ||= $builddir;
=item --dump
-Print the modules to boot and their parameters. This happens after
-parsing the novaboot script, i.e. after evaluating all I<--scriptmod>
-expressions etc. Exit after reading (and dumping) the script.
+Print the modules to boot and their parameters after this phase
+finishes. Then exit. This is useful for seeing the effect of other
+options in this section.
=item -k, --kernel=F<file>
is given multiple times all expressions are evaluated in the command
line order.
-=item --strip-rom
-
-Strip I<rom://> prefix from command lines and generated config files.
-The I<rom://> prefix is used by NUL. For NRE, it has to be stripped.
-
=back
=head2 File generation phase
In this phase, files needed for booting are generated in a so called
-I<build directory> (see TODO). In most cases configuration for a
-bootloader is generated automatically by novaboot. It is also possible
-to generate other files using I<heredoc> or I<"<"> syntax in novaboot
-scripts. Finally, binaries can be generated in this phases by running
-C<scons> or C<make>.
+I<build directory> (see L<--build-dir>). In most cases configuration
+for a bootloader is generated automatically by novaboot. It is also
+possible to generate other files using I<heredoc> or I<"<"> syntax in
+novaboot scripts. Finally, binaries can be generated in this phases by
+running C<scons> or C<make>.
=over 8
Runs C<scons> to build files that are not generated by novaboot
itself.
+=item --strip-rom
+
+Strip I<rom://> prefix from command lines and generated config files.
+The I<rom://> prefix is used by NUL. For NRE, it has to be stripped.
+
=item --gen-only
Exit novaboot after file generation phase.