-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathINSTALL
132 lines (90 loc) · 4.7 KB
/
INSTALL
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
BARE METAL INSTALL
This file describes the installation of CPMemu as bare metal application on the
Raspberry Pi. The build host is normally a Linux system.
REQUIREMENTS
You must be able to successfully build and run sample programs of a recent
version of the Circle bare metal environment on your Raspberry Pi. If not, go to
the following website and follow the instructions in the "README.md" file:
https://github.com/rsta2/circle
BUILDING
1. Before CPMemu can be built the Circle libraries must be built as noted in the
Circle instructions. The model number of your Raspberry Pi has to be chosen with
the "RASPPI" variable in Rules.mk or Config.mk. Further your keyboard map has to
be selected at the end of the file "include/circle/sysconfig.h". In the same
file you can enable multi-core support for the Raspberry Pi 2 and 3 (enable the
#define ARM_ALLOW_MULTI_CORE). After building the Circle standard libraries
using "makeall" you have to manually build the SDcard library. In the Circle
root directory enter:
cd addon/SDCard
make
If you want to change the Raspberry Pi model later, you have to "clean" all
Circle directories from libraries and object files first.
2. When Circle is successfully build for your Raspberry Pi, CPMemu has to be
configured so it can find the Circle directory on your disk. Load the file
"Makefile" (in the CPMemu root directory) into an editor and change the
following line according to your needs:
CIRCLEHOME ?= ../circle
Alternatively you can create a file "Config.mk" in the CPMemu root directory and
add this line (with the right path) to the new file. The file "Config.mk" will
be ignored by "git".
3. Now you can build CPMemu (including the "cpmdisk" tool). In the CPMemu root
directory enter:
make clean
make
INSTALLATION
If this step was successful, a file "kernel.img" was created in the CPMemu root
directory. This file has to be copied to the first FAT partition of a SD card
along with the firmware files as described in the Circle instructions.
4. Now the CP/M system has to be build. Just enter:
cd system/
make clean
make
This creates a file "system.bin" in the system/ subdirectory which has to be
copied to the first FAT partition of the SD card too.
Please note that the system is not build from scratch from .asm files because
this is only possible on a running CP/M system using the MAC macro assembler.
Instead the CP/M components are available in .hex files which may be replaced
later when you have CPMemu running.
5. At last the CP/M disk image file has to be prepared. Go to the CPMemu root
directory and enter:
./cpmdisk init
./cpmdisk write system/shutdown.com
This creates the file "cpmdisk.bin" and writes the file "system/shutdown.com" to
it. Because CP/M disks have only one directory it is saved without path there.
6. Now you can add more CP/M binaries and files to the disk image file. These
files do not come with CPMemu but have to be downloaded from archives on the
Internet (see the links in the "README.md" file). You should put all extracted
CP/M files, that you want, to an empty directory (say "cpmfiles") and enter:
./cpmdisk write cpmfiles/*
./cpmdisk dir
This writes all CP/M files to the disk image file "cpmdisk.bin" and displays the
CP/M directory afterwards.
7. Finally the file "cpmdisk.bin" has to be copied to the root directory of the
SD card.
With a recent version of Circle you can also select your keyboard map using the
file "cmdline.txt" on the SD card. See the file "doc/cmdline.txt" in the Circle
directory for details. If you want to supress the displayed multi-core log
messages you can do this by adding "loglevel=3" to "cmdline.txt".
RUNNING
Now you can put the SD card into your Raspberry Pi. You need a HDMI display and
an USB keyboard to use CPMemu. Both must be connected to your Raspberry Pi. Now
you can start it.
After some seconds the CP/M prompt "A>" is displayed and you can enter an
command:
A>dir
A>... (something else)
A>shutdown
The last command writes the CP/M disk image back to the SD card and shuts the
system down. Don't switch off the system before the green Act LED is switched
off. This may take some seconds. Otherwise the SD card may be corrupted.
UPDATE
This version of CPMemu optionally supports two CP/M disk drives. To use a second
disk drive you have to create a second disk image file "cpmdisk2.bin" as
follows:
./cpmdisk init -f cpmdisk2.bin
The file "cpmdisk2.bin" has to be copied to the root directory of the SD card
along with the other files. Please note that using a second disk drive may
increase the time needed for starting and shutdown.
If you do an update from a previous version, be sure to replace the file
"system.bin" on the SD card with the newly built version from the system/
subdirectory (see 4.)!