Projecte

General

Perfil

New device » Historial » Versió 4

Roger Pueyo Centelles, 23-05-2014 14:55

1 1 Pau Escrich
h1. New device
2
3 2 Pau Escrich
This howto explains how to port a new device to the qMp firmware generator. It is required to have a UNIX based system with GNU-Make intalled.
4 1 Pau Escrich
5
* Get qmpfw (Firmware generator)
6
<pre>
7
git clone git://qmp.cat/qmpfw.git
8
</pre>
9 4 Roger Pueyo Centelles
Or if you have developer access use, instead:
10
<pre>
11
git clone gitolite@qmp.cat:qmpfw.git
12
</pre>
13
14
 "ssh://gitolite@qmp.cat:qmpfw.git" instead
15 1 Pau Escrich
16
* Execute menuconfig to checkout sources and launch the OpenWRT menuconfig
17
<pre>
18
make T=NEW_DEVICE_NAME menuconfig
19
</pre> 
20
21
* Then enable/disable the desired options in menuconfig (remember to enable base/qmp-small-node or base/qmp-big-node)
22
23
* Exit and save
24
25
* Compile the sources
26
<pre>
27
make T=NEW_DEVICE_NAME build
28
</pre>
29
30
> If compilation sucees you will get an error in the last step (when trying to copy the output binaries into images/ directory).
31
> Don't worry, identify the name of the output binary: ls build/NEW_DEVICE_NAME/bin/*/
32
> Then modify targets.mk with some text editor, and add the new entry for your device as shown in the next example for Nanostation M5
33
> 
34
> <pre>
35
 ifeq ($(T),nsm5)
36
 NAME:=NanoStation M5
37
 ARCH:=ar71xx
38
 IMAGE:=bin/$(ARCH)/openwrt-ar71xx-ubnt-nano-m-squashfs-factory.bin
39
 SYSUPGRADE:=bin/$(ARCH)/openwrt-ar71xx-ubnt-nano-m-squashfs-sysupgrade.bin
40
 endif 
41
</pre>
42
43
* Compile again
44
<pre>
45
make T=NEW_DEVICE_NAME build
46
</pre>
47
48
* If this time all works fine, copy the temporal config files
49
<pre>
50
cp -rf build/configs/NEW_DEVICE_NAME configs/
51
</pre>
52
53
* Then prepare the patch
54
<pre>
55
git add configs/NEW_DEVICE_NAME
56
git add targets.mk
57
git commit -m 'Support for new device NEW_DEVICE_NAME'
58
git diff > ../NEW_DEVICE_NAME.patch
59
</pre>
60
And send it to the developers list: qmp-dev@mail.qmp.cat