-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
233 lines (207 loc) · 6.98 KB
/
README
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# pmon
pmon2000 git for possible qemu use
Download toolchain from http://www.anheng.com.cn/loongson/pmon/
toolchain-pmon.tar.bz2
Unpack it, copy gcc-2.95 based cross-compiler to /usr
In pmon directory tree compile and install tools from /tools subdir
{they will go into /opt/pmon2000/tools}
Possibly modify Targets/Bonito2edev/conf/Bonito
I use:
# $Id: Bonito,v 1.1.1.1 2006/09/14 01:59:09 root Exp $ # # GENERIC configuration for Galileo EV64240 # # This file is supposed to be included by target file after # endian has been defined.
#
machine Bonito2edev mips # CPU Architecture, Platform
config pmon
#
# Define target endian
#
makeoptions ENDIAN=EL # Little endian version.
#include "conf/GENERIC_ALL"
#
# System Name and Target Name
#
option SYSTYPE="\"Bonito\""
option TARGETNAME="\"Bonito\""
#
# Platform options
#
option BONITOEL
option DEVBD2E
option MIPS
option INET
select mod_flash_amd # AMD flash device programming
select mod_flash_intel # intel flash device programming
select mod_flash_sst # intel flash device programming
select mod_debugger # Debugging module
select mod_symbols # Symbol table handling
select mod_s3load # Srecord loading
#select mod_fastload # LSI Fastload
select mod_elfload # ELF loading
#
# Command selection. Selects pmon commands
#
select cmd_newmt
select cmd_setup
select mod_display
select cmd_about # Display info about PMON
select cmd_boot # Boot wrapper
select cmd_mycmd
select cmd_xmodem
select ramfiles
select cmd_newmt
select cmd_cache # Cache enabling
select cmd_call # Call a function command
select cmd_date # Time of day command
select cmd_env # Full blown environment command set
select cmd_flash # Flash programming cmds
select cmd_hist # Command history
select cmd_ifaddr # Interface address command
select cmd_l # Disassemble
select cmd_mem # Memory manipulation commands
select cmd_more # More paginator
select cmd_mt # Simple memory test command
select cmd_misc # Reboot & Flush etc.
select cmd_stty # TTY setings command
select cmd_tr # Host port-through command
select cmd_devls # Device list
select cmd_set # As cmd_env but not req. cmd_hist
select cmd_testdisk
select cmd_test
select pmon_zmodem_rz
#
select cmd_shell # Shell commands, vers, help, eval
#
#
# Platform options
#
select mod_uart_ns16550 # Standard UART driver
#option CONS_BAUD=B9600
option CONS_BAUD=B115200
select ext2
select fatfs
#select mod_x86emu # X86 emulation for VGA
option MY40IO
#select mod_x86emu_int10
select mod_vgacon
select mod_framebuffer
option X640x480
option CONFIG_VIDEO_16BPP
option NOPCINAMES # Save some space for x86emu
option VIDEO_HW_BITBLT
option FASTBOOT
select vt82c686 #via686a/b code
#
# Functional options.
#
option NOSNOOP # Caches are no-snooping
#
# HAVE options. What tgt level provide
#
option HAVE_TOD # Time-Of-Day clock
option HAVE_NVENV # Platform has non-volatile env mem
option HAVE_LOGO # Output splash logo
option USE_SUPERIO_UART
#option USE_LEGACY_RTC
#option GODSONEV2A
#option LINUX_PC
#option LONGMENG
option RADEON7000
#option DEBUG_EMU_VGA
option AUTOLOAD
#option CONFIG_PCI0_LARGE_MEM
#option CONFIG_PCI0_HUGE_MEM
#option CONFIG_PCI0_GAINT_MEM
option CONFIG_CACHE_64K_4WAY
option NVRAM_IN_FLASH
#
# Now the Machine specification
#
mainbus0 at root
localbus0 at mainbus0
#fd0 at mainbus0
pcibr* at mainbus0
#pcibr1 at mainbus0
pci* at pcibr?
#ppb* at pci? dev ? function ? # PCI-PCI bridges
#pci* at ppb? bus ?
#### USB
#uhci* at pci? dev ? function ?
#### SCSI support
#siop* at pci? dev ? function ? # Symbios/NCR 53c...
#scsibus* at siop?
#sd* at scsibus? target ? lun ?
#cd* at scsibus? target ? lun ?
#### Networking Devices
#gt0 at localbus? base 4
#gt1 at localbus? base 5
#gt2 at localbus? base 6
# fxp normally only used for debugging (enable/disable both)
fxp* at pci? dev ? function ? # Intel 82559 Device
inphy* at mii? phy ? # Intel 82555 PHYs
rtl* at pci? dev ? function ?
uhci* at pci? dev ? function ?
#ohci0 at pci? dev ? function ?
usb* at usbbus ?
#ohci1 at pci? dev ? function ?
#ehci* at pci? dev ? function ?
select mod_usb
select mod_usb_storage
select mod_usb_uhci
#select mod_usb_ohci
select mod_usb_kbd
#select mod_usb_ehci
#### IDE controllers
pciide* at pci ? dev ? function ? flags 0x0000
atp* at pci? dev ? function ? #sata atp8620
sata* at atp?
#### IDE hard drives
wd* at pciide? channel ? drive ? flags 0x0000
#### Pseudo devices
pseudo-device loop 1 # network loopback
ide_cd* at pciide? channel ? drive ? flags 0x0001
select iso9660
option IDECD
#option HAVE_NB_SERIAL
option USE_ENVMAC
#option LOOKLIKE_PC
select cmd_lwdhcp
select cmd_bootp
option WDC_NORESET
option FOR_GXEMUL
select fatfs
option FLOATINGPT
select gzip
option VIA686B_POWERFIXUP
option INPUT_FROM_BOTH
option OUTPUT_TO_BOTH
option PCI_IDSEL_VIA686B=17
select http
select nfs
#select cmd_menu
#select ds1308
#select http
select tcp
select inet
#select tftpd
select raw_ether
#select cmd_testfire
#option COM3_BASE_ADDR=0xbe000000
#select e100
select mod_txt
select loop
-------------
cd into zloader.2edev dir, put build script there as well.
Compile it with build.sh script:
#!/bin/bash
export MKDEP=makedepend
export PATH=/usr/local/comp/mips-elf/gcc-2.95.3/bin/:$PATH
make cfg #ёьРВЕдЦГ
make tgt=ram
mv gzram pmon_ram.bin
make tgt=rom #ІъЙъЙХЦЖОДјю gzrom.bin
mv gzrom.bin pmon.bin
mkdir -d /var/lib/tftpboot
cp pmon.bin pmon_ram.bin /var/lib/tftpboot
LANG=C ./build.sh
there must be pmon.bin file in this directory.
Use it with fresh (4.0+) qemu like this:
qemu-system-mips64el -M fulong2e -bios /dev/shm/pmon/zloader.2edev/pmon.bin