diff options
-rw-r--r-- | clusters/installer-build-system-x86_64.morph | 46 | ||||
-rwxr-xr-x | installer.configure | 48 | ||||
-rw-r--r-- | strata/bsp-armv7-highbank.morph | 4 | ||||
-rw-r--r-- | strata/bsp-armv7-versatile.morph | 4 | ||||
-rw-r--r-- | strata/bsp-armv7b-highbank.morph | 4 | ||||
-rw-r--r-- | strata/bsp-armv7b-vexpress-tc2.morph | 4 | ||||
-rw-r--r-- | strata/bsp-jetson.morph | 7 | ||||
-rw-r--r-- | strata/bsp-ppc64-generic.morph | 4 | ||||
-rw-r--r-- | strata/bsp-wandboard.morph | 4 | ||||
-rw-r--r-- | strata/bsp-x86_32-generic.morph | 4 | ||||
-rw-r--r-- | strata/bsp-x86_64-generic.morph | 4 | ||||
-rw-r--r-- | strata/foundation/systemd.morph | 2 | ||||
-rw-r--r-- | strata/input-common.morph | 14 | ||||
-rw-r--r-- | strata/installer-utils.morph | 12 | ||||
-rw-r--r-- | strata/installer-utils/installer-scripts.morph | 4 | ||||
-rw-r--r-- | strata/morph-utils.morph | 2 | ||||
-rw-r--r-- | systems/installer-system-x86_64.morph | 22 |
17 files changed, 160 insertions, 29 deletions
diff --git a/clusters/installer-build-system-x86_64.morph b/clusters/installer-build-system-x86_64.morph new file mode 100644 index 00000000..b31caced --- /dev/null +++ b/clusters/installer-build-system-x86_64.morph @@ -0,0 +1,46 @@ +name: installer-build-system-x86_64 +kind: cluster +description: | + This is a cluster morphology that can be used to deploy + installer systems. This is done by adding the files needed + using a manifest file (installer/manifest) with the INSTALL_FILES + extension, and using the installer.configure extension to generate + the configuration needed in the system. + + This manifest, which is installing the installer script in + /usr/lib/installer/installer.py, in combination of adding + "init=/usr/lib/installer/installer.py" as KERNEL_ARGS in the system + makes the system run the installer.py script as init script. + + The installer.py script will read the information needed to + install the system (where is the root filesystem to install and + where to install it) from /etc/install.conf. + + This cluster also deploys a subsystem (a build-system in this case) + which is going to be the system that the installer system/script is + going to install. + +systems: +- morph: systems/installer-system-x86_64.morph + deploy: + installer: + type: rawdisk + location: installer-build-system-x86_64.img + KERNEL_ARGS: init=/usr/lib/baserock-installer/installer + DISK_SIZE: 6G + HOSTNAME: installer-x86_64 + INSTALLER_TARGET_STORAGE_DEVICE: /dev/sda + INSTALLER_ROOTFS_TO_INSTALL: /rootfs + subsystems: + - morph: systems/build-system-x86_64.morph + deploy: + to-install: + type: sysroot + location: /rootfs + INITRAMFS_PATH: boot/initramfs.gz + subsystems: + - morph: systems/initramfs-x86_64.morph + deploy: + initramfs: + type: initramfs + location: boot/initramfs.gz diff --git a/installer.configure b/installer.configure new file mode 100755 index 00000000..a77dc851 --- /dev/null +++ b/installer.configure @@ -0,0 +1,48 @@ +#!/usr/bin/python +# +# Copyright (C) 2014 Codethink Limited +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# This is a "morph deploy" configuration extension to configure an installer +# system. It will create the configuration needed in the installer system +# to perform an installation. It uses the following variables from the +# environment: +# +# * INSTALLER_TARGET_STORAGE_DEVICE +# * INSTALLER_ROOTFS_TO_INSTALL +# * INSTALLER_POST_INSTALL_COMMAND (optional, defaults to `reboot -f`) + +import os +import sys +import yaml + +install_config_file = os.path.join(sys.argv[1], 'etc', 'install.conf') + +try: + installer_configuration = { + 'INSTALLER_TARGET_STORAGE_DEVICE': os.environ['INSTALLER_TARGET_STORAGE_DEVICE'], + 'INSTALLER_ROOTFS_TO_INSTALL': os.environ['INSTALLER_ROOTFS_TO_INSTALL'], + } +except KeyError as e: + print "Not configuring as an installer system" + sys.exit(0) + +postinstkey = 'INSTALLER_POST_INSTALL_COMMAND' +installer_configuration[postinstkey] = os.environ.get(postinstkey, 'reboot -f') + +with open(install_config_file, 'w') as f: + f.write( yaml.dump(installer_configuration, default_flow_style=False) ) + +print "Configuration of the installer system in %s" % install_config_file diff --git a/strata/bsp-armv7-highbank.morph b/strata/bsp-armv7-highbank.morph index d17d9c66..d5ff1264 100644 --- a/strata/bsp-armv7-highbank.morph +++ b/strata/bsp-armv7-highbank.morph @@ -7,6 +7,6 @@ chunks: - name: linux-armv7-highbank morph: strata/bsp-armv7-highbank/linux-armv7-highbank.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] diff --git a/strata/bsp-armv7-versatile.morph b/strata/bsp-armv7-versatile.morph index 801f5287..63d79667 100644 --- a/strata/bsp-armv7-versatile.morph +++ b/strata/bsp-armv7-versatile.morph @@ -8,6 +8,6 @@ chunks: - name: linux-armv7-versatile morph: strata/bsp-armv7-versatile/linux-armv7-versatile.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] diff --git a/strata/bsp-armv7b-highbank.morph b/strata/bsp-armv7b-highbank.morph index fe8c30e1..16dd9a17 100644 --- a/strata/bsp-armv7b-highbank.morph +++ b/strata/bsp-armv7b-highbank.morph @@ -7,6 +7,6 @@ chunks: - name: linux-armv7b-highbank morph: strata/bsp-armv7b-highbank/linux-armv7b-highbank.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] diff --git a/strata/bsp-armv7b-vexpress-tc2.morph b/strata/bsp-armv7b-vexpress-tc2.morph index 81d6fe48..440271de 100644 --- a/strata/bsp-armv7b-vexpress-tc2.morph +++ b/strata/bsp-armv7b-vexpress-tc2.morph @@ -7,6 +7,6 @@ chunks: - name: linux-armv7b-vexpress-tc2 morph: strata/bsp-armv7b-vexpress-tc2/linux-armv7b-vexpress-tc2.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] diff --git a/strata/bsp-jetson.morph b/strata/bsp-jetson.morph index 114e3a27..111402a7 100644 --- a/strata/bsp-jetson.morph +++ b/strata/bsp-jetson.morph @@ -28,10 +28,9 @@ chunks: - name: linux-jetson-tk1 morph: strata/bsp-jetson/linux-jetson-tk1.morph repo: upstream:linux - ref: 8c885b20c4c9115d29dca4e5afd66228c51c5f69 - unpetrify-ref: baserock/jetson/linux-tegra-3.18-rc3 - build-depends: - - u-boot@jetson + ref: 682c943b0159b1a4105f31020605bf8a0f155ffd + unpetrify-ref: baserock/v3.18-with-cpufreq + build-depends: [] - name: bsp-support morph: strata/bsp-jetson/bsp-support.morph repo: baserock:baserock/bsp-support diff --git a/strata/bsp-ppc64-generic.morph b/strata/bsp-ppc64-generic.morph index cbb0b201..f109ecf2 100644 --- a/strata/bsp-ppc64-generic.morph +++ b/strata/bsp-ppc64-generic.morph @@ -7,6 +7,6 @@ chunks: - name: linux-ppc64 morph: strata/bsp-ppc64-generic/linux-ppc64.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] diff --git a/strata/bsp-wandboard.morph b/strata/bsp-wandboard.morph index 98f153b8..6f829802 100644 --- a/strata/bsp-wandboard.morph +++ b/strata/bsp-wandboard.morph @@ -13,7 +13,7 @@ chunks: - name: linux-armv7-wandboard morph: strata/bsp-wandboard/linux-armv7-wandboard.morph repo: upstream:linux - ref: 9573986cf27ff44814f3efb1f1e95638406db456 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: - u-boot@wandboard diff --git a/strata/bsp-x86_32-generic.morph b/strata/bsp-x86_32-generic.morph index fa9dbf75..480bd702 100644 --- a/strata/bsp-x86_32-generic.morph +++ b/strata/bsp-x86_32-generic.morph @@ -8,8 +8,8 @@ chunks: - name: linux-x86-32-generic morph: strata/bsp-x86_32-generic/linux-x86-32-generic.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] - name: nasm morph: strata/bsp-x86_32-generic/nasm.morph diff --git a/strata/bsp-x86_64-generic.morph b/strata/bsp-x86_64-generic.morph index 8a7b9c9b..a24a34c5 100644 --- a/strata/bsp-x86_64-generic.morph +++ b/strata/bsp-x86_64-generic.morph @@ -8,8 +8,8 @@ chunks: - name: linux-x86-64-generic morph: strata/bsp-x86_64-generic/linux-x86-64-generic.morph repo: upstream:linux - ref: d67a0e110187abd560a1de63fa172894a52839d5 - unpetrify-ref: baserock/morph + ref: b2776bf7149bddd1f4161f14f79520f17fc1d71d + unpetrify-ref: v3.18 build-depends: [] - name: nasm morph: strata/bsp-x86_64-generic/nasm.morph diff --git a/strata/foundation/systemd.morph b/strata/foundation/systemd.morph index 1ee23cb8..c298748a 100644 --- a/strata/foundation/systemd.morph +++ b/strata/foundation/systemd.morph @@ -21,7 +21,7 @@ post-install-commands: - | cat > "$DESTDIR/etc/systemd/network/10-dhcp.network" << "EOF" [Match] - Name=en* + Name=e* [Network] DHCP=yes diff --git a/strata/input-common.morph b/strata/input-common.morph index 233bff22..533eff22 100644 --- a/strata/input-common.morph +++ b/strata/input-common.morph @@ -7,23 +7,23 @@ chunks: - name: mtdev repo: upstream:mtdev-git ref: 4381b78fea54de0e775bf54952b2f95e5a06c57d - unpetrify-ref: baserock/genivi/baseline + unpetrify-ref: v1.1.5 build-depends: [] - name: xkeyboard-config morph: strata/input-common/xkeyboard-config.morph repo: upstream:xkeyboard-config - ref: bc3ac1b0d152e929b3532a541596cf9fe286bb9e - unpetrify-ref: xkeyboard-config-2.12 + ref: 73aa90ce32967747c84a1b5fe32cee329bc3bbcf + unpetrify-ref: xkeyboard-config-2.13 build-depends: [] - name: libevdev repo: upstream:libevdev - ref: b23649e1ba9fd5c72fa9318e417b4f17f5f6f528 - unpetrify-ref: baserock/genivi/baseline + ref: 7ac00d7e920c56bb8617403699030a5300bfae1c + unpetrify-ref: libevdev-1.3.2 build-depends: [] - name: libinput repo: upstream:libinput - ref: 224f1d823b2d44aa5193d5b997d73e4322c50f41 - unpetrify-ref: 0.6.0 + ref: 06e2f522a4ab5ea0a1de68cce1b5f9fff568ed4f + unpetrify-ref: 0.7.0 build-depends: - mtdev - libevdev diff --git a/strata/installer-utils.morph b/strata/installer-utils.morph new file mode 100644 index 00000000..b97a7c09 --- /dev/null +++ b/strata/installer-utils.morph @@ -0,0 +1,12 @@ +name: installer-utils +kind: stratum +description: stratum for Baserock installer script. +build-depends: +- morph: strata/build-essential.morph +chunks: +- name: installer-scripts + morph: strata/installer-utils/installer-scripts.morph + repo: baserock:baserock/installer-scripts + ref: master + unpetrify-ref: master + build-depends: [] diff --git a/strata/installer-utils/installer-scripts.morph b/strata/installer-utils/installer-scripts.morph new file mode 100644 index 00000000..e42313a8 --- /dev/null +++ b/strata/installer-utils/installer-scripts.morph @@ -0,0 +1,4 @@ +name: installer-scripts +kind: chunk +install-commands: +- install -D -m 755 baserock-installer "$DESTDIR/usr/lib/baserock-installer/installer" diff --git a/strata/morph-utils.morph b/strata/morph-utils.morph index 17eecbbe..d2f9f364 100644 --- a/strata/morph-utils.morph +++ b/strata/morph-utils.morph @@ -71,7 +71,7 @@ chunks: build-depends: [] - name: morph repo: baserock:baserock/morph - ref: cb880f3554d9cf8daa3839dcd7a7ed2c336df85b + ref: d6a8067d6bfd929fa7505e019a4e6ea63e1210ea unpetrify-ref: master build-depends: - cliapp diff --git a/systems/installer-system-x86_64.morph b/systems/installer-system-x86_64.morph new file mode 100644 index 00000000..0b5e4709 --- /dev/null +++ b/systems/installer-system-x86_64.morph @@ -0,0 +1,22 @@ +name: installer-system-x86_64 +kind: system +description: The system that should be used as an Installer to install other Baserock systems. +arch: x86_64 +strata: +- name: build-essential + morph: strata/build-essential.morph +- name: core + morph: strata/core.morph +- name: foundation + morph: strata/foundation.morph +- name: bsp-x86_64-generic + morph: strata/bsp-x86_64-generic.morph +- name: morph-utils + morph: strata/morph-utils.morph +- name: installer-utils + morph: strata/installer-utils.morph +configuration-extensions: +- set-hostname +- install-files +- fstab +- installer |