committed by
Christian Helmuth
parent
71a48c0a26
commit
f0d28eeca7
@@ -12,6 +12,7 @@ proc core_link_address { } {
|
||||
if {[have_spec x86 ]} { return "0x01100000" }
|
||||
if {[have_spec arndale ]} { return "0x80100000" }
|
||||
if {[have_spec rpi ]} { return "0x00800000" }
|
||||
if {[have_spec rpi3 ]} { return "0x00800000" }
|
||||
if {[have_spec panda ]} { return "0xa0000000" }
|
||||
if {[have_spec pbxa9 ]} { return "0x76000000" }
|
||||
if {[have_spec odroid_x2]} { return "0x80100000" }
|
||||
@@ -51,6 +52,7 @@ proc l4_bin_dir { } {
|
||||
if {[have_spec x86_64]} { return "[l4_build_dir]/bin/amd64_K8" }
|
||||
if {[have_spec arm_v7a]} { return "[l4_build_dir]/bin/arm_armv7a" }
|
||||
if {[have_spec arm_v6]} { return "[l4_build_dir]/bin/arm_armv6" }
|
||||
if {[have_spec arm_v8]} { return "[l4_build_dir]/bin/arm64_armv8a" }
|
||||
|
||||
puts stderr "Error: Cannot determine bin directory"
|
||||
exit 1
|
||||
@@ -211,8 +213,9 @@ proc run_boot_dir_arm { binaries } {
|
||||
#
|
||||
proc run_boot_dir {binaries} {
|
||||
|
||||
if {[have_spec x86]} { return [run_boot_dir_x86 $binaries] }
|
||||
if {[have_spec arm]} { return [run_boot_dir_arm $binaries] }
|
||||
if {[have_spec x86]} { return [run_boot_dir_x86 $binaries] }
|
||||
if {[have_spec arm]} { return [run_boot_dir_arm $binaries] }
|
||||
if {[have_spec arm_64]} { return [run_boot_dir_arm $binaries] }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,9 +39,12 @@ proc run_image {elf_img} {
|
||||
set compress_type gzip
|
||||
}
|
||||
|
||||
set arch "arm"
|
||||
if {[have_spec arm_64]} { set arch "arm64" }
|
||||
|
||||
# create uImage
|
||||
set uboot_img [run_dir]/uImage
|
||||
exec mkimage -A arm -O linux -T kernel -C $compress_type -a $load_addr \
|
||||
exec mkimage -A $arch -O linux -T kernel -C $compress_type -a $load_addr \
|
||||
-e $entrypoint -d $bin_img$bin_ext $uboot_img
|
||||
exec rm -rf $bin_img$bin_ext
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ proc run_power_on { } {
|
||||
if {[have_spec x86_32]} { set qemu "qemu-system-i386" }
|
||||
if {[have_spec x86_64]} { set qemu "qemu-system-x86_64" }
|
||||
if {[have_spec arm]} { set qemu "qemu-system-arm" }
|
||||
if {[have_spec arm_64]} { set qemu "qemu-system-aarch64" }
|
||||
|
||||
#
|
||||
# Only the x86_64 variant of Qemu provides the emulation of hardware
|
||||
@@ -62,13 +63,19 @@ proc run_power_on { } {
|
||||
if {[have_spec nova]} { set qemu "qemu-system-x86_64" }
|
||||
|
||||
#
|
||||
# Redirect serial output to stdio, but only in graphics mode and no
|
||||
# explicit configuration of serial interfaces is specified in the run
|
||||
# script. The 'mon' prefix enables the access to the qemu console.
|
||||
# Redirect serial output to stdio, but only when no explicit configuration
|
||||
# of serial interfaces is specified in the run script.
|
||||
# The 'mon' prefix enables the access to the qemu console.
|
||||
#
|
||||
if {![regexp -- {-nographic} $qemu_args dummy] &&
|
||||
![regexp -- {-serial} $qemu_args dummy]} {
|
||||
append qemu_args " -serial mon:stdio " }
|
||||
if {![regexp -- {-serial} $qemu_args dummy]} {
|
||||
|
||||
#
|
||||
# In the raspi3 model the first UART is never used as
|
||||
# log output, but the second
|
||||
#
|
||||
if {[have_spec rpi3]} { append qemu_args " -serial null " }
|
||||
append qemu_args " -serial mon:stdio "
|
||||
}
|
||||
|
||||
# SVM virtualization is broken after $qemu_good_old and until before $qemu_good_new
|
||||
# We use "-cpu phenom" when using VMs in Qemu
|
||||
@@ -100,6 +107,7 @@ proc run_power_on { } {
|
||||
}
|
||||
if {[have_spec vpb926]} { append qemu_args " -M versatilepb -m 128 " }
|
||||
if {[have_spec zynq_qemu]} { append qemu_args " -M xilinx-zynq-a9 -cpu cortex-a9 -m 256 " }
|
||||
if {[have_spec rpi3]} { append qemu_args " -M raspi3 -m 512 " }
|
||||
|
||||
# on x86, we support booting via pxe or iso/disk image
|
||||
if {[have_spec x86]} {
|
||||
@@ -131,7 +139,7 @@ proc run_power_on { } {
|
||||
}
|
||||
|
||||
# on ARM, we supply the boot image as kernel
|
||||
if {[have_spec arm]} { append qemu_args " -kernel [run_dir]/boot/image.elf " }
|
||||
if {[have_spec arm] || [have_spec arm_v8]} { append qemu_args " -kernel [run_dir]/boot/image.elf " }
|
||||
|
||||
eval spawn $qemu $qemu_args
|
||||
set qemu_spawn_id $spawn_id
|
||||
|
||||
Reference in New Issue
Block a user