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",
148 "phases_scale_bench",
151 "shared_mem_clock_bench",
155 bench_k1om = [ "/sbin/" ++ f | f <- [
156 "benchmarks/bomp_mm",
157 "benchmarks/dma_bench",
158 "benchmarks/xomp_share",
159 "benchmarks/xomp_spawn",
160 "benchmarks/xomp_work",
161 "benchmarks/xphi_ump_bench",
162 "benchmarks/xphi_xump_bench" ] ] ++ bench_x86
164 -- Default list of modules to build/install for all enabled architectures
165 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" ]
179 -- x86_64-specific modules to build by default
180 -- this should shrink as targets are ported and move into the generic list above
181 modules_x86_64 = [ "/sbin/" ++ f | f <- [
192 "block_server_client",
232 -- the following are broken in the newidc system
233 modules_x86_64_broken = [ "/sbin/" ++ f | f <- [
241 modules_k1om = [ "/sbin/" ++ f | f <- [
247 -- ARMv7-a Pandaboard modules
248 pandaModules = [ "/sbin/" ++ f | f <- [
272 -- ARMv7-A modules for Versatile Express EMM board (GEM5, qemu)
273 vExpressEMMModules_A15 = [ "/sbin/" ++ f | f <- [
291 -- ARMv7-A modules for Versatile Express EMM board (FVP)
292 vExpressEMMModules_A9 = [ "/sbin/" ++ f | f <- [
310 -- ARMv7-A modules for the Xilinx Zynq7000
311 zynq7Modules = [ "/sbin/" ++ f | f <- [
329 -- ARMv8 modules for running under QEMU
330 armv8_modules= [ "/sbin/" ++ f | f <- [
348 armv7Image target bootTarget cpuTarget physBase modules =
349 let bootDriver = "/sbin/boot_" ++ bootTarget
350 cpuDriver = "/sbin/cpu_" ++ cpuTarget
351 image = "/" ++ target ++ "_image"
353 Rule ([ In BuildTree "tools" "/bin/arm_bootimage",
354 In BuildTree "root" ("/platforms/arm/menu.lst."++target),
355 In BuildTree "armv7" bootDriver,
357 NoDep BuildTree "root" "/",
359 [ (Dep BuildTree "armv7" m) | m <- modules ] ++
360 [ (Dep BuildTree "" m) | m <- modules_generic ] ),
362 Rule ([ Str Config.arm_objcopy,
364 In BuildTree "root" image,
365 Out "root" (image ++ ".bin") ]),
366 Rule ([ In SrcTree "tools" "/tools/arm_boot/gdb_script.sh",
367 Str Config.arm_objdump,
368 In BuildTree "root" image,
369 In BuildTree "armv7" bootDriver,
370 In BuildTree "armv7" cpuDriver,
371 Out "root" (image ++ "-gdb.gdb") ])
376 -- Rules to build assorted platforms
379 platform "X86_64_Basic" [ "x86_64" ]
380 ([ ("x86_64", f) | f <- modules_x86_64 ]
382 [ ("", f) | f <- modules_generic])
383 "Basic 64-bit x86 PC build",
385 platform "X86_64_Benchmarks" [ "x86_64" ]
386 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64]
388 [ ("", f) | f <- modules_generic])
389 "64-bit x86 PC build with benchmarks",
391 platform "X86_64_Full" [ "x86_64" ]
392 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64 ++ tests_x86_64 ]
394 [ ("", f) | f <- modules_generic])
395 "64-bit x86 PC build with benchmarks and test suites",
397 platform "K1OM_Basic" [ "k1om" ]
398 ([ ("k1om", f) | f <- modules_k1om ]
400 [ ("", f) | f <- modules_generic])
401 "Basic Xeon Phi build",
403 platform "K1OM_Benchmarks" [ "k1om" ]
404 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om]
406 [ ("", f) | f <- modules_generic])
407 "Xeon Phi build with benchmarks",
409 platform "K1OM_Full" [ "k1om" ]
410 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om ++ tests_k1om ]
412 [ ("", f) | f <- modules_generic])
413 "Xeon Phi build with benchmarks and test suites",
415 platform "QEMU" [ "armv8" ]
416 ([ ("armv8", "/sbin/cpu_a57v") ]
418 [ ("armv8", f) | f <- armv8_modules ]
420 [ ("", f) | f <- modules_generic])
421 "ARM Virtual Machine Board with ARM Cortex A57 processors in Qemu.",
423 platform "APM88xxxx" [ "armv8" ]
424 ([ ("armv8", "/sbin/cpu_apm88xxxx"), ("armv8", "/sbin/boot_armv8_generic")]
426 [ ("armv8", f) | f <- armv8_modules ]
428 [ ("", f) | f <- modules_generic]
430 "The APM XGene development board (Mustang)",
432 platform "ThunderX" [ "armv8" ]
433 ([ ("armv8", "/sbin/cpu_cn88xx"), ("armv8", "/sbin/boot_armv8_generic") ]
435 [ ("armv8", f) | f <- armv8_modules ]
437 [ ("", f) | f <- modules_generic]
439 "Cavium ThunderX-1 (CN88xx) boards",
441 platform "PandaboardES" [ "armv7" ]
442 ([ ("armv7", f) | f <- pandaModules ] ++
443 [ ("root", "/armv7_omap44xx_image"),
444 ("root", "/armv7_omap44xx_image-gdb.gdb") ])
445 "Standard Pandaboard ES build image and modules",
447 platform "VExpressEMM-A15" [ "armv7" ]
448 ([ ("armv7", f) | f <- vExpressEMMModules_A15 ] ++
449 [ ("root", "/armv7_a15ve_1_image"),
450 ("root", "/armv7_a15ve_1_image-gdb.gdb"),
451 ("root", "/armv7_a15ve_fvp_1_image"),
452 ("root", "/armv7_a15ve_fvp_1_image-gdb.gdb"),
453 ("root", "/armv7_a15ve_4_image"),
454 ("root", "/armv7_a15ve_4_image-gdb.gdb"),
455 ("root", "/armv7_a15ve_fvp_4_image"),
456 ("root", "/armv7_a15ve_fvp_4_image-gdb.gdb"),
457 ("root", "/armv7_a15ve_gem5_image"),
458 ("root", "/armv7_a15ve_gem5_image-gdb.gdb") ])
459 "VersatileExpress EMM board with ARM Cortex-A15s",
461 platform "VExpressEMM-A15-A7" [ "armv7" ]
462 ([ ("armv7", f) | f <- vExpressEMMModules_A15 ] ++
463 [ ("root", "/armv7_a15a7ve_image"),
464 ("root", "/armv7_a15a7ve_image-gdb.gdb") ])
465 "VersatileExpress EMM board with ARM Cortex-A15s and A7s",
467 platform "VExpressEMM-A9" [ "armv7" ]
468 ([ ("armv7", f) | f <- vExpressEMMModules_A9 ] ++
469 [ ("root", "/armv7_a9ve_1_image"),
470 ("root", "/armv7_a9ve_1_image-gdb.gdb"),
471 ("root", "/armv7_a9ve_4_image"),
472 ("root", "/armv7_a9ve_4_image-gdb.gdb") ])
473 "VersatileExpress EMM board for ARMv7-A Fixed Virtual Platforms",
475 platform "Zynq7000" [ "armv7" ]
476 ([ ("armv7", f) | f <- zynq7Modules ] ++
477 [ ("root", "/armv7_zynq7_image"),
478 ("root", "/armv7_zynq7_image-gdb.gdb") ])
482 -- Rules to build assorted boot images
485 -- Build the default PandaBoard boot image
486 armv7Image "armv7_omap44xx" "omap44xx" "omap44xx" "0x80000000" pandaModules,
488 -- Build the A15 simulation image (VersatileExpress EMM board, 1 core)
489 armv7Image "armv7_a15ve_1" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
491 -- Build the A15 simulation image (VersatileExpress EMM board, 1 core, FVP
493 armv7Image "armv7_a15ve_fvp_1" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
495 -- Build the A15 simulation image (VersatileExpress EMM board, 4 cores)
496 armv7Image "armv7_a15ve_4" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
498 -- Build the A15 simulation image (VersatileExpress EMM board, 4 cores,
500 armv7Image "armv7_a15ve_fvp_4" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
502 -- Build the A15 simulation image (VersatileExpress EMM board, with GEM5
504 armv7Image "armv7_a15ve_gem5" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
506 -- Build the big.LITTLE A15/A7 simulation image (VersatileExpress EMM
508 armv7Image "armv7_a15a7ve" "ve" "a15ve" "0x80000000" vExpressEMMModules_A15,
510 -- Build the A9 simulation image (VersatileExpress EMM board, 1 core)
511 armv7Image "armv7_a9ve_1" "ve" "a9ve" "0x80000000" vExpressEMMModules_A9,
513 -- Build the A9 simulation image (VersatileExpress EMM board, 4 cores)
514 armv7Image "armv7_a9ve_4" "ve" "a9ve" "0x80000000" vExpressEMMModules_A9,
516 -- Build the Zynq7000 image
517 armv7Image "armv7_zynq7" "zynq7" "zynq7" "0x00000000" zynq7Modules,
520 -- Booting: various targets for booting Barrelfish under different circumstances
523 -- Copy menu.list files across
524 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
525 "root" ("/platforms/arm/menu.lst." ++ p)
526 | p <- [ "armv8_a57v",
540 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
541 "root" ("/platforms/x86/menu.lst." ++ p)
542 | p <- [ "x86_64", "k1om" ] ],
545 boot "gem5_armv7_vexpressemm" [ "armv7" ] [
546 In SrcTree "tools" "/tools/arm_gem5/boot_gem5.sh",
548 In BuildTree "root" "/armv7_a15ve_gem5_image" ]
549 "Boot an ARMv7a multicore image on a VersatileExpress EMM board in GEM5",
551 boot "FVP_VE_A5x1" [ "armv7" ] [
552 Str "FVP_VE_Cortex-A5x1",
553 In BuildTree "root" "/armv7_a9ve_1_image" ]
554 "Boot on a single-core Cortex-A5 FVP model",
556 boot "FVP_VE_A7x1" [ "armv7" ] [
557 Str "FVP_VE_Cortex-A7x1",
558 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
559 "Boot on a single-core Cortex-A7 FVP model",
561 boot "FVP_VE_A9x1" [ "armv7" ] [
562 Str "FVP_VE_Cortex-A9x1",
563 In BuildTree "root" "/armv7_a9ve_1_image" ]
564 "Boot on a single-core Cortex-A9 FVP model",
566 boot "FVP_VE_A9x4" [ "armv7" ] [
567 Str "FVP_VE_Cortex-A9x4",
568 In BuildTree "root" "/armv7_a9ve_4_image" ]
569 "Boot on a four-core Cortex-A9 FVP model",
571 boot "FVP_VE_A15x1" [ "armv7" ] [
572 Str "FVP_VE_Cortex-A15x1",
573 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
574 "Boot on a single-core Cortex-A15 FVP model",
576 boot "FVP_VE_A15x4" [ "armv7" ] [
577 Str "FVP_VE_Cortex-A15x4-A7x4",
578 In BuildTree "root" "/armv7_a15ve_fvp_4_image" ]
579 "Boot on a four-core Cortex-A15 FVP model",
581 boot "FVP_VE_A15x4_A7x4" [ "armv7" ] [
582 Str "FVP_VE_Cortex-A15x4-A7x4",
583 NStr "-a coretile.cluster0.*=",
584 In BuildTree "root" "/armv7_a15a7ve_image",
585 NStr "-a coretile.cluster1.*=",
586 In BuildTree "root" "/armv7_a15a7ve_image",
588 Str "coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3"
590 "Boot on a 4+4-core Cortex-A15/A7 FVP model",
592 boot "FVP_VE_A17x1" [ "armv7" ] [
593 Str "FVP_VE_Cortex-A17x1",
594 In BuildTree "root" "/armv7_a15ve_fvp_1_image" ]
595 "Boot on a single-core Cortex-A17 FVP model",
597 boot "qemu_a15ve_1" [ "armv7" ] [
598 In SrcTree "tools" "/tools/qemu-wrapper.sh",
599 Str "--image", In BuildTree "root" "/armv7_a15ve_1_image",
600 Str "--arch", Str "a15ve",
601 Str "--smp", Str "1" ]
602 "Boot QEMU in 32-bit ARM mode emulating a Versatile Express board (1 core)",
604 boot "qemu_a15ve_4" [ "armv7" ] [
605 In SrcTree "tools" "/tools/qemu-wrapper.sh",
606 Str "--image", In BuildTree "root" "/armv7_a15ve_4_image",
607 Str "--arch", Str "a15ve",
608 Str "--smp", Str "4" ]
609 "Boot QEMU in 32-bit ARM mode emulating a Versatile Express board (4 cores)",
611 boot "qemu_zynq7" [ "armv7" ] [
612 In SrcTree "tools" "/tools/qemu-wrapper.sh",
613 Str "--image", In BuildTree "root" "/armv7_zynq7_image",
614 Str "--arch", Str "zynq7" ]
615 "Boot QEMU in 32-bit ARM mode emulating a Zynq 7000",
617 boot "qemu_a57v" [ "armv8" ] ([
618 In SrcTree "tools" "/tools/qemu-wrapper.sh",
619 Str "--menu", In BuildTree "root" "/platforms/arm/menu.lst.armv8_a57v",
620 Str "--arch", Str "armv8",
621 Str "--hagfish", Str Config.hagfish_location ]
622 ++ [(Dep BuildTree "armv8" f) | f <- armv8_modules ]
623 ++ [(Dep BuildTree "armv8" "/sbin/cpu_a57v")]
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 "" f) | f <- modules_generic ])
636 "Boot QEMU in 64-bit ARM mode emulating a ARM Virtual Machine",
638 boot "qemu_x86_64" [ "x86_64" ] ([
639 In SrcTree "tools" "/tools/qemu-wrapper.sh",
640 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
641 Str "--arch", Str "x86_64" ] ++ [
642 (Dep BuildTree "x86_64" f) | f <- modules_x86_64 ] ++ [
643 (Dep BuildTree "" f) | f <- modules_generic ])
644 "Boot QEMU in 64-bit x86 mode emulating a PC",
646 boot "qemu_x86_64_debug" [ "x86_64" ] ([
647 In SrcTree "tools" "/tools/qemu-wrapper.sh",
648 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
649 Str "--arch", Str "x86_64",
650 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ] ++ [
651 (Dep BuildTree "x86_64" f) | f <- modules_x86_64 ] ++ [
652 (Dep BuildTree "" f) | f <- modules_generic ])
653 "Boot QEMU under GDB in 64-bit x86 mode emulating a PC",
655 boot "usbboot_panda" [ "armv7" ] [
656 In BuildTree "tools" "/bin/usbboot",
657 In BuildTree "root" "/armv7_omap44xx_image"
659 "Boot Barrelfish on a Pandaboard, over a local USB cable"