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 "XScale" [ "xscale" ]
388 ([ ("xscale", "/sbin/" ++ f) | f <- [ "cpu_ixp2800", "cpu_ixp2800.bin" ]])
389 "Very basic XScale configuration for testing",
392 -- Rules to build assorted boot images
395 -- Build the default PandaBoard boot image
396 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
397 Str "--srcdir", NoDep SrcTree "root" "/.",
398 Str "--builddir", NoDep BuildTree "root" "/.",
399 Str "--menu", In SrcTree "tools" "/hake/menu.lst.pandaboard",
400 Str "--baseaddr", Str "0x82001000",
401 Str "--image", Out "root" "/pandaboard_image",
402 Str "--gcc", Str Config.arm_cc,
403 Str "--objcopy", Str Config.arm_objcopy,
404 Dep BuildTree "tools" "/bin/arm_molly"
405 ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
407 -- Build the (old) PandaBoard Cortex-M3 image
408 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
409 Str "--srcdir", NoDep SrcTree "root" "/.",
410 Str "--builddir", NoDep BuildTree "root" "/.",
411 Str "--menu", In SrcTree "tools" "/hake/menu.lst.armv7-m",
412 Str "--baseaddr", Str "0x00",
413 Str "--cflags", Str "\"-march=armv7-m -mcpu=cortex-m3 -mthumb\"",
414 Str "--image", Out "root" "/pandaboard_m3image_intermediate",
415 Str "--gcc", Str Config.arm_cc,
416 Str "--objcopy", Str Config.arm_objcopy,
417 Dep BuildTree "tools" "/bin/arm_molly"
418 ] ++ [ (Dep BuildTree "armv7-m" m) | m <- pandaM3Modules ]),
420 -- Convert slave image into a form we can insert in our image
421 Rule ([ Str "arm-linux-gnueabi-objcopy",
422 Str "-I", Str "binary",
423 Str "-O", Str "elf32-littlearm",
425 Str "--rename-section", Str (".data=.rodata_thumb,alloc,load" ++
426 ",readonly,data,contents"),
427 In BuildTree "root" "/pandaboard_m3image_intermediate",
428 Out "root" "/pandaboard_m3image" ]),
430 -- Build the PandaBoard Cortex-A9 image that includes the M3 image
431 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
432 Str "--srcdir", NoDep SrcTree "root" "/.",
433 Str "--builddir", NoDep BuildTree "root" "/.",
434 Str "-D", Str "HETEROPANDA",
435 Str "--menu", In SrcTree "tools"
436 "/hake/menu.lst.heteropanda_master",
437 Str "--baseaddr", Str "0x82001000",
438 Str "--extra", In BuildTree "root" "/pandaboard_m3image",
439 Str "--image", Out "root" "/pandaboard_het_image",
440 Str "--gcc", Str Config.arm_cc,
441 Str "--objcopy", Str Config.arm_objcopy,
442 Dep BuildTree "tools" "/bin/arm_molly"
443 ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
445 -- Build the ARM GEM5 simulation image
446 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
447 Str "--srcdir", NoDep SrcTree "root" "/.",
448 Str "--builddir", NoDep BuildTree "root" "/.",
449 Str "--menu", In SrcTree "tools" "/hake/menu.lst.arm_gem5_mc",
450 Str "--baseaddr", Str "0x00100000",
451 Str "--image", Out "root" "/arm_gem5_image",
452 Str "--gcc", Str Config.arm_cc,
453 Str "--objcopy", Str Config.arm_objcopy,
454 Dep BuildTree "tools" "/bin/arm_molly"
455 ] ++ [ (Dep BuildTree "armv7" m) | m <- gem5Modules ]),
458 -- Booting: various targets for booting Barrelfish under different circumstances
461 -- Copy menu.list files across
462 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
463 "root" ("/platforms/arm/menu.lst." ++ p)
469 "heteropanda_master",
472 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
473 "root" ("/platforms/x86/menu.lst." ++ p)
474 | p <- [ "x86_32", "x86_64", "k1om" ] ],
476 -- Convenient functions for running GEM5
477 boot "gem5_armv7" [ "armv7" ] [
479 In SrcTree "tools" "/tools/arm_gem5/gem5script.py",
483 NStr "--kernel=", In BuildTree "root" "/arm_gem5_image" ]
484 "Boot an ARMv7a multicore image in GEM5",
486 boot "gem5_armv7_detailed" [ "armv7" ] [
488 In SrcTree "tools" "/tools/arm_gem5/gem5script.py",
492 Str "--cpu-type=arm_detailed",
493 NStr "--kernel=", In BuildTree "root" "/arm_gem5_image" ]
494 "Boot an ARMv7a multicore image in GEM5 using a detailed CPU model",
496 boot "qemu_x86_64" [ "x86_64" ] [
497 In SrcTree "tools" "/tools/qemu-wrapper.sh",
498 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
499 Str "--arch", Str "x86_64" ]
500 "Boot QEMU in 64-bit x86 mode emulating a PC",
502 boot "qemu_x86_32" [ "x86_32" ] [
503 In SrcTree "tools" "/tools/qemu-wrapper.sh",
504 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_32",
505 Str "--arch", Str "x86_32" ]
506 "Boot QEMU in 32-bit x86 mode emulating a PC",
508 boot "qemu_x86_64_debug" [ "x86_64" ] [
509 In SrcTree "tools" "/tools/qemu-wrapper.sh",
510 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
511 Str "--arch", Str "x86_64",
512 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ]
513 "Boot QEMU under GDB in 64-bit x86 mode emulating a PC",
515 boot "qemu_x86_32_debug" [ "x86_32" ] [
516 In SrcTree "tools" "/tools/qemu-wrapper.sh",
517 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_32",
518 Str "--arch", Str "x86_32",
519 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ]
520 "Boot QEMU under GDB in 32-bit x86 mode emulating a PC",
522 boot "qemu_armv5" [ "armv5" ] [
523 In SrcTree "tools" "/tools/qemu-wrapper.sh",
524 Str "--kernel", In BuildTree "armv5" "/sbin/cpu.bin",
525 Str "--initrd", In BuildTree "armv5" "/romfs.cpio",
526 Str "--arch", Str "armv5" ]
527 "Boot QEMU as an ARMv5-based Integrator/CP board",
529 boot "qemu_armv5_debug" [ "armv5" ] [
530 In SrcTree "tools" "/tools/qemu-wrapper.sh",
531 Str "--kernel", In BuildTree "armv5" "/sbin/cpu.bin",
532 Str "--initrd", In BuildTree "armv5" "/romfs.cpio",
533 Str "--arch", Str "armv5",
534 Str "--debug", In SrcTree "tools" "/tools/debug.arm.gdb" ]
535 "Boot QEMU under GDB as an ARMv5-based Integrator/CP board"