diff options
author | ArthurBorsboom | 2016-10-08 13:08:54 +0200 |
---|---|---|
committer | ArthurBorsboom | 2016-10-08 13:08:54 +0200 |
commit | 035aa6e93208e6806d6ff0a38dcae88b1baab360 (patch) | |
tree | 9e532b04de73460c01123315a5b788a58f698279 | |
parent | b293e293082aac93522f894cf21799cacca73f7a (diff) | |
download | aur-035aa6e93208e6806d6ff0a38dcae88b1baab360.tar.gz |
Replaced xen 4.5.1 package with the package build by John Thomson. Source: https://gitlab.com/johnth/aur-xen
-rw-r--r-- | .SRCINFO | 127 | ||||
-rw-r--r-- | ChangeLog | 49 | ||||
-rw-r--r-- | PKGBUILD | 342 | ||||
-rw-r--r-- | etherboot-gcc5.patch | 40 | ||||
-rw-r--r-- | gcc5.patch | 10 | ||||
-rw-r--r-- | ovmf-gcc4.9-basetools.patch | 231 | ||||
-rw-r--r-- | ovmf-gcc4.9-ovmfpkg.patch | 19 | ||||
-rw-r--r-- | ovmf.patch | 9 | ||||
-rw-r--r-- | patch-gcc6-etherboot-ath9k-9287-array.patch | 68 | ||||
-rw-r--r-- | patch-gcc6-etherboot-e1000_phy.c.patch | 20 | ||||
-rw-r--r-- | patch-gcc6-etherboot-igb_phy.c.patch | 20 | ||||
-rw-r--r-- | patch-gcc6-etherboot-rm-unused-string-functions.patch | 257 | ||||
-rw-r--r-- | patch-gcc6-etherboot-via-rhine.c.patch | 21 | ||||
-rw-r--r-- | patch-gcc6-etherboot-via-velocity.c.patch | 12 | ||||
-rw-r--r-- | patch-gcc6-ovmf-build.sh.patch | 12 | ||||
-rw-r--r-- | seabios-gcc5.patch | 48 | ||||
-rw-r--r-- | xen.install | 23 |
17 files changed, 802 insertions, 506 deletions
@@ -1,23 +1,24 @@ pkgbase = xen pkgdesc = Virtual Machine Hypervisor & Tools - pkgver = 4.5.1 - pkgrel = 1 + pkgver = 4.7.0 + pkgrel = 3 url = http://www.xenproject.org/ install = xen.install changelog = ChangeLog - arch = i686 arch = x86_64 license = GPL2 makedepends = bin86 makedepends = cmake makedepends = dev86 + makedepends = figlet makedepends = git makedepends = iasl makedepends = markdown + makedepends = nasm makedepends = ocaml-findlib - makedepends = figlet - makedepends = wget makedepends = spice-protocol + makedepends = wget + makedepends = mingw-w64-binutils depends = bridge-utils depends = curl depends = gnutls @@ -25,19 +26,17 @@ pkgbase = xen depends = libaio depends = libcap-ng depends = libiscsi - depends = libjpeg-turbo + depends = libnl depends = libpng - depends = libseccomp depends = lzo2 - depends = nss - depends = pixman depends = pciutils depends = python depends = python2 depends = sdl - depends = yajl depends = spice depends = usbredir + depends = yajl + depends = lib32-glibc optdepends = xen-docs: Official Xen Documentation optdepends = openvswitch: Optional Networking support conflicts = xen-4.2 @@ -46,16 +45,12 @@ pkgbase = xen conflicts = xen-hg-unstable conflicts = xen-rc conflicts = xen-git + conflicts = xen-igvtg conflicts = xen-4.3 conflicts = xen-4.3-testing-hg - noextract = lwip-1.3.0.tar.gz - noextract = zlib-1.2.3.tar.gz - noextract = newlib-1.16.0.tar.gz - noextract = pciutils-2.2.9.tar.bz2 - noextract = polarssl-1.1.4-gpl.tgz - noextract = grub-0.97.tar.gz - noextract = tpm_emulator-0.7.4.tar.gz - noextract = gmp-4.3.2.tar.bz2 + conflicts = xen-4.4 + conflicts = xen-4.5 + conflicts = xen-4.6 noextract = ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz options = !buildflags options = !strip @@ -66,54 +61,76 @@ pkgbase = xen backup = etc/conf.d/xendomains backup = etc/conf.d/xencommons backup = etc/xen/grub.conf - source = http://bits.xensource.com/oss-xen/release/4.5.1/xen-4.5.1.tar.gz + source = http://bits.xensource.com/oss-xen/release/4.7.0/xen-4.7.0.tar.gz source = http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz - source = http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz - source = http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz - source = http://xenbits.xen.org/xen-extfiles/newlib-1.16.0.tar.gz - source = http://xenbits.xen.org/xen-extfiles/pciutils-2.2.9.tar.bz2 - source = http://xenbits.xen.org/xen-extfiles/polarssl-1.1.4-gpl.tgz - source = http://xenbits.xen.org/xen-extfiles/grub-0.97.tar.gz - source = http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz - source = http://xenbits.xen.org/xen-extfiles/gmp-4.3.2.tar.bz2 - source = xen.install - source = tmpfiles.d-xen.conf - source = 09_xen + source = seabios::git://xenbits.xen.org/seabios.git#tag=rel-1.9.2 + source = ovmf::git://xenbits.xen.org/ovmf.git#tag=52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d source = ati-passthrough.patch - source = etherboot-gcc5.patch - source = gcc5.patch - source = gnutls-3.4.0.patch::http://git.alpinelinux.org/cgit/aports/plain/main/xen/gnutls-3.4.0.patch?id=628f27939412a7d6fb67734bd644119a1f49463a source = ovmf.patch - source = ovmf-gcc4.9-basetools.patch - source = ovmf-gcc4.9-ovmfpkg.patch - source = seabios-gcc5.patch + source = patch-gcc6-ovmf-build.sh.patch + source = patch-gcc6-etherboot-nonnull-compare.patch::https://git.ipxe.org/ipxe.git/patch/e2f14c2f8c10674dbbd4f1228d79dc4c9be213b5 + source = patch-gcc6-etherboot-rm-unused-string-functions.patch + source = patch-gcc6-etherboot-nic.c.patch::https://git.ipxe.org/ipxe.git/patch/a5885fbc19c4b60dc1a21624d1a9d1b77a93504e + source = patch-gcc6-etherboot-ath.patch::https://git.ipxe.org/ipxe.git/patch/63037bdce4a325e5e1da85ffcdf27b77ac670c01 + source = patch-gcc6-etherboot-sis190.patch::https://git.ipxe.org/ipxe.git/patch/65b32a0b7000f70a5bb1d33190d40f9b04c93172 + source = patch-gcc6-etherboot-skge.patch::https://git.ipxe.org/ipxe.git/patch/76ec2a0540b25dbd183b9ce185583a4b24278cf1 + source = patch-gcc6-etherboot-via-velocity.c.patch + source = patch-gcc6-etherboot-via-rhine.c.patch + source = patch-gcc6-etherboot-e1000_phy.c.patch + source = patch-gcc6-etherboot-igb_phy.c.patch + source = patch-gcc6-etherboot-eth_broadcast.patch::https://git.ipxe.org/ipxe.git/patch/1cbb1581f16e235fafc963c906ad02b38d5457bd + source = patch-gcc6-etherboot-link-header.patch::https://git.ipxe.org/ipxe.git/patch/6324bd9389521c7e86384591f41eb78a81e9af47 + source = patch-gcc6-etherboot-ath9k-9287-array.patch + source = xen.install + source = 09_xen source = efi-xen.cfg source = grub.conf source = xen.conf - sha256sums = 668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371 + source = tmpfiles.d-xen.conf + source = https://xenbits.xen.org/xsa/xsa182-unstable.patch + source = https://xenbits.xen.org/xsa/xsa183-unstable.patch + source = https://xenbits.xen.org/xsa/xsa184-qemut-master.patch + source = https://xenbits.xen.org/xsa/xsa184-qemuu-master.patch + source = https://xenbits.xen.org/xsa/xsa185.patch + source = https://xenbits.xen.org/xsa/xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch + source = https://xenbits.xen.org/xsa/xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch + source = https://xenbits.xen.org/xsa/xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch + source = https://xenbits.xen.org/xsa/xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch + sha256sums = be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 sha256sums = 632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c - sha256sums = 772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f - sha256sums = 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e - sha256sums = db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 - sha256sums = f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 - sha256sums = 2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6 - sha256sums = 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b - sha256sums = 4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459 - sha256sums = 936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775 - sha256sums = 5bc10f125bdc1ae5f9e3eeb58888970d02e7856e94e2435d66ddb717884db016 - sha256sums = 40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf - sha256sums = 06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb + sha256sums = SKIP + sha256sums = SKIP sha256sums = d93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3 - sha256sums = deeec880522c1374ad135dc8b4c14c7b301464a60fbac410efb3db70f670eed9 - sha256sums = 22b03d220aa6caa0bbe04868a1839a658a99d020bde95a31952a2a624490ef95 - sha256sums = e25d38376e22f6f935d2c0ce1b9d6e6b47ff261b5e6056bc3b47168739d7a992 - sha256sums = 1c44b9dc848bb6c3ef2ab76e4807a0b3ed360aea6b13b5b86d2bf5301d14247b - sha256sums = 45aae7a1d48357e5f981c12870b5bcac0dd0f630f84e398160d8c9adb42a6674 - sha256sums = 8e16638d0cc366d1eaae7ccbcf43215853b4444a625478ec8f6e0a2c655370d9 - sha256sums = 091f5eed7e33b45cabb232e9a03dd6c1abae1a820b804c888c20d4b7e673618f + sha256sums = 9cf9232c6e9a2b972cd4e1c7aacac9152bb8676db2b794381e1964c9f452e7de + sha256sums = 6403a0478e3cfed91dcad53b5f02e71745c98d18ab53930f87aeff1da8d71d55 + sha256sums = 17bb27d95c86af8cc5e499b1b0db9b95bba3f45910d55b420f9f1f5452355fab + sha256sums = 5d5fe7bf52cbae9da20cfd1fc798699b2355a1af907ebf7f764e227891a759bb + sha256sums = 9f34f8ecb9a44c688275b838c83efd233bb817f5e222629eac98e116168d704c + sha256sums = cdf7c4a089fe1fe493aafaf669decc3c9e071a0950da77dce526c09088d1c931 + sha256sums = 32595581467772b9fa0fbb5384c99caefeb2cee3306b94b9bd2722084454f5a2 + sha256sums = c73d1653b9b1d97ddce717817dc74429cd94c7b22989a08604eaa60df63f75f8 + sha256sums = 448caed900ada2c030738218f5b82f5e29d9dc2e1beef9ebd49cbeb23734df0d + sha256sums = 61b1518c8d41792ec3b36e0fbfc265adb6c9304945a6fa18d6cc5a197e34b94f + sha256sums = 577f06e38a9ecbd3576907f2ba1c5040f4f1573fe92912635230702ad157b2e7 + sha256sums = 80a24e9504d3893e83dc60550ffe364a873aaf3dafb52dcdade13f61f2ec0ee5 + sha256sums = be05ccd8975af402dcba3a3dc78c173319b2edd636bac11ac11163091453b704 + sha256sums = cace870b6629003b55d9df9ef24f3445067239b913c006b6e23da511c1a21d78 + sha256sums = a15d73e0fb51fe3c1cf8b80a5ff17d532444016d14495d90d9e642ec60f320a6 + sha256sums = c3b5b199c3ed271267d255f34e116258c593d04727ff1fd9199ecd37c1b98fe8 + sha256sums = 06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb sha256sums = ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f sha256sums = 3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568 sha256sums = 50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c + sha256sums = 40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf + sha256sums = 303400b9a832a3c1d423cc2cc97c2f00482793722f9ef7dd246783a049ac2792 + sha256sums = ea0ea4b294332814330f222e6d78eea3b19c394eac8ae22feb4a5bd21e90331f + sha256sums = ea41a25dac82cc5c0ef8e599feb6ed400e99414110d4dba8017d6bd048bc3de4 + sha256sums = 2d675e5e08d9443cf2e5f3aa37521241d6ed898a602b5111d6969023e67b9b6b + sha256sums = 3328a1953ecdf4de35462ea8396b0927171d718e95f73a87a7f651427bd8f8b4 + sha256sums = f2082a36d968a47e477bb5082d0e0aaa58e6cb3dc20b26389f043a9b7b595fa6 + sha256sums = 5a826a32763d82ac83c924f8c89d12aae5f069a4cbc7d5193aa8413a02b6dc05 + sha256sums = be9fe85d36c2c1fbca246c1f4d834c3ef11b6ab3d5467da0ac8c079aa5a68de9 + sha256sums = 36b22d6a168be39f31a1c1304f708269a2a10fe5105f7da4a06877d6059f1cd6 pkgname = xen diff --git a/ChangeLog b/ChangeLog index 7dcee938b5bd..9f029be5641b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,52 @@ +2016-09-18 John Thomson + * 4.7.0-3 + Apply XSA patch: 185, 186, 187 + +2016-09-03 John Thomson + * 4.7.0-2 + Apply XSA patch: 182, 183, 184 + +2016-06-24 John Thomson + * 4.7.0-1 + Xen 4.7.0 + +2016-06-11 John Thomson + * 4.6.1-7 + Apply XSA patch: 175, 178, 181 + +2016-05-23 John Thomson + * 4.6.1-6 + Apply XSA patch: 180 + +2016-05-19 John Thomson + * 4.6.1-5 + Apply XSA patch: 176 + +2016-05-12 John Thomson + * 4.6.1-4 + Apply XSA patch: 179 + Patches for GCC6 + +2016-04-19 John Thomson + * 4.6.1-3 + Apply XSA patch: 173 + +2016-03-31 John Thomson + * 4.6.1-2 + Apply XSA patch: 172 + +2016-02-19 John Thomson + * 4.6.1-1 + Xen source package updated to 4.6.1 + Apply XSA patch: 170 + +2016-02-19 John Thomson + * 4.5.2-1 + Xen source package updated to 4.5.2 + Build xen.efi with mingw-w64-binutils + Build ovmf + Apply XSA patches: 154, 156, 158 to 160, 162 to 168, and 170 + 2015-07-04 David Sutton <kantras - gmail.com> * 4.5.1-1 New major release from upstream @@ -1,61 +1,193 @@ -# Maintainer: David Sutton <kantras - gmail.com> +# Maintainer: Arthur Borsboom <arthurborsboom@gmail.com> # Contributor: Shanmu Thiagaraja <sthiagaraja+AUR@prshanmu.com> # Contributor: Limao Luo # Contributor: Luceo # Contributor: Revellion +# Contributor: John Thomson + +#linux-4.7 EFI boot panic issue (patch linux) +#http://lkml.iu.edu/hypermail/linux/kernel/1608.2/03448.html + +_build_stubdom=${build_stubdom:-false} +## use _build_stubdom=true to build xen with stubdom +#_build_stubdom=true pkgname=xen -pkgver=4.5.1 -pkgrel=1 +pkgver=4.7.0 +pkgrel=3 pkgdesc="Virtual Machine Hypervisor & Tools" -arch=(i686 x86_64) +arch=(x86_64) url="http://www.xenproject.org/" license=(GPL2) -depends=(bridge-utils curl gnutls iproute2 libaio libcap-ng libiscsi libjpeg-turbo libpng libseccomp lzo2 nss pixman pciutils python python2 sdl yajl spice usbredir) +depends=(bridge-utils curl gnutls iproute2 libaio libcap-ng libiscsi libnl libpng lzo2 pciutils python python2 sdl spice usbredir yajl + # seabios ovmf qemu + ) [[ "$CARCH" == "x86_64" ]] && depends+=(lib32-glibc) -makedepends=(bin86 cmake dev86 git iasl markdown ocaml-findlib figlet wget spice-protocol) +makedepends=(bin86 cmake dev86 figlet git iasl markdown nasm ocaml-findlib spice-protocol wget) + +## For building Xen EFI boot file. +## mingw-w64-binutils only needed if +## binutils not built with --enable-targets=x86_64-pep +_binutils_emulations=$(ld -V) +_binutils_efi=false +if [[ $_binutils_emulations == *'i386pep'* ]] +then + _binutils_efi=true + echo 'ld has efi support' +else + makedepends+=(mingw-w64-binutils) + echo 'ld does not have efi support, using mingw' +fi + optdepends=('xen-docs: Official Xen Documentation' 'openvswitch: Optional Networking support') -conflicts=(xen-4.2{,-testing-hg} xen-{gdbsx,hg-unstable,rc,git} xen-4.3{,-testing-hg}) -backup=(etc/modules-load.d/$pkgname.conf etc/$pkgname/xl.conf etc/conf.d/xen{stored,consoled,domains,commons} etc/$pkgname/grub.conf) +conflicts=(xen-4.2{,-testing-hg} xen-{gdbsx,hg-unstable,rc,git,igvtg} xen-4.3{,-testing-hg} xen-4.4 xen-4.5 xen-4.6) +backup=( + etc/modules-load.d/$pkgname.conf + etc/$pkgname/xl.conf + etc/conf.d/xen{stored,consoled,domains,commons} + etc/$pkgname/grub.conf + ) options=(!buildflags !strip) install=$pkgname.install changelog=ChangeLog -source=(http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz + +##SeaBIOS & OVMF tags are in src/xen-*/tools/Config.mk +##grep -R 'UPSTREAM_REVISION' src/xen-*/Config.mk +_git_tag_seabios='#tag=rel-1.9.2' +_git_tag_ovmf='#tag=52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d' + +source=( + http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz - http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz - http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz - http://xenbits.xen.org/xen-extfiles/newlib-1.16.0.tar.gz - http://xenbits.xen.org/xen-extfiles/pciutils-2.2.9.tar.bz2 - http://xenbits.xen.org/xen-extfiles/polarssl-1.1.4-gpl.tgz - http://xenbits.xen.org/xen-extfiles/grub-0.97.tar.gz - http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz - http://xenbits.xen.org/xen-extfiles/gmp-4.3.2.tar.bz2 - xen.install - tmpfiles.d-$pkgname.conf - 09_xen + + 'seabios'::"git://xenbits.xen.org/seabios.git${_git_tag_seabios}" + 'ovmf'::"git://xenbits.xen.org/ovmf.git${_git_tag_ovmf}" + ##HTTP access + #'seabios'::"git+http://xenbits.xen.org/git-http/seabios.git${_git_tag_seabios}" + + ## Compile patches ati-passthrough.patch - etherboot-gcc5.patch - gcc5.patch - gnutls-3.4.0.patch::http://git.alpinelinux.org/cgit/aports/plain/main/xen/gnutls-3.4.0.patch?id=628f27939412a7d6fb67734bd644119a1f49463a ovmf.patch - ovmf-gcc4.9-basetools.patch - ovmf-gcc4.9-ovmfpkg.patch - seabios-gcc5.patch + #patch-build-efi-with-mingw.patch::https://github.com/jakogut/xen-igvtg-aur/raw/28c81072e419d72a100ada9c393e37fae35ad263/xen_efi_build.patch + patch-gcc6-ovmf-build.sh.patch + #ipxe + patch-gcc6-etherboot-nonnull-compare.patch::https://git.ipxe.org/ipxe.git/patch/e2f14c2f8c10674dbbd4f1228d79dc4c9be213b5 + patch-gcc6-etherboot-rm-unused-string-functions.patch + patch-gcc6-etherboot-nic.c.patch::https://git.ipxe.org/ipxe.git/patch/a5885fbc19c4b60dc1a21624d1a9d1b77a93504e + patch-gcc6-etherboot-ath.patch::https://git.ipxe.org/ipxe.git/patch/63037bdce4a325e5e1da85ffcdf27b77ac670c01 + patch-gcc6-etherboot-sis190.patch::https://git.ipxe.org/ipxe.git/patch/65b32a0b7000f70a5bb1d33190d40f9b04c93172 + patch-gcc6-etherboot-skge.patch::https://git.ipxe.org/ipxe.git/patch/76ec2a0540b25dbd183b9ce185583a4b24278cf1 + patch-gcc6-etherboot-via-velocity.c.patch + patch-gcc6-etherboot-via-rhine.c.patch + patch-gcc6-etherboot-e1000_phy.c.patch + patch-gcc6-etherboot-igb_phy.c.patch + patch-gcc6-etherboot-eth_broadcast.patch::https://git.ipxe.org/ipxe.git/patch/1cbb1581f16e235fafc963c906ad02b38d5457bd + patch-gcc6-etherboot-link-header.patch::https://git.ipxe.org/ipxe.git/patch/6324bd9389521c7e86384591f41eb78a81e9af47 + patch-gcc6-etherboot-ath9k-9287-array.patch + + ## Files + xen.install + 09_xen efi-xen.cfg grub.conf - $pkgname.conf) -noextract=(lwip-1.3.0.tar.gz - zlib-1.2.3.tar.gz - newlib-1.16.0.tar.gz - pciutils-2.2.9.tar.bz2 - polarssl-1.1.4-gpl.tgz - grub-0.97.tar.gz - tpm_emulator-0.7.4.tar.gz - gmp-4.3.2.tar.bz2 - ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) - -sha256sums=('668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371' + $pkgname.conf + tmpfiles.d-$pkgname.conf + + ## XSA patches + https://xenbits.xen.org/xsa/xsa182-unstable.patch + https://xenbits.xen.org/xsa/xsa183-unstable.patch + https://xenbits.xen.org/xsa/xsa184-qemut-master.patch + https://xenbits.xen.org/xsa/xsa184-qemuu-master.patch + https://xenbits.xen.org/xsa/xsa185.patch + https://xenbits.xen.org/xsa/xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch + https://xenbits.xen.org/xsa/xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch + https://xenbits.xen.org/xsa/xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch + https://xenbits.xen.org/xsa/xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch + ) + +if [ "$_build_stubdom" = true ] ; then + echo "building with stubdom" + source+=( + http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz + http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz + http://xenbits.xen.org/xen-extfiles/newlib-1.16.0.tar.gz + http://xenbits.xen.org/xen-extfiles/pciutils-2.2.9.tar.bz2 + http://xenbits.xen.org/xen-extfiles/polarssl-1.1.4-gpl.tgz + http://xenbits.xen.org/xen-extfiles/grub-0.97.tar.gz + http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz + http://xenbits.xen.org/xen-extfiles/gmp-4.3.2.tar.bz2 + #http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.0.tar.gz + ) +fi + + +noextract=( + ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz + ) + +if [ "$_build_stubdom" = true ] ; then + noextract+=( + lwip-1.3.0.tar.gz + zlib-1.2.3.tar.gz + newlib-1.16.0.tar.gz + pciutils-2.2.9.tar.bz2 + polarssl-1.1.4-gpl.tgz + grub-0.97.tar.gz + tpm_emulator-0.7.4.tar.gz + gmp-4.3.2.tar.bz2 + #ocaml-3.11.0.tar.gz + ) +fi + +sha256sums=( + 'be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623' '632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c' + + 'SKIP' + 'SKIP' + + 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3' + '9cf9232c6e9a2b972cd4e1c7aacac9152bb8676db2b794381e1964c9f452e7de' + #'a8ce42777e22af49080131e174b6b89c6e7597539838fb8b17a12280fd10b10b' + '6403a0478e3cfed91dcad53b5f02e71745c98d18ab53930f87aeff1da8d71d55' + #ipxe + '17bb27d95c86af8cc5e499b1b0db9b95bba3f45910d55b420f9f1f5452355fab' + '5d5fe7bf52cbae9da20cfd1fc798699b2355a1af907ebf7f764e227891a759bb' + '9f34f8ecb9a44c688275b838c83efd233bb817f5e222629eac98e116168d704c' + 'cdf7c4a089fe1fe493aafaf669decc3c9e071a0950da77dce526c09088d1c931' + '32595581467772b9fa0fbb5384c99caefeb2cee3306b94b9bd2722084454f5a2' + 'c73d1653b9b1d97ddce717817dc74429cd94c7b22989a08604eaa60df63f75f8' + '448caed900ada2c030738218f5b82f5e29d9dc2e1beef9ebd49cbeb23734df0d' + '61b1518c8d41792ec3b36e0fbfc265adb6c9304945a6fa18d6cc5a197e34b94f' + '577f06e38a9ecbd3576907f2ba1c5040f4f1573fe92912635230702ad157b2e7' + '80a24e9504d3893e83dc60550ffe364a873aaf3dafb52dcdade13f61f2ec0ee5' + 'be05ccd8975af402dcba3a3dc78c173319b2edd636bac11ac11163091453b704' + 'cace870b6629003b55d9df9ef24f3445067239b913c006b6e23da511c1a21d78' + 'a15d73e0fb51fe3c1cf8b80a5ff17d532444016d14495d90d9e642ec60f320a6' + #pkgbuild files + 'c3b5b199c3ed271267d255f34e116258c593d04727ff1fd9199ecd37c1b98fe8' + '06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb' + 'ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f' + '3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568' + '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c' + '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf' + + ## XSA patches + '303400b9a832a3c1d423cc2cc97c2f00482793722f9ef7dd246783a049ac2792' + 'ea0ea4b294332814330f222e6d78eea3b19c394eac8ae22feb4a5bd21e90331f' + 'ea41a25dac82cc5c0ef8e599feb6ed400e99414110d4dba8017d6bd048bc3de4' + '2d675e5e08d9443cf2e5f3aa37521241d6ed898a602b5111d6969023e67b9b6b' + '3328a1953ecdf4de35462ea8396b0927171d718e95f73a87a7f651427bd8f8b4' + 'f2082a36d968a47e477bb5082d0e0aaa58e6cb3dc20b26389f043a9b7b595fa6' + '5a826a32763d82ac83c924f8c89d12aae5f069a4cbc7d5193aa8413a02b6dc05' + 'be9fe85d36c2c1fbca246c1f4d834c3ef11b6ab3d5467da0ac8c079aa5a68de9' + '36b22d6a168be39f31a1c1304f708269a2a10fe5105f7da4a06877d6059f1cd6' + ) + + +if [ "$_build_stubdom" = true ] ; then + sha256sums+=( + #stubdom bits '772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f' '1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e' 'db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07' @@ -64,74 +196,124 @@ sha256sums=('668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371' '4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b' '4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459' '936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775' - '5bc10f125bdc1ae5f9e3eeb58888970d02e7856e94e2435d66ddb717884db016' - '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf' - '06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb' - 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3' - 'deeec880522c1374ad135dc8b4c14c7b301464a60fbac410efb3db70f670eed9' - '22b03d220aa6caa0bbe04868a1839a658a99d020bde95a31952a2a624490ef95' - 'e25d38376e22f6f935d2c0ce1b9d6e6b47ff261b5e6056bc3b47168739d7a992' - '1c44b9dc848bb6c3ef2ab76e4807a0b3ed360aea6b13b5b86d2bf5301d14247b' - '45aae7a1d48357e5f981c12870b5bcac0dd0f630f84e398160d8c9adb42a6674' - '8e16638d0cc366d1eaae7ccbcf43215853b4444a625478ec8f6e0a2c655370d9' - '091f5eed7e33b45cabb232e9a03dd6c1abae1a820b804c888c20d4b7e673618f' - 'ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f' - '3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568' - '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c') + #'ecdd4f8473ab0dee5d3acb5c0a31a4c1dd6aa12179895cf1903dd0f455c43a4f' + + #stubdom patches + ) +fi prepare() { cd "$pkgname-$pkgver/" - ### Patching + ### Copy git sourced tools/firmware + # Copy seabios into place + mkdir tools/firmware/seabios-dir-remote/ + cp -r ../seabios/* tools/firmware/seabios-dir-remote/ + # Copy ovmf into place + mkdir tools/firmware/ovmf-dir-remote/ + cp -r ../ovmf/* tools/firmware/ovmf-dir-remote/ + + ### Patching + # XSA Patches + echo 'XSA patches' # Security Patches - Base + patch -Np1 -i "$srcdir/xsa182-unstable.patch" + patch -Np1 -i "$srcdir/xsa183-unstable.patch" + patch -Np1 -i "$srcdir/xsa185.patch" + patch -Np1 -i "$srcdir/xsa186-0001-x86-emulate-Correct-boundary-interactions-of-emulate.patch" + patch -Np1 -i "$srcdir/xsa186-4.7-0002-hvm-fep-Allow-testing-of-instructions-crossing-the.patch" + patch -Np1 -i "$srcdir/xsa187-4.7-0001-x86-shadow-Avoid-overflowing-sh_ctxt-seg.patch" + patch -Np1 -i "$srcdir/xsa187-4.7-0002-x86-segment-Bounds-check-accesses-to-emulation-ctx.patch" - # Security Patches - qemu-xen + # Security Patches - qemu-xen-traditional + cd 'tools/qemu-xen-traditional/' + patch -Np1 -i "$srcdir/xsa184-qemut-master.patch" + cd '../../' + + # Security Patches - qemu-xen (upstream) + cd 'tools/qemu-xen/' + patch -Np1 -i "$srcdir/xsa184-qemuu-master.patch" + cd '../../' - # Security Patches - qemu-upstream # Compile Patches - patch -p1 -i "$srcdir/gnutls-3.4.0.patch" - patch -p1 -i "$srcdir/gcc5.patch" - echo "etherboot-gcc5.patch" >> tools/firmware/etherboot/patches/series - cp "$srcdir/seabios-gcc5.patch" tools/firmware/ - cp "$srcdir/etherboot-gcc5.patch" tools/firmware/etherboot/patches/ + echo 'Compile patches' + + # Build EFI binary with mingw + if [ $_binutils_efi != true ] + then + #patch -Np1 -i "$srcdir/patch-build-efi-with-mingw.patch" + sed -i.bak '/ EFI_LD/s/LD/LD_EFI/' xen/arch/x86/Makefile + sed -i.bak 's/LD/LD_EFI/' xen/arch/x86/efi/Makefile + sed -i.bak '/EFI_MOUNTPOINT .*/aLD_EFI ?= $(LD)' xen/Makefile + fi # OVMF Compile support (Pulls from GIT repo, so patching to patch after pull request) - echo "Patching OVMF..." patch -Np1 -i "$srcdir/ovmf.patch" - cp "$srcdir/ovmf-gcc4.9-basetools.patch" tools/firmware/ - cp "$srcdir/ovmf-gcc4.9-ovmfpkg.patch" tools/firmware/ + cp "$srcdir/patch-gcc6-ovmf-build.sh.patch" tools/firmware/ # Uncomment line below if you want to enable ATI Passthrough support (some reported successes, untested with 4.4) #patch -Np1 -i "$srcdir/ati-passthrough.patch" + ## GCC-6 + #etherboot + echo -e "patch-gcc6-etherboot-nonnull-compare.patch\npatch-gcc6-etherboot-rm-unused-string-functions.patch\npatch-gcc6-etherboot-nic.c.patch\npatch-gcc6-etherboot-ath.patch\npatch-gcc6-etherboot-sis190.patch\npatch-gcc6-etherboot-skge.patch\npatch-gcc6-etherboot-via-velocity.c.patch\npatch-gcc6-etherboot-via-rhine.c.patch\npatch-gcc6-etherboot-e1000_phy.c.patch\npatch-gcc6-etherboot-igb_phy.c.patch\npatch-gcc6-etherboot-link-header.patch\npatch-gcc6-etherboot-eth_broadcast.patch\npatch-gcc6-etherboot-ath9k-9287-array.patch" >> tools/firmware/etherboot/patches/series + cp ${srcdir}/patch-gcc6-etherboot-*.patch tools/firmware/etherboot/patches/ + ## Fix Install Paths sed -i 's:\$localstatedir/run/xen:/run/xen:' m4/paths.m4 sed -i 's:/var/run:/run:' tools/ocaml/xenstored/define.ml sed -i 's:/var/run:/run:' tools/ocaml/xenstored/systemd_stubs.c - # Copy supporting tarballs into place - cp "$srcdir/lwip-1.3.0.tar.gz" stubdom/ - cp "$srcdir/zlib-1.2.3.tar.gz" stubdom/ - cp "$srcdir/newlib-1.16.0.tar.gz" stubdom/ - cp "$srcdir/pciutils-2.2.9.tar.bz2" stubdom/ - cp "$srcdir/polarssl-1.1.4-gpl.tgz" stubdom/ - cp "$srcdir/grub-0.97.tar.gz" stubdom/ - cp "$srcdir/tpm_emulator-0.7.4.tar.gz" stubdom/ - cp "$srcdir/gmp-4.3.2.tar.bz2" stubdom/ + if [ "$_build_stubdom" = true ] ; then + # Copy supporting tarballs into place + cp "$srcdir/lwip-1.3.0.tar.gz" stubdom/ + cp "$srcdir/zlib-1.2.3.tar.gz" stubdom/ + cp "$srcdir/newlib-1.16.0.tar.gz" stubdom/ + cp "$srcdir/pciutils-2.2.9.tar.bz2" stubdom/ + cp "$srcdir/polarssl-1.1.4-gpl.tgz" stubdom/ + cp "$srcdir/grub-0.97.tar.gz" stubdom/ + cp "$srcdir/tpm_emulator-0.7.4.tar.gz" stubdom/ + cp "$srcdir/gmp-4.3.2.tar.bz2" stubdom/ + #cp "$srcdir/ocaml-3.11.0.tar.gz" stubdom/ + + ## Stubdom patches + cd 'extras/mini-os' + cd '../../' + + fi + + #etherboot cp "$srcdir/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz" tools/firmware/etherboot/ipxe.tar.gz + #Workaround for cannot compute sizeof (unsigned short) + #Makefile:170: recipe for target 'gmp-x86_64' failed + #Probably not safe! + #sed -i.bak "/< gmp.patch/a\ sed -i.bak 's/\\\\(\\\\s*\\\\)\\\\(fprintf (f,\\\\)\\\\(.*\\\\)/\\\\1\\\\2\\\\3\\\\n\\\\1clearerr(f);/' \$@/configure" stubdom/Makefile + + } build() { cd "$pkgname-$pkgver/" - export CFLAGS=-fno-caller-saves + export LD_EFI="/usr/x86_64-w64-mingw32/bin/ld" ./autogen.sh + if [ "$_build_stubdom" = true ] ; then + _config_stubdom='--enable-stubdom' + fi ./configure PYTHON=/usr/bin/python2 --prefix=/usr --sbindir=/usr/bin --with-sysconfig-leaf-dir=conf.d --with-initddir=/etc/init.d \ - --enable-systemd --disable-docs --enable-stubdom --enable-qemu-traditional --enable-rombios \ - --with-extra-qemuu-configure-args="--disable-bluez --disable-gtk --enable-spice --enable-usb-redir" # --enable-ovmf - make LANG=C PYTHON=python2 + --enable-systemd --disable-docs --enable-ovmf \ + "${_config_stubdom:---disable-stubdom}" \ + --with-extra-qemuu-configure-args="--disable-bluez --disable-gtk --enable-spice --enable-usb-redir" + #--with-system-qemu --with-system-seabios --with-system-ovmf + #defaults --enable-qemu-traditional --enable-rombios \ + make LANG=C PYTHON=python2 dist-misc + make LANG=C PYTHON=python2 dist-xen + make LANG=C PYTHON=python2 dist-tools + if [ "$_build_stubdom" = true ] ; then + make LANG=C PYTHON=python2 dist-stubdom + fi } package() { @@ -162,7 +344,7 @@ package() { cd usr/ cp -r lib64/* lib/ rm -rf lib64 - cd ../ + cd ../ fi # If EFI binaries build, move to /boot @@ -172,12 +354,12 @@ package() { fi # Compress syms file and move to a share location - gzip boot/$pkgname-syms-* - mv boot/$pkgname-syms-*.gz usr/share/xen + #gzip boot/$pkgname-syms-* + #mv boot/$pkgname-syms-*.gz usr/share/xen ##### Kill unwanted stuff ##### # hypervisor symlinks - rm -f boot/xen{,-4,-4.5,-4.5-rc}.gz + rm -f boot/xen{,-4,-4.7,-4.7-rc}.gz # Documentation cleanup ( see xen-docs package ) rm -rf usr/share/doc diff --git a/etherboot-gcc5.patch b/etherboot-gcc5.patch deleted file mode 100644 index 38838ce9b834..000000000000 --- a/etherboot-gcc5.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c 2011-12-11 03:28:04.000000000 +0100 -+++ b/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c 2015-05-25 11:14:30.732759966 +0200 -@@ -1141,7 +1141,7 @@ - REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW, - AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); - -- if (!on != aniState->ofdmWeakSigDetectOff) { -+ if ((!on) != aniState->ofdmWeakSigDetectOff) { - if (on) - ah->stats.ast_ani_ofdmon++; - else -@@ -1307,7 +1307,7 @@ - REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW, - AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); - -- if (!on != aniState->ofdmWeakSigDetectOff) { -+ if ((!on) != aniState->ofdmWeakSigDetectOff) { - DBG2("ath9k: " - "** ch %d: ofdm weak signal: %s=>%s\n", - chan->channel, ---- a/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c 2011-12-11 03:28:04.000000000 +0100 -+++ b/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c 2015-05-25 10:33:05.576229086 +0200 -@@ -859,7 +859,7 @@ - REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW, - AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); - -- if (!on != aniState->ofdmWeakSigDetectOff) { -+ if ((!on) != aniState->ofdmWeakSigDetectOff) { - DBG2("ath9k: " - "** ch %d: ofdm weak signal: %s=>%s\n", - chan->channel, -@@ -1013,7 +1013,7 @@ - AR_PHY_MRC_CCK_ENABLE, is_on); - REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL, - AR_PHY_MRC_CCK_MUX_REG, is_on); -- if (!is_on != aniState->mrcCCKOff) { -+ if ((!is_on) != aniState->mrcCCKOff) { - DBG2("ath9k: " - "** ch %d: MRC CCK: %s=>%s\n", - chan->channel, diff --git a/gcc5.patch b/gcc5.patch deleted file mode 100644 index e73e8a49799d..000000000000 --- a/gcc5.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/tools/firmware/Makefile 2015-07-04 16:20:40.986748538 -0500 -+++ a/tools/firmware/Makefile 2015-07-04 16:21:59.058388280 -0500 -@@ -29,6 +29,7 @@ - - seabios-dir: - GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir -+ patch -Np1 -i seabios-gcc5.patch - $(MAKE) -C seabios-dir defconfig - - .PHONY: all diff --git a/ovmf-gcc4.9-basetools.patch b/ovmf-gcc4.9-basetools.patch deleted file mode 100644 index 7af48e8ac27c..000000000000 --- a/ovmf-gcc4.9-basetools.patch +++ /dev/null @@ -1,231 +0,0 @@ -diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index f99ddf6..f9e1e6c 100644 ---- a/ovmf-dir/BaseTools/Conf/tools_def.template -+++ b/ovmf-dir/BaseTools/Conf/tools_def.template -@@ -159,6 +159,12 @@ - DEFINE GCC47_IA32_PREFIX = /usr/bin/
- DEFINE GCC47_X64_PREFIX = /usr/bin/
-
-+DEFINE GCC48_IA32_PREFIX = /usr/bin/
-+DEFINE GCC48_X64_PREFIX = /usr/bin/
-+
-+DEFINE GCC49_IA32_PREFIX = /usr/bin/
-+DEFINE GCC49_X64_PREFIX = /usr/bin/
-+
- DEFINE UNIX_IASL_BIN = /usr/bin/iasl
- #DEFINE UNIX_IASL_BIN = $(HOME)/programs/iasl
- DEFINE WIN_ASL_BIN_DIR = C:\ASL
-@@ -307,6 +310,12 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G - # Required to build platforms or ACPI tables:
- # Intel(r) ACPI Compiler v20101013 from
- # http://www.acpica.org/downloads/previous_releases.php
-+# GCC49 -Linux- Requires:
-+# GCC 4.9
-+# Optional:
-+# Required to build platforms or ACPI tables:
-+# Intel(r) ACPI Compiler v20101013 from
-+# http://www.acpica.org/downloads/previous_releases.php
- # ELFGCC -Linux- Requires:
- # GCC(this tool chain uses whatever version of gcc and binutils that is installed in /usr/bin)
- # Optional:
-@@ -3216,6 +3225,23 @@ DEFINE GCC48_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) - DEFINE GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC47_ARM_ASLDLINK_FLAGS)
- DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
-
-+DEFINE GCC_ARM_AARCH64_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) --entry ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) -+DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC47_IA32_CC_FLAGS)
-+DEFINE GCC49_X64_CC_FLAGS = DEF(GCC47_X64_CC_FLAGS)
-+DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.9-ld-script
-+DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable
-+DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
-+DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64
-+DEFINE GCC49_ASM_FLAGS = DEF(GCC47_ASM_FLAGS)
-+DEFINE GCC49_ARM_ASM_FLAGS = DEF(GCC47_ARM_ASM_FLAGS)
-+DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC47_AARCH64_ASM_FLAGS)
-+DEFINE GCC49_ARM_CC_FLAGS = DEF(GCC47_ARM_CC_FLAGS)
-+DEFINE GCC49_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS)
-+DEFINE GCC49_ARM_DLINK_FLAGS = DEF(GCC47_ARM_DLINK_FLAGS)
-+DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON)
-+DEFINE GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS) --oformat=elf32-littlearm
-+DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
-+
- ####################################################################################
- #
- # Unix GCC And Intel Linux ACPI Compiler
-@@ -3769,6 +3794,126 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s -
- ####################################################################################
- #
-+# GCC 4.9 - This configuration is used to compile under Linux to produce
-+# PE/COFF binaries using GCC 4.9.
-+#
-+####################################################################################
-+*_GCC49_*_*_FAMILY = GCC
-+
-+*_GCC49_*_MAKE_PATH = make
-+*_GCC49_*_ASL_PATH = DEF(UNIX_IASL_BIN)
-+
-+*_GCC49_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
-+*_GCC49_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
-+*_GCC49_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
-+*_GCC49_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
-+*_GCC49_*_APP_FLAGS =
-+*_GCC49_*_ASL_FLAGS = DEF(IASL_FLAGS)
-+*_GCC49_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
-+
-+##################
-+# GCC49 IA32 definitions
-+##################
-+*_GCC49_IA32_OBJCOPY_PATH = DEF(GCC49_IA32_PREFIX)objcopy
-+*_GCC49_IA32_CC_PATH = DEF(GCC49_IA32_PREFIX)gcc
-+*_GCC49_IA32_SLINK_PATH = DEF(GCC49_IA32_PREFIX)ar
-+*_GCC49_IA32_DLINK_PATH = DEF(GCC49_IA32_PREFIX)ld
-+*_GCC49_IA32_ASLDLINK_PATH = DEF(GCC49_IA32_PREFIX)ld
-+*_GCC49_IA32_ASM_PATH = DEF(GCC49_IA32_PREFIX)gcc
-+*_GCC49_IA32_PP_PATH = DEF(GCC49_IA32_PREFIX)gcc
-+*_GCC49_IA32_VFRPP_PATH = DEF(GCC49_IA32_PREFIX)gcc
-+*_GCC49_IA32_ASLCC_PATH = DEF(GCC49_IA32_PREFIX)gcc
-+*_GCC49_IA32_ASLPP_PATH = DEF(GCC49_IA32_PREFIX)gcc
-+*_GCC49_IA32_RC_PATH = DEF(GCC49_IA32_PREFIX)objcopy
-+
-+*_GCC49_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
-+*_GCC49_IA32_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -m elf_i386
-+*_GCC49_IA32_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m32 -march=i386
-+*_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
-+*_GCC49_IA32_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
-+*_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
-+*_GCC49_IA32_OBJCOPY_FLAGS =
-+
-+##################
-+# GCC49 X64 definitions
-+##################
-+*_GCC49_X64_OBJCOPY_PATH = DEF(GCC49_X64_PREFIX)objcopy
-+*_GCC49_X64_CC_PATH = DEF(GCC49_X64_PREFIX)gcc
-+*_GCC49_X64_SLINK_PATH = DEF(GCC49_X64_PREFIX)ar
-+*_GCC49_X64_DLINK_PATH = DEF(GCC49_X64_PREFIX)ld
-+*_GCC49_X64_ASLDLINK_PATH = DEF(GCC49_X64_PREFIX)ld
-+*_GCC49_X64_ASM_PATH = DEF(GCC49_X64_PREFIX)gcc
-+*_GCC49_X64_PP_PATH = DEF(GCC49_X64_PREFIX)gcc
-+*_GCC49_X64_VFRPP_PATH = DEF(GCC49_X64_PREFIX)gcc
-+*_GCC49_X64_ASLCC_PATH = DEF(GCC49_X64_PREFIX)gcc
-+*_GCC49_X64_ASLPP_PATH = DEF(GCC49_X64_PREFIX)gcc
-+*_GCC49_X64_RC_PATH = DEF(GCC49_X64_PREFIX)objcopy
-+
-+*_GCC49_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
-+*_GCC49_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -m elf_x86_64
-+*_GCC49_X64_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m64
-+*_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
-+*_GCC49_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS)
-+*_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
-+*_GCC49_X64_OBJCOPY_FLAGS =
-+
-+##################
-+# GCC49 ARM definitions
-+##################
-+*_GCC49_ARM_CC_PATH = ENV(GCC49_ARM_PREFIX)gcc
-+*_GCC49_ARM_SLINK_PATH = ENV(GCC49_ARM_PREFIX)ar
-+*_GCC49_ARM_DLINK_PATH = ENV(GCC49_ARM_PREFIX)ld
-+*_GCC49_ARM_ASLDLINK_PATH = ENV(GCC49_ARM_PREFIX)ld
-+*_GCC49_ARM_ASM_PATH = ENV(GCC49_ARM_PREFIX)gcc
-+*_GCC49_ARM_PP_PATH = ENV(GCC49_ARM_PREFIX)gcc
-+*_GCC49_ARM_VFRPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
-+*_GCC49_ARM_ASLCC_PATH = ENV(GCC49_ARM_PREFIX)gcc
-+*_GCC49_ARM_ASLPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
-+*_GCC49_ARM_RC_PATH = ENV(GCC49_ARM_PREFIX)objcopy
-+
-+*_GCC49_ARM_ARCHCC_FLAGS = -mthumb
-+*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
-+
-+*_GCC49_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
-+*_GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
-+*_GCC49_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
-+*_GCC49_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS)
-+*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
-+*_GCC49_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
-+*_GCC49_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-+*_GCC49_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
-+
-+ DEBUG_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
-+RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-variable
-+
-+##################
-+# GCC49 AARCH64 definitions
-+##################
-+*_GCC49_AARCH64_CC_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
-+*_GCC49_AARCH64_SLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ar
-+*_GCC49_AARCH64_DLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ld
-+*_GCC49_AARCH64_ASLDLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ld
-+*_GCC49_AARCH64_ASM_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
-+*_GCC49_AARCH64_PP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
-+*_GCC49_AARCH64_VFRPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
-+*_GCC49_AARCH64_ASLCC_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
-+*_GCC49_AARCH64_ASLPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
-+*_GCC49_AARCH64_RC_PATH = ENV(GCC49_AARCH64_PREFIX)objcopy
-+
-+*_GCC49_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
-+*_GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
-+*_GCC49_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS)
-+*_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
-+*_GCC49_AARCH64_PLATFORM_FLAGS =
-+*_GCC49_AARCH64_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
-+*_GCC49_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
-+*_GCC49_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
-+
-+ DEBUG_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
-+RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable
-+
-+####################################################################################
-+#
- # Cygwin GCC And Intel ACPI Compiler
- #
- ####################################################################################
-diff --git a/BaseTools/Scripts/gcc4.9-ld-script b/BaseTools/Scripts/gcc4.9-ld-script -new file mode 100644 -index 0000000..b692328 ---- /dev/null -+++ b/ovmf-dir/BaseTools/Scripts/gcc4.9-ld-script -@@ -0,0 +1,44 @@ -+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
-+SECTIONS
-+{
-+ /* . = 0 + SIZEOF_HEADERS; */
-+ . = 0x280;
-+ .text ALIGN(0x20) :
-+ {
-+ *(.text .stub .text.* .gnu.linkonce.t.*)
-+ . = ALIGN(0x20);
-+ } =0x90909090
-+ .data ALIGN(0x40) :
-+ {
-+ *(
-+ .rodata .rodata.* .gnu.linkonce.r.*
-+ .data .data.* .gnu.linkonce.d.*
-+ .bss .bss.*
-+ *COM*
-+ )
-+ . = ALIGN(0x20);
-+ }
-+ .eh_frame ALIGN(0x20) :
-+ {
-+ KEEP (*(.eh_frame))
-+ }
-+ .got ALIGN(0x20) :
-+ {
-+ *(.got .got.*)
-+ . = ALIGN(0x20);
-+ }
-+ .rela ALIGN(0x20) :
-+ {
-+ *(.rela .rela.*)
-+ }
-+ /DISCARD/ : {
-+ *(.note.GNU-stack) *(.gnu_debuglink)
-+ *(.interp)
-+ *(.dynsym)
-+ *(.dynstr)
-+ *(.dynamic)
-+ *(.hash)
-+ *(.comment)
-+ }
-+}
-+
diff --git a/ovmf-gcc4.9-ovmfpkg.patch b/ovmf-gcc4.9-ovmfpkg.patch deleted file mode 100644 index b060d3e48d2e..000000000000 --- a/ovmf-gcc4.9-ovmfpkg.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/ovmf-dir/OvmfPkg/build.sh -+++ b/ovmf-dir/OvmfPkg/build.sh -@@ -82,9 +82,15 @@ - 4.6.*) - TARGET_TOOLS=GCC46 - ;; -- 4.[789].*) -+ 4.7.*) - TARGET_TOOLS=GCC47 - ;; -+ 4.8.*) -+ TARGET_TOOLS=GCC48 -+ ;; -+ 4.9.*|4.1[0-9].*) -+ TARGET_TOOLS=GCC49 -+ ;; - *) - TARGET_TOOLS=GCC44 - ;; diff --git a/ovmf.patch b/ovmf.patch index a31b89608c7e..19ad7d326015 100644 --- a/ovmf.patch +++ b/ovmf.patch @@ -1,13 +1,12 @@ ---- a/tools/firmware/Makefile 2014-10-26 23:26:08.002103548 -0500 -+++ b/tools/firmware/Makefile 2014-10-26 23:25:50.112361448 -0500 -@@ -19,6 +19,10 @@ +--- a/tools/firmware/Makefile ++++ b/tools/firmware/Makefile +@@ -19,6 +19,9 @@ ovmf-dir: GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) $(OVMF_UPSTREAM_REVISION) ovmf-dir + sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/BinWrappers/PosixLike"/* || true + sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/Tests/GNUmakefile" -+ patch -Np1 -i ovmf-gcc4.9-basetools.patch -+ patch -Np1 -i ovmf-gcc4.9-ovmfpkg.patch ++ patch -Np1 -i patch-gcc6-ovmf-build.sh.patch cp ovmf-makefile ovmf-dir/Makefile; seabios-dir: diff --git a/patch-gcc6-etherboot-ath9k-9287-array.patch b/patch-gcc6-etherboot-ath9k-9287-array.patch new file mode 100644 index 000000000000..7b1f369b1edf --- /dev/null +++ b/patch-gcc6-etherboot-ath9k-9287-array.patch @@ -0,0 +1,68 @@ +From 83d6f1f15f8cce844b0a131cbc63e444620e48b5 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann <arnd@arndb.de> +Date: Mon, 14 Mar 2016 15:18:36 +0100 +Subject: ath9k: fix buffer overrun for ar9287 + +Code that was added back in 2.6.38 has an obvious overflow +when accessing a static array, and at the time it was added +only a code comment was put in front of it as a reminder +to have it reviewed properly. + +This has not happened, but gcc-6 now points to the specific +overflow: + +drivers/net/wireless/ath/ath9k/eeprom.c: In function 'ath9k_hw_get_gain_boundaries_pdadcs': +drivers/net/wireless/ath/ath9k/eeprom.c:483:44: error: array subscript is above array bounds [-Werror=array-bounds] + maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4]; + ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ + +It turns out that the correct array length exists in the local +'intercepts' variable of this function, so we can just use that +instead of hardcoding '4', so this patch changes all three +instances to use that variable. The other two instances were +already correct, but it's more consistent this way. + +Signed-off-by: Arnd Bergmann <arnd@arndb.de> +Fixes: 940cd2c12ebf ("ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs") +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/wireless/ath/ath9k/eeprom.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c +index 73fb423..a794157 100644 +--- a/src/drivers/net/ath/ath9k/ath9k_eeprom.c ++++ b/src/drivers/net/ath/ath9k/ath9k_eeprom.c +@@ -477,10 +477,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, + + if (match) { + if (AR_SREV_9287(ah)) { +- /* FIXME: array overrun? */ + for (i = 0; i < numXpdGains; i++) { + minPwrT4[i] = data_9287[idxL].pwrPdg[i][0]; +- maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4]; ++ maxPwrT4[i] = data_9287[idxL].pwrPdg[i][intercepts - 1]; + ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], + data_9287[idxL].pwrPdg[i], + data_9287[idxL].vpdPdg[i], +@@ -490,7 +489,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, + } else if (eeprom_4k) { + for (i = 0; i < numXpdGains; i++) { + minPwrT4[i] = data_4k[idxL].pwrPdg[i][0]; +- maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4]; ++ maxPwrT4[i] = data_4k[idxL].pwrPdg[i][intercepts - 1]; + ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], + data_4k[idxL].pwrPdg[i], + data_4k[idxL].vpdPdg[i], +@@ -500,7 +499,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, + } else { + for (i = 0; i < numXpdGains; i++) { + minPwrT4[i] = data_def[idxL].pwrPdg[i][0]; +- maxPwrT4[i] = data_def[idxL].pwrPdg[i][4]; ++ maxPwrT4[i] = data_def[idxL].pwrPdg[i][intercepts - 1]; + ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], + data_def[idxL].pwrPdg[i], + data_def[idxL].vpdPdg[i], +-- +cgit v0.12 + diff --git a/patch-gcc6-etherboot-e1000_phy.c.patch b/patch-gcc6-etherboot-e1000_phy.c.patch new file mode 100644 index 000000000000..4cd6c246c1b9 --- /dev/null +++ b/patch-gcc6-etherboot-e1000_phy.c.patch @@ -0,0 +1,20 @@ +diff -aur a/src/drivers/net/e1000/e1000_phy.c b/src/drivers/net/e1000/e1000_phy.c +--- a/src/drivers/net/e1000/e1000_phy.c 2016-05-12 19:40:13.950772568 +1000 ++++ b/src/drivers/net/e1000/e1000_phy.c 2016-05-12 19:41:08.429089344 +1000 +@@ -164,7 +164,7 @@ + + DEBUGFUNC("e1000_get_phy_id"); + +- if (!(phy->ops.read_reg)) ++ if (!(phy->ops.read_reg)) { + goto out; + + ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); +@@ -179,6 +179,7 @@ + + phy->id |= (u32)(phy_id & PHY_REVISION_MASK); + phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); ++ } + + out: + return ret_val; diff --git a/patch-gcc6-etherboot-igb_phy.c.patch b/patch-gcc6-etherboot-igb_phy.c.patch new file mode 100644 index 000000000000..44beb4baa932 --- /dev/null +++ b/patch-gcc6-etherboot-igb_phy.c.patch @@ -0,0 +1,20 @@ +diff -aur a/src/drivers/net/igb/igb_phy.c b/src/drivers/net/igb/igb_phy.c +--- a/src/drivers/net/igb/igb_phy.c 2016-05-12 19:53:45.063246296 +1000 ++++ b/src/drivers/net/igb/igb_phy.c 2016-05-12 19:54:09.992692278 +1000 +@@ -88,7 +88,7 @@ + + DEBUGFUNC("igb_get_phy_id"); + +- if (!(phy->ops.read_reg)) ++ if (!(phy->ops.read_reg)) { + goto out; + + ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); +@@ -103,6 +103,7 @@ + + phy->id |= (u32)(phy_id & PHY_REVISION_MASK); + phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); ++ } + + out: + return ret_val; diff --git a/patch-gcc6-etherboot-rm-unused-string-functions.patch b/patch-gcc6-etherboot-rm-unused-string-functions.patch new file mode 100644 index 000000000000..991d433301f4 --- /dev/null +++ b/patch-gcc6-etherboot-rm-unused-string-functions.patch @@ -0,0 +1,257 @@ +From b54167b8b6a35c7dab19bbe4b421d447036558d4 Mon Sep 17 00:00:00 2001 +From: Michael Brown <mcb30@ipxe.org> +Date: Mon, 16 Feb 2015 15:33:32 +0000 +Subject: [PATCH] [libc] Remove unused string functions + +Signed-off-by: Michael Brown <mcb30@ipxe.org> +--- + src/core/stringextra.c | 188 ------------------------------------------------ + src/include/string.h | 6 -- + 2 files changed, 0 insertions(+), 194 deletions(-) + +diff --git a/src/core/stringextra.c b/src/core/stringextra.c +index 0a50985..18ffc63 100644 +--- a/src/core/stringextra.c ++++ b/src/core/stringextra.c +@@ -38,122 +38,6 @@ FILE_LICENCE ( GPL2_ONLY ); + + /* *** FROM string.c *** */ + +-#ifndef __HAVE_ARCH_STRNICMP +-/** +- * strnicmp - Case insensitive, length-limited string comparison +- * @s1: One string +- * @s2: The other string +- * @len: the maximum number of characters to compare +- */ +-int strnicmp(const char *s1, const char *s2, size_t len) +-{ +- /* Yes, Virginia, it had better be unsigned */ +- unsigned char c1, c2; +- +- c1 = 0; c2 = 0; +- if (len) { +- do { +- c1 = *s1; c2 = *s2; +- s1++; s2++; +- if (!c1) +- break; +- if (!c2) +- break; +- if (c1 == c2) +- continue; +- c1 = tolower(c1); +- c2 = tolower(c2); +- if (c1 != c2) +- break; +- } while (--len); +- } +- return (int)c1 - (int)c2; +-} +-#endif +- +-char * ___strtok; +- +-#ifndef __HAVE_ARCH_STRNCAT +-/** +- * strncat - Append a length-limited, %NUL-terminated string to another +- * @dest: The string to be appended to +- * @src: The string to append to it +- * @count: The maximum numbers of bytes to copy +- * +- * Note that in contrast to strncpy, strncat ensures the result is +- * terminated. +- */ +-char * strncat(char *dest, const char *src, size_t count) +-{ +- char *tmp = dest; +- +- if (count) { +- while (*dest) +- dest++; +- while ((*dest++ = *src++)) { +- if (--count == 0) { +- *dest = '\0'; +- break; +- } +- } +- } +- +- return tmp; +-} +-#endif +- +-#ifndef __HAVE_ARCH_STRSPN +-/** +- * strspn - Calculate the length of the initial substring of @s which only +- * contain letters in @accept +- * @s: The string to be searched +- * @accept: The string to search for +- */ +-size_t strspn(const char *s, const char *accept) +-{ +- const char *p; +- const char *a; +- size_t count = 0; +- +- for (p = s; *p != '\0'; ++p) { +- for (a = accept; *a != '\0'; ++a) { +- if (*p == *a) +- break; +- } +- if (*a == '\0') +- return count; +- ++count; +- } +- +- return count; +-} +-#endif +- +-#ifndef __HAVE_ARCH_STRCSPN +-/** +- * strcspn - Calculate the length of the initial substring of @s which only +- * contain letters not in @reject +- * @s: The string to be searched +- * @accept: The string to search for +- */ +-size_t strcspn(const char *s, const char *reject) +-{ +- const char *p; +- const char *r; +- size_t count = 0; +- +- for (p = s; *p != '\0'; ++p) { +- for (r = reject; *r != '\0'; ++r) { +- if (*p == *r) +- return count; +- } +- ++count; +- } +- +- return count; +-} +-#endif +- + #ifndef __HAVE_ARCH_STRPBRK + /** + * strpbrk - Find the first occurrence of a set of characters +@@ -174,35 +58,6 @@ char * strpbrk(const char * cs,const char * ct) + } + #endif + +-#ifndef __HAVE_ARCH_STRTOK +-/** +- * strtok - Split a string into tokens +- * @s: The string to be searched +- * @ct: The characters to search for +- * +- * WARNING: strtok is deprecated, use strsep instead. +- */ +-char * strtok(char * s,const char * ct) +-{ +- char *sbegin, *send; +- +- sbegin = s ? s : ___strtok; +- if (!sbegin) { +- return NULL; +- } +- sbegin += strspn(sbegin,ct); +- if (*sbegin == '\0') { +- ___strtok = NULL; +- return( NULL ); +- } +- send = strpbrk( sbegin, ct); +- if (send && *send != '\0') +- *send++ = '\0'; +- ___strtok = send; +- return (sbegin); +-} +-#endif +- + #ifndef __HAVE_ARCH_STRSEP + /** + * strsep - Split a string into tokens +@@ -230,46 +85,3 @@ char * strsep(char **s, const char *ct) + return sbegin; + } + #endif +- +-#ifndef __HAVE_ARCH_BCOPY +-/** +- * bcopy - Copy one area of memory to another +- * @src: Where to copy from +- * @dest: Where to copy to +- * @count: The size of the area. +- * +- * Note that this is the same as memcpy(), with the arguments reversed. +- * memcpy() is the standard, bcopy() is a legacy BSD function. +- * +- * You should not use this function to access IO space, use memcpy_toio() +- * or memcpy_fromio() instead. +- */ +-char * bcopy(const char * src, char * dest, int count) +-{ +- return memmove(dest,src,count); +-} +-#endif +- +-#ifndef __HAVE_ARCH_MEMSCAN +-/** +- * memscan - Find a character in an area of memory. +- * @addr: The memory area +- * @c: The byte to search for +- * @size: The size of the area. +- * +- * returns the address of the first occurrence of @c, or 1 byte past +- * the area if @c is not found +- */ +-void * memscan(const void * addr, int c, size_t size) +-{ +- unsigned char * p = (unsigned char *) addr; +- +- while (size) { +- if (*p == c) +- return (void *) p; +- p++; +- size--; +- } +- return (void *) p; +-} +-#endif +diff --git a/src/include/string.h b/src/include/string.h +index 3482e1b..dfd78a6 100644 +--- a/src/include/string.h ++++ b/src/include/string.h +@@ -19,11 +19,9 @@ FILE_LICENCE ( GPL2_ONLY ); + #include <stddef.h> + #include <bits/string.h> + +-int __pure strnicmp(const char *s1, const char *s2, size_t len) __nonnull; + char * strcpy(char * dest,const char *src) __nonnull; + char * strncpy(char * dest,const char *src,size_t count) __nonnull; + char * strcat(char * dest, const char * src) __nonnull; +-char * strncat(char *dest, const char *src, size_t count) __nonnull; + int __pure strcmp(const char * cs,const char * ct) __nonnull; + int __pure strncmp(const char * cs,const char * ct, + size_t count) __nonnull; +@@ -31,16 +29,12 @@ char * __pure strchr(const char * s, int c) __nonnull; + char * __pure strrchr(const char * s, int c) __nonnull; + size_t __pure strlen(const char * s) __nonnull; + size_t __pure strnlen(const char * s, size_t count) __nonnull; +-size_t __pure strspn(const char *s, const char *accept) __nonnull; +-size_t __pure strcspn(const char *s, const char *reject) __nonnull; + char * __pure strpbrk(const char * cs,const char * ct) __nonnull; +-char * strtok(char * s,const char * ct) __nonnull; + char * strsep(char **s, const char *ct) __nonnull; + void * memset(void * s,int c,size_t count) __nonnull; + void * memmove(void * dest,const void *src,size_t count) __nonnull; + int __pure memcmp(const void * cs,const void * ct, + size_t count) __nonnull; +-void * __pure memscan(const void * addr, int c, size_t size) __nonnull; + char * __pure strstr(const char * s1,const char * s2) __nonnull; + void * __pure memchr(const void *s, int c, size_t n) __nonnull; + char * __malloc strdup(const char *s) __nonnull; +-- +1.7.9 + diff --git a/patch-gcc6-etherboot-via-rhine.c.patch b/patch-gcc6-etherboot-via-rhine.c.patch new file mode 100644 index 000000000000..697208ae3fd8 --- /dev/null +++ b/patch-gcc6-etherboot-via-rhine.c.patch @@ -0,0 +1,21 @@ +diff -aru a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c +--- a/src/drivers/net/via-rhine.c 2016-05-12 19:24:14.047825550 +1000 ++++ b/src/drivers/net/via-rhine.c 2016-05-12 19:33:18.061858418 +1000 +@@ -945,13 +945,15 @@ + /* added comment by guard */ + /* For supporting VT6107, please use revision id to recognize different chips in driver */ + // if (tp->chip_id == 0x3065) +- if( tp->chip_revision < 0x80 && tp->chip_revision >=0x40 ) ++ if( tp->chip_revision < 0x80 && tp->chip_revision >=0x40 ) { + intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; + intr_status = (intr_status & ~DEFAULT_INTR); +- if ( action == ENABLE ) ++ if ( action == ENABLE ) { + intr_status = intr_status | DEFAULT_INTR; + outw(intr_status, nic->ioaddr + IntrEnable); ++ } + break; ++ } + case FORCE : + outw(0x0010, nic->ioaddr + 0x84); + break; diff --git a/patch-gcc6-etherboot-via-velocity.c.patch b/patch-gcc6-etherboot-via-velocity.c.patch new file mode 100644 index 000000000000..36a3d81158f4 --- /dev/null +++ b/patch-gcc6-etherboot-via-velocity.c.patch @@ -0,0 +1,12 @@ +diff -aur a/src/drivers/net/via-velocity.c b/src/drivers/net/via-velocity.c +--- a/src/drivers/net/via-velocity.c 2016-05-12 19:14:33.231788641 +1000 ++++ b/src/drivers/net/via-velocity.c 2016-05-12 19:17:08.235494746 +1000 +@@ -69,7 +69,7 @@ + + /* NIC specific static variables go here */ + #define VELOCITY_PARAM(N,D) \ +- static const int N[MAX_UNITS]=OPTION_DEFAULT; ++ static __attribute__ ((unused)) const int N[MAX_UNITS]=OPTION_DEFAULT; + /* MODULE_PARM(N, "1-" __MODULE_STRING(MAX_UNITS) "i");\ + MODULE_PARM_DESC(N, D); */ + diff --git a/patch-gcc6-ovmf-build.sh.patch b/patch-gcc6-ovmf-build.sh.patch new file mode 100644 index 000000000000..3da5e1c324e4 --- /dev/null +++ b/patch-gcc6-ovmf-build.sh.patch @@ -0,0 +1,12 @@ +diff -aur a/ovmf-dir/OvmfPkg/build.sh b/ovmf-dir/OvmfPkg/build.sh +--- a/ovmf-dir/OvmfPkg/build.sh 2016-05-12 12:32:47.417562962 +1000 ++++ b/ovmf-dir/OvmfPkg/build.sh 2016-05-12 12:32:06.440897741 +1000 +@@ -95,7 +95,7 @@ + 4.8.*) + TARGET_TOOLS=GCC48 + ;; +- 4.9.*|4.1[0-9].*|5.*.*) ++ 4.9.*|4.1[0-9].*|5.*.*|6.*.*) + TARGET_TOOLS=GCC49 + ;; + *) diff --git a/seabios-gcc5.patch b/seabios-gcc5.patch deleted file mode 100644 index 9f7676ba3872..000000000000 --- a/seabios-gcc5.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/seabios-dir-remote/src/kbd.c -+++ b/seabios-dir-remote/src/kbd.c -@@ -11,7 +11,7 @@ - #include "hw/ps2port.h" // ps2_kbd_command - #include "hw/usb-hid.h" // usb_kbd_command - #include "output.h" // debug_enter --#include "stacks.h" // stack_hop -+#include "stacks.h" // yield - #include "string.h" // memset - #include "util.h" // kbd_init - -@@ -117,8 +117,8 @@ static int - kbd_command(int command, u8 *param) - { - if (usb_kbd_active()) -- return stack_hop(command, (u32)param, usb_kbd_command); -- return stack_hop(command, (u32)param, ps2_kbd_command); -+ return usb_kbd_command(command, param); -+ return ps2_kbd_command(command, param); - } - - // read keyboard input -diff --git a/src/mouse.c b/src/mouse.c -index 83e499d..6d1f5b7 100644 ---- a/seabios-dir-remote/src/mouse.c -+++ b/seabios-dir-remote/src/mouse.c -@@ -10,7 +10,7 @@ - #include "hw/ps2port.h" // ps2_mouse_command - #include "hw/usb-hid.h" // usb_mouse_command - #include "output.h" // dprintf --#include "stacks.h" // stack_hop -+#include "stacks.h" // stack_hop_back - #include "util.h" // mouse_init - - void -@@ -27,8 +27,8 @@ static int - mouse_command(int command, u8 *param) - { - if (usb_mouse_active()) -- return stack_hop(command, (u32)param, usb_mouse_command); -- return stack_hop(command, (u32)param, ps2_mouse_command); -+ return usb_mouse_command(command, param); -+ return ps2_mouse_command(command, param); - } - - #define RET_SUCCESS 0x00 - --- diff --git a/xen.install b/xen.install index 3914a2f15abe..a15206874e8a 100644 --- a/xen.install +++ b/xen.install @@ -32,24 +32,11 @@ __EOF__ upgrade_msg() { cat << __EOF__ - -Note: If you are upgrading from one of the previous 4.2 xen builds, and are having issues - with graphics card passthrough, the default device model used has changed and the - newer model can sometimes have issues. To work around these issue, support for the - old style qemu-xen-traditional device model has been enabled. To use, add (or change) - the following line into the configuration file for the domain you want to use - passthrough with: - device_model_version = "qemu-xen-traditional" - - Also remember to rebuild your grub configuration if upgrading from a non-xen 4.5.0 - install. - - The xend daemon and the xm toolset have now been removed with the xen 4.5 release. - - This install is now using a new version of the 09_xen file, used when generating - a new grub.cfg file. The new version inherits the default linux kernel command - line settings; to use the old method, uncomment the 'XEN_LINUX_CMDLINE_OVERRIDE' - option in /etc/xen/grub.conf and change the '0' to '1' +Xen 4.7 +Release notes +http://wiki.xen.org/wiki/Xen_Project_4.7_Release_Notes +Feature list +http://wiki.xen.org/wiki/Xen_Project_4.7_Feature_List __EOF__ } |