New device » Historial » Revisió 2
Revisió 1 (Pau Escrich, 09-04-2012 16:07) → Revisió 2/7 (Pau Escrich, 11-01-2013 17:09)
h1. New device
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.
* Get qmpfw (Firmware generator)
<pre>
git clone git://qmp.cat/qmpfw.git
</pre>
Or if you have developer access use "ssh://gitosis@qmp.cat/qmpfw.git" instead
* Execute menuconfig to checkout sources and launch the OpenWRT menuconfig
<pre>
make T=NEW_DEVICE_NAME menuconfig
</pre>
* Then enable/disable the desired options in menuconfig (remember to enable base/qmp-small-node or base/qmp-big-node)
* Exit and save
* Compile the sources
<pre>
make T=NEW_DEVICE_NAME build
</pre>
> If compilation sucees you will get an error in the last step (when trying to copy the output binaries into images/ directory).
> Don't worry, identify the name of the output binary: ls build/NEW_DEVICE_NAME/bin/*/
> 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
>
> <pre>
ifeq ($(T),nsm5)
NAME:=NanoStation M5
ARCH:=ar71xx
IMAGE:=bin/$(ARCH)/openwrt-ar71xx-ubnt-nano-m-squashfs-factory.bin
SYSUPGRADE:=bin/$(ARCH)/openwrt-ar71xx-ubnt-nano-m-squashfs-sysupgrade.bin
endif
</pre>
* Compile again
<pre>
make T=NEW_DEVICE_NAME build
</pre>
* If this time all works fine, copy the temporal config files
<pre>
cp -rf build/configs/NEW_DEVICE_NAME configs/
</pre>
* Then prepare the patch
<pre>
git add configs/NEW_DEVICE_NAME
git add targets.mk
git commit -m 'Support for new device NEW_DEVICE_NAME'
git diff > ../NEW_DEVICE_NAME.patch
</pre>
And send it to the developers list: qmp-dev@mail.qmp.cat