if { [get_cmd_switch --autopilot] } { assert_spec x86 }
if { [have_spec linux] } {
puts "Run script is not supported on this platform."
exit 0
}
set host_tool [installed_command host]
set ntp_ip [exec $host_tool -t A pool.ntp.org | head -1 | cut -d " " -f 4]
puts "Using NTP server $ntp_ip"
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_nic_pkg] \
[depot_user]/src/init
build { app/sntp_client server/report_rom }
append config {
}
install_config $config
build_boot_image { core ld.lib.so init timer sntp_client report_rom }
proc qemu_nic_model {} {
if [have_spec x86] { return e1000 }
if [have_spec lan9118] { return lan9118 }
if [have_spec zynq] { return cadence_gem }
return nic_model_missing
}
append qemu_args " -nographic "
append qemu_args " -netdev user,id=net0 "
append qemu_args " -net nic,model=[qemu_nic_model],netdev=net0 "
set done_string "report_rom]