Add armhf support.
ARM doesn't have a generic Linux image due to the soc-specific nature of Linux kernels today, so we drop the manual installation of that package, replacing it with a dist-upgrade instead. This involved tweaks to the dpkg and fedora install-package scripts. Change-Id: I97924b80ca87781307e1087b9fe4b18215770e84
This commit is contained in:
13
README.md
13
README.md
@@ -17,9 +17,12 @@ OpenStack itself. These live in the TripleO elements repository
|
|||||||
What tools are there?
|
What tools are there?
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
* disk-image-create -o filename {element} [{element} ...] : Create an image of
|
* disk-image-create [-a i386|amd64|armhf] -o filename {element} [{element} ...]
|
||||||
element {element}, optionally mixing in other elements. You will usually want
|
Create an image of element {element}, optionally mixing in other elements.
|
||||||
to include the "base" element in your image.
|
Element dependencies are automatically included. Support for other
|
||||||
|
architectures depends on your environment being able to run binaries of that
|
||||||
|
platform. For instance, to enable armhf on Ubuntu install the qemu-user-static
|
||||||
|
package.
|
||||||
|
|
||||||
* ramdisk-image-create -o filename {element} [{element} ...] : Create a kernel+
|
* ramdisk-image-create -o filename {element} [{element} ...] : Create a kernel+
|
||||||
ramdisk pair for running maintenance on bare metal machines (deployment,
|
ramdisk pair for running maintenance on bare metal machines (deployment,
|
||||||
@@ -108,13 +111,13 @@ part of the process you need to customise:
|
|||||||
to blindly overwrite but instead to adapt the context extracted by other
|
to blindly overwrite but instead to adapt the context extracted by other
|
||||||
elements.
|
elements.
|
||||||
|
|
||||||
* inputs: $ARCH=i386|amd64 $TARGET\_ROOT=/path/to/target/workarea
|
* inputs: $ARCH=i386|amd64|armhf $TARGET\_ROOT=/path/to/target/workarea
|
||||||
|
|
||||||
* cleanup.d: Perform cleanups of the root filesystem content. For instance,
|
* cleanup.d: Perform cleanups of the root filesystem content. For instance,
|
||||||
temporary settings to use the image build environment HTTP proxy are removed
|
temporary settings to use the image build environment HTTP proxy are removed
|
||||||
here in the dpkg element. Runs outside the chroot on the host environment.
|
here in the dpkg element. Runs outside the chroot on the host environment.
|
||||||
|
|
||||||
* inputs: $ARCH=i386|amd64 $TARGET\_ROOT=/path/to/target/workarea
|
* inputs: $ARCH=i386|amd64|armhf $TARGET\_ROOT=/path/to/target/workarea
|
||||||
|
|
||||||
* block-device-size.d: Alter the size (in GB) of the disk image. This is useful
|
* block-device-size.d: Alter the size (in GB) of the disk image. This is useful
|
||||||
when a particular element will require a certain minimum (or maximum) size.
|
when a particular element will require a certain minimum (or maximum) size.
|
||||||
|
@@ -32,7 +32,7 @@ source $_LIB/die
|
|||||||
|
|
||||||
function show_options () {
|
function show_options () {
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -a i386|amd64 -- set the architecture of the image"
|
echo " -a i386|amd64|armhf -- set the architecture of the image"
|
||||||
echo " -o filename -- set the name of the output file"
|
echo " -o filename -- set the name of the output file"
|
||||||
echo " -x -- turn on tracing"
|
echo " -x -- turn on tracing"
|
||||||
echo " -u -- uncompressed; do not compress the image - larger but faster"
|
echo " -u -- uncompressed; do not compress the image - larger but faster"
|
||||||
|
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
install-packages linux-image-generic vlan open-iscsi
|
install-packages vlan open-iscsi
|
||||||
|
7
elements/base/install.d/99-up-to-date
Executable file
7
elements/base/install.d/99-up-to-date
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Fully upgrade everything on the system (if the package manager knows how to
|
||||||
|
# do it).
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
install-packages -u
|
@@ -18,21 +18,17 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# install-packages package [package ...]
|
# install-packages package [package ...]
|
||||||
install_deb_packages() {
|
|
||||||
|
install_deb_packages () {
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
http_proxy=$http_proxy https_proxy=$https_proxy \
|
http_proxy=$http_proxy https_proxy=$https_proxy \
|
||||||
no_proxy=$no_proxy \
|
no_proxy=$no_proxy \
|
||||||
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes install "$@"
|
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
DISTRO=`lsb_release -si`
|
if [ "$1" = "-u" ] ; then
|
||||||
|
install_deb_packages dist-upgrade
|
||||||
case $DISTRO in
|
exit 0
|
||||||
'Ubuntu'|'Debian')
|
else
|
||||||
install_deb_packages $@
|
install_deb_packages install $@
|
||||||
;;
|
fi
|
||||||
*)
|
|
||||||
echo "Distribution not supported"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
@@ -17,9 +17,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "-u" ] ; then
|
||||||
|
yum -y update
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
yum -y install $(map-packages "$@")
|
yum -y install $(map-packages "$@")
|
||||||
for pkg in "$@"; do
|
for pkg in "$@"; do
|
||||||
if [[ "$pkg" == "python-pip" ]] ; then
|
if [ "$pkg" = "python-pip" ] ; then
|
||||||
alternatives --install /usr/bin/pip pip /usr/bin/pip-python 10
|
alternatives --install /usr/bin/pip pip /usr/bin/pip-python 10
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user