![Embedded Linux Development Using Yocto Project Cookbook(Second Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/294/36700294/b_36700294.jpg)
上QQ阅读APP看书,第一时间看更新
Looking at build history
Inspecting the Git directory with build history can be done in several ways:
- Using Git tools such as gitk or git log
- Using the buildhistory-diff command-line tool, which displays the differences in a human-readable format
- Using a Django-1.8-based web interface
To install the Django web interface on a development machine, you first need to install some host dependencies:
$ sudo apt-get install python3-django
$ sudo apt-get install python-django-registration
This will install Django 1.8 both for Python 2.7, and Python 3. The buildhistory-web interface will only currently work on Python 2.7 but the build history import script will need to run under Python 3 as that is what the Yocto 2.4 BitBake uses.
Now we can clone the web interface source and configure it:
$ cd /opt/yocto/fsl-community-bsp/sources $ git clone git://git.yoctoproject.org/buildhistory-web $ cd buildhistory-web/
Edit the settings.py file to change the path to the database engine:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/opt/yocto/fsl-community-bsp/sources/buildhistory-web/bhtest.db3', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } }
You then need to set up the Django application with:
$ python manage.py migrate
Next, import buildhistory as follows:
$ python3 warningmgr/import.py /opt/yocto/fsl-community-bsp/sources/poky/ /opt/yocto/fsl-community-bsp/wandboard/buildhistory/
The preceding command will need to be executed each time there is a new build.
And finally, start the web server on the localhost with:
$ python manage.py runserver
To bind it to a different IP address and port you can do:
$ python manage.py runserver <host>:<port>
But you will need to configure your settings.py accordingly with:
ALLOWED_HOSTS = [u'<host>']
$ python manage.py runserver <host>:<port>
But you will need to configure your settings.py accordingly with:
ALLOWED_HOSTS = [u'<host>']
The following image shows the Buildhistory web interface home page:
![](https://epubservercos.yuewen.com/782DAF/19470398708912006/epubprivate/OEBPS/Images/7223a22f-c2f1-4857-bd6f-932a77cfdcea.png?sign=1739299163-g9pDNxpOqZFirIhzDgfbLUpX9H7U5GJJ-0-b21b98f465a6683cf29a57b53520d881)
Buildhistory web interface