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 <- [
39 "nkmtest_modify_flags",
44 "test_create_l1l2_cnodes",
52 tests_x86 = [ "/sbin/" ++ f | f <- [
54 "tests/numatest" ] ] ++ tests_common
56 tests_x86_64 = [ "/sbin/" ++ f | f <- [
60 "bomp_cpu_bound_progress",
67 "mdbtest_range_query",
72 "nkmtest_invalid_mappings",
84 "tests/xphi_nameservice_test",
92 "xcorecapserv" ] ] ++ tests_x86
95 tests_k1om = [ "/sbin/" ++ f | f <- [
97 "tests/xeon_phi_inter",
98 "tests/xeon_phi_test",
99 "tests/xphi_nameservice_test" ] ] ++ tests_x86
101 bench_common = [ "/sbin/" ++ f | f <- [
102 "channel_cost_bench",
103 "flounder_stubs_buffer_bench",
104 "flounder_stubs_empty_bench",
105 "flounder_stubs_payload_bench",
108 bench_x86 = [ "/sbin/" ++ f | f <- [
109 "multihop_latency_bench",
112 "thc_v_flounder_empty",
122 bench_x86_64 = bench_x86 ++ bin_rcce_bt ++ bin_rcce_lu ++
123 [ "/sbin/" ++ f | f <- [
126 "benchmarks/bomp_mm",
127 "benchmarks/dma_bench",
128 "benchmarks/xomp_share",
129 "benchmarks/xomp_spawn",
130 "benchmarks/xomp_work",
131 "benchmarks/xphi_ump_bench",
135 "bulk_transfer_passthrough",
137 "bulkbench_micro_echo",
138 "bulkbench_micro_rtt",
139 "bulkbench_micro_throughput",
147 "phases_scale_bench",
150 "shared_mem_clock_bench",
154 bench_k1om = [ "/sbin/" ++ f | f <- [
155 "benchmarks/bomp_mm",
156 "benchmarks/dma_bench",
157 "benchmarks/xomp_share",
158 "benchmarks/xomp_spawn",
159 "benchmarks/xomp_work",
160 "benchmarks/xphi_ump_bench",
161 "benchmarks/xphi_xump_bench" ] ] ++ bench_x86
163 -- Default list of modules to build/install for all enabled architectures
164 modules_common = [ "/sbin/" ++ f | f <- [
174 -- List of modules that are arch-independent and always built
176 "/eclipseclp_ramfs.cpio.gz",
177 "/skb_ramfs.cpio.gz",
178 "/sshd_ramfs.cpio.gz" ]
180 -- x86_64-specific modules to build by default
181 -- this should shrink as targets are ported and move into the generic list above
182 modules_x86_64 = [ "/sbin/" ++ f | f <- [
193 "block_server_client",
233 -- the following are broken in the newidc system
234 modules_x86_64_broken = [ "/sbin/" ++ f | f <- [
242 modules_k1om = [ "/sbin/" ++ f | f <- [
248 -- ARMv7-a Pandaboard modules
249 pandaModules = [ "/sbin/" ++ f | f <- [
273 -- ARMv7-A modules for Versatile Express EMM board (GEM5, qemu)
274 vExpressEMMModules_A15 = [ "/sbin/" ++ f | f <- [
292 -- ARMv7-A modules for Versatile Express EMM board (FVP)
293 vExpressEMMModules_A9 = [ "/sbin/" ++ f | f <- [
311 -- ARMv7-A modules for the Xilinx Zynq7000
312 zynq7Modules = [ "/sbin/" ++ f | f <- [
330 -- ARMv8 modules for running under QEMU
331 armv8_modules= [ "/sbin/" ++ f | f <- [
349 armv7Image target bootTarget cpuTarget physBase modules =
350 let bootDriver = "/sbin/boot_" ++ bootTarget
351 cpuDriver = "/sbin/cpu_" ++ cpuTarget
352 image = "/" ++ target ++ "_image"
354 Rule ([ In BuildTree "tools" "/bin/arm_bootimage",
355 In BuildTree "root" ("/platforms/arm/menu.lst."++target),
356 In BuildTree "armv7" bootDriver,
358 NoDep BuildTree "root" "/",
360 [ (Dep BuildTree "armv7" m) | m <- modules ] ++
361 [ (Dep BuildTree "" m) | m <- modules_generic ] ),
363 Rule ([ Str Config.arm_objcopy,
365 In BuildTree "root" image,
366 Out "root" (image ++ ".bin") ]),
367 Rule ([ In SrcTree "tools" "/tools/arm_boot/gdb_script.sh",
368 Str Config.arm_objdump,
369 In BuildTree "root" image,
370 In BuildTree "armv7" bootDriver,
371 In BuildTree "armv7" cpuDriver,
372 Out "root" (image ++ "-gdb.gdb") ])
377 -- Rules to build assorted platforms
380 platform "X86_64_Basic" [ "x86_64" ]
381 ([ ("x86_64", f) | f <- modules_x86_64 ]
383 [ ("", f) | f <- modules_generic])
384 "Basic 64-bit x86 PC build",
386 platform "X86_64_Benchmarks" [ "x86_64" ]
387 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64]
389 [ ("", f) | f <- modules_generic])
390 "64-bit x86 PC build with benchmarks",
392 platform "X86_64_Full" [ "x86_64" ]
393 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64 ++ tests_x86_64 ]
395 [ ("", f) | f <- modules_generic])
396 "64-bit x86 PC build with benchmarks and test suites",
398 platform "K1OM_Basic" [ "k1om" ]
399 ([ ("k1om", f) | f <- modules_k1om ]
401 [ ("", f) | f <- modules_generic])
402 "Basic Xeon Phi build",
404 platform "K1OM_Benchmarks" [ "k1om" ]
405 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om]
407 [ ("", f) | f <- modules_generic])
408 "Xeon Phi build with benchmarks",
410 platform "K1OM_Full" [ "k1om" ]
411 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om ++ tests_k1om ]
413 [ ("", f) | f <- modules_generic])
414 "Xeon Phi build with benchmarks and test suites",
416 platform "QEMU" [ "armv8" ]
417 ([ ("armv8", "/sbin/cpu_a57v") ]
419 [ ("armv8", f) | f <- armv8_modules ]
421 [ ("", f) | f <- modules_generic])
422 "ARM Virtual Machine Board with ARM Cortex A57 processors in Qemu.",
424 platform "APM88xxxx" [ "armv8" ]
425 ([ ("armv8", "/sbin/cpu_apm88xxxx"), ("armv8", "/sbin/boot_armv8_generic")]
427 [ ("armv8", f) | f <- armv8_modules ]
429 [ ("", f) | f <- modules_generic]
431 "The APM XGene development board (Mustang)",
433 platform "ThunderX" [ "armv8" ]
434 ([ ("armv8", "/sbin/cpu_cn88xx"), ("armv8", "/sbin/boot_armv8_generic") ]
436 [ ("armv8", f) | f <- armv8_modules ]
438 [ ("", f) | f <- modules_generic]
440 "Cavium ThunderX-1 (CN88xx) boards",
442 platform "PandaboardES" [ "armv7" ]
443 ([ ("armv7", f) | f <- pandaModules ] ++
444 [ ("root", "/armv7_omap44xx_image"),
445 ("root", "/armv7_omap44xx_image-gdb.gdb") ])
446 "Standard Pandaboard ES build image and modules",
448 platform "VExpressEMM-A15" [ "armv7" ]
449 ([ ("armv7", f) | f <- vExpressEMMModules_A15 ] ++
450 [ ("root", "/armv7_a15ve_1_image"),
451 ("root", "/armv7_a15ve_1_image-gdb.gdb"),
452 ("root", "/armv7_a15ve_fvp_1_image"),
453 ("root", "/armv7_a15ve_fvp_1_image-gdb.gdb"),
454 ("root", "/armv7_a15ve_4_image"),
455 ("root", "/armv7_a15ve_4_image-gdb.gdb"),
456 ("root", "/armv7_a15ve_fvp_4_image"),
457 ("root", "/armv7_a15ve_fvp_4_image-gdb.gdb"),
458 ("root", "/armv7_a15ve_gem5_image"),
459 ("root", "/armv7_a15ve_gem5_image-gdb.gdb") ])
460 "VersatileExpress EMM board with ARM Cortex-A15s",
462 platform "VExpressEMM-A15-A7" [ "armv7" ]
463 ([ ("armv7", f) | f <- vExpressEMMModules_A15 ] ++
464 [ ("root", "/armv7_a15a7ve_image"),
465 ("root", "/armv7_a15a7ve_image-gdb.gdb") ])
466 "VersatileExpress EMM board with ARM Cortex-A15s and A7s",
468 platform "VExpressEMM-A9" [ "armv7" ]
469 ([ ("armv7", f) | f <- vExpressEMMModules_A9 ] ++
470 [ ("root", "/armv7_a9ve_1_image"),
471 ("root", "/armv7_a9ve_1_image-gdb.gdb"),
472 ("root", "/armv7_a9ve_4_image"),
473 ("root", "/armv7_a9ve_4_image-gdb.gdb") ])
474 "VersatileExpress EMM board for ARMv7-A Fixed Virtual Platforms",
476 platform "Zynq7000" [ "armv7" ]
477 ([ ("armv7", f) | f <- zynq7Modules ] ++
478 [ ("root", "/armv7_zynq7_image"),
479 ("root", "/armv7_zynq7_image-gdb.gdb") ])
483 -- Rules to build assorted boot images
486 -- Build the default PandaBoard boot image
487 armv7Image "armv7_omap44xx" "omap44xx" "omap44xx" "0x80000000" pandaModules,
489 -- Build the A15 simulation image (VersatileExpress EMM board, 1 core)
490 armv7Image "armv7_a15ve_1" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
492 -- Build the A15 simulation image (VersatileExpress EMM board, 1 core, FVP
494 armv7Image "armv7_a15ve_fvp_1" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
496 -- Build the A15 simulation image (VersatileExpress EMM board, 4 cores)
497 armv7Image "armv7_a15ve_4" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
499 -- Build the A15 simulation image (VersatileExpress EMM board, 4 cores,
501 armv7Image "armv7_a15ve_fvp_4" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
503 -- Build the A15 simulation image (VersatileExpress EMM board, with GEM5
505 armv7Image "armv7_a15ve_gem5" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
507 -- Build the big.LITTLE A15/A7 simulation image (VersatileExpress EMM
509 armv7Image "armv7_a15a7ve" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
511 -- Build the A9 simulation image (VersatileExpress EMM board, 1 core)
512 armv7Image "armv7_a9ve_1" "ve" "a9ve" "0x80000000" vExpressEMMModules_A9,
514 -- Build the A9 simulation image (VersatileExpress EMM board, 4 cores)
515 armv7Image "armv7_a9ve_4" "ve" "a9ve" "0x80000000" vExpressEMMModules_A9,
517 -- Build the Zynq7000 image
518 armv7Image "armv7_zynq7" "zynq7" "zynq7" "0x00000000" zynq7Modules,
521 -- Booting: various targets for booting Barrelfish under different circumstances
524 -- Copy menu.list files across
525 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
526 "root" ("/platforms/arm/menu.lst." ++ p)
527 | p <- [ "armv8_a57v",
541 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
542 "root" ("/platforms/x86/menu.lst." ++ p)
543 | p <- [ "x86_64", "k1om" ] ],
546 boot "gem5_armv7_vexpressemm" [ "armv7" ] [
547 In SrcTree "tools" "/tools/arm_gem5/boot_gem5.sh",
549 In BuildTree "root" "/armv7_a15ve_gem5_image" ]
550 "Boot an ARMv7a multicore image on a VersatileExpress EMM board in GEM5",
552 boot "FVP_VE_A5x1" [ "armv7" ] [
553 Str "FVP_VE_Cortex-A5x1",
554 In BuildTree "root" "/armv7_a9ve_1_image" ]
555 "Boot on a single-core Cortex-A5 FVP model",
557 boot "FVP_VE_A7x1" [ "armv7" ] [
558 Str "FVP_VE_Cortex-A7x1",
559 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
560 "Boot on a single-core Cortex-A7 FVP model",
562 boot "FVP_VE_A9x1" [ "armv7" ] [
563 Str "FVP_VE_Cortex-A9x1",
564 In BuildTree "root" "/armv7_a9ve_1_image" ]
565 "Boot on a single-core Cortex-A9 FVP model",
567 boot "FVP_VE_A9x4" [ "armv7" ] [
568 Str "FVP_VE_Cortex-A9x4",
569 In BuildTree "root" "/armv7_a9ve_4_image" ]
570 "Boot on a four-core Cortex-A9 FVP model",
572 boot "FVP_VE_A15x1" [ "armv7" ] [
573 Str "FVP_VE_Cortex-A15x1",
574 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
575 "Boot on a single-core Cortex-A15 FVP model",
577 boot "FVP_VE_A15x4" [ "armv7" ] [
578 Str "FVP_VE_Cortex-A15x4-A7x4",
579 In BuildTree "root" "/armv7_a15ve_fvp_4_image" ]
580 "Boot on a four-core Cortex-A15 FVP model",
582 boot "FVP_VE_A15x4_A7x4" [ "armv7" ] [
583 Str "FVP_VE_Cortex-A15x4-A7x4",
584 NStr "-a coretile.cluster0.*=",
585 In BuildTree "root" "/armv7_a15a7ve_image",
586 NStr "-a coretile.cluster1.*=",
587 In BuildTree "root" "/armv7_a15a7ve_image",
589 Str "coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3"
591 "Boot on a 4+4-core Cortex-A15/A7 FVP model",
593 boot "FVP_VE_A17x1" [ "armv7" ] [
594 Str "FVP_VE_Cortex-A17x1",
595 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
596 "Boot on a single-core Cortex-A17 FVP model",
598 boot "qemu_a15ve_1" [ "armv7" ] [
599 In SrcTree "tools" "/tools/qemu-wrapper.sh",
600 Str "--image", In BuildTree "root" "/armv7_a15ve_1_image",
601 Str "--arch", Str "a15ve",
602 Str "--smp", Str "1" ]
603 "Boot QEMU in 32-bit ARM mode emulating a Versatile Express board (1 core)",
605 boot "qemu_a15ve_4" [ "armv7" ] [
606 In SrcTree "tools" "/tools/qemu-wrapper.sh",
607 Str "--image", In BuildTree "root" "/armv7_a15ve_4_image",
608 Str "--arch", Str "a15ve",
609 Str "--smp", Str "4" ]
610 "Boot QEMU in 32-bit ARM mode emulating a Versatile Express board (4 cores)",
612 boot "qemu_zynq7" [ "armv7" ] [
613 In SrcTree "tools" "/tools/qemu-wrapper.sh",
614 Str "--image", In BuildTree "root" "/armv7_zynq7_image",
615 Str "--arch", Str "zynq7" ]
616 "Boot QEMU in 32-bit ARM mode emulating a Zynq 7000",
618 boot "qemu_a57v" [ "armv8" ] ([
619 In SrcTree "tools" "/tools/qemu-wrapper.sh",
620 Str "--menu", In BuildTree "root" "/platforms/arm/menu.lst.armv8_a57v",
621 Str "--arch", Str "armv8",
622 Str "--hagfish", Str Config.hagfish_location ]
623 ++ [(Dep BuildTree "armv8" f) | f <- armv8_modules ]
624 ++ [(Dep BuildTree "armv8" "/sbin/cpu_a57v")]
625 ++ [(Dep BuildTree "" f) | f <- modules_generic ])
626 "Boot QEMU in 64-bit ARM mode emulating a ARM Virtual Machine",
628 boot "qemu_a57v_debug" [ "armv8" ] ([
629 In SrcTree "tools" "/tools/qemu-wrapper.sh",
630 Str "--menu", In BuildTree "root" "/platforms/arm/menu.lst.armv8_a57v",
631 Str "--arch", Str "armv8",
632 Str "--hagfish", Str Config.hagfish_location,
633 Str "--debug", In SrcTree "tools" "/tools/debug.armv8.gdb" ]
634 ++ [(Dep BuildTree "armv8" f) | f <- armv8_modules ]
635 ++ [(Dep BuildTree "armv8" "/sbin/cpu_a57v")]
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"