From 8d89651ef729e560ad96dcfc002fcde6ff7f923b Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 8 Oct 2015 22:46:13 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta-aarch64/conf/layer.conf | 14 + meta-aarch64/conf/machine/genericarmv8.conf | 37 ++ meta-aarch64/conf/machine/genericarmv8b.conf | 8 + .../conf/machine/include/arm64/arch-armv8.inc | 20 + .../recipes-core/openjdk/openjdk-8-common.inc | 267 +++++++++++ meta-aarch64/recipes-core/openjdk/openjdk-8_0.1.bb | 29 ++ .../packagegroups/packagegroup-core-sdk.bbappend | 16 + .../kexec-tools/files/add-arm64-support.patch | 521 +++++++++++++++++++++ .../kexec-tools/kexec-tools_2.0.7.bbappend | 5 + .../recipes-kernel/sysprof/sysprof_git.bbappend | 1 + .../0001-libatomic_ops-Aarch64-basic-port.patch | 232 +++++++++ .../pulseaudio/libatomics-ops_7.2.bbappend | 5 + meta-aarch64/recipes-qt/qt4/files/aarch64.patch | 39 ++ .../recipes-qt/qt4/qt4-x11-free_4.8.6.bbappend | 5 + .../recipes-support/emacs/emacs_23.4.bbappend | 1 + 15 files changed, 1200 insertions(+) create mode 100644 meta-aarch64/conf/layer.conf create mode 100644 meta-aarch64/conf/machine/genericarmv8.conf create mode 100644 meta-aarch64/conf/machine/genericarmv8b.conf create mode 100644 meta-aarch64/conf/machine/include/arm64/arch-armv8.inc create mode 100644 meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc create mode 100644 meta-aarch64/recipes-core/openjdk/openjdk-8_0.1.bb create mode 100644 meta-aarch64/recipes-core/packagegroups/packagegroup-core-sdk.bbappend create mode 100644 meta-aarch64/recipes-kernel/kexec-tools/files/add-arm64-support.patch create mode 100644 meta-aarch64/recipes-kernel/kexec-tools/kexec-tools_2.0.7.bbappend create mode 100644 meta-aarch64/recipes-kernel/sysprof/sysprof_git.bbappend create mode 100644 meta-aarch64/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch create mode 100644 meta-aarch64/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bbappend create mode 100644 meta-aarch64/recipes-qt/qt4/files/aarch64.patch create mode 100644 meta-aarch64/recipes-qt/qt4/qt4-x11-free_4.8.6.bbappend create mode 100644 meta-aarch64/recipes-support/emacs/emacs_23.4.bbappend (limited to 'meta-aarch64') diff --git a/meta-aarch64/conf/layer.conf b/meta-aarch64/conf/layer.conf new file mode 100644 index 0000000..010a700 --- /dev/null +++ b/meta-aarch64/conf/layer.conf @@ -0,0 +1,14 @@ +BBPATH .= ":${LAYERDIR}" +BBFILES += "\ + ${LAYERDIR}/recipes*/*/*.bb \ + ${LAYERDIR}/recipes*/*/*.bbappend \ + " + +BBFILE_COLLECTIONS += "aarch64" +BBFILE_PATTERN_aarch64 := "^${LAYERDIR}/" +BBFILE_PRIORITY_aarch64 = "20" + +# do not error out on bbappends for missing recipes (mysql5) +BB_DANGLINGAPPENDS_WARNONLY = "true" + +LAYERDEPENDS_aarch64 = "linaro linaro-toolchain" diff --git a/meta-aarch64/conf/machine/genericarmv8.conf b/meta-aarch64/conf/machine/genericarmv8.conf new file mode 100644 index 0000000..466900a --- /dev/null +++ b/meta-aarch64/conf/machine/genericarmv8.conf @@ -0,0 +1,37 @@ +#@TYPE: Machine +#@NAME: generic armv8 machine +#@DESCRIPTION: generic machine to be used by linaro-media-create + +require conf/machine/include/arm64/arch-armv8.inc + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" + +XSERVER ?= "xserver-xorg \ + mesa-driver-swrast \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-video-fbdev \ + xf86-input-keyboard" + +MACHINE_FEATURES = "" + +# Don't include kernels in standard images +RDEPENDS_kernel-base = "" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-aarch64" + +KERNEL_IMAGETYPE = "Image" + +# We have to disable SERIAL_CONSOLE due to auto-serial-console +#SERIAL_CONSOLE = "115200 ttyAMA0" + +# Force auto-serial-console to be used by all image types +# Ideally this would be part of core oe or as a bbclassappend, +# but as we don't have an easy way to append a class, defining +# it here +EXTRA_IMAGE_FEATURES += "autoserial" +FEATURE_PACKAGES_autoserial = "auto-serial-console" + +# we do not want to have getty running on tty1 as we run +# auto-serial-console there +USE_VT = "0" diff --git a/meta-aarch64/conf/machine/genericarmv8b.conf b/meta-aarch64/conf/machine/genericarmv8b.conf new file mode 100644 index 0000000..e70de08 --- /dev/null +++ b/meta-aarch64/conf/machine/genericarmv8b.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@NAME: generic armv8 big endian machine +#@DESCRIPTION: generic machine to be used by linaro-media-create +DEFAULTTUNE = "aarch64_be" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy" + +require conf/machine/genericarmv8.conf diff --git a/meta-aarch64/conf/machine/include/arm64/arch-armv8.inc b/meta-aarch64/conf/machine/include/arm64/arch-armv8.inc new file mode 100644 index 0000000..c86142a --- /dev/null +++ b/meta-aarch64/conf/machine/include/arm64/arch-armv8.inc @@ -0,0 +1,20 @@ +DEFAULTTUNE ?= "aarch64" + +ARMPKGARCH ?= "aarch64" + +TUNEVALID[aarch64] = "Enable instructions for aarch64" +TUNEVALID[bigendian] = "Enable big-endian mode." +TUNECONFLICTS[aarch64] = "" +MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}" + +# Little Endian base configs +AVAILTUNES += "aarch64 aarch64_be" +TUNE_FEATURES_tune-aarch64 ?= "aarch64" +TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian" + +ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}" + +TUNE_ARCH = "aarch64${ARMPKGSFX_ENDIAN}" +TUNE_PKGARCH = "aarch64${ARMPKGSFX_ENDIAN}" + +PACKAGE_EXTRA_ARCHS = "aarch64${ARMPKGSFX_ENDIAN}" diff --git a/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc b/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc new file mode 100644 index 0000000..f251e14 --- /dev/null +++ b/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc @@ -0,0 +1,267 @@ +DESCRIPTION = "Java runtime based upon the OpenJDK8" +HOMEPAGE = "http://openjdk.java.net/projects/jdk8" +LICENSE = "GPL-2.0-with-classpath-exception" +PRIORITY = "optional" +SECTION = "libs" +INHIBIT_PACKAGE_STRIP = "1" +#INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +INC_PR = "r16" + +SRC_URI = " \ + ${OPENJDK_URI} \ + " + +libdir_jvm ?= "${libdir}/jvm" + +JDKPN = "openjdk-8" +JDK_DIR = "java-8-openjdk" +JDK_HOME = "${libdir_jvm}/${JDK_DIR}" + +PN = "${JDKPN}-jre" +PROVIDES += "${JDKPN}" + +DEPENDS = " \ + zip-native \ + zlib \ + jpeg libpng giflib \ + gtk+ glib-2.0 \ + cups fontconfig \ + libxt libxinerama libxrender libxtst libxi \ + freetype alsa-lib libffi libxt \ + " + +# No package should directly depend on this (it should require +# java2-runtime instead). +PRIVATE_LIBS = "\ + libunpack.so libverify.so libjava.so libzip.so libnpt.so \ + libjava_crw_demo.so libhprof.so libnet.so libnio.so \ + libmanagement.so libinstrument.so libjsound.so libjsoundalsa.so \ + libj2pcsc.so libj2pkcs11.so libj2gss.so libmlib_image.so \ + libawt.so libsplashscreen.so libfreetype.so.6 libfontmanager.so \ + libjpeg.so liblcms.so librmi.so libjawt.so libjaas_unix.so \ + libattach.so libjdwp.so libdt_socket.so libhpi.so libjli.so \ + libmawt.so libjvm.so \ + libversionCheck.so libcompiledMethodLoad.so libgctest.so \ + libheapViewer.so libheapTracker.so libminst.so libmtrace.so \ + libwaiters.so libhprof.so \ + " + +COMPATIBLE_HOST = "(aarch64).*-linux" +JAVA_HOME[unexport] = "1" +S="${WORKDIR}/openjdk8-aarch64-port-snapshot" + +# The compiler tests in do_configure seem to drop TARGET_CC_ARCH from $CC, so add it into CFLAGS. +CFLAGS =+ "${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS}" +CXXFLAGS =+ "${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS}" +export EXTRA_CFLAGS = "${TOOLCHAIN_OPTIONS}" +ASNEEDED = "" + +do_configure() { + unset MAKE + bash ./configure --with-debug-level=release --with-jvm-variants=client,server --with-sys-root=${STAGING_DIR_TARGET} --openjdk-target=${TARGET_SYS} --with-zlib=system --with-stdc++lib=dynamic --disable-ccache --disable-zip-debug-info +} + +do_compile() { + make \ + LOG=debug \ + ALT_SDT_H=/openjdk/path/to/a/nonexistent/directory \ + EXTRA_CFLAGS='${EXTRA_CFLAGS}' \ + CC='${CC}' \ + CXX='${CXX}' \ + LD='${CC} ${LDFLAGS}' \ + LDCXX='${CXX} ${LDFLAGS}' \ + LDEXE='${CC} ${LDFLAGS}' \ + LDEXECXX='${CXX} ${LDFLAGS}' \ + images + +} + +do_install() { + install -d ${D}${libdir_jvm} + install -d ${D}${JDK_HOME}/jtreg + install -d ${D}${JDK_HOME}/jtreg/hotspot + install -d ${D}${JDK_HOME}/jtreg/jdk + cp -R ${S}/build/${BUILD_DIR}/j2sdk-image/* ${D}${JDK_HOME} + cp -R ${S}/hotspot/test ${D}${JDK_HOME}/jtreg/hotspot + cp -R ${S}/jdk/test ${D}${JDK_HOME}/jtreg/jdk +# The OpenJDK build does its own thing with debuginfo files; as we +# default to a 'release' build we remove these files. + find ${D}${JDK_HOME} -name \*.debuginfo -print | xargs rm +# The upstream Mercurial repo has various incompatible binaries checked in. +# Remove these otherwise bitbake complains about mismatched architecture, et al. + find ${D}${JDK_HOME}/jtreg -name \*.so -print | xargs rm + rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/linux-i586/launcher + rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/linux-amd64/launcher + rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/solaris-sparcv9/launcher + rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/solaris-amd64/launcher + chmod -R u+rw,go+r ${D}${JDK_HOME} +} + +PACKAGES = " \ + ${JDKPN}-jdk \ + ${JDKPN}-doc \ + ${JDKPN}-source \ + ${JDKPN}-demo \ + ${JDKPN}-jtreg \ + ${JDKPN}-jre \ + " + +FILES_${JDKPN}-jdk = " \ + ${JDK_HOME}/bin \ + ${JDK_HOME}/lib \ + ${JDK_HOME}/include \ + ${JDK_HOME}/ASSEMBLY_EXCEPTION \ + ${JDK_HOME}/release \ + ${JDK_HOME}/THIRD_PARTY_README \ + ${JDK_HOME}/LICENSE \ + " + +FILES_${JDKPN}-doc = " \ + ${JDK_HOME}/man \ + " + +FILES_${JDKPN}-source = " \ + ${JDK_HOME}/src.zip \ + " + +FILES_${JDKPN}-demo = " \ + ${JDK_HOME}/demo \ + ${JDK_HOME}/sample \ + " + +FILES_${JDKPN}-jtreg = " \ + ${JDK_HOME}/jtreg \ + " + +FILES_${PN} = " \ + ${JDK_HOME}/jre \ + " + +INSANE_SKIP_${JDKPN}-jdk = "dev-so" +INSANE_SKIP_${JDKPN}-jre = "dev-so" + +RPROVIDES_${JDKPN}-jre = "java2-runtime java2-vm" +RPROVIDES_${JDKPN}-jdk = "java2-runtime java2-vm" +RDEPENDS_${JDKPN}-demo = "java2-runtime" + +RRECOMMENDS_${JDKPN}-jre = "liberation-fonts" +RRECOMMENDS_${JDKPN}-jdk = "liberation-fonts" + +inherit update-alternatives + +pkg_postinst_${JDKPN}-jre () { + update-alternatives --install ${bindir}/java java ${JDK_HOME}/jre/bin/java 75 + update-alternatives --install ${bindir}/jjs jjs ${JDK_HOME}/jre/bin/jjs 75 + update-alternatives --install ${bindir}/keytool keytool ${JDK_HOME}/jre/bin/keytool 75 + update-alternatives --install ${bindir}/orbd orbd ${JDK_HOME}/jre/bin/orbd 75 + update-alternatives --install ${bindir}/pack200 pack200 ${JDK_HOME}/jre/bin/pack200 75 + update-alternatives --install ${bindir}/policytool policytool ${JDK_HOME}/jre/bin/policytool 75 + update-alternatives --install ${bindir}/rmid rmid ${JDK_HOME}/jre/bin/rmid 75 + update-alternatives --install ${bindir}/rmiregistry rmiregistry ${JDK_HOME}/jre/bin/rmiregistry 75 + update-alternatives --install ${bindir}/servertool servertool ${JDK_HOME}/jre/bin/servertool 75 + update-alternatives --install ${bindir}/tnameserv tnameserv ${JDK_HOME}/jre/bin/tnameserv 75 + update-alternatives --install ${bindir}/unpack200 unpack200 ${JDK_HOME}/jre/bin/unpack200 75 +} + +pkg_prerm_${JDKPN}-jre () { + update-alternatives --remove java ${JDK_HOME}/jre/bin/java + update-alternatives --remove jjs ${JDK_HOME}/jre/bin/jjs + update-alternatives --remove keytool ${JDK_HOME}/jre/bin/keytool + update-alternatives --remove orbd ${JDK_HOME}/jre/bin/orbd + update-alternatives --remove pack200 ${JDK_HOME}/jre/bin/pack200 + update-alternatives --remove policytool ${JDK_HOME}/jre/bin/policytool + update-alternatives --remove rmid ${JDK_HOME}/jre/bin/rmid + update-alternatives --remove rmiregistry ${JDK_HOME}/jre/bin/rmiregistry + update-alternatives --remove servertool ${JDK_HOME}/jre/bin/servertool + update-alternatives --remove tnameserv ${JDK_HOME}/jre/bin/tnameserv + update-alternatives --remove unpack200 ${JDK_HOME}/jre/bin/unpack200 +} + +pkg_postinst_${JDKPN}-jdk () { + update-alternatives --install ${bindir}/appletviewer appletviewer ${JDK_HOME}/bin/appletviewer 100 + update-alternatives --install ${bindir}/extcheck extcheck ${JDK_HOME}/bin/extcheck 100 + update-alternatives --install ${bindir}/idlj idlj ${JDK_HOME}/bin/idlj 100 + update-alternatives --install ${bindir}/jar jar ${JDK_HOME}/bin/jar 100 + update-alternatives --install ${bindir}/jarsigner jarsigner ${JDK_HOME}/bin/jarsigner 100 + update-alternatives --install ${bindir}/java java ${JDK_HOME}/bin/java 100 + update-alternatives --install ${bindir}/javac javac ${JDK_HOME}/bin/javac 100 + update-alternatives --install ${bindir}/javadoc javadoc ${JDK_HOME}/bin/javadoc 100 + update-alternatives --install ${bindir}/javah javah ${JDK_HOME}/bin/javah 100 + update-alternatives --install ${bindir}/javap javap ${JDK_HOME}/bin/javap 100 + update-alternatives --install ${bindir}/java-rmi.cgi java-rmi.cgi ${JDK_HOME}/bin/java-rmi.cgi 100 + update-alternatives --install ${bindir}/jcmd jcmd ${JDK_HOME}/bin/jcmd 100 + update-alternatives --install ${bindir}/jconsole jconsole ${JDK_HOME}/bin/jconsole 100 + update-alternatives --install ${bindir}/jdb jdb ${JDK_HOME}/bin/jdb 100 + update-alternatives --install ${bindir}/jdeps jdeps ${JDK_HOME}/bin/jdeps 100 + update-alternatives --install ${bindir}/jhat jhat ${JDK_HOME}/bin/jhat 100 + update-alternatives --install ${bindir}/jinfo jinfo ${JDK_HOME}/bin/jinfo 100 + update-alternatives --install ${bindir}/jjs jjs ${JDK_HOME}/bin/jjs 100 + update-alternatives --install ${bindir}/jmap jmap ${JDK_HOME}/bin/jmap 100 + update-alternatives --install ${bindir}/jps jps ${JDK_HOME}/bin/jps 100 + update-alternatives --install ${bindir}/jrunscript jrunscript ${JDK_HOME}/bin/jrunscript 100 + update-alternatives --install ${bindir}/jsadebugd jsadebugd ${JDK_HOME}/bin/jsadebugd 100 + update-alternatives --install ${bindir}/jstack jstack ${JDK_HOME}/bin/jstack 100 + update-alternatives --install ${bindir}/jstat jstat ${JDK_HOME}/bin/jstat 100 + update-alternatives --install ${bindir}/jstatd jstatd ${JDK_HOME}/bin/jstatd 100 + update-alternatives --install ${bindir}/keytool keytool ${JDK_HOME}/bin/keytool 100 + update-alternatives --install ${bindir}/native2ascii native2ascii ${JDK_HOME}/bin/native2ascii 100 + update-alternatives --install ${bindir}/orbd orbd ${JDK_HOME}/bin/orbd 100 + update-alternatives --install ${bindir}/pack200 pack200 ${JDK_HOME}/bin/pack200 100 + update-alternatives --install ${bindir}/policytool policytool ${JDK_HOME}/bin/policytool 100 + update-alternatives --install ${bindir}/rmic rmic ${JDK_HOME}/bin/rmic 100 + update-alternatives --install ${bindir}/rmid rmid ${JDK_HOME}/bin/rmid 100 + update-alternatives --install ${bindir}/rmiregistry rmiregistry ${JDK_HOME}/bin/rmiregistry 100 + update-alternatives --install ${bindir}/schemagen schemagen ${JDK_HOME}/bin/schemagen 100 + update-alternatives --install ${bindir}/serialver serialver ${JDK_HOME}/bin/serialver 100 + update-alternatives --install ${bindir}/servertool servertool ${JDK_HOME}/bin/servertool 100 + update-alternatives --install ${bindir}/tnameserv tnameserv ${JDK_HOME}/bin/tnameserv 100 + update-alternatives --install ${bindir}/unpack200 unpack200 ${JDK_HOME}/bin/unpack200 100 + update-alternatives --install ${bindir}/wsgen wsgen ${JDK_HOME}/bin/wsgen 100 + update-alternatives --install ${bindir}/wsimport wsimport ${JDK_HOME}/bin/wsimport 100 + update-alternatives --install ${bindir}/xjc xjc ${JDK_HOME}/bin/xjc 100 +} + +pkg_prerm_${JDKPN}-jdk () { + update-alternatives --remove appletviewer ${JDK_HOME}/bin/appletviewer + update-alternatives --remove extcheck ${JDK_HOME}/bin/extcheck + update-alternatives --remove idlj ${JDK_HOME}/bin/idlj + update-alternatives --remove jar ${JDK_HOME}/bin/jar + update-alternatives --remove jarsigner ${JDK_HOME}/bin/jarsigner + update-alternatives --remove java ${JDK_HOME}/bin/java + update-alternatives --remove javac ${JDK_HOME}/bin/javac + update-alternatives --remove javadoc ${JDK_HOME}/bin/javadoc + update-alternatives --remove javah ${JDK_HOME}/bin/javah + update-alternatives --remove javap ${JDK_HOME}/bin/javap + update-alternatives --remove java-rmi.cgi ${JDK_HOME}/bin/java-rmi.cgi + update-alternatives --remove jcmd ${JDK_HOME}/bin/jcmd + update-alternatives --remove jconsole ${JDK_HOME}/bin/jconsole + update-alternatives --remove jdb ${JDK_HOME}/bin/jdb + update-alternatives --remove jdeps ${JDK_HOME}/bin/jdeps + update-alternatives --remove jhat ${JDK_HOME}/bin/jhat + update-alternatives --remove jinfo ${JDK_HOME}/bin/jinfo + update-alternatives --remove jjs ${JDK_HOME}/bin/jjs + update-alternatives --remove jmap ${JDK_HOME}/bin/jmap + update-alternatives --remove jps ${JDK_HOME}/bin/jps + update-alternatives --remove jrunscript ${JDK_HOME}/bin/jrunscript + update-alternatives --remove jsadebugd ${JDK_HOME}/bin/jsadebugd + update-alternatives --remove jstack ${JDK_HOME}/bin/jstack + update-alternatives --remove jstat ${JDK_HOME}/bin/jstat + update-alternatives --remove jstatd ${JDK_HOME}/bin/jstatd + update-alternatives --remove keytool ${JDK_HOME}/bin/keytool + update-alternatives --remove native2ascii ${JDK_HOME}/bin/native2ascii + update-alternatives --remove orbd ${JDK_HOME}/bin/orbd + update-alternatives --remove pack200 ${JDK_HOME}/bin/pack200 + update-alternatives --remove policytool ${JDK_HOME}/bin/policytool + update-alternatives --remove rmic ${JDK_HOME}/bin/rmic + update-alternatives --remove rmid ${JDK_HOME}/bin/rmid + update-alternatives --remove rmiregistry ${JDK_HOME}/bin/rmiregistry + update-alternatives --remove schemagen ${JDK_HOME}/bin/schemagen + update-alternatives --remove serialver ${JDK_HOME}/bin/serialver + update-alternatives --remove servertool ${JDK_HOME}/bin/servertool + update-alternatives --remove tnameserv ${JDK_HOME}/bin/tnameserv + update-alternatives --remove unpack200 ${JDK_HOME}/bin/unpack200 + update-alternatives --remove wsgen ${JDK_HOME}/bin/wsgen + update-alternatives --remove wsimport ${JDK_HOME}/bin/wsimport + update-alternatives --remove xjc ${JDK_HOME}/bin/xjc +} diff --git a/meta-aarch64/recipes-core/openjdk/openjdk-8_0.1.bb b/meta-aarch64/recipes-core/openjdk/openjdk-8_0.1.bb new file mode 100644 index 0000000..44eef03 --- /dev/null +++ b/meta-aarch64/recipes-core/openjdk/openjdk-8_0.1.bb @@ -0,0 +1,29 @@ +require openjdk-8-common.inc + +PR = "${INC_PR}.0" + +OPENJDK_URI = "\ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/jdk8;name=jdk8;module=jdk8 \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/corba;name=corba;module=jdk8/corba \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/hotspot;name=hotspot;module=jdk8/hotspot \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/jaxp;name=jaxp;module=jdk8/jaxp \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/jaxws;name=jaxws;module=jdk8/jaxws \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/jdk;name=jdk;module=jdk8/jdk \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/langtools;name=langtools;module=jdk8/langtools \ + hg://hg.openjdk.java.net/aarch64-port;protocol=http;destsuffix=hg/nashorn;name=nashorn;module=jdk8/nashorn \ + " + +SRCREV_jdk8 = "${AUTOREV}" +SRCREV_corba = "${AUTOREV}" +SRCREV_hotspot = "${AUTOREV}" +SRCREV_jaxp = "${AUTOREV}" +SRCREV_jaxws = "${AUTOREV}" +SRCREV_jdk = "${AUTOREV}" +SRCREV_langtools = "${AUTOREV}" +SRCREV_nashorn = "${AUTOREV}" + +S = "${WORKDIR}/jdk8" + +LIC_FILES_CHKSUM="file://LICENSE;md5=7b4baeedfe2d40cb03536573bc2c89b1" + +BUILD_DIR="linux-aarch64-normal-clientANDserver-release/images" diff --git a/meta-aarch64/recipes-core/packagegroups/packagegroup-core-sdk.bbappend b/meta-aarch64/recipes-core/packagegroups/packagegroup-core-sdk.bbappend new file mode 100644 index 0000000..5d50b62 --- /dev/null +++ b/meta-aarch64/recipes-core/packagegroups/packagegroup-core-sdk.bbappend @@ -0,0 +1,16 @@ +INCPR = "1" + +RDEPENDS_packagegroup-core-sdk = "\ + packagegroup-core-buildessential \ + coreutils \ + ccache \ + diffutils \ + intltool \ + perl-module-re \ + perl-module-text-wrap \ + findutils \ + quilt \ + less \ + ldd \ + file \ + tcl" diff --git a/meta-aarch64/recipes-kernel/kexec-tools/files/add-arm64-support.patch b/meta-aarch64/recipes-kernel/kexec-tools/files/add-arm64-support.patch new file mode 100644 index 0000000..30b0229 --- /dev/null +++ b/meta-aarch64/recipes-kernel/kexec-tools/files/add-arm64-support.patch @@ -0,0 +1,521 @@ +From 98215763db92c85668fd217cfc719322ce54e704 Mon Sep 17 00:00:00 2001 +From: Geoff Levand +Date: Tue, 13 May 2014 10:59:52 -0700 +Subject: [PATCH 1/1] Add arm64 support + +Signed-off-by: Geoff Levand +Signed-off-by: Fathi Boudra +--- + configure.ac | 3 + kexec/Makefile | 1 + kexec/arch/arm64/Makefile | 31 +++++ + kexec/arch/arm64/include/arch/options.h | 30 ++++ + kexec/arch/arm64/kexec-arm64.c | 194 ++++++++++++++++++++++++++++++++ + kexec/arch/arm64/kexec-arm64.h | 28 ++++ + kexec/arch/arm64/kexec-elf-arm64.c | 147 ++++++++++++++++++++++++ + kexec/kexec-syscall.h | 9 + + 8 files changed, 441 insertions(+), 2 deletions(-) + create mode 100644 kexec/arch/arm64/Makefile + create mode 100644 kexec/arch/arm64/include/arch/options.h + create mode 100644 kexec/arch/arm64/kexec-arm64.c + create mode 100644 kexec/arch/arm64/kexec-arm64.h + create mode 100644 kexec/arch/arm64/kexec-elf-arm64.c + +--- a/configure.ac ++++ b/configure.ac +@@ -35,6 +35,9 @@ case $target_cpu in + ARCH="ppc64" + SUBARCH="LE" + ;; ++ aarch64* ) ++ ARCH="arm64" ++ ;; + arm* ) + ARCH="arm" + ;; +--- a/kexec/Makefile ++++ b/kexec/Makefile +@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT) + + include $(srcdir)/kexec/arch/alpha/Makefile + include $(srcdir)/kexec/arch/arm/Makefile ++include $(srcdir)/kexec/arch/arm64/Makefile + include $(srcdir)/kexec/arch/i386/Makefile + include $(srcdir)/kexec/arch/ia64/Makefile + include $(srcdir)/kexec/arch/m68k/Makefile +--- /dev/null ++++ b/kexec/arch/arm64/Makefile +@@ -0,0 +1,31 @@ ++ ++arm64_FS2DT += kexec/fs2dt.c ++arm64_FS2DT_INCLUDE += -include $(srcdir)/kexec/arch/arm64/kexec-arm64.h ++ ++arm64_KEXEC_SRCS += \ ++ kexec/arch/arm64/kexec-arm64.c \ ++ kexec/arch/arm64/kexec-elf-arm64.c ++ ++arm64_ARCH_REUSE_INITRD = ++arm64_ADD_SEGMENT = ++arm64_VIRT_TO_PHYS = ++ ++dist += $(arm64_KEXEC_SRCS) \ ++ kexec/arch/arm64/Makefile \ ++ kexec/arch/arm64/kexec-arm64.h ++ ++ifdef HAVE_LIBFDT ++ ++LIBS += -lfdt ++ ++else ++ ++include $(srcdir)/kexec/libfdt/Makefile.libfdt ++ ++libfdt_SRCS += $(LIBFDT_SRCS:%=kexec/libfdt/%) ++ ++arm64_CPPFLAGS = -I$(srcdir)/kexec/libfdt ++ ++arm64_KEXEC_SRCS += $(libfdt_SRCS) ++ ++endif +--- /dev/null ++++ b/kexec/arch/arm64/include/arch/options.h +@@ -0,0 +1,30 @@ ++#ifndef KEXEC_ARCH_ARM64_OPTIONS_H ++#define KEXEC_ARCH_ARM64_OPTIONS_H ++ ++#define OPT_APPEND ((OPT_MAX)+0) ++#define OPT_RAMDISK ((OPT_MAX)+1) ++#define OPT_DTB ((OPT_MAX)+2) ++#define OPT_ARCH_MAX ((OPT_MAX)+3) ++ ++#define KEXEC_ARCH_OPTIONS \ ++ KEXEC_OPTIONS \ ++ { "append", 1, NULL, OPT_APPEND }, \ ++ { "command-line", 1, NULL, OPT_APPEND }, \ ++ { "dtb", 1, NULL, OPT_DTB }, \ ++ { "initrd", 1, NULL, OPT_RAMDISK }, \ ++ { "ramdisk", 1, NULL, OPT_RAMDISK }, \ ++ ++#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */ ++ ++#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS ++#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR ++ ++struct arm64_opts { ++ const char *command_line; ++ const char *ramdisk; ++ const char *dtb; ++}; ++ ++struct arm64_opts arm64_opts; ++ ++#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */ +--- /dev/null ++++ b/kexec/arch/arm64/kexec-arm64.c +@@ -0,0 +1,194 @@ ++/* ++ * ARM64 kexec support. ++ */ ++ ++#define _GNU_SOURCE ++ ++#include ++#include ++#include ++#include ++#include ++ ++//#include ++ ++#include "../../kexec.h" ++#include "../../kexec-syscall.h" ++#include "kexec-arm64.h" ++#include "arch/options.h" ++ ++/* Global varables the core kexec routines expect. */ ++ ++unsigned char reuse_initrd; ++off_t initrd_base = 0; ++off_t initrd_size = 0; ++ ++struct memory_ranges usablemem_rgns = { ++}; ++ ++const struct arch_map_entry arches[] = { ++ { "aarch64", KEXEC_ARCH_ARM64 }, ++ { NULL, 0 }, ++}; ++ ++/* arm64 global varables. */ ++ ++struct arm64_opts arm64_opts; ++ ++void arch_usage(void) ++{ ++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); ++ ++ printf( ++" --append=STRING Set the kernel command line to STRING.\n" ++" --command-line=STRING Set the kernel command line to STRING.\n" ++" --dtb=FILE Use FILE as the device tree blob.\n" ++" --initrd=FILE Use FILE as the kernel initial ramdisk.\n" ++" --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n"); ++ ++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); ++} ++ ++int arch_process_options(int argc, char **argv) ++{ ++ static const char short_options[] = KEXEC_OPT_STR ""; ++ static const struct option options[] = { ++ KEXEC_ARCH_OPTIONS ++ { 0 } ++ }; ++ int opt; ++ ++ for (opt = 0; opt != -1; ) { ++ opt = getopt_long(argc, argv, short_options, options, 0); ++ ++ switch (opt) { ++ case OPT_APPEND: ++ arm64_opts.command_line = optarg; ++ break; ++ case OPT_RAMDISK: ++ arm64_opts.ramdisk = optarg; ++ break; ++ case OPT_DTB: ++ arm64_opts.dtb = optarg; ++ break; ++ default: ++ break; /* Ignore core and unknown options */ ++ } ++ } ++ ++ dbgprintf("%s:%d: command_line: %s\n", __func__, __LINE__, ++ arm64_opts.command_line); ++ dbgprintf("%s:%d: ramdisk: %s\n", __func__, __LINE__, ++ arm64_opts.ramdisk); ++ dbgprintf("%s:%d: dtb: %s\n", __func__, __LINE__, arm64_opts.dtb); ++ ++ return 0; ++} ++ ++void arch_reuse_initrd(void) ++{ ++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); ++ reuse_initrd = 1; ++} ++ ++unsigned long virt_to_phys(unsigned long v) ++{ ++ const unsigned long memstart_addr = 0x080000000UL; // FIXME: get from memory_range/DT ++ const unsigned long page_offset = 0xffffffc000000000UL; // FIXME: from where??? ++ unsigned long p = (v & ~page_offset) + memstart_addr; ++ ++ fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, v, p); ++ return p; ++} ++ ++void add_segment(struct kexec_info *info, const void *buf, size_t bufsz, ++ unsigned long base, size_t memsz) ++{ ++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); ++ add_segment_phys_virt(info, buf, bufsz, base, memsz, 1); ++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); ++} ++ ++int get_memory_ranges(struct memory_range **range, int *ranges, ++ unsigned long kexec_flags) ++{ ++ /* FIXME: Should get this info from device tree. */ ++ static struct memory_range memory_range[KEXEC_SEGMENT_MAX]; ++ const char *iomem; ++ int range_count = 0; ++ char line[MAX_LINE]; ++ FILE *fp; ++ ++ iomem = proc_iomem(); ++ fp = fopen(iomem, "r"); ++ ++ if (!fp) { ++ fprintf(stderr, "Cannot open %s: %s\n", iomem, strerror(errno)); ++ return -1; ++ } ++ ++ dbgprintf("memory ranges:\n"); ++ ++ while(fgets(line, sizeof(line), fp) != 0) { ++ struct memory_range r; ++ char *str; ++ int consumed; ++ ++ if (range_count >= KEXEC_SEGMENT_MAX) ++ break; ++ ++ if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed) ++ != 2) ++ continue; ++ ++ str = line + consumed; ++ r.end++; ++ ++ if (memcmp(str, "System RAM\n", 11)) { ++ dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end, ++ str); ++ continue; ++ } ++ ++ r.type = RANGE_RAM; ++ memory_range[range_count] = r; ++ range_count++; ++ ++ dbgprintf(" Add: %016Lx - %016Lx : %s", r.start, r.end, str); ++ } ++ ++ fclose(fp); ++ *range = memory_range; ++ *ranges = range_count; ++ ++ return 0; ++} ++ ++struct file_type file_type[] = { ++ { "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage }, ++}; ++ ++int file_types = sizeof(file_type) / sizeof(file_type[0]); ++ ++int arch_compat_trampoline(struct kexec_info *info) ++{ ++ return 0; ++} ++int machine_verify_elf_rel(struct mem_ehdr *ehdr) ++{ ++ return 0; ++} ++ ++void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, ++ void *location, unsigned long address, unsigned long value) ++{ ++} ++ ++void arch_update_purgatory(struct kexec_info *UNUSED(info)) ++{ ++} ++ ++int is_crashkernel_mem_reserved(void) ++{ ++ return 0; ++} +--- /dev/null ++++ b/kexec/arch/arm64/kexec-arm64.h +@@ -0,0 +1,28 @@ ++/* ++ * ARM64 kexec support. ++ */ ++ ++#if !defined(KEXEC_ARM64_H) ++#define KEXEC_ARM64_H ++ ++/* #include FIXME: this is broken */ ++#include ++ ++#include "../../kexec.h" ++ ++#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from */ ++ ++#define BOOT_BLOCK_VERSION 17 ++#define BOOT_BLOCK_LAST_COMP_VERSION 16 ++#define COMMAND_LINE_SIZE 512 ++ ++int elf_arm64_probe(const char *buf, off_t len); ++int elf_arm64_load(int argc, char **argv, const char *buf, off_t len, ++ struct kexec_info *info); ++void elf_arm64_usage(void); ++ ++struct memory_ranges usablemem_rgns; ++off_t initrd_base; ++off_t initrd_size; ++ ++#endif +--- /dev/null ++++ b/kexec/arch/arm64/kexec-elf-arm64.c +@@ -0,0 +1,147 @@ ++/* ++ * ARM64 kexec support. ++ */ ++ ++#define _GNU_SOURCE ++ ++#include ++#include ++#include ++ ++#include "kexec-arm64.h" ++ ++#include "../../kexec-syscall.h" ++#include "../../fs2dt.h" ++ ++#include "arch/options.h" ++ ++#if !defined(EM_AARCH64) ++# define EM_AARCH64 183 ++#endif ++ ++int elf_arm64_probe(const char *buf, off_t len) ++{ ++ int result; ++ struct mem_ehdr ehdr; ++ ++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); ++ ++ result = build_elf_exec_info(buf, len, &ehdr, 0); ++ ++ if (result < 0) { ++ dbgprintf("Not an ELF executable\n"); ++ goto out; ++ } ++ ++ if (ehdr.e_machine != EM_AARCH64) { ++ dbgprintf("Not an AARCH64 executable\n"); ++ result = -1; ++ goto out; ++ } ++ ++ result = 0; ++ ++out: ++ free_elf_info(&ehdr); ++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); ++ return result; ++} ++ ++static off_t round_up(off_t v) ++{ ++ return _ALIGN_DOWN(v + getpagesize(), getpagesize()); ++} ++ ++int elf_arm64_load(int argc, char **argv, const char *buf, off_t len, ++ struct kexec_info *info) ++{ ++ char *dtb_buf; ++ off_t dtb_base; ++ off_t dtb_size; ++ struct mem_ehdr ehdr; ++ int result; ++ //unsigned int command_line_len = strlen(arm64_opts.command_line) + 1; ++ ++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); ++ ++ if (info->kexec_flags & KEXEC_ON_CRASH) { ++ fprintf(stderr, "kexec: kdump not yet supported on arm64\n"); ++ return -1; ++ } ++ ++ result = build_elf_exec_info(buf, len, &ehdr, 0); ++ ++ if (result < 0) { ++ free_elf_info(&ehdr); ++ fprintf(stderr, "%s:%d: build_elf_exec_info failed\n", __func__, ++ __LINE__); ++ return result; ++ } ++ ++ elf_exec_build_load(info, &ehdr, buf, len, 0); ++ ++ info->entry = (void*)0x80080000UL; // FIXME ++ ++ initrd_base = 0; ++ initrd_size = 0; ++ ++ if (arm64_opts.ramdisk) { ++ char *buf; ++ ++ buf = slurp_file(arm64_opts.ramdisk, &initrd_size); ++ ++ if (!buf) ++ fprintf(stderr, "kexec: empty ramdisk file\n"); ++ else { ++ initrd_base = locate_hole(info, initrd_size, 0, 0, -1, -1); ++ ++ add_segment_phys_virt(info, buf, initrd_size, initrd_base, ++ initrd_size, 0); ++ } ++ } ++ ++ fprintf(stderr, "%s:%d: initrd_base: %lx, initrd_size: %lx\n", __func__, ++ __LINE__, (unsigned long)initrd_base, (unsigned long)initrd_size); ++ ++ if (arm64_opts.dtb) ++ dtb_buf = slurp_file(arm64_opts.dtb, &dtb_size); ++ else ++ create_flatten_tree(&dtb_buf, &dtb_size, ++ arm64_opts.command_line); ++ ++ fprintf(stderr, "%s:%d: dt magic: %x : %x\n", __func__, __LINE__, ++ fdt32_to_cpu(*(uint32_t*)dtb_buf), *(uint32_t*)dtb_buf); ++ ++ result = fdt_check_header(dtb_buf); ++ ++ if (result) { ++ fprintf(stderr, "Invalid FDT.\n"); ++ return -1; ++ } ++ ++ if (arm64_opts.command_line) { ++ // FIXME: need to handle command line... ++ fprintf(stderr, "%s:%d: command line support TODO\n", __func__, __LINE__); ++ } ++ ++if (1) { ++ dtb_base = (unsigned long)info->entry + round_up(0xA43FA0); // computed kernel mem size. ++ ++ fprintf(stderr, "%s:%d: dtb_base: %lx, dtb_size: %lx\n", __func__, ++ __LINE__, (unsigned long)dtb_base, (unsigned long)dtb_size); ++} else { ++ dtb_base = locate_hole(info, dtb_size, 0, 0, -1, -1); ++ ++ fprintf(stderr, "%s:%d: dtb_base: %lx, dtb_size: %lx\n", __func__, ++ __LINE__, (unsigned long)dtb_base, (unsigned long)dtb_size); ++} ++ add_segment_phys_virt(info, dtb_buf, dtb_size, dtb_base, dtb_size, 0); ++ ++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); ++ return 0; ++} ++ ++void elf_arm64_usage(void) ++{ ++ fprintf(stderr, "%s:%d\n", __func__, __LINE__); ++} +--- a/kexec/kexec-syscall.h ++++ b/kexec/kexec-syscall.h +@@ -39,8 +39,8 @@ + #ifdef __s390__ + #define __NR_kexec_load 277 + #endif +-#ifdef __arm__ +-#define __NR_kexec_load __NR_SYSCALL_BASE + 347 ++#if defined(__arm__) || defined(__arm64__) ++#define __NR_kexec_load __NR_SYSCALL_BASE + 347 + #endif + #if defined(__mips__) + #define __NR_kexec_load 4311 +@@ -76,6 +76,8 @@ static inline long kexec_load(void *entr + #define KEXEC_ARCH_PPC64 (21 << 16) + #define KEXEC_ARCH_IA_64 (50 << 16) + #define KEXEC_ARCH_ARM (40 << 16) ++#define KEXEC_ARCH_ARM64 (183 << 16) ++/* #define KEXEC_ARCH_AARCH64 (183 << 16) */ + #define KEXEC_ARCH_S390 (22 << 16) + #define KEXEC_ARCH_SH (42 << 16) + #define KEXEC_ARCH_MIPS_LE (10 << 16) +@@ -121,5 +123,8 @@ static inline long kexec_load(void *entr + #ifdef __m68k__ + #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K + #endif ++#if defined(__arm64__) ++#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64 ++#endif + + #endif /* KEXEC_SYSCALL_H */ diff --git a/meta-aarch64/recipes-kernel/kexec-tools/kexec-tools_2.0.7.bbappend b/meta-aarch64/recipes-kernel/kexec-tools/kexec-tools_2.0.7.bbappend new file mode 100644 index 0000000..6417ffa --- /dev/null +++ b/meta-aarch64/recipes-kernel/kexec-tools/kexec-tools_2.0.7.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = " file://add-arm64-support.patch" + +COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64|powerpc|mips).*-(linux|freebsd.*)" diff --git a/meta-aarch64/recipes-kernel/sysprof/sysprof_git.bbappend b/meta-aarch64/recipes-kernel/sysprof/sysprof_git.bbappend new file mode 100644 index 0000000..8db9345 --- /dev/null +++ b/meta-aarch64/recipes-kernel/sysprof/sysprof_git.bbappend @@ -0,0 +1 @@ +COMPATIBLE_HOST_aarch64 = "0" diff --git a/meta-aarch64/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch b/meta-aarch64/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch new file mode 100644 index 0000000..0769377 --- /dev/null +++ b/meta-aarch64/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch @@ -0,0 +1,232 @@ +From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Wed, 23 Jan 2013 17:14:16 +0100 +Subject: [PATCH] Aarch64 basic port + +Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz + +--- + src/atomic_ops.h | 4 + src/atomic_ops/sysdeps/Makefile.am | 1 + src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++ + 3 files changed, 189 insertions(+) + create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h + +--- libatomic_ops-7.2.orig/src/atomic_ops.h ++++ libatomic_ops-7.2/src/atomic_ops.h +@@ -242,10 +242,14 @@ + # endif /* __m68k__ */ + # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ + || defined(__powerpc64__) || defined(__ppc64__) + # include "atomic_ops/sysdeps/gcc/powerpc.h" + # endif /* __powerpc__ */ ++# if defined(__aarch64__) ++# include "atomic_ops/sysdeps/gcc/aarch64.h" ++# define AO_CAN_EMUL_CAS ++# endif /* __aarch64__ */ + # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) + # include "atomic_ops/sysdeps/gcc/arm.h" + # define AO_CAN_EMUL_CAS + # endif /* __arm__ */ + # if defined(__cris__) || defined(CRIS) +--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am +@@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h + standard_ao_double_t.h \ + README \ + \ + armcc/arm_v6.h \ + \ ++ gcc/aarch64.h \ + gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \ + gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \ + gcc/mips.h gcc/powerpc.h gcc/s390.h \ + gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \ + \ +--- /dev/null ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h +@@ -0,0 +1,184 @@ ++/* ++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. ++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. ++ * ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ * ++ */ ++ ++#include "../read_ordered.h" ++ ++#include "../test_and_set_t_is_ao_t.h" ++ ++AO_INLINE void ++AO_nop_full(void) ++{ ++# ifndef AO_UNIPROCESSOR ++__sync_synchronize (); ++# endif ++} ++#define AO_HAVE_nop_full ++ ++AO_INLINE AO_t ++AO_load(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_load ++ ++AO_INLINE AO_t ++AO_load_acquire(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_load_acquire ++ ++AO_INLINE void ++ AO_store(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_store ++ ++AO_INLINE void ++ AO_store_release(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_store_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELAXED); ++} ++# define AO_HAVE_test_and_set ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_acquire(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE); ++} ++# define AO_HAVE_test_and_set_acquire ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_release(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELEASE); ++} ++# define AO_HAVE_test_and_set_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_full(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST); ++} ++# define AO_HAVE_test_and_set_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add ++ ++AO_INLINE AO_t ++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add1(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add1 ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add1_full ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_sub1 ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_sub1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_sub1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_sub1_full ++ ++/* Returns nonzero if the comparison succeeded. */ ++AO_INLINE int ++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_bool_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_compare_and_swap ++ ++AO_INLINE AO_t ++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_val_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_fetch_compare_and_swap diff --git a/meta-aarch64/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bbappend b/meta-aarch64/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bbappend new file mode 100644 index 0000000..6a7932d --- /dev/null +++ b/meta-aarch64/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = " \ + file://0001-libatomic_ops-Aarch64-basic-port.patch \ +" diff --git a/meta-aarch64/recipes-qt/qt4/files/aarch64.patch b/meta-aarch64/recipes-qt/qt4/files/aarch64.patch new file mode 100644 index 0000000..2c970fe --- /dev/null +++ b/meta-aarch64/recipes-qt/qt4/files/aarch64.patch @@ -0,0 +1,39 @@ +From d780ac54b5dd1cf45eb59103f014f811c407d38c Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 10 Aug 2014 10:35:33 +0200 +Subject: [PATCH] JavaScriptCore: add Aarch64 support + +Signed-off-by: Koen Kooi +--- + src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h +index e8b03be..01a839f 100644 +--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h ++++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h +@@ -373,6 +373,11 @@ + #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 + #endif + ++/* CPU(AARCH64) - Aarch64 */ ++#if defined(__aarch64__) ++#define WTF_CPU_AARCH64 1 ++#endif ++ + /* ==== OS() - underlying operating system; only to be used for mandated low-level services like + virtual memory, not to choose a GUI toolkit ==== */ + +@@ -1003,7 +1008,8 @@ + || CPU(SPARC64) \ + || CPU(S390X) \ + || CPU(PPC64) \ +- || CPU(MIPS64) ++ || CPU(MIPS64) \ ++ || CPU(AARCH64) + #define WTF_USE_JSVALUE64 1 + #else + #define WTF_USE_JSVALUE32_64 1 +-- +1.9.0 + diff --git a/meta-aarch64/recipes-qt/qt4/qt4-x11-free_4.8.6.bbappend b/meta-aarch64/recipes-qt/qt4/qt4-x11-free_4.8.6.bbappend new file mode 100644 index 0000000..d969143 --- /dev/null +++ b/meta-aarch64/recipes-qt/qt4/qt4-x11-free_4.8.6.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = " \ + file://aarch64.patch \ +" diff --git a/meta-aarch64/recipes-support/emacs/emacs_23.4.bbappend b/meta-aarch64/recipes-support/emacs/emacs_23.4.bbappend new file mode 100644 index 0000000..8db9345 --- /dev/null +++ b/meta-aarch64/recipes-support/emacs/emacs_23.4.bbappend @@ -0,0 +1 @@ +COMPATIBLE_HOST_aarch64 = "0" -- cgit v1.2.3-54-g00ecf