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 bench_common = [ "/sbin/" ++ f | f <- [
85 "flounder_stubs_buffer_bench",
86 "flounder_stubs_empty_bench",
87 "flounder_stubs_payload_bench",
90 bench_x86 = [ "/sbin/" ++ f | f <- [
91 "multihop_latency_bench",
94 "thc_v_flounder_empty",
104 bench_x86_64 = bench_x86 ++ bin_rcce_bt ++ bin_rcce_lu ++
105 [ "/sbin/" ++ f | f <- [
108 "benchmarks/bomp_mm",
109 "benchmarks/dma_bench",
110 "benchmarks/xomp_share",
111 "benchmarks/xomp_spawn",
112 "benchmarks/xomp_work",
113 "benchmarks/xphi_ump_bench",
117 "bulk_transfer_passthrough",
119 "bulkbench_micro_echo",
120 "bulkbench_micro_rtt",
121 "bulkbench_micro_throughput",
129 "phases_scale_bench",
132 "shared_mem_clock_bench",
135 bench_x86_32 = bench_x86 ++ bin_rcce_bt ++ bin_rcce_lu
138 -- Default list of modules to build/install for all enabled architectures
139 modules_common = [ "/sbin/" ++ f | f <- [
149 -- List of modules that are arch-independent and always built
150 modules_generic = [ "/skb_ramfs.cpio.gz", "/sshd_ramfs.cpio.gz" ]
152 -- x86_64-specific modules to build by default
153 -- this should shrink as targets are ported and move into the generic list above
154 modules_x86_64 = [ "/sbin/" ++ f | f <- [
165 "block_server_client",
204 ]] ++ modules_generic
206 -- the following are broken in the newidc system
207 modules_x86_64_broken = [ "/sbin/" ++ f | f <- [
214 -- x86-32-specific module to build by default
215 modules_x86_32 = [ "/sbin/" ++ f | f <- [
228 "thc_v_flounder_empty",
236 "multihop_latency_bench",
239 "corectrl" ]] ++ bin_rcce_bt ++ bin_rcce_lu
241 -- ARMv7-a Pandaboard modules
242 pandaModules = [ "/sbin/" ++ f | f <- [
265 -- ARMv7-m Pandaboard modules
266 pandaM3Modules = [ "/sbin/" ++ f | f <- [
278 -- ARMv7-a modules for running under GEM5
279 gem5Modules = [ "/sbin/" ++ f | f <- [
296 -- Rules to build assorted platforms
299 platform "X86_64_Basic" [ "x86_64" ]
300 [ ("x86_64", f) | f <- modules_x86_64 ]
301 "Basic 64-bit x86 PC build",
303 platform "X86_64_Benchmarks" [ "x86_64" ]
304 [ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64]
305 "64-bit x86 PC build with benchmarks",
307 platform "X86_64_Full" [ "x86_64" ]
308 [ ("x86_64", f) | f <- modules_x86_64 ++ bench_x86_64 ++ tests_x86_64 ]
309 "64-bit x86 PC build with benchmarks and test suites",
311 platform "X86_32_Basic" [ "x86_32" ]
312 [ ("x86_32", f) | f <- modules_x86_32 ]
313 "Basic 32-bit x86 PC build",
315 platform "X86_32_Benchmarks" [ "x86_32" ]
316 [ ("x86_32", f) | f <- modules_x86_32 ++ bench_x86_32]
317 "32-bit x86 PC build with benchmarks",
319 platform "X86_32_Full" [ "x86_32" ]
320 [ ("x86_32", f) | f <- modules_x86_32 ++ bench_x86_32 ++ tests_x86_32 ]
321 "32-bit x86 PC build with benchmarks and test suites",
323 platform "PandaboardES" [ "armv7" ]
324 ([ ("armv7", f) | f <- pandaModules ] ++ [ ("root", "/pandaboard_image") ])
325 "Standard Pandaboard ES build image and modules",
327 platform "PandaboardES-Heterogeneous" [ "armv7", "armv7-m" ]
328 ([ ("armv7", f) | f <- pandaModules ] ++ [ ("root", "/pandaboard_het_image") ])
329 "Pandaboard ES with experimental heterogeneous (Cortex-M3) support",
331 platform "ARMv7-GEM5" [ "armv7" ]
332 ([ ("armv7", f) | f <- gem5Modules ] ++ [ ("root", "/arm_gem5_image") ])
333 "GEM5 emulator for ARM Cortex-A series multicore processors",
335 platform "ARMv5" [ "armv5" ]
336 ([ ("armv5", "/sbin/" ++ f) | f <- [ "cpu", "cpu.bin" ]])
337 "Very basic ARMv5 configuration for testing",
339 platform "ARM11MP" [ "arm11mp" ]
340 ([ ("arm11mp", "/sbin/" ++ f) | f <- [ "cpu", "cpu.bin" ]])
341 "Very basic ARM11MP configuration for testing",
344 -- Rules to build assorted boot images
347 -- Build the default PandaBoard boot image
348 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
349 Str "--srcdir", NoDep SrcTree "root" "/.",
350 Str "--builddir", NoDep BuildTree "root" "/.",
351 Str "--menu", In SrcTree "tools" "/hake/menu.lst.pandaboard",
352 Str "--baseaddr", Str "0x82001000",
353 Str "--image", Out "root" "/pandaboard_image",
354 Dep BuildTree "tools" "/bin/arm_molly"
355 ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
357 -- Build the (old) PandaBoard Cortex-M3 image
358 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
359 Str "--srcdir", NoDep SrcTree "root" "/.",
360 Str "--builddir", NoDep BuildTree "root" "/.",
361 Str "--menu", In SrcTree "tools" "/hake/menu.lst.armv7-m",
362 Str "--baseaddr", Str "0x00",
363 Str "--cflags", Str "\"-march=armv7-m -mcpu=cortex-m3 -mthumb\"",
364 Str "--image", Out "root" "/pandaboard_m3image_intermediate",
365 Dep BuildTree "tools" "/bin/arm_molly"
366 ] ++ [ (Dep BuildTree "armv7-m" m) | m <- pandaM3Modules ]),
368 -- Convert slave image into a form we can insert in our image
369 Rule ([ Str "arm-linux-gnueabi-objcopy",
370 Str "-I", Str "binary",
371 Str "-O", Str "elf32-littlearm",
373 Str "--rename-section", Str ".data=.rodata_thumb,alloc,load,readonly,data,contents",
374 In BuildTree "root" "/pandaboard_m3image_intermediate",
375 Out "root" "/pandaboard_m3image" ]),
377 -- Build the PandaBoard Cortex-A9 image that includes the M3 image
378 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
379 Str "--srcdir", NoDep SrcTree "root" "/.",
380 Str "--builddir", NoDep BuildTree "root" "/.",
381 Str "-D", Str "HETEROPANDA",
382 Str "--menu", In SrcTree "tools" "/hake/menu.lst.heteropandaboard",
383 Str "--baseaddr", Str "0x82001000",
384 Str "--extra", In BuildTree "root" "/pandaboard_m3image",
385 Str "--image", Out "root" "/pandaboard_hetero_image",
386 Dep BuildTree "tools" "/bin/arm_molly"
387 ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
389 -- Build the ARM GEM5 simulation image
390 Rule ([ In SrcTree "tools" "/tools/arm_molly/build_pandaboard_image.sh",
391 Str "--srcdir", NoDep SrcTree "root" "/.",
392 Str "--builddir", NoDep BuildTree "root" "/.",
393 Str "--menu", In SrcTree "tools" "/hake/menu.lst.arm_gem5_mc",
394 Str "--baseaddr", Str "0x00100000",
395 Str "--image", Out "root" "/arm_gem5_image",
396 Dep BuildTree "tools" "/bin/arm_molly"
397 ] ++ [ (Dep BuildTree "armv7" m) | m <- gem5Modules ]),
400 -- Booting: various targets for booting Barrelfish under different circumstances
403 -- Copy menu.list files across
404 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
405 "root" ("/platforms/arm/menu.lst." ++ p)
411 "heteropanda_master",
414 Rules [ copyFile SrcTree "root" ("/hake/menu.lst." ++ p)
415 "root" ("/platforms/x86/menu.lst." ++ p)
416 | p <- [ "x86_32", "x86_64", "k1om" ] ],
418 -- Convenient functions for running GEM5
419 boot "gem5_armv7" [ "armv7" ] [
421 In SrcTree "tools" "/tools/arm_gem5/gem5script.py",
425 NStr "--kernel=", In BuildTree "root" "/arm_gem5_image" ]
426 "Boot an ARMv7a multicore image in GEM5",
428 boot "gem5_armv7_detailed" [ "armv7" ] [
430 In SrcTree "tools" "/tools/arm_gem5/gem5script.py",
434 Str "--cpu-type=arm_detailed",
435 NStr "--kernel=", In BuildTree "root" "/arm_gem5_image" ]
436 "Boot an ARMv7a multicore image in GEM5 using a detailed CPU model",
438 boot "qemu_x86_64" [ "x86_64" ] [
439 In SrcTree "tools" "/tools/qemu-wrapper.sh",
440 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
441 Str "--arch", Str "x86_64" ]
442 "Boot QEMU in 64-bit x86 mode emulating a PC",
444 boot "qemu_x86_32" [ "x86_32" ] [
445 In SrcTree "tools" "/tools/qemu-wrapper.sh",
446 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_32",
447 Str "--arch", Str "x86_32" ]
448 "Boot QEMU in 32-bit x86 mode emulating a PC",
450 boot "qemu_x86_64_debug" [ "x86_64" ] [
451 In SrcTree "tools" "/tools/qemu-wrapper.sh",
452 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_64",
453 Str "--arch", Str "x86_64",
454 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ]
455 "Boot QEMU under GDB in 64-bit x86 mode emulating a PC",
457 boot "qemu_x86_32_debug" [ "x86_32" ] [
458 In SrcTree "tools" "/tools/qemu-wrapper.sh",
459 Str "--menu", In BuildTree "root" "/platforms/x86/menu.lst.x86_32",
460 Str "--arch", Str "x86_32",
461 Str "--debug", In SrcTree "tools" "/tools/debug.gdb" ]
462 "Boot QEMU under GDB in 32-bit x86 mode emulating a PC",
464 boot "qemu_armv5" [ "armv5" ] [
465 In SrcTree "tools" "/tools/qemu-wrapper.sh",
466 Str "--kernel", In BuildTree "armv5" "/sbin/cpu.bin",
467 Str "--initrd", In BuildTree "armv5" "/romfs.cpio",
468 Str "--arch", Str "armv5" ]
469 "Boot QEMU as an ARMv5-based Integrator/CP board",
471 boot "qemu_armv5_debug" [ "armv5" ] [
472 In SrcTree "tools" "/tools/qemu-wrapper.sh",
473 Str "--kernel", In BuildTree "armv5" "/sbin/cpu.bin",
474 Str "--initrd", In BuildTree "armv5" "/romfs.cpio",
475 Str "--arch", Str "armv5",
476 Str "--debug", In SrcTree "tools" "/tools/debug.arm.gdb" ]
477 "Boot QEMU under GDB as an ARMv5-based Integrator/CP board",
479 boot "qemu_arm11mp" [ "arm11mp" ] [
480 In SrcTree "tools" "/tools/qemu-wrapper.sh",
481 Str "--kernel", In BuildTree "arm11mp" "/sbin/cpu.bin",
482 Str "--initrd", In BuildTree "arm11mp" "/romfs.cpio",
483 Str "--arch", Str "arm11mp" ]
484 "Boot QEMU as an ARM11MPCore-based Realview board"