commit | 42d9daca7dadc388d058581d50bd3af1a313a995 | [log] [tgz] |
---|---|---|
author | Joel Stanley <joel@jms.id.au> | Thu Jun 22 13:31:58 2017 +0930 |
committer | Joel Stanley <joel@jms.id.au> | Tue Jun 27 11:13:52 2017 +0930 |
tree | fe032719bdb7a778e7314eb5752cd4f20ed17f19 | |
parent | 79aae65c0c3a8a1dd5038be3d1aa88addd37fd09 [diff] |
hostboot: Add patches to fix cmpi assembly This is change is a noop with the existing toolchain. We change from implicitly generating the cmpwi to explicitly stating in for compatibility with newer toolchains. The patch has been applied to the master branch of hostboot. The P8 backport is pending review. With gcc 4.9.3, binutils 2.25.2: ``` $ cat asm-test.S .text .global test cmpi 0, 8, 1 $ /opt/cross/gcc-4.9.3-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc -c asm-test.S $ objdump -d asm-test.o 0000000000000000 <.text>: 0: 2c 08 00 01 cmpwi r8,1 ``` Old toolchain, updated instruction: ``` $ cat asm-test.S .text .global test cmpwi 0, 8, 1 $ /opt/cross/gcc-4.9.3-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc -c asm-test.S $ objdump -d asm-test.o 0000000000000000 <.text>: 0: 2c 08 00 01 cmpwi r8,1 ``` And then the new toolchain (gcc 6.3.0, binutils 2.28) with the updated asm: ``` $ cat asm-test.S .text .global test cmpwi 0, 8, 1 $ powerpc64-linux-gnu-gcc -c asm-test.S $ objdump -d asm-test.o 0000000000000000 <.text>: 0: 2c 08 00 01 cmpwi r8,1 ``` Signed-off-by: Joel Stanley <joel@jms.id.au>
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.
Issues, Milestones, pull requests and code hosting is on GitHub: https://github.com/open-power/op-build
Mailing list: openpower-firmware@lists.ozlabs.org
Info/Subscribe: https://lists.ozlabs.org/listinfo/openpower-firmware
Archives: https://lists.ozlabs.org/pipermail/openpower-firmware/
To build an image for a Palmetto system:
git clone --recursive git@github.com:open-power/op-build.git cd op-build . op-build-env op-build palmetto_defconfig && op-build
There are also default configurations for other platforms in openpower/configs/
such as Habanero and Firestone.
Buildroot/op-build supports both native and cross-compilation - it will automatically download and build an appropriate toolchain as part of the build process, so you don't need to worry about setting up a cross-compiler. Cross-compiling from a x86-64 host is officially supported.
Install Ubuntu (>= 14.04) or Debian (>= 7.5) 64-bit.
Enable Universe (Ubuntu only):
sudo apt-get install software-properties-common sudo add-apt-repository universe
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 \ libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \ wget bc
Install Fedora 25 64-bit (older Fedora should also work).
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