aboutsummaryrefslogtreecommitdiff
path: root/docs/Project-structure-explained.md
blob: 7dc0789b374d412f60f8022f769a04c494fdb6c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
## Project structure
Directory structure of the project:

    doc/
    build/
          Makefile
    Makefile
    src/
        lib/
            rs232/
                  rs232.c
                  rs232.h
        host/
             pipe_image.c
             makefs.c
        arm/
            common/
                   svc_interface.h
                   strings.c
                   io.h
                   io.c
                   strings.h
            PL0/
                PL0_utils.h
                svc.S
                PL0_utils.c
                PL0_test.c
                PL0_test.ld
            PL1/
                loader/
                       loader_stage2.ld
                       loader_stage2.c
                       loader_stage1.S
                       loader.ld
                kernel/
                       demo_functionality.c
                       paging.h
                       setup.c
                       interrupts.h
                       interrupt_vector.S
                       kernel.ld
                       scheduler.h
                       atags.c
                       translation_table_descriptors.h
                       bcmclock.h
                       ramfs.c
                       kernel_stage1.S
                       paging.c
                       ramfs.h
                       interrupts.c
                       armclock.h
                       atags.h
                       kernel_stage2.ld
                       cp_regs.h
                       psr.h
                       scheduler.c
                       memory.h
                       demo_functionality.h
                PL1_common/
                           global.h
                           uart.h
                           uart.c


### Most Significant Directories

doc/
   Contains documentation of the project.

build/
   Contains main Makefile of the project. All objects created during the build process are placed there.

Makefile
    Proxies all calls to Makefile in build/.
    
src/
    Contains all sources of the project.

src/host/
    Contains sources of helper programs to be compiled using native GCC and run on the machine where development takes place.
    
src/arm/
    Contains sources to be compiled using ARM cross-compiler GCC and run on the RaspberryPi.

src/arm/common
    Contains sources used in both: privileged mode and unprivileged mode.

src/arm/PL0
    Contains sources used exclusively in unprivileged, user-mode (PL0) program, as well as the program's linker script.
    
src/arm/PL1
    Contains sources used exclusively in privileged (PL1) mode.
    
src/arm/PL1/loader
    Contains sources used exclusively in the bootloader, as well as linker scripts for stages 1 and 2 of this bootloader.
    
src/arm/PL1/kernel
    Contains sources used exclusively in the kernel, as well as linker scripts for stages 1 and 2 of this kernel.
    
src/arm/PL1/PL1_common
    Contains sources used in both: kernel and bootloader.