master project to build poky system images
Go to file
Pau Espin 819c17e138 Makefile: run 'bitbake package-index' after bitbake command building packages
It was recently spotted that during a build of 201705-testing where
sysmocom-openvpn-config was being rebuilt, the Packages(.gz) files
(opkg package indexes) were rebuilt before the new .ipk files for
sysmocom-openvpn-config were written to disk. Also then the Packages
file didn't contain a reference to the new sysmocom-openvpn-config
package version. So, it seems there was a race condition where the
package index was built too early.

Yocto documentation provides some hints:
https://docs.yoctoproject.org/dev-manual/packages.html?highlight=bitbake+package+index#build-considerations
"""
Whenever you perform any sort of build step that can potentially generate
a package or modify existing package, it is always a good idea to
re-generate the package index after the build by using the following
command: bitbake package-index
Do not do "$ bitbake some-package package-index" as BitBake does not schedule
the package index for after the completion of the package you are building.
Consequently, you cannot be sure of the package index including
information for the package you just built. Thus, be sure to run the
package update step separately after building any packages.
"""

So far it seems we were relying on the "create filesystem" task
triggered for image creation which would also trigger the package index
recreation, according to
https://yocto.yoctoproject.narkive.com/rjvLrVpW/question-about-rebuilding-rpm-package-index-for-updated-rpms-when-bitbake-completes
"""
The feed is normally indexed (createrepo) either when you manually run the
package-index operation, or when you construct a filesystem. Until you do that,
the feed directories are transient.
"""

Related: SYS#6023
2023-06-22 16:24:09 +02:00
cfg Revert "HACK: disable dahdi on alix/apu2 builds, too." 2019-12-23 11:40:52 +01:00
scripts Revert "upload-build.sh: Create upload directory before using rsync" 2018-01-19 17:09:33 +01:00
.gitignore gitignore: Add downloads dir 2017-08-06 23:27:51 +08:00
Makefile Makefile: run 'bitbake package-index' after bitbake command building packages 2023-06-22 16:24:09 +02:00
README Add scripts and rules for server side handling 2017-08-03 18:44:46 +08:00

README

Scripts and documentation for building system images for our target platforms. The
goal is to help anyone checking out the right repositories, configuring a target
and build the images that are built by CI (in fact CI will use these scripts).

The central piece is a Makefile that helps to:

	* Git clone the necessary layers
	* Update/git pull --rebase all of them
	* Set-up the build as used by sysmocom
	* Configure .ssh/config for uploading to sysmocom
	* Do the upload
	* Clean after a build

The bblayers.conf is created from a template located in cfg/ and the local.conf
will be created by using Poky's oe-init-build-env and then files from cfg/common/*
and cfg/BOARD/*. Files will be sorted in their alphabetically sort order and first
come from the common directory and then the board specific one. At the end an include
directive will be issued.


Using the Makefile:

	$ make help
	...

Example of building everything

	# make install-ssh-config SSH_HOST=build-upload.foo.bar SSH_PORT=2342
	$ make setup-all V=1
	... git clone
	... git pull --rebase
	... creating build directories

	For the sysmobts firmware needs to be copied to the downloads directory.
	As a customer you should have received instructions for doing it and as
	an employee it should be mentioned in the wiki

	$ make build-all	# Build for all boards the default targets
	...

	$ make upload-all	# Make an upload to testing for all boards
	...

	$ make clean-all	# Clean the tmp directory for all boards
	...


Server side set-up:

On the server we need scripts to copy from -testing to -stable. It is a simple
script and it is the easiest if we bind it to ssh keys. It should be a self
service for the developers.

....
command="/home/user/system-images/scripts/dispatch.sh" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7ZJ339MQh1ctTP3UyRQSpdjcJmG8tafd+akq6cmplSuG6j8BZH38u38Zvf7+WLvMBsluujfj7lkuPA/vzP5c6YHBBWOoT+5moRxpEdLXzUPzxA2l+1Nfgd+pd4mvmV9WI22dY6mtDXtOZxXoG8sAXZe/RoUN9MTzayJVkUtp76SW5eiVT519kQGRRaHEFvEqis9t9K5wJN/CVD7uDudpel0ljtkRh4K0KFTUJLVG7bXu5CAOc61JGoeoAb0z/0DL5Nnlxe9P9eMHKqFSqC97xovtRGy1U+2EAVuWY2N32G0VuXpIisBrx/FGxChWp3V5q5KurlkrnV/Rq3dBmKwykAYTQRMrx6mMatiAxFnVnkXYnjFwGC5AdEO2iw865TJ1riv6uZsDviVxFK79BQnkLkFBNLWdfIiYP2j4mMSGsK4xpDXUFAP7xDoVzLO1ZyaJcqF/DCyS4sZ/cYcj0lW2pKxSkFE4Mv2zO4Zwgu7t1EmKjR6SDfzZ+wfSfcjAytwA9l6NfMlLvMy1bL+b5I4UHvZJD1nxpdzByKuTZ11/6o/BN+anrj+SqsXUrD7k9q3LhdMMAJf3lxG0ZVV81FZm6jh/XsO9FwoAzXwqezeJpnaNSqb4alYl/P/7xoFuNQjxZmomROIFMdOAOL8ius+Bz28k1va93tSgkPpr6YUJBaQ== .ssh/id_rsa-new
....