-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
110 lines (76 loc) · 3.54 KB
/
README
File metadata and controls
110 lines (76 loc) · 3.54 KB
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
Standalone framework information
Version: @(#)README 1.9
Date: 4/17/15
---------------------------------------------------------------------------
Notes on the Makefile:
DO NOT USE makemake! You must edit the given Makefile to tell
it about the file(s) you create. Add your own file names (both
source and object versions) to the U_* macros at the top of the
Makefile.
After adding or removing files from the Makefile (or changing
your #includes), do a "make depend" to adjust the Makefile's
dependency entries.
To create your program:
* run 'make' in your project directory
To copy it onto a USB flash drive:
All machines in the DSL have at least two front-panel USB slots
located at the bottom on the front of the machine; some have a
third slot, located next to the floppy disk drive. Under Ubuntu,
you can use any of these slots; insert a flash drive, and the OS
automatically creates device entries for the drive, using the
next available disk name in /dev (e.g., /dev/sdg).
Because the name of the device in the filesystem varies depending
on the number and type of disk drives in the system, we use a
special program which identifies the flash device and then runs
'dd' to copy the image file to that device. This program runs
with GID 'disk', which has write permissions to the device files.
To copy your bootable image to the flash drive, plug the drive
into a USB socket, wait a few moments for Ubuntu to recognize
it and create the device entries in /dev, and type
make usb
This will remake the usb.image file (if necessary), and will then
usr /usr/local/dcs/dcopy to copy it to the flash drive.
To copy it onto a 3.5" floppy in the drive:
* run 'make floppy' in your project directory
To boot your program:
* be sure you have copied it to a bootable medium
* shut down Ubuntu by executing the 'uhalt' command
* insert the bootable medium
* push the reset button on the front of the machine
DO NOT just push the reset button - Ubuntu must be shut down
correctly in order to avoid damaging the filesystems.
To reboot Ubuntu:
* take your bootable medium out of the machine
* push the reset button
Compiling your program creates several files:
prog.o linked, object form of the system
prog.b binary version of the system - generated from prog.o
by removing all the object file headers and symbol table
prog.nl namelist of the prog.o file - lists all global symbols,
their values, and the program section they're defined in
(Text, Data, Bss)
prog.nlf
like prog.nl, but also lists local (e.g., static) symbols
*.image the binary system image - contains the bootstrap, the
protected mode startup code, and your stuff, in this layout:
bootstrap first sector
switch code second sector
your program sectors 3 through n+2
next file n+3 through p+n+2
next file p+n+3 through q+p+n+2
etc. (see below)
This file will be named floppy.image or usb.image,
depending on which device you'll be using.
BuildImage used to patch the system length into the boot sector
of the disk.image file
Other things you can 'make':
prog.dis a disassembly of the prog.o file - a text version of the
binary machine code
clean deletes all object, listing, and binary files
depend recreates the dependency lists in the Makefile
Loading additional files:
You can load additional files into memory by adding the name of
the file and the address where you want it loaded to the end of
the BuildImage command in the Makefile. However, because the
loading is done in real mode, you cannot load into addresses
above 0x9ffff.