1 --------------------------------------------------------------------------
2 -- Copyright (c) 2015, 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, Universitätstr. 6, CH-8092 Zurich. Attn: Systems Group.
9 -- Hakefile for /platforms/x86
11 --------------------------------------------------------------------------
13 let bin_rcce_lu = [ "/sbin/" ++ f | f <- [
22 bin_rcce_bt = [ "/sbin/" ++ f | f <- [
30 tests_common = [ "/sbin/" ++ f | f <- [
41 tests_x86 = [ "/sbin/" ++ f | f <- [
45 tests_x86_64 = [ "/sbin/" ++ f | f <- [
49 "bomp_cpu_bound_progress",
56 "mdbtest_range_query",
71 "tests/xphi_nameservice_test",
79 "xcorecapserv" ] ] ++ tests_x86
81 tests_x86_32 = tests_x86
83 tests_k1om = [ "/sbin/" ++ f | f <- [
85 "tests/xeon_phi_inter",
86 "tests/xeon_phi_test",
87 "tests/xphi_nameservice_test" ] ] ++ tests_x86
89 bench_common = [ "/sbin/" ++ f | f <- [
91 "flounder_stubs_buffer_bench",
92 "flounder_stubs_empty_bench",
93 "flounder_stubs_payload_bench",
96 bench_x86 = [ "/sbin/" ++ f | f <- [
97 "multihop_latency_bench",
100 "thc_v_flounder_empty",
110 bench_x86_64 = bench_x86 ++ bin_rcce_bt ++ bin_rcce_lu ++
111 [ "/sbin/" ++ f | f <- [
114 "benchmarks/bomp_mm",
115 "benchmarks/dma_bench",
116 "benchmarks/xomp_share",
117 "benchmarks/xomp_spawn",
118 "benchmarks/xomp_work",
119 "benchmarks/xphi_ump_bench",
123 "bulk_transfer_passthrough",
125 "bulkbench_micro_echo",
126 "bulkbench_micro_rtt",
127 "bulkbench_micro_throughput",
135 "phases_scale_bench",
138 "shared_mem_clock_bench",
141 bench_x86_32 = bench_x86 ++ bin_rcce_bt ++ bin_rcce_lu
143 bench_k1om = [ "/sbin/" ++ f | f <- [
144 "benchmarks/bomp_mm",
145 "benchmarks/dma_bench",
146 "benchmarks/xomp_share",
147 "benchmarks/xomp_spawn",
148 "benchmarks/xomp_work",
149 "benchmarks/xphi_ump_bench",
150 "benchmarks/xphi_xump_bench" ] ] ++ bench_x86
152 -- Default list of modules to build/install for all enabled architectures
153 modules_common = [ "/sbin/" ++ f | f <- [
163 -- List of modules that are arch-independent and always built
164 modules_generic = [ "/skb_ramfs.cpio.gz", "/sshd_ramfs.cpio.gz" ]
166 -- x86_64-specific modules to build by default
167 -- this should shrink as targets are ported and move into the generic list above
168 modules_x86_64 = [ "/sbin/" ++ f | f <- [
179 "block_server_client",
220 -- the following are broken in the newidc system
221 modules_x86_64_broken = [ "/sbin/" ++ f | f <- [
228 -- x86-32-specific module to build by default
229 modules_x86_32 = [ "/sbin/" ++ f | f <- [
242 "thc_v_flounder_empty",
250 "multihop_latency_bench",
253 "corectrl" ]] ++ bin_rcce_bt ++ bin_rcce_lu
255 modules_k1om = [ "/sbin/" ++ f | f <- [
261 -- ARMv7-a Pandaboard modules
262 pandaModules = [ "/sbin/" ++ f | f <- [
285 -- ARMv7-m Pandaboard modules
286 pandaM3Modules = [ "/sbin/" ++ f | f <- [
298 -- ARMv7-a modules for running under GEM5
299 gem5Modules = [ "/sbin/" ++ f | f <- [
314 -- Rules to build assorted platforms
317 platform "X86_64_Basic" [ "x86_64" ]
318 ([ ("x86_64", f) | f <- modules_x86_64 ]
320 [ ("", f) | f <- modules_generic])
321 "Basic 64-bit x86 PC build",
323 platform "X86_64_Benchmarks" [ "x86_64" ]
324 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64]
326 [ ("", f) | f <- modules_generic])
327 "64-bit x86 PC build with benchmarks",
329 platform "X86_64_Full" [ "x86_64" ]
330 ([ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64 ++ tests_x86_64 ]
332 [ ("", f) | f <- modules_generic])
333 "64-bit x86 PC build with benchmarks and test suites",
335 platform "X86_32_Basic" [ "x86_32" ]
336 ([ ("x86_32", f) | f <- modules_x86_32 ]
338 [ ("", f) | f <- modules_generic])
339 "Basic 32-bit x86 PC build",
341 platform "X86_32_Benchmarks" [ "x86_32" ]
342 ([ ("x86_32", f) | f <- modules_x86_32 ++ bench_x86_32]
344 [ ("", f) | f <- modules_generic])
345 "32-bit x86 PC build with benchmarks",
347 platform "X86_32_Full" [ "x86_32" ]
348 ([ ("x86_32", f) | f <- modules_x86_32 ++ bench_x86_32 ++ tests_x86_32 ]
350 [ ("", f) | f <- modules_generic])
351 "32-bit x86 PC build with benchmarks and test suites",
353 platform "K1OM_Basic" [ "k1om" ]
354 ([ ("k1om", f) | f <- modules_k1om ]
356 [ ("", f) | f <- modules_generic])
357 "Basic Xeon Phi build",
359 platform "K1OM_Benchmarks" [ "k1om" ]
360 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om]
362 [ ("", f) | f <- modules_generic])
363 "Xeon Phi build with benchmarks",
365 platform "K1OM_Full" [ "k1om" ]
366 ([ ("k1om", f) | f <- modules_k1om ++ bench_k1om ++ tests_k1om ]
368 [ ("", f) | f <- modules_generic])
369 "Xeon Phi build with benchmarks and test suites",
371 platform "PandaboardES" [ "armv7" ]
372 ([ ("armv7", f) | f <- pandaModules ] ++ [ ("root", "/pandaboard_image") ])
373 "Standard Pandaboard ES build image and modules",
375 platform "PandaboardES-Heterogeneous" [ "armv7", "armv7-m" ]
376 ([ ("armv7", f) | f <- pandaModules ] ++ [ ("root", "/pandaboard_het_image") ])
377 "Pandaboard ES with experimental heterogeneous (Cortex-M3) support",
379 platform "ARMv7-GEM5" [ "armv7" ]
380 ([ ("armv7", f) | f <- gem5Modules ] ++ [ ("root", "/arm_gem5_image") ])
381 "GEM5 emulator for ARM Cortex-A series multicore processors",
383 platform "ARMv5" [ "armv5" ]
384 ([ ("armv5", "/sbin/" ++ f) | f <- [ "cpu", "cpu.bin" ]])
385 "Very basic ARMv5 configuration for testing",
387 platform "ARM11MP" [ "arm11mp" ]
388 ([ ("arm11mp", "/sbin/" ++ f) | f <- [ "cpu", "cpu.bin" ]])
389 "Very basic ARM11MP configuration for testing",
391 platform "XScale" [ "xscale" ]
392 ([ ("xscale", "/sbin/" ++ f) | f <- [ "cpu_ixp2800", "cpu_ixp2800.bin" ]])
393 "Very basic XScale configuration for testing",
396 -- Rules to build assorted boot images
399 -- Build the default PandaBoard boot image
400 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
401 Str "--srcdir", NoDep SrcTree "root" "/.",
402 Str "--builddir", NoDep BuildTree "root" "/.",
403 Str "--menu", In SrcTree "tools" "/hake/menu.lst.pandaboard",
404 Str "--baseaddr", Str "0x82001000",
405 Str "--image", Out "root" "/pandaboard_image",
406 Str "--gcc", Str Config.arm_cc,
407 Str "--objcopy", Str Config.arm_objcopy,
408 Dep BuildTree "tools" "/bin/arm_molly"
409 ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
411 -- Build the (old) PandaBoard Cortex-M3 image
412 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
413 Str "--srcdir", NoDep SrcTree "root" "/.",
414 Str "--builddir", NoDep BuildTree "root" "/.",
415 Str "--menu", In SrcTree "tools" "/hake/menu.lst.armv7-m",
416 Str "--baseaddr", Str "0x00",
417 Str "--cflags", Str "\"-march=armv7-m -mcpu=cortex-m3 -mthumb\"",
418 Str "--image", Out "root" "/pandaboard_m3image_intermediate",
419 Str "--gcc", Str Config.arm_cc,
420 Str "--objcopy", Str Config.arm_objcopy,
421 Dep BuildTree "tools" "/bin/arm_molly"
422 ] ++ [ (Dep BuildTree "armv7-m" m) | m <- pandaM3Modules ]),
424 -- Convert slave image into a form we can insert in our image
425 Rule ([ Str "arm-linux-gnueabi-objcopy",
426 Str "-I", Str "binary",
427 Str "-O", Str "elf32-littlearm",
429 Str "--rename-section", Str (".data=.rodata_thumb,alloc,load" ++
430 ",readonly,data,contents"),
431 In BuildTree "root" "/pandaboard_m3image_intermediate",
432 Out "root" "/pandaboard_m3image" ]),
434 -- Build the PandaBoard Cortex-A9 image that includes the M3 image
435 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
436 Str "--srcdir", NoDep SrcTree "root" "/.",
437 Str "--builddir", NoDep BuildTree "root" "/.",
438 Str "-D", Str "HETEROPANDA",
439 Str "--menu", In SrcTree "tools"
440 "/hake/menu.lst.heteropanda_master",
441 Str "--baseaddr", Str "0x82001000",
442 Str "--extra", In BuildTree "root" "/pandaboard_m3image",
443 Str "--image", Out "root" "/pandaboard_het_image",
444 Str "--gcc", Str Config.arm_cc,
445 Str "--objcopy", Str Config.arm_objcopy,
446 Dep BuildTree "tools" "/bin/arm_molly"
447 ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
449 -- Build the ARM GEM5 simulation image
450 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
451 Str "--srcdir", NoDep SrcTree "root" "/.",
452 Str "--builddir", NoDep BuildTree "root" "/.",
453 Str "--menu", In SrcTree "tools" "/hake/menu.lst.arm_gem5_mc",
454 Str "--baseaddr", Str "0x00100000",
455 Str "--image", Out "root" "/arm_gem5_image",
456 Str "--gcc", Str Config.arm_cc,
457 Str "--objcopy", Str Config.arm_objcopy,
458 Dep BuildTree "tools" "/bin/arm_molly"
459 ] ++ [ (Dep BuildTree "armv7" m) | m <- gem5Modules ]),
462 -- Booting: various targets for booting Barrelfish under different circumstances
465 -- Copy menu.list files across
466 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
467 "root" ("/platforms/arm/menu.lst." ++ p)
473 "heteropanda_master",
476 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
477 "root" ("/platforms/x86/menu.lst." ++ p)
478 | p <- [ "x86_32", "x86_64", "k1om" ] ],
480 -- Convenient functions for running GEM5
481 boot "gem5_armv7" [ "armv7" ] [
483 In SrcTree "tools" "/tools/arm_gem5/gem5script.py",
487 NStr "--kernel=", In BuildTree "root" "/arm_gem5_image" ]
488 "Boot an ARMv7a multicore image in GEM5",
490 boot "gem5_armv7_detailed" [ "armv7" ] [
492 In SrcTree "tools" "/tools/arm_gem5/gem5script.py",
496 Str "--cpu-type=arm_detailed",
497 NStr "--kernel=", In BuildTree "root" "/arm_gem5_image" ]
498 "Boot an ARMv7a multicore image in GEM5 using a detailed CPU model",
500 boot "qemu_x86_64" [ "x86_64" ] [
501 In SrcTree "tools" "/tools/qemu-wrapper.sh",
502 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
503 Str "--arch", Str "x86_64" ]
504 "Boot QEMU in 64-bit x86 mode emulating a PC",
506 boot "qemu_x86_32" [ "x86_32" ] [
507 In SrcTree "tools" "/tools/qemu-wrapper.sh",
508 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_32",
509 Str "--arch", Str "x86_32" ]
510 "Boot QEMU in 32-bit x86 mode emulating a PC",
512 boot "qemu_x86_64_debug" [ "x86_64" ] [
513 In SrcTree "tools" "/tools/qemu-wrapper.sh",
514 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
515 Str "--arch", Str "x86_64",
516 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ]
517 "Boot QEMU under GDB in 64-bit x86 mode emulating a PC",
519 boot "qemu_x86_32_debug" [ "x86_32" ] [
520 In SrcTree "tools" "/tools/qemu-wrapper.sh",
521 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_32",
522 Str "--arch", Str "x86_32",
523 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ]
524 "Boot QEMU under GDB in 32-bit x86 mode emulating a PC",
526 boot "qemu_armv5" [ "armv5" ] [
527 In SrcTree "tools" "/tools/qemu-wrapper.sh",
528 Str "--kernel", In BuildTree "armv5" "/sbin/cpu.bin",
529 Str "--initrd", In BuildTree "armv5" "/romfs.cpio",
530 Str "--arch", Str "armv5" ]
531 "Boot QEMU as an ARMv5-based Integrator/CP board",
533 boot "qemu_armv5_debug" [ "armv5" ] [
534 In SrcTree "tools" "/tools/qemu-wrapper.sh",
535 Str "--kernel", In BuildTree "armv5" "/sbin/cpu.bin",
536 Str "--initrd", In BuildTree "armv5" "/romfs.cpio",
537 Str "--arch", Str "armv5",
538 Str "--debug", In SrcTree "tools" "/tools/debug.arm.gdb" ]
539 "Boot QEMU under GDB as an ARMv5-based Integrator/CP board",
541 boot "qemu_arm11mp" [ "arm11mp" ] [
542 In SrcTree "tools" "/tools/qemu-wrapper.sh",
543 Str "--kernel", In BuildTree "arm11mp" "/sbin/cpu.bin",
544 Str "--initrd", In BuildTree "arm11mp" "/romfs.cpio",
545 Str "--arch", Str "arm11mp" ]
546 "Boot QEMU as an ARM11MPCore-based Realview board"