This is an old revision of the document!
This set creates a Virtual Machine that contains Kernel CI and LAVA. Kernel CI is used to build, boot and report results where LAVA is used to offer a robust automated testing language, a testing engine and reporting results.
This tutorial assumes that you have the following installed on the host machine: * Vagrant * Virtualbox
1. Clone the board-at-desk-single-dev
repository
user@host ~$ https://gitlab.com/cip-project/board-at-desk-single-dev.git
user@host ~$ cd board-at-desk-single-dev
user@host ~/board-at-desk-single-dev$
2. Start the Virtual Machine
user@host ~/board-at-desk-single-dev$ vagrant up
3. SSH into the Virtual Machine
user@host ~/board-at-desk-single-dev$ vagrant ssh
4. Set up a Superuser for Lava Job maintenance.
vagrant@jessie:~$ sudo lava-server manage createsuperuser --username lavauser --email=lavauser@lava.co.uk
Password: mylava1234
Password (again): mylava1234
Superuser created successfully.
Note: Replace <lavauser> with your desired username and replace lavauser@lava.co.uk with that user’s email address. Select a password and enter it twice.
5. On your host machine, open a web browser and enter the following in the address box:
Note: Replace localhost with the IP Address of the Lava Server Virtual Machine.
6. The LAVA Home Page is displayed in your web browser. Log in to the web server as the superuser:
7. Click on Device Types under lava_scheduler_app
8. Click on the qemu device type
9. Copy and paste the contents of the file /vagrant/tests/qemu-health-check.yaml
into the Health check job textbox.
10. Click on the Save button in the lower right-hand corner of the page
Note: Once the health-check job is saved to the device type, the job is automatically started by LAVA.
11. Click on the bbb01 device type
12. Copy and past the contents of the file /vagrant/tests/beaglebone-black-health-check.yaml
into the Health check job textbox.
13. Click on the Save button in the lower right-hand corner of the page
14. Change to the git-repos directory
vagrant@guest:~$ cd git-repos
15. Clone the CIP Linux Kernel
vagrant@guest:~/git-repos$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-cip.git
16. Find the branch of the kernel version you want (i.e. 4.4.27)
vagrant@guest:~/git-repos$ cd linux-cip
vagrant@guest:~/git-repos/linux-cip$ git tag -l | grep 4.4.y
17. Create a new branch using that tag.
vagrant@guest:~/git-repos/linux-cip$ git checkout -b cip_v4.4.27 v4.4.27
18. Set the environment variables. You can create a tree name that describes your project. Select the Architecture of the target device (i.e. arm, arm64, mips, i386, amd64, etc…). Choose the cross compiler you need for that architecture.
vagrant@guest:~/git-repos/linux-cip$ export TREE_NAME=cip-test
vagrant@guest:~/git-repos/linux-cip$ export ARCH=arm
vagrant@guest:~/git-repos/linux-cip$ export CROSS_COMPILE=arm-linux-gnueabihf-
Note: Don't forget the dash (-) at the end of the CROSS_COMPILE
line!
19. Execute the build.py command, passing in the configuration you require for your project.
vagrant@guest:~/git-repos/linux-cip$ ~/kernelci-build/build.py -c tinyconfig -p CIP-KernelCI
20. Start the web server
vagrant@guest:/vagrant/scripts/start_webserver.sh &
21. On your host machine, open a web browser and enter the following in the address box:
22. You will see the KernelCI Website home page from which, you can navigate to the different builds and Trees that you've created (see Example Builds below)
23. Click on the Jobs button at the top of the page and you will see all of the available Trees
24. Click on the cip-tyrannosaurus Tree and you will see the list of available builds, or kernel versions.
25. Click on the v4.4.27 kernel and you will see the list of build configurations. The tinyconfig configuration is shown below, but the allnoconfig is also available.
26. The files that resulted from the build are available in the KernelCI website by navigating to the Tree Name, Kernel version, and Configuration. They are stored on the hard drive at:
/var/www/images/kernel-ci/TREE_NAME/KERNEL_VERSION/ARCH_CONFIG
For instance, for the build with the following parameters:
The files will be located at:
/var/www/images/kernel-ci/cip-tyrannosaurus/v4.4.27/arm-tinyconfig
Kernel CI generates the following files:
* build.log
shows the output of the build process to help track down any issues in compilation.
* kernel.config
holds the configuration of which features the kernel was built with.
* system.map
is the kernel's symbol table that is used to debug kernel runtime errors
* zImage
is the compressed kernel image to be installed on target device
* dtbs
directory which holds all of the generated Device Tree Binary's
27. Included in the /vagrant/scripts directory, there is a script named create_builds.sh. It clones the CIP Kernel and builds it with the following: Three different tree names and two different build configurations each.
* TREE_NAME=cip-tyrannosaurus
* TREE_NAME=cip-stegosaurus
* TREE_NAME=cip-triceratops