Skip to content

Commit

Permalink
Merge pull request #393 from open-power/master-next
Browse files Browse the repository at this point in the history
Merge master-next content to master for v1.8
  • Loading branch information
williamspatrick committed Mar 17, 2016
2 parents 0747270 + d10e586 commit 25eaa9d
Show file tree
Hide file tree
Showing 72 changed files with 1,218 additions and 2,007 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "buildroot"]
path = buildroot
branch = 2015.11.1-op-build
url = https://github.com/open-power/buildroot
44 changes: 0 additions & 44 deletions README

This file was deleted.

54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# OpenPower Firmware Build Environment

The OpenPower firmware build process uses Buildroot to create a toolchain and
build the various components of the PNOR firmware, including Hostboot, Skiboot,
OCC, Petitboot etc.

## Development

Issues, Milestones, pull requests and code hosting is on github:
https://github.com/open-power/op-build

Mailing list: [email protected]
Info/Subscribe: https://lists.ozlabs.org/listinfo/openpower-firmware
Archives: https://lists.ozlabs.org/pipermail/openpower-firmware/

## Building an image

```
git clone --recursive [email protected]:open-power/op-build.git
cd op-build
. op-build-env
op-build palmetto_defconfig && op-build
```

This will build an image for a Palmetto system. There exists default
configurations for other platforms in openpower/configs/ such as
Habanero and Firestone.

### Dependancies for *64-bit* Ubuntu/Debian systems

1. Install Ubuntu (>= 14.04) or Debian (>= 7.5) 64-bit.
2. Enable Universe:

sudo apt-get install software-properties-common
sudo add-apt-repository universe
3. Install the packages necessary for the build:

sudo apt-get install cscope ctags libz-dev libexpat-dev \
python language-pack-en texinfo \
build-essential g++ git bison flex unzip \
libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \
wget bc

### Dependancies for *64-bit* Fedora systems

1. Install Fedora 23 64-bit.
2. Install the packages necessary for the build:

sudo dnf install gcc-c++ flex bison git ctags cscope expat-devel patch \
zlib-devel zlib-static texinfo perl-bignum "perl(XML::Simple)" \
"perl(YAML)" "perl(XML::SAX)" "perl(Fatal)" "perl(Thread::Queue)" \
"perl(Env)" "perl(XML::LibXML)" "perl(Digest::SHA1)" libxml2-devel \
which wget unzip tar cpio python bzip2 bc findutils ncurses-devel

2 changes: 1 addition & 1 deletion buildroot
Submodule buildroot updated 2917 files
5 changes: 5 additions & 0 deletions ci/Dockerfile/fedora23
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM fedora:23
RUN dnf -y install gcc-c++ flex bison git ctags cscope expat-devel patch zlib-devel zlib-static texinfo perl-bignum "perl(XML::Simple)" "perl(YAML)" "perl(XML::SAX)" "perl(Fatal)" "perl(Thread::Queue)" "perl(Env)" "perl(XML::LibXML)" "perl(Digest::SHA1)" libxml2-devel
RUN dnf -y install which wget unzip tar cpio python bzip2 bc
RUN dnf -y install findutils
RUN dnf -y install ncurses-devel
1 change: 1 addition & 0 deletions ci/Dockerfile/fedora23.x86_64
10 changes: 10 additions & 0 deletions ci/Dockerfile/ubuntu1404
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:14.04
# Don't ask. Ubuntu is awful.
RUN sed -e 's/main$/main universe/' --in-place=orig /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yy cscope ctags \
libz-dev libexpat-dev \
python language-pack-en texinfo \
build-essential g++ git bison flex unzip \
libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yy wget bc
1 change: 1 addition & 0 deletions ci/Dockerfile/ubuntu1404.ppc64le
1 change: 1 addition & 0 deletions ci/Dockerfile/ubuntu1404.x86_64
38 changes: 38 additions & 0 deletions ci/build-all-defconfigs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -ex
set -eo pipefail

DEFCONFIGS=`(cd openpower/configs; ls -1 *_defconfig)`

if [ -z "$1" or ! -d "$1" ]; then
echo "No output directory specified"
exit 1;
fi

if [ -z "$CCACHE_DIR" ]; then
CCACHE_DIR=`pwd`/.op-build_ccache
fi

shopt -s expand_aliases
source op-build-env

for i in $DEFCONFIGS; do
op-build $i
echo 'BR2_CCACHE=y' >> output/.config
echo "BR2_CCACHE_DIR=\"$CCACHE_DIR\"" >> output/.config
echo 'BR2_CCACHE_INITIAL_SETUP=""' >> output/.config

op-build olddefconfig
op-build
r=$?
mkdir $1/$i-images
mv output/images/* $1/$i-images/
mv output/.config $1/$i-images/.config
lsb_release -a > $1/$i-images/lsb_release
rm -rf output/*
if [ $r -ne 0 ]; then
exit $r
fi
done

55 changes: 55 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

set -ex
set -eo pipefail

function run_docker
{
$DOCKER_PREFIX docker run --cap-add=sys_admin --net=host --rm=true \
--user="${USER}" -w "${PWD}" -v "${PWD}":"${PWD}":Z \
-t $1 $2
}

env

if [ -d output-images ]; then
echo 'output-images already exists!';
exit 1;
fi

for distro in ubuntu1404 fedora23;
do
base_dockerfile=ci/Dockerfile/$distro.`arch`
if [ ! -f $base_dockerfile ]; then
echo '$distro not supported on `arch`.';
continue
fi
if [[ -n "$HTTP_PROXY" ]]; then
http_proxy=$HTTP_PROXY
fi
if [[ -n "$http_proxy" ]]; then
if [[ "$distro" == fedora23 ]]; then
PROXY="RUN echo \"proxy=${http_proxy}\" >> /etc/dnf/dnf.conf"
fi
if [[ "$distro" == ubuntu1404 ]]; then
PROXY="RUN echo \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy"
fi
fi

Dockerfile=$(head -n1 $base_dockerfile; echo ${PROXY}; tail -n +2 $base_dockerfile; cat << EOF
RUN groupadd -g ${GROUPS} ${USER} && useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
${PROXY}
USER ${USER}
ENV HOME ${HOME}
EOF
)
$DOCKER_PREFIX docker build -t openpower/op-build-$distro - <<< "${Dockerfile}"
mkdir -p output-images/$distro
run_docker openpower/op-build-$distro "./ci/build-all-defconfigs.sh output-images/$distro"
if [ $? = 0 ]; then
mv *-images output-$distro/
else
exit $?;
fi
done;

4 changes: 3 additions & 1 deletion op-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ fi
export BR2_EXTERNAL=${__PWD}/openpower
export BR2_DL_DIR=${__PWD}/dl

alias op-build="make --directory=${__PWD}/buildroot O=${__PWD}/output "
op-build () {
make --directory=${__PWD}/buildroot O=${__PWD}/output $@
}
72 changes: 72 additions & 0 deletions openpower/configs/barreleye_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_OPENPOWER_PLATFORM=y

BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set
BR2_GLIBC_VERSION_2_23=y

BR2_OPENPOWER_CONFIG_NAME="barreleye"
BR2_OPENPOWER_XML_PACKAGE="barreleye-xml"
BR2_HOSTBOOT_CONFIG_FILE="barreleye.config"

BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"

BR2_OCC_BIN_FILENAME="occ.bin"

BR2_BARRELEYE_SYSTEM_XML_FILENAME="BARRELEYE_hb.system.xml"
BR2_BARRELEYE_MRW_XML_FILENAME="BARRELEYE_hb.mrw.xml"
BR2_BARRELEYE_BIOS_XML_FILENAME="BARRELEYE_bios.xml"

BR2_OPENPOWER_TARGETING_BIN_FILENAME="BARRELEYE_HB.targeting.bin"
BR2_OPENPOWER_TARGETING_ECC_FILENAME="BARRELEYE_HB.targeting.bin.ecc"
BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"

BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
BR2_OPENPOWER_PNOR_FILENAME="barreleye.pnor"
BR2_OPENPOWER_PNOR_UPDATE_FILENAME="barreleye_update.pnor"

# skiboot requirements
BR2_TARGET_SKIBOOT=y
BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=n
BR2_SKIBOOT_CUSTOM_VERSION=y
BR2_SKIBOOT_CUSTOM_VERSION_VALUE="skiboot-5.2.0"

# petitboot requirements
BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
BR2_KERNEL_HEADERS_4_4=y
BR2_DEFAULT_KERNEL_HEADERS="4.4.5"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_DROPBEAR=y
# BR2_PACKAGE_DROPBEAR_SERVER is not set
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_PETITBOOT=y
BR2_PACKAGE_IPMITOOL=y
BR2_PACKAGE_POWERPC_UTILS=y
BR2_PACKAGE_MDADM=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
8 changes: 5 additions & 3 deletions openpower/configs/firestone_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set
BR2_GLIBC_VERSION_2_23=y

BR2_OPENPOWER_CONFIG_NAME="firestone"
BR2_OPENPOWER_XML_PACKAGE="firestone-xml"
Expand Down Expand Up @@ -43,16 +44,17 @@ BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_VERSION="4.2.1"
BR2_KERNEL_HEADERS_4_2=y
BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
BR2_KERNEL_HEADERS_4_4=y
BR2_DEFAULT_KERNEL_HEADERS="4.4.5"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_DROPBEAR=y
Expand Down
10 changes: 7 additions & 3 deletions openpower/configs/garrison_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set
BR2_GLIBC_VERSION_2_23=y

BR2_OPENPOWER_CONFIG_NAME="garrison"
BR2_OPENPOWER_XML_PACKAGE="garrison-xml"
Expand All @@ -32,6 +33,8 @@ BR2_OPENPOWER_PNOR_UPDATE_FILENAME="garrison_update.pnor"
# skiboot requirements
BR2_TARGET_SKIBOOT=y
BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=n
BR2_SKIBOOT_CUSTOM_VERSION=y
BR2_SKIBOOT_CUSTOM_VERSION_VALUE="skiboot-5.2.0"

# petitboot requirements
BR2_ENABLE_LOCALE_PURGE=y
Expand All @@ -43,16 +46,17 @@ BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_VERSION="4.2.1"
BR2_KERNEL_HEADERS_4_2=y
BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
BR2_KERNEL_HEADERS_4_4=y
BR2_DEFAULT_KERNEL_HEADERS="4.4.5"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_DROPBEAR=y
Expand Down
Loading

0 comments on commit 25eaa9d

Please sign in to comment.