From f98b7d84adb0b9fac847eb18f51dc0725c649615 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Thu, 19 Feb 2015 14:13:05 +0000 Subject: Add PXE-based deployment support to an HP Moonshot node --- clusters/moonshot-pxe-armv8l64.morph | 22 ++++++++++++++++++++++ moonshot-kernel.configure | 33 +++++++++++++++++++++++++++++++++ moonshot/boot/m400-1003.dtb | Bin 0 -> 18063 bytes moonshot/manifest | 2 ++ systems/build-system-armv8l64.morph | 1 + systems/devel-system-armv8l64.morph | 1 + 6 files changed, 59 insertions(+) create mode 100644 clusters/moonshot-pxe-armv8l64.morph create mode 100644 moonshot-kernel.configure create mode 100644 moonshot/boot/m400-1003.dtb create mode 100644 moonshot/manifest diff --git a/clusters/moonshot-pxe-armv8l64.morph b/clusters/moonshot-pxe-armv8l64.morph new file mode 100644 index 00000000..3cda43ae --- /dev/null +++ b/clusters/moonshot-pxe-armv8l64.morph @@ -0,0 +1,22 @@ +name: moonshot-m400-armv8l64-netboot +kind: cluster +description: | + Deploy an armv8l64 devel system into a HP Moonshot node + + The system will be configured to boot through PXE from existing DHCP, + TFTP and NFS servers. +systems: +- morph: systems/minimal-system-armv8l64.morph + deploy: + netboot: + type: pxeboot + location: 14:58:d0:57:7f:42 + PXEBOOT_MODE: existing-server + PXEBOOT_CONFIG_TFTP_ADDRESS: sftp://192.168.0.1/srv/nfsboot/tftp/ + PXEBOOT_ROOTFS_RSYNC_ADDRESS: rsync://192.168.0.1/srv/nfsboot/ + KERNEL_ARGS: console=ttyS0,9600n8r rw + DTB_PATH: boot/m400-1003.dtb + HOSTNAME: baserock-m400-node31 + MOONSHOT_KERNEL: yes + INSTALL_FILES: moonshot/manifest + PXE_INSTALLER: no diff --git a/moonshot-kernel.configure b/moonshot-kernel.configure new file mode 100644 index 00000000..11d01751 --- /dev/null +++ b/moonshot-kernel.configure @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 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 convert a plain +# kernel Image to uImage, for an HP Moonshot m400 cartridge + +set -eu + +case "$MOONSHOT_KERNEL" in + True|yes) + echo "Converting kernel image for Moonshot" + mkimage -A arm -O linux -C none -T kernel -a 0x00080000 \ + -e 0x00080000 -n Linux -d "$1/boot/vmlinux" "$1/boot/uImage" + ;; + *) + echo Unrecognised option "$MOONSHOT_KERNEL" to MOONSHOT_KERNEL + exit 1 + ;; +esac diff --git a/moonshot/boot/m400-1003.dtb b/moonshot/boot/m400-1003.dtb new file mode 100644 index 00000000..d6fd83ee Binary files /dev/null and b/moonshot/boot/m400-1003.dtb differ diff --git a/moonshot/manifest b/moonshot/manifest new file mode 100644 index 00000000..dd80fe49 --- /dev/null +++ b/moonshot/manifest @@ -0,0 +1,2 @@ +0040755 0 0 /boot +0100744 0 0 /boot/m400-1003.dtb diff --git a/systems/build-system-armv8l64.morph b/systems/build-system-armv8l64.morph index 01d70c61..2fcb1e8c 100644 --- a/systems/build-system-armv8l64.morph +++ b/systems/build-system-armv8l64.morph @@ -41,3 +41,4 @@ configuration-extensions: - fstab - mason - cloud-init +- moonshot-kernel diff --git a/systems/devel-system-armv8l64.morph b/systems/devel-system-armv8l64.morph index e292e780..88495e48 100644 --- a/systems/devel-system-armv8l64.morph +++ b/systems/devel-system-armv8l64.morph @@ -43,3 +43,4 @@ configuration-extensions: - nfsboot - install-files - cloud-init +- moonshot-kernel -- cgit v1.2.1