Message ID | 20190128232209.17485-1-aduskett@gmail.com |
---|---|
Headers | show
Return-Path: <buildroot-bounces@busybox.net> X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sdYa4gbP"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43pQf02Yxyz9sDL for <incoming-buildroot@patchwork.ozlabs.org>; Tue, 29 Jan 2019 10:22:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 180FE22E89; Mon, 28 Jan 2019 23:22:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05hFI+G+-O2P; Mon, 28 Jan 2019 23:22:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id F3F182381E; Mon, 28 Jan 2019 23:22:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 118421BF2C8 for <buildroot@lists.busybox.net>; Mon, 28 Jan 2019 23:22:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0EB3C875AD for <buildroot@lists.busybox.net>; Mon, 28 Jan 2019 23:22:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3UdFHyaNA2GZ for <buildroot@lists.busybox.net>; Mon, 28 Jan 2019 23:22:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it1-f193.google.com (mail-it1-f193.google.com [209.85.166.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4D9C787525 for <buildroot@buildroot.org>; Mon, 28 Jan 2019 23:22:43 +0000 (UTC) Received: by mail-it1-f193.google.com with SMTP id b5so1283701iti.2 for <buildroot@buildroot.org>; Mon, 28 Jan 2019 15:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gx+XJI5Fy4Dr8rB3IipC1m0Kxbq58Dtf6+CyHlJMlvI=; b=sdYa4gbP0xxzvN5e9eYQWe+reP136o8MeFAGfijMV0HGIPUfDSlLTI3fKQdKocEs2g SFT079m6th9eAazNTDL0w4NBv3ojOxw5V9MQoj+lsW8zrLxlQv43bXFU9/qhHK3iV32i ASvv3zCkWyiCUnVNMbQov4HANfMHz3ptDFZFdZlEuDCQW7s9/8nism/TrPIz6hBPZr9D zUpHHw+wKfuo6wMOErgVVry8yyUlsxjSKzYWJ406wVBkZ9OOIqmuX/TwT6+s33NWfZG7 XfRT/AqUIiSrA47OI9XmSOa8fJB39+Lt4GGCitFQIpHs+Ug3EsjfqqO9bnUZ5+fyPNFU Tt/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gx+XJI5Fy4Dr8rB3IipC1m0Kxbq58Dtf6+CyHlJMlvI=; b=T1qkSR7GypoZbQsBWvxgLYQbH+0JGo95M2ThCEOkTLJXGSMpUIc2asHeOkoFwU3LNm jC3nuk6h2Q4Oq6pzTtnFmBjBeXEjkIrA7IEjc2s/Qh73skhtlVDcUBqayzOWtv/ZwdQD iD+1TOUobFaj5dC3bMhMKoFh7ZXUt/Hur4XhceoalRuSokHbgOVBU2ioFqgfixcYsCO2 7M03CDZSRSlUPu5LK1kJS6GMXKP6xlHiyj7oKPwllMQBKmtLlgFcCTlsYs3BBfzjIQKP wsll2xg9Jf6TgLX6gOG8GwLoctVDPFroF12TbwlyKf5YiQr0RXDBvHaMHpIoJaVphgZD Wl9A== X-Gm-Message-State: AJcUukeXdo4F2yt5/rJskCZd/Zdd/KCJtSfsi5slub7417Rkz2TP8GGq 93NtMzcjTS0TBPUKcwROlAPi+ylR X-Google-Smtp-Source: ALg8bN6t5p8ZeVb9MLMXT+FipOpeVQm/YUlUkUs0PvFJ6ZE9IYp+MxtrzPWQn6g9N7SsH09+09zngA== X-Received: by 2002:a24:d443:: with SMTP id x64mr11772667itg.46.1548717762204; Mon, 28 Jan 2019 15:22:42 -0800 (PST) Received: from localhost.localdomain (68-188-149-81.dhcp.aldl.mi.charter.com. [68.188.149.81]) by smtp.gmail.com with ESMTPSA id r195sm492325ita.3.2019.01.28.15.22.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 15:22:41 -0800 (PST) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Mon, 28 Jan 2019 18:22:04 -0500 Message-Id: <20190128232209.17485-1-aduskett@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 0/5] OpenJDK: new package and tests X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot <buildroot.busybox.net> List-Unsubscribe: <http://lists.busybox.net/mailman/options/buildroot>, <mailto:buildroot-request@busybox.net?subject=unsubscribe> List-Archive: <http://lists.busybox.net/pipermail/buildroot/> List-Post: <mailto:buildroot@busybox.net> List-Help: <mailto:buildroot-request@busybox.net?subject=help> List-Subscribe: <http://lists.busybox.net/mailman/listinfo/buildroot>, <mailto:buildroot-request@busybox.net?subject=subscribe> Cc: dleach@belcan.com, matthew.weber@collins.com, Adam Duskett <Aduskett@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" <buildroot-bounces@busybox.net> |
Series | OpenJDK: new package and tests | expand |
From: Adam Duskett <Aduskett@gmail.com> This patch series adds OpenJDK and an updated testing framework to BuildRoot. A previous patch series for OpenJDK8 used the JDK Muricle page to download a tarball. Instead, what I have chosen to do is use the AdoptOpenJDK GitHub repository. This repository allows us to use the GitHub macro instead of trying to provide a nasty workaround when grabbing the source code. With this patch series, there are some quirks that I would like to detail: - The openjdk-bin package: From http://hg.openjdk.java.net/jdk10/jdk10/raw-file/tip/common/doc/building.html#boot-jdk-requirements "Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the "boot JDK." The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, the chances are that there already exists another JDK for that platform that is usable as boot JDK. The rule of thumb is that the boot JDK for building JDK major version N should be a JDK of major version N-1, so for building JDK 9, a JDK 8 would be suitable as boot JDK." This paradox causes an issue because every distribution I have used comes with JDK8 by default. So there are two solutions that I could come up with: 1) Require the host-system to have JDK N-1 2) Grab the convenient and easy to install binaries from the AdoptOpenJDK repository, and use those binaries as the boot-jdk. - JDK >= 10 requires X11, even if building a headless version. It's unfortunate, but there isn't anything I cared to do about it. - Running "make install" installs the entire JDK to the target directory, which is why INSTALL_TARGET is manual. - The OpenJDK package: - Depending on !BR2_SOFT_FLOAT From http://hg.openjdk.java.net/jdk10/jdk10/raw-file/tip/common/doc/building.html#building-for-armaarch64 "Note that soft-float ABIs are no longer properly supported on OpenJDK." Yes, it compiles as of right now, but I don't want to have to help people with possible ASM java bugs because they wanted to use a processor without an FPU. - Requiring GLIBC OpenJDK could probably build against uClibc with a few patches, but I decided against going through the effort of doing so. My reasoning is that uClibc advertises itself as a small C library, however, at this time, OpenJDK comes in at over 100MB for a minimal install. So the few megabytes saved by using uClibc probably isn't going to be a concern for anybody wanting to use Java on their embedded environment. - Other thoughts: It is possible to use fine-grained make targets when building OpenJDK, check out http://hg.openjdk.java.net/jdk10/jdk10/raw-file/tip/common/doc/building.html#using-fine-grained-make-targets. Perhaps in the future, BuildRoot could have Java setup just like PHP or Python, with a large selection of modules to build? This fine-grained build could potentially save a massive amount of space. Perhaps in the future, a patch set that removes the X11/Alsa/cups dependencies can be added. In addition to the OpenJDK patches, Matt Webber, Daniel Leach and Ricardo Martincoski extended the testing framework to allow for a more flexible and comprehensive testing environment. The first of which is to test OpenJDK by running a simple "Hello world" application. Comments and critiques are always welcome! Adam Daniel J. Leach (1): support/testing: openjdk hello world Ricardo Martincoski (2): testing/infra/builder: build with target and environment testing/infra/basetest: support br2-external Adam Duskett (5): openjdk-bin: new package openjdk: new package .gitlab-ci.yml | 1 + DEVELOPERS | 3 + package/Config.in | 1 + package/Config.in.host | 1 + package/openjdk-bin/Config.in.host | 12 ++ package/openjdk-bin/openjdk-bin.hash | 6 + package/openjdk-bin/openjdk-bin.mk | 20 +++ package/openjdk/Config.in | 55 +++++++ package/openjdk/openjdk.hash | 3 + package/openjdk/openjdk.mk | 141 ++++++++++++++++++ support/testing/infra/basetest.py | 3 +- support/testing/infra/builder.py | 36 ++++- .../package/br2-external/openjdk/Config.in | 1 + .../br2-external/openjdk/external.desc | 1 + .../package/br2-external/openjdk/external.mk | 1 + .../package/openjdk-hello-world/Config.in | 26 ++++ .../openjdk-hello-world/HelloWorld.java | 8 + .../openjdk-hello-world.mk | 19 +++ support/testing/tests/package/test_openjdk.py | 42 ++++++ 19 files changed, 375 insertions(+), 5 deletions(-) create mode 100644 package/openjdk-bin/Config.in.host create mode 100644 package/openjdk-bin/openjdk-bin.hash create mode 100644 package/openjdk-bin/openjdk-bin.mk create mode 100644 package/openjdk/Config.in create mode 100644 package/openjdk/openjdk.hash create mode 100644 package/openjdk/openjdk.mk create mode 100644 support/testing/tests/package/br2-external/openjdk/Config.in create mode 100644 support/testing/tests/package/br2-external/openjdk/external.desc create mode 100644 support/testing/tests/package/br2-external/openjdk/external.mk create mode 100644 support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/Config.in create mode 100644 support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/HelloWorld.java create mode 100644 support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/openjdk-hello-world.mk create mode 100644 support/testing/tests/package/test_openjdk.py