Project

General

Profile

Compile-with-sercomm » History » Version 5

gnutoo, 02/19/2016 10:49 PM

1 4 gnutoo
To compile nuttx-bb with sercomm, do the following steps:
2 1 gnutoo
3
 * Clone osmocom-bb and nuttx-bb, they must reside in the same directory and you shouldn't change the name of the osmocom-bb directory.
4
{{{
5
git clone git://git.osmocom.org/osmocom-bb
6
git clone git://git.osmocom.org/nuttx-bb
7
}}}
8
 * Put the gnuarm(for 64bit) or the codesourcery(for 32bit)
9
  in your path(there is a problem with gnuarm for 32bit).
10
 * Compile osmocom-bb as usual
11
{{{
12
cd osmocom-bb/src
13
make
14
cd ../../
15
}}}
16
 * Compile nuttx-bb:
17
{{{
18
cd nuttx-bb/nuttx/tools/
19 2 gnutoo
./configure.sh compal_e88/nsh #for compal_e88( gta02 and Motorola W220).
20 3 gnutoo
./configure.sh compal_e99/nsh #for compal_e99( motorolla c155 )
21 1 gnutoo
cd ../
22
make
23
}}}
24 5 gnutoo
 * nuttx.bin is ready for beeing loaded like any other firmware (Loading nuttx-bb is not different from loading osmocom-bb, refer to the pages related to osmocom-bb for informations on how to load a firmware in your phone.)
25
26
== Running ==
27
Once you loaded nuttx-bb you should see the following appearing on sercomm:
28
{{{
29
[...]
30
Preparing block 61, block checksum is 0xda 
31
handle_write_block(): 1024 bytes (1024/1024)
32
handle_write_block(): Block 61 finished
33
Received block ack from phone
34
Preparing block 62, block checksum is 0xd8 
35
handle_write_block(): 1024 bytes (1024/1024)
36
handle_write_block(): Block 62 finished
37
Received block ack from phone
38
Preparing the last block, filling 386 bytes, block checksum is 0xaf 
39
handle_write_block(): 1024 bytes (1024/1024)
40
handle_write_block(): Block 63 finished
41
Finished, sent 63 blocks in total
42
Received block ack from phone
43
Sending checksum: 0x0e 
44
Checksum on phone side matches, let's branch to your code
45
Branching to 0x00820000
46
Received branch ack, your code is running now!
47
48
NuttShell (NSH)
49
50
}}}
51
To interact with it run the loadwriter.py script that can be found in nuttx/drivers/sercomm/loadwriter.py in the nuttx sources.
52
{{{
53
sudo ./loadwriter.py 
54
>help
55
}}}
56
will produce the following output on sercomm:
57
{{{
58
nsh> help
59
Builtin Apps: 
60
and type 'help' for more NSH commands.
61
62
NSH command forms:
63
  [nice [-d <niceness>>]] <cmd> [> <file>|>> <file>] [&]
64
OR
65
  if <cmd>
66
  then
67
    [sequence of <cmd>]
68
  else
69
    [sequence of <cmd>]
70
  fi
71
Where <cmd> is one of:
72
  [ <expression> ]
73
  cat <path> [<path> [<path> ...]]
74
  cp <source-path> <dest-path>
75
  dd if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors>] [skip=<sectors>]
76
  echo [<string> [<string>...]]
77
  exec <hex-address>
78
  exit
79
  free
80
  help
81
  kill -<signal> <pid>
82
  losetup [-d <dev-path>] | [[-o <offset>] [-r] <dev-path> <file-path>]
83
  ls [-lRs] <dir-path>
84
  mb <hex-address>[=<hex-value>][ <hex-byte-count>]
85
  mkfifo <path>
86
  mh <hex-address>[=<hex-value>][ <hex-byte-count>]
87
  mw <hex-address>[=<hex-value>][ <hex-byte-count>]
88
  ps
89
  sh <script-path>
90
  sleep <sec>
91
  test <expression>
92
  usleep <usec>
93
  xd <hex-address> <byte-count>
94
nsh> 
95
}}}
Add picture from clipboard (Maximum size: 48.8 MB)