Projecte

General

Perfil

New device » Historial » Versió 5

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

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 1 Pau Escrich
15
* Execute menuconfig to checkout sources and launch the OpenWRT menuconfig
16
<pre>
17
make T=NEW_DEVICE_NAME menuconfig
18
</pre> 
19
20
* Then enable/disable the desired options in menuconfig (remember to enable base/qmp-small-node or base/qmp-big-node)
21
22
* Exit and save
23
24
* Compile the sources
25
<pre>
26
make T=NEW_DEVICE_NAME build
27
</pre>
28
29
> If compilation sucees you will get an error in the last step (when trying to copy the output binaries into images/ directory).
30
> Don't worry, identify the name of the output binary: ls build/NEW_DEVICE_NAME/bin/*/
31
> 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
32
> 
33
> <pre>
34
 ifeq ($(T),nsm5)
35
 NAME:=NanoStation M5
36
 ARCH:=ar71xx
37
 IMAGE:=bin/$(ARCH)/openwrt-ar71xx-ubnt-nano-m-squashfs-factory.bin
38
 SYSUPGRADE:=bin/$(ARCH)/openwrt-ar71xx-ubnt-nano-m-squashfs-sysupgrade.bin
39
 endif 
40
</pre>
41
42
* Compile again
43
<pre>
44
make T=NEW_DEVICE_NAME build
45
</pre>
46
47
* If this time all works fine, copy the temporal config files
48
<pre>
49
cp -rf build/configs/NEW_DEVICE_NAME configs/
50
</pre>
51
52
* Then prepare the patch
53
<pre>
54
git add configs/NEW_DEVICE_NAME
55
git add targets.mk
56
git commit -m 'Support for new device NEW_DEVICE_NAME'
57
git diff > ../NEW_DEVICE_NAME.patch
58
</pre>
59
And send it to the developers list: qmp-dev@mail.qmp.cat