Skip to content

Commit

Permalink
local_testing: arm64 chroot setup commands fixes
Browse files Browse the repository at this point in the history
1. changed "distro" on few places with "chroot_distro" only in the sbuild section for consitensy in the whole section, because at some places was used "distro" on others "chroot_distro"
2. added "--foreign" option in the sbuild setup command for arm4 because its needed for cross architecture setups
3. again for the sbuild arm64 setup commant at the end switched to the webpage to "http://ports.ubuntu.com/ubuntu-ports/" for arm64 binaries
  • Loading branch information
beywolfff authored and doniks committed Sep 24, 2023
1 parent 39234e1 commit 21dcbb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions systemdev/testing-locally.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Create the directory ``~/logs`` if it does not exist, yet::

Creating a build chroot
^^^^^^^^^^^^^^^^^^^^^^^
In order to create a chroot based on Ubuntu 20.04 (Focal Fossa) with the amd64 architecture under the directory ``/srv/chroot/ubports-${distro}-amd64`` (``chroot_base`` can be changed if needed) the following variables can be defined for later use by the actual commands::
In order to create a chroot based on Ubuntu 20.04 (Focal Fossa) with the amd64 architecture under the directory ``/srv/chroot/ubports-${chroot_distro}-amd64`` (``chroot_base`` can be changed if needed) the following variables can be defined for later use by the actual commands::

chroot_distro=focal
chroot_base=/srv/chroot/ubports-${chroot_distro}-amd64
Expand All @@ -125,10 +125,10 @@ In both cases the chroot will be created by running the following command::

sudo sbuild-createchroot --components=main,restricted,universe --extra-repository="deb http://archive.ubuntu.com/ubuntu/ ${chroot_distro}-updates main restricted universe" --include=ccache "${chroot_distro}" "${chroot_base}" http://archive.ubuntu.com/ubuntu/

A chroot for cross-building arm64 packages on an amd64 host can e.g. be created under the directory ``/srv/chroot/ubports-${distro}-arm64`` using::
A chroot for cross-building arm64 packages on an amd64 host can e.g. be created under the directory ``/srv/chroot/ubports-${chroot_distro}-arm64`` using::

chroot_base=/srv/chroot/ubports-${distro}-arm64
sudo sbuild-createchroot --arch=arm64 --components=main,restricted,universe --extra-repository="deb http://ports.ubuntu.com/ubuntu-ports/ ${chroot_distro}-updates main restricted universe" --include=ccache "${chroot_distro}" "${chroot_base}" http://archive.ubuntu.com/ubuntu/
chroot_base=/srv/chroot/ubports-${chroot_distro}-arm64
sudo sbuild-createchroot --arch=arm64 --foreign --components=main,restricted,universe --extra-repository="deb http://ports.ubuntu.com/ubuntu-ports/ ${chroot_distro}-updates main restricted universe" --include=ccache "${chroot_distro}" "${chroot_base}" http://ports.ubuntu.com/ubuntu-ports/

For cross-building armhf packages the above command can be used with ``arm64`` changed to ``armhf``.

Expand Down

0 comments on commit 21dcbb0

Please sign in to comment.