(or `./script` as described above) will run Qemu and make it boot the
configuration specified in the _script_.
2. Create a bootloader configuration file (currently supported
-bootloaders are GRUB, GRUB2 and Pulsar) and copy it with all other
-files needed for booting to another, perhaps remote, location.
+bootloaders are GRUB, GRUB2, Pulsar and uBoot) and copy it with all
+other files needed for booting to another, perhaps remote, location.
./script --server --iprelay=192.168.1.2
See __\--serial__. There will be new options soon.
+- \--uboot
+
+ Interact with uBoot bootloader to boot the thing described in the
+ novaboot script. Implementation of this option is currently tied to a
+ particular board that we use. It may be subject to changes in the
+ future!
+
## Target's output reception phase
- \-s, --serial\[=device\]
## Command line handling
-my ($append, $bender, @chainloaders, $concat, $config_name_opt, $dhcp_tftp, $dump_opt, $dump_config, $gen_only, $grub_config, $grub_prefix, $grub_preamble, $grub2_prolog, $grub2_config, $help, $iprelay, $iso_image, $man, $no_file_gen, $off_opt, $on_opt, $pulsar, $pulsar_root, $qemu, $qemu_append, $qemu_flags_cmd, $rom_prefix, $rsync_flags, @scriptmod, $scons, $serial, $server, $stty);
+my ($append, $bender, @chainloaders, $concat, $config_name_opt, $dhcp_tftp, $dump_opt, $dump_config, $gen_only, $grub_config, $grub_prefix, $grub_preamble, $grub2_prolog, $grub2_config, $help, $iprelay, $iso_image, $man, $no_file_gen, $off_opt, $on_opt, $pulsar, $pulsar_root, $qemu, $qemu_append, $qemu_flags_cmd, $rom_prefix, $rsync_flags, @scriptmod, $scons, $serial, $server, $stty, $uboot);
$rsync_flags = '';
$rom_prefix = 'rom://';
"target|t=s" => sub { my ($opt_name, $opt_value) = @_;
exists $CFG::targets{$opt_value} or die("Unknown target '$opt_value' (valid targets are: ".join(", ", sort keys(%CFG::targets)).")");
GetOptionsFromString($CFG::targets{$opt_value}, %opt_spec); },
+ "uboot" => \$uboot,
"h" => \$help,
"help" => \$man,
);
print "done\n";
}
+if (defined $uboot) {
+ print "novaboot: Waiting for uBoot prompt...\n";
+ $exp->log_stdout(1);
+ $exp->expect(20,
+ [qr/Hit any key to stop autoboot:/, sub { $exp->send('.'); exp_continue; }],
+ '=> ') || die "No uBoot prompt deteceted";
+
+ $exp->send("dhcp\n");
+ $exp->expect(1, '=> ');
+
+ my ($kbin, $kcmd) = split(' ', shift(@$modules), 2);
+ my $dtb;
+ @$modules = map { print "DTBBBB $_\n"; if (/\.dtb$/) { $dtb=$_; (); } else { $_ } } @$modules;
+ my $initrd = shift @$modules;
+
+ my $kern_addr = '800000';
+ my $initrd_addr = '-';
+ my $dtb_addr = '';
+
+ sleep(1);
+ $exp->send("tftp $kern_addr $kbin\n");
+ $exp->expect(1,
+ [qr/#/, sub { exp_continue; }],
+ '=> ') || die "Kernel load failed";
+ if (defined $dtb) {
+ $dtb_addr = '7f0000';
+ $exp->send("tftp $dtb_addr $dtb\n");
+ $exp->expect(1,
+ [qr/#/, sub { exp_continue; }],
+ '=> ') || die "Device tree load failed";
+ }
+ if (defined $initrd) {
+ $initrd_addr = 'b00000';
+ $exp->send("tftp $initrd_addr $initrd\n");
+ $exp->expect(1,
+ [qr/#/, sub { exp_continue; }],
+ '=> ') || die "Initrd load failed";
+ }
+ $exp->send('mw f0000b00 ${psc_cfg}');
+ $exp->send("set bootargs $kcmd\n");
+ $exp->expect(1, '=> ');
+ $exp->send("bootm $kern_addr $initrd_addr $dtb_addr\n");
+}
+
if (defined $exp) {
# Serial line of the target is available
print "novaboot: Serial line interaction (press Ctrl-C to interrupt)...\n";
=item 2.
Create a bootloader configuration file (currently supported
-bootloaders are GRUB, GRUB2 and Pulsar) and copy it with all other
-files needed for booting to another, perhaps remote, location.
+bootloaders are GRUB, GRUB2, Pulsar and uBoot) and copy it with all
+other files needed for booting to another, perhaps remote, location.
./script --server --iprelay=192.168.1.2
See B<--serial>. There will be new options soon.
+=over 8
+
+=item --uboot
+
+Interact with uBoot bootloader to boot the thing described in the
+novaboot script. Implementation of this option is currently tied to a
+particular board that we use. It may be subject to changes in the
+future!
+
+=back
+
=head2 Target's output reception phase
=over 8