Project

General

Profile

Linux on Auerswald Commander Basic 2 » History » Version 9

laforge, 01/08/2020 03:17 PM

1 1 laforge
{{>toc}}
2
3
h1. Linux on Auerswald COMmander Basic2
4
5 2 laforge
This page is an attempt to document bits and pieces about the embedded Linux OS that runs on the [[Auerswald COMmander Basic2]] PBX. 
6
7
More speificially, it's an ARM/Linux based system running on a "Digi International NS9360":http://ftp1.digi.com/support/documentation/91001326_D.pdf ARM926 SoC built from PTXdist-0.7.5 
8 1 laforge
9 3 laforge
h2. Source Code
10
11
* the PTXdist 0.7.5 source code can be found at https://public.pengutronix.de/software/ptxdist/v0.7/
12
* Auerswald has released _GPL tarballs_ at http://data-1.auerswald.de/license/gpl/COMfortel_VoIP_250_DECT1040_COMfortel2500/2015/GPL_COMfortel_VoIP_250_DECT1040_VoIP_2500_150415.iso
13
14 1 laforge
h2. Serial Console
15
16 4 laforge
The ARM SoC has a serial console (ttyS2) at 3.3V.  It is running at 19200 bps and is exposed on test pads near the NS9630 on the PBX mainboard.
17 3 laforge
18 1 laforge
h3. Pinout
19 3 laforge
20 9 laforge
!{width:40%}auerswald_cb2_uart.jpg! !{width:40%}auerswald_cb2_uart2.jpg!
21
22
The pinout related to the orientation of the pictures is (from top to bottom):
23
24
|_.location|_.signal|
25
|top|GND|
26
|center|TxD (of CB2)|
27
|bottom|RxD (of CB2)|
28 1 laforge
29 6 laforge
h2. u-boot
30
31 1 laforge
h3. u-boot bootlog
32
33
<pre>
34
YABOL 1.3 (11:21:24Jan 17 2007)
35
hardware version: 01
36
checking for image mode...on... no
37
loading binary from NAND
38
binary loaded, starting...
39
40
41
U-Boot 1.1.2 (Aug  7 2006 - 08:23:30) FS.1-gds3.1
42
43
U-Boot code: 00F80000 -> 00F9D148  BSS: -> 00FA83DC
44
IRQ Stack: 00f5fb7c
45
FIQ Stack: 00f5eb7c
46
SDRAM-Size: 2000000 hex
47
RAM Configuration:
48
Bank #0: 00000000 32 MB
49
NAND:  64 MB
50
Init NAND-FLASH ....
51
Using default environment
52
53
In:    serial
54
Out:   serial
55
Err:   serial
56
57
Board revision 1 found
58
serial: 2448900276AU0123103800820H      
59
ethaddr: 00:09:52:00:d1:7f
60
ccode: 0
61
reserve:                                 
62
Checking for factory reset... no
63
Looking for boot partition...
64
reading marker block: ********
65
Checking Partition 1... OK
66
Hit any key to stop autoboot:  0 
67
Partition changed to 1
68
### JFFS2 loading 'boot/bas2boot.1.img' to 0x10000
69
Scanning JFFS2 FS: ......... done.
70
### JFFS2 load complete: 456 bytes loaded to 0x10000
71
## Executing script at 00010000
72
### JFFS2 loading 'boot/fpga_r1.bin' to 0x10000
73
### JFFS2 load complete: 75895 bytes loaded to 0x10000
74
75
FPGA Version @0x40088000: 11    .
76
### JFFS2 loading 'boot/uImage' to 0x10000
77
### JFFS2 load complete: 952212 bytes loaded to 0x10000
78
## Booting image at 00010000 ...
79
   Image Name:   Linux-2.6.11-fs.1-gds9.4
80
   Image Type:   ARM Linux Kernel Image (uncompressed)
81
   Data Size:    952148 Bytes = 929.8 kB
82
   Load Address: 00008000
83
   Entry Point:  00008000
84
   Verifying Checksum ... OK
85
OK
86
</pre>
87
88 5 laforge
h3. u-boot environment
89
90
<pre>
91
bootargs=console=ttyS1 ip=192.168.0.240::192.168.0.10:255.255.255.0 root=mtdblock/$(bootpart) ro rootfstype=jffs2
92
bootcmd=chpart $(bootpart);fsload boot/bas2boot.$(board_revision).img;autoscr;chpart $(backuppart);fsload boot/bas2boot.$(board_revision).img;autoscr;booterr 3 4 4
93
bootdelay=3
94
baudrate=19200
95
ipaddr=192.168.0.240
96
serverip=192.168.0.10
97
gatewayip=192.168.0.1
98
netmask=255.255.255.0
99
bootcmd_error=booterr 1 4 4
100
bootcmd_install=autoscr;mw.b 1000000 0 100;echo update failed;booterr 1 4 4
101
stdin=serial
102
stdout=serial
103
stderr=serial
104
board_revision=1
105
serial=2448900276AU0123103800820H
106
ethaddr=00:09:52:00:d1:7f
107
ccode=0
108
reserve=
109
bootpart=1
110
backuppart=2
111
</pre>
112 6 laforge
113
h2. boot script
114
115
<pre>
116 7 laforge
u-boot> fsload boot/bas2boot.1.img
117
u-boot> md 0x10000 80
118 6 laforge
00010000: 56190527 233f5c22 ffa86e5c 88010000    '..V"\?#\n......
119
00010010: 00000000 00000000 1b0005ea 01060205    ................
120
00010020: 00000000 00000000 00000000 00000000    ................
121
00010030: 00000000 00000000 00000000 00000000    ................
122
00010040: 80010000 00000000 6c746573 30206465    ........setled 0
123
00010050: 0a0a3320 6f6c7366 31206461 30303030     3..fsload 10000
124
00010060: 6f6f6220 70662f74 725f6167 69622e31     boot/fpga_r1.bi
125
00010070: 70660a6e 6c206167 2064616f 30312030    n.fpga load 0 10
126
00010080: 20303030 69662824 6973656c 0a29657a    000 $(filesize).
127
00010090: 6f686365 47504620 65562041 6f697372    echo FPGA Versio
128
000100a0: 3040206e 635c5c78 2e646d0a 30342062    n @0x\\c.md.b 40
129
000100b0: 30383830 31203030 65730a0a 766e6574    088000 1..setenv
130
000100c0: 6f6f6220 67726174 73616273 63206369     bootargsbasic c
131
000100d0: 6f736e6f 743d656c 32537974 3239312c    onsole=ttyS2,192
132
000100e0: 75203030 5f726573 75626564 35323d67    00 user_debug=25
133
000100f0: 65730a35 766e6574 6f6f6220 67726174    5.setenv bootarg
134
00010100: 64746d73 6f6f7220 746d3d74 6f6c6264    smtd root=mtdblo
135
00010110: 242f6b63 72617028 69746974 20296e6f    ck/$(partition) 
136
00010120: 72206f72 66746f6f 70797473 666a3d65    ro rootfstype=jf
137
00010130: 20327366 61687465 3d726464 74652824    fs2 ethaddr=$(et
138
00010140: 64646168 63202972 65646f63 6328243d    haddr) ccode=$(c
139
00010150: 65646f63 65732029 6c616972 7328243d    code) serial=$(s
140
00010160: 61697265 730a296c 6e657465 6f622076    erial).setenv bo
141
00010170: 7261746f 24207367 6f6f6228 67726174    otargs $(bootarg
142
00010180: 73616273 20296369 6f622824 7261746f    sbasic) $(bootar
143
00010190: 746d7367 0a0a2964 6f6c7366 31206461    gsmtd)..fsload 1
144
000101a0: 30303030 6f6f6220 49752f74 6567616d    0000 boot/uImage
145
000101b0: 7465730a 2064656c 0a322030 746f6f62    .setled 0 2.boot
146
000101c0: 3031206d 0a303030 5a2cf071 6b6b6b6b    m 10000.q.,Zkkkk
147
</pre>
148
149 7 laforge
h3. modified bootscript to get root shell
150
151
<pre>
152
u-boot> setled 0 3
153
u-boot> fsload 10000 boot/fpga_r1.bin
154
### JFFS2 loading 'boot/fpga_r1.bin' to 0x10000
155
### JFFS2 load complete: 75895 bytes loaded to 0x10000
156
u-boot> fpga load 0 10000 $(filesize)
157
u-boot> setenv bootargsbasic console=ttyS2,19200 user_debug=255 init=/bin/sh
158
u-boot> setenv bootargsmtd root=mtdblock/1 ro rootfstype=jffs2 ethaddr=$(ethaddr) ccode=$(ccode) serial=$(serial)
159
u-boot> setenv bootargs $(bootargsbasic) $(bootargsmtd)
160
u-boot> fsload 10000 boot/uImage
161
### JFFS2 loading 'boot/uImage' to 0x10000
162
### JFFS2 load complete: 952212 bytes loaded to 0x10000
163
u-boot> setled 0 2
164
u-boot> bootm 10000
165
</pre>
166 6 laforge
167
h2. kernel
168 5 laforge
169 1 laforge
h3. kernel bootlog
170
171
<pre>
172
Starting kernel ...
173
174
Uncompressing Linux............................................................... done, booting the kernel.
175
Linux version 2.6.11-fs.1-gds9.4 (build@build) (gcc version 3.4.2) #375 Fri Mar 5 09:55:24 CET 2010
176
CPU: ARM926EJ-Sid(wb) [41069264] revision 4 (ARMv5TEJ)
177
CPU0: D VIVT write-back cache
178
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
179
CPU0: D cache: 4096 bytes, associativity 4, 32 byte lines, 32 sets
180
Machine: A9M9360
181
Memory policy: ECC disabled, Data cache writeback
182
NS9360 Rev. 0, running at 154 MHz
183
Built 1 zonelists
184
Kernel command line: console=ttyS2,19200 user_debug=255 root=mtdblock/1 ro rootfstype=jffs2 ethaddr=00:09:52:00:d1:7f ccode=0 serial=2448900276AU0123103800820H
185
PID hash table entries: 256 (order: 8, 4096 bytes)
186
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
187
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
188
Memory: 32MB = 32MB total
189
Memory: 30352KB available (1602K code, 332K data, 80K init)
190
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
191
CPU: Testing write buffer coherency: ok
192
NET: Registered protocol family 16
193
i2c_ns: I2C ns9750 driver $Revision: 1.5 $ initializing
194
NetWinder Floating Point Emulator V0.97 (double precision)
195
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
196
devfs: boot_options: 0x1
197
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
198
JFFS2 version 2.2. (NAND) (SAFENAND) (SUMMARY) (C) 2001-2006 Red Hat, Inc.
199
NS9750 Watchdog initialized
200
Serial: NS9750 driver $Revision: 1.6 $
201
ttyS0 at MMIO 0xf9200000 (irq = 34) is a NS9xx0
202
ttyS1 at MMIO 0xf9200040 (irq = 36) is a NS9xx0
203
ttyS2 at MMIO 0xf9300000 (irq = 38) is a NS9xx0
204
ttyS3 at MMIO 0xf9300040 (irq = 40) is a NS9xx0
205
Serial: JTAG driver $Revision: 1.1 $
206
ttyJ0 at MMIO 0x0 (irq = 0) is a JTAGCOMM
207
io scheduler noop registered
208
io scheduler anticipatory registered
209
io scheduler deadline registered
210
io scheduler cfq registered
211
loop: loaded (max 8 devices)
212
Ethernet: NS9xx0 driver $Revision: 1.13.cbr $
213
NAND Flash memory mapped to virtual c2880000
214
NAND device: Manufacturer ID: 0x98, Chip ID: 0x76 (Toshiba NAND 64MiB 3,3V 8-bit)
215
Scanning device for bad blocks
216
Using static partition definition
217
Creating 5 MTD partitions on "basic.2":
218
0x00000000-0x00038000 : "U-BOOT"
219
0x00040000-0x01020000 : "System_1"
220
0x01020000-0x02000000 : "System_2"
221
0x02000000-0x04000000 : "Daten"
222
0x00038000-0x00040000 : "Service"
223
NS9360 udc driver
224
ns9360-udc ns9360-udc0: gadget driver initializing
225
i2c /dev entries driver
226
24c64: EEPROM driver $Revision: 1.1 $ initializing
227
NET: Registered protocol family 2
228
IP: routing cache hash table of 512 buckets, 4Kbytes
229
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
230
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
231
TCP: Hash tables configured (established 2048 bind 2048)
232
NET: Registered protocol family 1
233
Root-NFS: No NFS server available, giving up.
234
VFS: Unable to mount root fs via NFS, trying floppy.
235
VFS: Mounted root (jffs2 filesystem) readonly.
236
Mounted devfs on /dev
237
Freeing init memory: 80K
238
239
PTXdist-0.7.5 (2005-11-23T10:35:05+0100)
240
241
mounting /proc and /sys... done.
242
mounting filesystems... mount: WARNING: loop device is read-only
243
done.
244
preparing /data ...done.
245
basic system configuration... done.
246
starting the system logger... done.
247
starting network... [HWaddr: 00:09:52:00:d1:7f]
248
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/packet/af_packet.ko
249
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/ipv4/netfilter/ip_conntrack.ko
250
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/ipv4/netfilter/ip_tables.ko
251
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/ipv4/netfilter/iptable_filter.ko
252
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/ipv4/netfilter/iptable_nat.ko
253
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/ipv4/netfilter/ipt_MASQUERADE.ko
254
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/net/ipv4/netfilter/ipt_REDIRECT.ko
255
killall: vd: no process killed
256
killall: vmd: no process killed
257
done.
258
starting USB network port ... 
259
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/drivers/usb/gadget/g_ether.ko
260
killall: udhcpd: no process killed
261
udhcpd (v0.9.9-pre) started
262
done.
263
starting ppp... Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/drivers/net/slhc.ko
264
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/drivers/net/ppp_generic.ko
265
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/drivers/net/ppp_synctty.ko
266
Using /lib/modules/2.6.11-fs.1-gds9.4/kernel/drivers/char/n_hdlc.ko
267
done.
268
mounting nfs filesystems... done.
269
reading the hardware clock... 
270
Using /opt/auerswald/modules/auerrtc.ko
271
hwclock: Could not read time from RTC: Input/output error
272
date is invalid, setting default date
273
Tue May  1 00:00:00 CEST 2001
274
hwclock: Could not set the RTC time: Input/output error
275
starting network services... done.
276
Using /opt/auerswald/modules/auerlog.ko
277
Using /opt/auerswald/modules/hwtimer.ko
278
Using /opt/auerswald/modules/auertim.ko
279
Using /opt/auerswald/modules/auergb.ko
280
Using /opt/auerswald/modules/auermod.ko
281
Using /opt/auerswald/modules/isdnhdlc.ko
282
Using /opt/auerswald/modules/auerdsp.ko
283
Using /opt/auerswald/modules/auersicofi4.ko
284
Using /opt/auerswald/modules/auertdm.ko
285
Using /opt/auerswald/modules/auerab_all.ko
286
Using /opt/auerswald/modules/auers0basic.ko
287
Using /opt/auerswald/modules/auer4s0.ko
288
Using /opt/auerswald/modules/auer8up0.ko
289
Using /opt/auerswald/modules/auers2m.ko
290
Using /opt/auerswald/modules/auertsm_all.ko
291
Using /opt/auerswald/modules/auertoene.ko
292
Using /opt/auerswald/modules/auer_sscp.ko
293
Using /opt/auerswald/modules/auers0_hfc8s4s.ko
294
Using /opt/auerswald/modules/auer_voip.ko
295
</pre>
296 8 laforge
297
h2. Useful hints
298
299
h3. Activationg telnet/nfs server, NFS client
300
301
There's a file @/data/etc/network.conf@
302
<pre>
303
telnet-server: no
304
ftp-server: no
305
nfs-server: no
306
# nfs-mount: <host>:<path> <mountpoint>
307
dhcp-name: COMmander_Basic.2
308
</pre>
309
310
If you change the settings, you can enable telnet/nfs servers on the PBX itself (ftp binary is missing), or you can instruct it to mount a network share from a NFS server.  Those settings are processed by the init scripts.
311
312
The default NFS exports of the server in the PBX look like this:
313
<pre>
314
/ 192.168.21.0/24(sync,no_root_squash,rw)
315
/data 192.168.21.0/24(sync,no_root_squash,rw)
316
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)