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