example, explicitly hard-code gcc(1) as the compiler.
Partially revert r264703, which did a post-chroot install
of gcc(1). This was initially removed because gcc(1) fails
to build usr.bin/dtc/ causing the xdev target to fail. So
this time, move the gcc(1) installation after xdev is built.
This change is likely applicable to stable/10 arm build
failures, as well.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
XDEV_FLAGS variable in ${KERNCONF}.conf file.
MFC after: 3 days
X-MFC-Note: fix stable/10 XDEV_FLAGS local for branch
Sponsored by: The FreeBSD Foundation
For stable/10, r264703 sets the correct WITH/WITHOUT
knobs to get xdev built with the arm-freebsd-gcc binary
installed. Unfortunately, the same fix does not work on
head/.
Also, quite to my amazement, WITH_GCC=1 and WITH_GNUCXX=1
causes xdev to fail spectactularly at least on r264791.
The situation as it stands is:
- gcc(1) is needed for the u-boot build.
- cc(1) *cannot* be clang(1)
To shoe-horn the toolchain to make 'xdev' give what is
needed, remove WITH_GNUCXX=1 and add WITH_GCC_BOOTSTRAP=1.
MFC After: 1 week
X-MFC-To: stable/10 only
X-MFC-Note: after stable/10 is broken in this way...
Sponsored by: The FreeBSD Foundation
- gcc(1) fails to build usr.bin/dtc
- lack of WITH_GNUCXX=1 causes cc1plus(1) calls to fail
- u-boot fails to build with clang (hard-coded gcc(1) calls)
Implement the proper incantation of WITH_/WITHOUT_ knobs
to get arm snapshot builds working again.
Since the cc(1) binary is no longer expected to be clang(1),
remove the chroot(8) post-install cc(1) overwrite.
MFC After: 3 days
X-MFC-With: r264518,r264697,r264698
Tested on: stable/10@r264677 RPI-B
Sponsored by: The FreeBSD Foundation
WITHOUT_CLANG_IS_CC=1, it appears WITHOUT_CLANG=1 must
also be set.
While here, reorder the lines to put the WITH_* and
WITHOUT_* entries on the same line.
MFC After: 3 days
X-MFC-With: r264518
Tested on: stable/10@r264677
Sponsored by: The FreeBSD Foundation
After several months of testing and fixing (and breaking)
various parts of release/release.sh changes, it is now
possible to build FreeBSD/arm images as part of the release
process.
When EMBEDDEDBUILD is set in the release.conf file, release.sh
will create the build environment, then run a separate script
in release/${XDEV}/release.sh [1]. Currently, only arm is
supported.
The release/${XDEV}/release.sh configures the build environment
specific for the target image, such as installing gcc(1),
installing additional third-party software from the ports tree,
and fetching external sources.
Once the build environment is set up, release/${XDEV}/release.sh
runs Crochet, written by Tim Kientzle, which builds the userland
and kernel, and creates an image that can be written to an SD
card with dd(1). Many thanks to Tim for his work on Crochet.
Sample configurations for FreeBSD/arm boards are in the
release/arm/ directory, and Crochet configuration files for each
board are located in release/tools/arm/. Supported boards at this
time are: BEAGLEBONE, PANDABOARD, RPI-B, and WANDBOARD-QUAD.
Adding support for additional boards will continue in the
projects/release-embedded/ branch, and incrementally merged back
to head/.
Many thanks to the FreeBSD Foundation for the support and
sponsorship of this project.
[1] XDEV is used in order to keep the various configurations
organized by architecture, but since TARGET and TARGET_ARCH
are used to build the chroot, the values of those variables
cannot be used.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
^/user/gjb/hacking/release-embedded:
259994,260000,260895-260896,261139,261152,
261174,261176,261210,261221,261237,261239,
261448,261489
^/user/gjb/release-embedded:
262305,262307
svn:mergeinfo is intentionally not included in the commit, so it does
not propagate to head/.
Sponsored by: The FreeBSD Foundation
Building gnu/usr.bin/cc/ with '-j' set blows up quite
impressively, so add '-j1' after WORLD_FLAGS, and add
a comment explaining why '-j1' is there.
Sponsored by: The FreeBSD Foundation
build to arm/release.sh.
This prevents needing to build a separate chroot environment for
the arm/armv6 builds when it is not absolutely necessary. This
is useful for situations where a single userland build is used
to populate more than one chroot.
Sponsored by: The FreeBSD Foundation
- In arm/release.sh:
- Move crochet work directory creation to occur earlier,
since its parent directory is needed to store a fetched
u-boot version.
- Add a before_build() function as a quick hack to run
board-specific (kernel configuration specific, really)
commands, if any.
- For the BEAGLEBONE kernel, a specific version of u-boot
source is needed. Fetch the source in before_build() for
this case. Unfortunately, there are no checksums available
(that I can find) for these sources. For a quick solution,
add the hard-coded sha256 of the tarball, and fetch from
my public_html/ directory. A more permanent solution for
this needs to be found.
Add initial release.sh and crochet configuration files for the
BEAGLEBONE build.
Sponsored by: The FreeBSD Foundation
set up for the amd64/amd64 TARGET/TARGET_ARCH combination.
Some of the build tools used here (u-boot in particular) require
use of gcc(1). The lang/gcc* from ports/ will install as 'gccNN'
instead of 'gcc', so they cannot be used without extra hacks.
Add an EMBEDDED_WORLD_FLAGS variable to be used to properly set
up the build chroot. For the RPI-B case, EMBEDDED_WORLD_FLAGS
is set to 'WITH_GCC=1', which is used to set up the build chroot.
While here, in followup to r260895, do not rely on the necessary
configuration files and/or scripts to exist in the build target
src/ tree.
To work around cases where files do not exist, copy (from the
local release/ checkout) the tools/${XDEV}/crochet-${KERNEL}.conf
to ${CHROOTDIR}/tmp/external/crochet-${KERNEL}.conf to make them
accessible to the external utilities that need them (i.e., crochet).
Sponsored by: The FreeBSD Foundation
release.sh:
- Modify release/release.sh to recognize an 'EMBEDDEDBUILD'
variable. When set, release/release.sh will build the chroot
userland as is done for big-iron builds.
- Instead of running the 'buildworld', 'buildkernel', and
'release' targets in the chroot, a separate script is run.
The script tools/release/${XDEV}/release.sh sets up the rest
of the chroot workspace, such as installing ports that will
be needed, and building the 'xdev' target.
- crochet (by kientzle@) is checked out from the upstream
repository (and if needed, u-boot, in the case of Raspberry
Pi).
- tools/release/${XDEV}/release.sh then runs crochet with
a configuration file specific to the ${KERNCONF} being built.
Note that this is effectively a first-pass attempt to integrate
this into the release process.
Tested against: head@r259961
Sponsored by: The FreeBSD Foundation