Projecte

General

Perfil

Actions

Development Environment

To know how to set the basics for the development go to: http://qmp.cat/Development

Note: only tricks or hack articles in this wiki.

Compiling qMp from a previous git revision of the source code

To ensure maximum compatibility between the nodes in a network, all of them should run the same qMp firmware version (or, at least, very similar ones). To compile the firmware from a previous release (for example, revision 944c45d, do the following:

  • Get the qMp firmware generator using git:
    git clone git://qmp.cat/qmpfw.git qmpfw-r944c45d
  • Enter the source directory:
    cd qmpfw-r944c45d
  • Do a checkout specifying the revision:
    make .checkout_qmp QMP_GIT_BRANCH=%GIT_REVISION%

Example for revision 944c45d:

make .checkout_qmp QMP_GIT_BRANCH=944c45d

The result is:

git clone git://qmp.cat/qmp.git build/qmp
Cloning into 'build/qmp'...
remote: Counting objects: 8822, done.
remote: Compressing objects: 100% (4160/4160), done.
remote: Total 8822 (delta 4060), reused 7827 (delta 3544)
Receiving objects: 100% (8822/8822), 2.03 MiB | 670.00 KiB/s, done.
Resolving deltas: 100% (4060/4060), done.
Checking connectivity... done.
cd build/qmp; git checkout 944c45d; cd ..
Note: checking out '944c45d'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 944c45d... Import "Fix typo in RouterStationPro switch configuration".

However, git now is not in a branch, but in a detached state:

git --git-dir=build/qmp/.git branch

* (detached from 944c45d)
  master

A new local branch must be created. Otherwise compilation will most surely fail. The new local branch can be named pladebarris:

git --git-dir=build/qmp/.git checkout -b pladebarris

[...]
Switched to a new branch 'pladebarris'
  • [Optional] qMp is based on OpenWrt, which is also developed using revisions. The qMp firmware build process downloads, by default, the stable OpenWrt release with the latest revision (as of 4th January 2014, Attitude Adjustment revision 39154. It might be possible that an old revision of qMp would not work with the latest OpenWrt revision. If, for any reason, the qMp firmware must be built from a previous OpenWrt revision, the Makefile file must be edited:

Uncomment the OWRT_SVN_REV variable and specify the desired OpenWrt revision, for example r36842

OWRT_SVN_REV = 36842

Then add the OpenWrt revision declaration in every svn co $(OWRT_SVN)... or svn co ${OWRT_PKG_SVN}... command inside the Makefile:

[...]

define checkout_src
        svn --quiet co $(OWRT_SVN) $(BUILD_PATH)

[...]

define checkout_owrt_pkg_override
        svn --quiet co ${OWRT_PKG_SVN} $(BUILD_DIR)/packages.$(TARGET)

[...]

.checkout_owrt_pkg:
        svn --quiet co ${OWRT_PKG_SVN} $(BUILD_DIR)/packages

[...]

for

[...]

define checkout_src
        svn --quiet co --revision=$(OWRT_SVN_REV) $(OWRT_SVN) $(BUILD_PATH)

[...]

define checkout_owrt_pkg_override
        svn --quiet co --revision=$(OWRT_SVN_REV) ${OWRT_PKG_SVN} $(BUILD_DIR)/packages.$(TARGET)

[...]

.checkout_owrt_pkg:
        svn --quiet co --revision=$(OWRT_SVN_REV) ${OWRT_PKG_SVN} $(BUILD_DIR)/packages

[...]
  • And compile it specifying the target (follow the instructions above). For a Nanostation M5:
    make build T=nsm5

After that, you will find the images ready to install in your devices inside directory images/

Actualitzat per Jorge L. Florit fa aproximadament 10 anys · 25 revisions