1 --------------------------------------------------------------------------
2 -- Copyright (c) 2015-2016 ETH Zurich.
3 -- All rights reserved.
5 -- This file is distributed under the terms in the attached LICENSE file.
6 -- If you do not find this file, copies can be found by writing to:
7 -- ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
9 -- Hakefile for /platforms/
11 --------------------------------------------------------------------------
13 let bin_rcce_lu = [ "/sbin/" ++ f | f <- [
22 bin_rcce_bt = [ "/sbin/" ++ f | f <- [
30 tests_common = [ "/sbin/" ++ f | f <- [
37 "nkmtest_modify_flags",
42 "test_create_l1l2_cnodes",
51 tests_x86 = [ "/sbin/" ++ f | f <- [
53 "tests/numatest" ] ] ++ tests_common
55 tests_x86_64 = [ "/sbin/" ++ f | f <- [
59 "bomp_cpu_bound_progress",
68 "mdbtest_range_query",
73 "nkmtest_invalid_mappings",
85 "tests/xphi_nameservice_test",
93 "xcorecapserv" ] ] ++ tests_x86
96 tests_k1om = [ "/sbin/" ++ f | f <- [
98 "tests/xeon_phi_inter",
99 "tests/xeon_phi_test",
100 "tests/xphi_nameservice_test" ] ] ++ tests_x86
102 bench_common = [ "/sbin/" ++ f | f <- [
103 "channel_cost_bench",
104 "flounder_stubs_buffer_bench",
105 "flounder_stubs_empty_bench",
106 "flounder_stubs_payload_bench",
109 bench_x86 = [ "/sbin/" ++ f | f <- [
110 "multihop_latency_bench",
113 "thc_v_flounder_empty",
123 bench_x86_64 = bench_x86 ++ bin_rcce_bt ++ bin_rcce_lu ++
124 [ "/sbin/" ++ f | f <- [
127 "benchmarks/bomp_mm",
128 "benchmarks/dma_bench",
129 "benchmarks/xomp_share",
130 "benchmarks/xomp_spawn",
131 "benchmarks/xomp_work",
132 "benchmarks/xphi_ump_bench",
136 "bulk_transfer_passthrough",
138 "bulkbench_micro_echo",
139 "bulkbench_micro_rtt",
140 "bulkbench_micro_throughput",
146 "phases_scale_bench",
149 "shared_mem_clock_bench",
153 bench_k1om = [ "/sbin/" ++ f | f <- [
154 "benchmarks/bomp_mm",
155 "benchmarks/dma_bench",
156 "benchmarks/xomp_share",
157 "benchmarks/xomp_spawn",
158 "benchmarks/xomp_work",
159 "benchmarks/xphi_ump_bench",
160 "benchmarks/xphi_xump_bench" ] ] ++ bench_x86
162 -- Default list of modules to build/install for all enabled architectures
163 modules_common = [ "/sbin/" ++ f | f <- [
172 -- List of modules that are arch-independent and always built
174 "/eclipseclp_ramfs.cpio.gz",
175 "/skb_ramfs.cpio.gz" ]
177 -- x86_64-specific modules to build by default
178 -- this should shrink as targets are ported and move into the generic list above
179 modules_x86_64 = [ "/sbin/" ++ f | f <- [
190 "block_server_client",
231 -- the following are broken in the newidc system
232 modules_x86_64_broken = [ "/sbin/" ++ f | f <- [
240 modules_k1om = [ "/sbin/" ++ f | f <- [
246 -- ARMv7-a Pandaboard modules
247 pandaModules = [ "/sbin/" ++ f | f <- [
271 -- ARMv7-A modules for Versatile Express EMM board (GEM5, qemu)
272 vExpressEMMModules_A15 = [ "/sbin/" ++ f | f <- [
290 -- ARMv7-A modules for Versatile Express EMM board (FVP)
291 vExpressEMMModules_A9 = [ "/sbin/" ++ f | f <- [
309 -- ARMv7-A modules for the Xilinx Zynq7000
310 zynq7Modules = [ "/sbin/" ++ f | f <- [
328 -- ARMv8 modules for running under QEMU
329 armv8_modules= [ "/sbin/" ++ f | f <- [
347 armv7Image target bootTarget cpuTarget physBase modules =
348 let bootDriver = "/sbin/boot_" ++ bootTarget
349 cpuDriver = "/sbin/cpu_" ++ cpuTarget
350 image = "/" ++ target ++ "_image"
352 Rule ([ In BuildTree "tools" "/bin/arm_bootimage",
353 In BuildTree "root" ("/platforms/arm/menu.lst."++target),
354 In BuildTree "armv7" bootDriver,
356 NoDep BuildTree "root" "/",
358 [ (Dep BuildTree "armv7" m) | m <- modules ] ++
359 [ (Dep BuildTree "" m) | m <- modules_generic ] ),
361 Rule ([ Str Config.arm_objcopy,
363 In BuildTree "root" image,
364 Out "root" (image ++ ".bin") ]),
365 Rule ([ In SrcTree "tools" "/tools/arm_boot/gdb_script.sh",
366 Str Config.arm_objdump,
367 In BuildTree "root" image,
368 In BuildTree "armv7" bootDriver,
369 In BuildTree "armv7" cpuDriver,
370 Out "root" (image ++ "-gdb.gdb") ])
375 -- Rules to build assorted platforms
378 platform "X86_64_Basic" [ "x86_64" ]
379 ([ ("x86_64", f) | f <- modules_x86_64 ]
381 [ ("", f) | f <- modules_generic])
382 "Basic 64-bit x86 PC build",
384 platform "X86_64_Benchmarks" [ "x86_64" ]
385 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64]
387 [ ("", f) | f <- modules_generic])
388 "64-bit x86 PC build with benchmarks",
390 platform "X86_64_Full" [ "x86_64" ]
391 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64 ++ tests_x86_64 ]
393 [ ("", f) | f <- modules_generic])
394 "64-bit x86 PC build with benchmarks and test suites",
396 platform "K1OM_Basic" [ "k1om" ]
397 ([ ("k1om", f) | f <- modules_k1om ]
399 [ ("", f) | f <- modules_generic])
400 "Basic Xeon Phi build",
402 platform "K1OM_Benchmarks" [ "k1om" ]
403 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om]
405 [ ("", f) | f <- modules_generic])
406 "Xeon Phi build with benchmarks",
408 platform "K1OM_Full" [ "k1om" ]
409 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om ++ tests_k1om ]
411 [ ("", f) | f <- modules_generic])
412 "Xeon Phi build with benchmarks and test suites",
414 platform "QEMU" [ "armv8" ]
415 ([ ("armv8", "/sbin/cpu_a57v"), ("armv8", "/sbin/boot_armv8_generic") ]
417 [ ("armv8", f) | f <- armv8_modules ]
419 [ ("", f) | f <- modules_generic])
420 "ARM Virtual Machine Board with ARM Cortex A57 processors in Qemu.",
422 platform "APM88xxxx" [ "armv8" ]
423 ([ ("armv8", "/sbin/cpu_apm88xxxx"), ("armv8", "/sbin/boot_armv8_generic")]
425 [ ("armv8", f) | f <- armv8_modules ]
427 [ ("", f) | f <- modules_generic]
429 "The APM XGene development board (Mustang)",
431 platform "ThunderX" [ "armv8" ]
432 ([ ("armv8", "/sbin/cpu_cn88xx"), ("armv8", "/sbin/boot_armv8_generic") ]
434 [ ("armv8", f) | f <- armv8_modules ]
436 [ ("", f) | f <- modules_generic]
438 "Cavium ThunderX-1 (CN88xx) boards",
440 platform "PandaboardES" [ "armv7" ]
441 ([ ("armv7", f) | f <- pandaModules ] ++
442 [ ("root", "/armv7_omap44xx_image"),
443 ("root", "/armv7_omap44xx_image-gdb.gdb") ])
444 "Standard Pandaboard ES build image and modules",
446 platform "VExpressEMM-A15" [ "armv7" ]
447 ([ ("armv7", f) | f <- vExpressEMMModules_A15 ] ++
448 [ ("root", "/armv7_a15ve_1_image"),
449 ("root", "/armv7_a15ve_1_image-gdb.gdb"),
450 ("root", "/armv7_a15ve_fvp_1_image"),
451 ("root", "/armv7_a15ve_fvp_1_image-gdb.gdb"),
452 ("root", "/armv7_a15ve_4_image"),
453 ("root", "/armv7_a15ve_4_image-gdb.gdb"),
454 ("root", "/armv7_a15ve_fvp_4_image"),
455 ("root", "/armv7_a15ve_fvp_4_image-gdb.gdb"),
456 ("root", "/armv7_a15ve_gem5_image"),
457 ("root", "/armv7_a15ve_gem5_image-gdb.gdb") ])
458 "VersatileExpress EMM board with ARM Cortex-A15s",
460 platform "VExpressEMM-A15-A7" [ "armv7" ]
461 ([ ("armv7", f) | f <- vExpressEMMModules_A15 ] ++
462 [ ("root", "/armv7_a15a7ve_image"),
463 ("root", "/armv7_a15a7ve_image-gdb.gdb") ])
464 "VersatileExpress EMM board with ARM Cortex-A15s and A7s",
466 platform "VExpressEMM-A9" [ "armv7" ]
467 ([ ("armv7", f) | f <- vExpressEMMModules_A9 ] ++
468 [ ("root", "/armv7_a9ve_1_image"),
469 ("root", "/armv7_a9ve_1_image-gdb.gdb"),
470 ("root", "/armv7_a9ve_4_image"),
471 ("root", "/armv7_a9ve_4_image-gdb.gdb") ])
472 "VersatileExpress EMM board for ARMv7-A Fixed Virtual Platforms",
474 platform "Zynq7000" [ "armv7" ]
475 ([ ("armv7", f) | f <- zynq7Modules ] ++
476 [ ("root", "/armv7_zynq7_image"),
477 ("root", "/armv7_zynq7_image-gdb.gdb") ])
481 -- Rules to build assorted boot images
484 -- Build the default PandaBoard boot image
485 armv7Image "armv7_omap44xx" "omap44xx" "omap44xx" "0x80000000" pandaModules,
487 -- Build the A15 simulation image (VersatileExpress EMM board, 1 core)
488 armv7Image "armv7_a15ve_1" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
490 -- Build the A15 simulation image (VersatileExpress EMM board, 1 core, FVP
492 armv7Image "armv7_a15ve_fvp_1" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
494 -- Build the A15 simulation image (VersatileExpress EMM board, 4 cores)
495 armv7Image "armv7_a15ve_4" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
497 -- Build the A15 simulation image (VersatileExpress EMM board, 4 cores,
499 armv7Image "armv7_a15ve_fvp_4" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
501 -- Build the A15 simulation image (VersatileExpress EMM board, with GEM5
503 armv7Image "armv7_a15ve_gem5" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
505 -- Build the big.LITTLE A15/A7 simulation image (VersatileExpress EMM
507 armv7Image "armv7_a15a7ve" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
509 -- Build the A9 simulation image (VersatileExpress EMM board, 1 core)
510 armv7Image "armv7_a9ve_1" "ve" "a9ve" "0x80000000" vExpressEMMModules_A9,
512 -- Build the A9 simulation image (VersatileExpress EMM board, 4 cores)
513 armv7Image "armv7_a9ve_4" "ve" "a9ve" "0x80000000" vExpressEMMModules_A9,
515 -- Build the Zynq7000 image
516 armv7Image "armv7_zynq7" "zynq7" "zynq7" "0x00000000" zynq7Modules,
519 -- Booting: various targets for booting Barrelfish under different circumstances
522 -- Copy menu.list files across
523 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
524 "root" ("/platforms/arm/menu.lst." ++ p)
525 | p <- [ "armv8_a57v",
539 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
540 "root" ("/platforms/x86/menu.lst." ++ p)
541 | p <- [ "x86_64", "k1om" ] ],
544 boot "gem5_armv7_vexpressemm" [ "armv7" ] [
545 In SrcTree "tools" "/tools/arm_gem5/boot_gem5.sh",
547 In BuildTree "root" "/armv7_a15ve_gem5_image" ]
548 "Boot an ARMv7a multicore image on a VersatileExpress EMM board in GEM5",
550 boot "FVP_VE_A5x1" [ "armv7" ] [
551 Str "FVP_VE_Cortex-A5x1",
552 In BuildTree "root" "/armv7_a9ve_1_image" ]
553 "Boot on a single-core Cortex-A5 FVP model",
555 boot "FVP_VE_A7x1" [ "armv7" ] [
556 Str "FVP_VE_Cortex-A7x1",
557 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
558 "Boot on a single-core Cortex-A7 FVP model",
560 boot "FVP_VE_A9x1" [ "armv7" ] [
561 Str "FVP_VE_Cortex-A9x1",
562 In BuildTree "root" "/armv7_a9ve_1_image" ]
563 "Boot on a single-core Cortex-A9 FVP model",
565 boot "FVP_VE_A9x4" [ "armv7" ] [
566 Str "FVP_VE_Cortex-A9x4",
567 In BuildTree "root" "/armv7_a9ve_4_image" ]
568 "Boot on a four-core Cortex-A9 FVP model",
570 boot "FVP_VE_A15x1" [ "armv7" ] [
571 Str "FVP_VE_Cortex-A15x1",
572 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
573 "Boot on a single-core Cortex-A15 FVP model",
575 boot "FVP_VE_A15x4" [ "armv7" ] [
576 Str "FVP_VE_Cortex-A15x4-A7x4",
577 In BuildTree "root" "/armv7_a15ve_fvp_4_image" ]
578 "Boot on a four-core Cortex-A15 FVP model",
580 boot "FVP_VE_A15x4_A7x4" [ "armv7" ] [
581 Str "FVP_VE_Cortex-A15x4-A7x4",
582 NStr "-a coretile.cluster0.*=",
583 In BuildTree "root" "/armv7_a15a7ve_image",
584 NStr "-a coretile.cluster1.*=",
585 In BuildTree "root" "/armv7_a15a7ve_image",
587 Str "coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3"
589 "Boot on a 4+4-core Cortex-A15/A7 FVP model",
591 boot "FVP_VE_A17x1" [ "armv7" ] [
592 Str "FVP_VE_Cortex-A17x1",
593 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
594 "Boot on a single-core Cortex-A17 FVP model",
596 boot "qemu_a15ve_1" [ "armv7" ] [
597 In SrcTree "tools" "/tools/qemu-wrapper.sh",
598 Str "--image", In BuildTree "root" "/armv7_a15ve_1_image",
599 Str "--arch", Str "a15ve",
600 Str "--smp", Str "1" ]
601 "Boot QEMU in 32-bit ARM mode emulating a Versatile Express board (1 core)",
603 boot "qemu_a15ve_4" [ "armv7" ] [
604 In SrcTree "tools" "/tools/qemu-wrapper.sh",
605 Str "--image", In BuildTree "root" "/armv7_a15ve_4_image",
606 Str "--arch", Str "a15ve",
607 Str "--smp", Str "4" ]
608 "Boot QEMU in 32-bit ARM mode emulating a Versatile Express board (4 cores)",
610 boot "qemu_zynq7" [ "armv7" ] [
611 In SrcTree "tools" "/tools/qemu-wrapper.sh",
612 Str "--image", In BuildTree "root" "/armv7_zynq7_image",
613 Str "--arch", Str "zynq7" ]
614 "Boot QEMU in 32-bit ARM mode emulating a Zynq 7000",
616 boot "qemu_a57v" [ "armv8" ] ([
617 In SrcTree "tools" "/tools/qemu-wrapper.sh",
618 Str "--menu", In BuildTree "root" "/platforms/arm/menu.lst.armv8_a57v",
619 Str "--arch", Str "armv8",
620 Str "--hagfish", Str Config.hagfish_location ]
621 ++ [(Dep BuildTree "armv8" f) | f <- armv8_modules ]
622 ++ [(Dep BuildTree "armv8" "/sbin/cpu_a57v")]
623 ++ [(Dep BuildTree "armv8" "/sbin/boot_armv8_generic")]
624 ++ [(Dep BuildTree "" f) | f <- modules_generic ])
625 "Boot QEMU in 64-bit ARM mode emulating a ARM Virtual Machine",
627 boot "qemu_a57v_debug" [ "armv8" ] ([
628 In SrcTree "tools" "/tools/qemu-wrapper.sh",
629 Str "--menu", In BuildTree "root" "/platforms/arm/menu.lst.armv8_a57v",
630 Str "--arch", Str "armv8",
631 Str "--hagfish", Str Config.hagfish_location,
632 Str "--debug", In SrcTree "tools" "/tools/debug.armv8.gdb" ]
633 ++ [(Dep BuildTree "armv8" f) | f <- armv8_modules ]
634 ++ [(Dep BuildTree "armv8" "/sbin/cpu_a57v")]
635 ++ [(Dep BuildTree "armv8" "/sbin/boot_armv8_generic")]
636 ++ [(Dep BuildTree "" f) | f <- modules_generic ])
637 "Boot QEMU in 64-bit ARM mode emulating a ARM Virtual Machine",
639 boot "qemu_x86_64" [ "x86_64" ] ([
640 In SrcTree "tools" "/tools/qemu-wrapper.sh",
641 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
642 Str "--arch", Str "x86_64" ] ++ [
643 (Dep BuildTree "x86_64" f) | f <- modules_x86_64 ] ++ [
644 (Dep BuildTree "" f) | f <- modules_generic ])
645 "Boot QEMU in 64-bit x86 mode emulating a PC",
647 boot "qemu_x86_64_debug" [ "x86_64" ] ([
648 In SrcTree "tools" "/tools/qemu-wrapper.sh",
649 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
650 Str "--arch", Str "x86_64",
651 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ] ++ [
652 (Dep BuildTree "x86_64" f) | f <- modules_x86_64 ] ++ [
653 (Dep BuildTree "" f) | f <- modules_generic ])
654 "Boot QEMU under GDB in 64-bit x86 mode emulating a PC",
656 boot "usbboot_panda" [ "armv7" ] [
657 In BuildTree "tools" "/bin/usbboot",
658 In BuildTree "root" "/armv7_omap44xx_image"
660 "Boot Barrelfish on a Pandaboard, over a local USB cable"