c50814bedd2494aa53e49a5491dc08355ceafd33
[ikiwiki.git] / docs / developer / AMD64GSoC.mdwn
1 # Port DragonFly to the AMD64 architecture 
2
3 A [Google Summer of Code](http://code.google.com/soc/2008) project.
4
5 Student: Jordan Gordeev
6
7 Mentor: Matthew Dillon
8
9
10 # What's this all about? 
11
12 This project is about mixing DragonFly/i386 code and FreeBSD/amd64 code with human intelligence in order to produce DragonFly/amd64.
13
14
15
16 # What I promised to deliver 
17
18
19
20 1. Functioning 64-bit kernel (Linux emulation and NDIS wrapper support not included) - available by midterm
21
22 2. Working non-threaded 64-bit userland. - available by midterm
23
24 3. 64-bit SMP.
25
26 4. Working threaded 64-bit programs.
27
28 5. 64-bit vkernels.
29
30 6. 32-bit apps working on 64-bit kernels. - optional, if nothing goes wrong
31
32
33
34 # Where's the code? 
35
36 The code is in a Subversion repository available at svn://sometimes.studgrad.net/amd64.
37
38
39
40 # What's the current status? 
41
42
43 * The kernel crashes in the boot sequence soon after leavecrit.
44
45
46 * The serial console works.
47
48
49 * ddb supposedly works.
50
51
52 * Current hot areas: pmap & vm code.
53
54
55
56 # Various questions with answers 
57
58 Q:  **How do I build a 64-bit kernel for testing?** 
59
60 A: Execute the following steps:
61
62  1. `cd /usr/src`
63
64  1. `make TARGET_ARCH#amd64 TARGET_PLATFORMpc64 buildworld`
65
66  1. `make TARGET_ARCH#amd64 TARGET_PLATFORMpc64 KERNCONF=JG64 buildkernel`
67
68
69
70 Your kernel is now in `/usr/obj/usr/src/sys/AMD64_GENERIC/kernel.debug`.
71
72
73 Q:  **How do I boot the 64-bit kernel?** 
74
75 A: Copy the 64-bit kernel to a convenient location, e.g. '/kernel64'. Reboot your 64-bit system and at the loader menu choose option 6 (escape to prompt). Enter the following commands:
76
77  1. `unload`
78
79  1. `unset acpi_load`
80
81  1. `load /kernel64`
82
83  1. `boot`
84
85
86
87 Q: ***'I get an error when trying to boot the 64-bit kernel: "can't load file '/kernel64': input/output error". What's wrong?***'
88
89 A: Your boot loader isn't prepared to load a 64-bit kernel. You need to recompile and reinstall your boot loader.
90
91
92
93 If you've got other questions, add them here or e-mail me at jgordeev@dir.bg.
94