Commit Graph

89 Commits

Author SHA1 Message Date
Glen Barber
4de042ec89 Set OPTIONS_UNSET in the argument list to env(1), and add
AVAHI to the list.  This fixes the textproc/docproj build
seemingly following FLAVORS being added.

Specifically, the problem with the dependency chain here is:
- textproc/docproj depends on print/cups, which sets AVAHI=on
  by default;
- net/avahi-app depends on devel/gobject-introspection, which
  requires python3+;
- graphics/netpbm depends on graphics/mesa-libs, which can
  only be built with python2.7;
- textproc/docproj depends on a number of graphics ports for
  font rendering, etc.

MFC after:	3 days
MFC before:	12.0-BETA3
Sponsored by:	The FreeBSD Foundation
2018-10-29 20:53:05 +00:00
Emmanuel Vadot
8608db1eb6 release: Deinstall u-boot ports before installing
FORCE_PKG_REGISTER is broken so multiple invocation of release.sh for the
same board will fails if /scratch isn't cleaned.
Leave it but deinstall the package first.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D16513
2018-07-31 18:57:11 +00:00
Emmanuel Vadot
3d62046d67 release: arm: Use BOARDNAME in the image name
Using KERNEL made sense when all boards had different kernel configuration.
Now that all of them are using GENERIC use the board name instead

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D16512
2018-07-31 18:55:44 +00:00
Emmanuel Vadot
43e289df5a release: Add arm_install_boot to install the commit boot bits
This reduce the per-board arm_install_uboot to just install u-boot.
While here remove the installation of rpi.dtb and rpi2.dtb as we load
them from the UFS partition via ubldr.

Reviewed by:	gjb, imp (older version)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D16239
2018-07-22 12:03:17 +00:00
Glen Barber
6c41d54855 Bump Copyright year following r328283.
MFC after:	3 days
MFC with:	r328283
Sponsored by:	The FreeBSD Foundation
2018-01-23 16:48:31 +00:00
Glen Barber
afac3ed6c3 When CHROOTBUILD_SKIP is set, evaluate the existence of /bin/sh
within the CHROOTDIR.  If it does not exist, unset CHROOTBUILD_SKIP
to prevent build failures.

Requested by:	swills
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-01-23 16:41:31 +00:00
Glen Barber
30ba43e1a6 Fix port build flags passed to make(1) after r326315, where
it was missed for embedded image builds.

MFC after:	3 days
MFC with:	r326315
Sponsored by:	The FreeBSD Foundation
2017-11-30 20:53:57 +00:00
Glen Barber
27879b9a70 Set DISTDIR and WRKDIRPREFIX when building ports within the
chroot(8) to avoid mtime changes within the ports checkout,
which can cause checksum differences.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-11-28 16:00:27 +00:00
Glen Barber
d294a5246f Only copy /etc/resolv.conf to ${CHROOTDIR} if /etc/resolv.conf does
not already exist within ${CHROOTDIR}.  This allows re-using a build
chroot with CHROOTBUILD_SKIP set to a non-empty value and CHROOTDIR
set to '/' in release.conf.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-11-15 19:14:44 +00:00
Glen Barber
d412b1d7bc Update the GUMSTIX image build to use arm/arm TARGET/TARGET_ARCH.
Update the TARGET/TARGET_ARCH matching in release/release.sh and
release/Makefile.mirrors for simplification.

Discussed with:	mmel
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-11-13 19:31:51 +00:00
Glen Barber
bb0c3a6b03 Specify WITH_UNIFIED_OBJDIR in chroot_arm_build_release() to
ensure the output image is created in the correct .OBJDIR.

Sponsored by:	The FreeBSD Foundation
2017-11-06 17:59:04 +00:00
Glen Barber
0dd40b17a8 Include TARGET and TARGET_ARCH in chroot_arm_build_release()
make(1) invocations following the OBJDIR restructuring to
ensure the output arm SoC image is in the correct directory.

Sponsored by:	The FreeBSD Foundation
2017-11-03 18:54:25 +00:00
Glen Barber
977401bd3b Add arm/armv7 checks to env_check().
Sponsored by:	The FreeBSD Foundation
2017-10-12 20:31:10 +00:00
Glen Barber
dae40fc1b4 Always expand the full path to the configuration file specified
with the '-c' flag.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-08-15 15:08:19 +00:00
Glen Barber
81d49eb56e Include WORLD_FLAGS in CHROOT_IMAKEFLAGS and CHROOT_DMAKEFLAGS, to
allow passing '-jN' to the installworld and distributeworld targets.

Submitted by:	bdrewery
Sponsored by:	The FreeBSD Foundation
2017-06-23 18:42:47 +00:00
Glen Barber
751c20d8a5 In release/release.sh:
- Rename chroot_arm_armv6_build_release() to chroot_arm_build_release()
  and make it hardware agnostic (such as armv6 -vs- armv7 -vs- arm64).

- Evaluate EMBEDDED_TARGET differently so release/tools/arm.subr can
  be used for arm/armv6 and arm64/aarch64.

- Update comments and copyright.

In release/tools/arm.subr:
- In arm_create_disk(), change the default alignment from 63 to 512k,
  fixing a boot issue on arm64 and EFI. [1]

- Update comments and copyright.

Add a RPI3 configuration file, pieces obtained from Crochet.

Obtained from:	Crochet [1]
MFC after:	5 days
X-MFC-Note:	maybe
Sponsored by:	The FreeBSD Foundation
2017-06-23 00:08:36 +00:00
Glen Barber
256bf4121c Pass overrides to make(1) when building ports for arm/armv6
targets, similar to what is done for the run-autotools-fixup
override for non-arm targets.

MFC after:	3 days
Tested on:	12-CURRENT building 10-STABLE
Sponsored by:	The FreeBSD Foundation
2016-08-09 22:48:46 +00:00
Renato Botelho
c6750673bf One of the already implemented options in release/Makefile is NOSRC. When
it's defined, installation image is shipped without source distribution
(src.txz)

Add the hability of defining NOSRC in release.conf and pass it to
'make release' argument

Approved by:	gjb
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D6710
2016-06-03 18:37:56 +00:00
Glen Barber
41ea4cc219 Set FORCE_PKG_REGISTER=1 when installing packages to avoid failures
when re-using build chroot(8) environments.

This is based on the patch in the PR referenced below, but instead
of using 'reinstall' in two locations (one of which already uses
FORCE_PKG_REGISTER=1), changes the non-embedded behavior.

PR:		205998
Submitted by:	ngie
MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2016-01-09 00:45:38 +00:00
Glen Barber
34187a086a Deprecate MD5 checksum generation in favor of SHA512.
This was discussed during the 10.2-RELEASE cycle, however
since we were nearing the end of the cycle, we decided to
defer this change until after 10.2-RELEASE.

Reminded by:	so (delphij), jmg
MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2015-10-14 22:33:11 +00:00
Glen Barber
238397876d Append VMFORMATS and VMSIZE to RELEASE_RMAKEFLAGS only if
WITH_VMIMAGES is set.

MFC after:	3 days
X-MFC-With:	r288341, r288345
Sponsored by:	The FreeBSD Foundation
2015-09-28 19:19:53 +00:00
Glen Barber
a312aae568 In followup to r288341, ensure VMFORMATS and VMSIZE are not
set to empty values, which would result in nonintuitive build
errors.

MFC after:	3 days
X-MFC-With:	r288341
PR:		203420 (related to)
Sponsored by:	The FreeBSD Foundation
2015-09-28 18:39:21 +00:00
Glen Barber
3a8cff7804 Honor VMFORMATS and VMSIZE if set in release.conf.
PR:		203420
Submitted by:	luca <dot> pizzamiglio <at> gmail <dot> com
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-09-28 16:33:38 +00:00
Glen Barber
88feae84be Merge ^/projects/release-arm-redux into ^/head.
Of note:

- This commit adds native FreeBSD/arm release build support without
  requiring out-of-tree utilities.

- Part of this merge removes the WANDBOARD-{SOLO,DUAL,QUAD} kernel
  configuration files, for which the IMX6 kernel configuration file
  should be used instead.

- The resulting images have a 'freebsd' user (password 'freebsd'),
  to allow ssh(1) access when console access is not available (VGA
  or serial).  The default 'root' user password is set to 'root'.

- The /etc/ttys file for arm images now enable both ttyv0 and ttyu0
  by default.

Help from:	many (boot testing, feedback, etc.)
Sponsored by:	The FreeBSD Foundation
2015-05-09 21:08:12 +00:00
Glen Barber
9fcdd5a3c9 Sigh. Really fix CHECKSUM file creation.
Sponsored by:	The FreeBSD Foundation
2015-05-08 15:15:36 +00:00
Glen Barber
395475f31e Fix CHECKSUM file creation.
Sponsored by:	The FreeBSD Foundation
2015-05-08 15:10:00 +00:00
Glen Barber
4bf1e8aee0 Do not include '/R' in the path when generating checksums, since
that will cause '/R' to be included in the CHECKSUM files.

Sponsored by:	The FreeBSD Foundation
2015-05-08 12:55:25 +00:00
Glen Barber
99cf2362e2 Move the finished image build to the '/R' directory (the
standard 'install' location for other architectures), then
compress the image with xz(1), and generate the CHECKSUM
files.

Sponsored by:	The FreeBSD Foundation
2015-05-08 12:50:48 +00:00
Glen Barber
40847e360b Fix the name of the final image.
Sigh.  Thou shalt not commit before coffee.

Sponsored by:	The FreeBSD Foundation
2015-05-08 10:47:57 +00:00
Glen Barber
b3e7a59bdf Rename KERNEL.img -> OSRELEASE-KERNEL.img when complete.
Sponsored by:	The FreeBSD Foundation
2015-05-08 10:43:29 +00:00
Glen Barber
ac1401b2c3 Fix paths.
Remove the temporary directory when done with it.
Destroy the md(4) device when done with it.

Sponsored by:	The FreeBSD Foundation
2015-05-07 17:40:00 +00:00
Glen Barber
befaadd56c In release.sh, create the /dev directory within the chroot
before attempting to mount(8) devfs.  Also, create the
.OBJDIR for the 'release' target, so files end up in the
correct location.

In tools/arm.subr, fix the target device when creating the
gpart partition scheme.

Sponsored by:	The FreeBSD Foundation
2015-05-07 00:27:28 +00:00
Glen Barber
68bca5fb30 Use the correct variable for the tools/TARGET.conf file.
Sponsored by:	The FreeBSD Foundation
2015-05-06 23:26:51 +00:00
Glen Barber
4ad8b75d53 Add tools/arm.subr to contain common subroutines used for
building arm images.  This is similar to tools/vmimage.subr
used for building virtual machine disk images.  By default,
only arm_create_disk() and arm_install_base() contain real
functionality here, and arm_install_uboot() must be overridden
in the arm/KERNEL.conf file.

In release.sh, make create_arm_armv6_build_release() do
something now.

In arm/BEAGLEBONE.conf, set IMAGE_SIZE, PART_SCHEME, FAT_SIZE,
FAT_TYPE, and MD_ARGS, as well as make arm_install_uboot()
functional.

Parts of this were taken from disecting a previous BEAGLEBONE
image, and other parts obtained from Crochet sources.

Sponsored by:	The FreeBSD Foundation
2015-05-06 19:58:12 +00:00
Glen Barber
9056dae945 Evaluage chroot_build_release_cmd based on the TARGET/TARGET_ARCH
of the build target.

Move arm/armv6 'release' bits to chroot_arm_armv6_build_release().

Sponsored by:	The FreeBSD Foundation
2015-05-06 18:16:27 +00:00
Glen Barber
57dbde2ca8 buildenv_setup(), if overridden in the configuration file,
only needs to be invoked once.

Sponsored by:	The FreeBSD Foundation
2015-05-06 16:21:12 +00:00
Glen Barber
6848c01fad Remove Crochet invocation.
Sponsored by:	The FreeBSD Foundation
2015-05-06 16:04:11 +00:00
Glen Barber
cf582ac56f Update the arm/*.conf configuration files to only set
EMBEDDEDBUILD, EMBEDDED_TARGET, EMBEDDED_TARGET_ARCH,
EMBEDDEDPORTS, and KERNEL.

In release.sh, set TARGET and TARGET_ARCH to the
EMBEDDED_* variants from the configuration file.

Sponsored by:	The FreeBSD Foundation
2015-05-06 15:58:21 +00:00
Glen Barber
a03128832c In extra_chroot_setup(), use 'uname -U' to determine OSVERSION.
Move the port build for EMBEDDEDPORTS (if set) from arm/release.sh
to release.sh.

Remove arm/release.sh.

Sponsored by:	The FreeBSD Foundation
2015-05-06 15:41:43 +00:00
Glen Barber
8501ddab55 Add a return to chroot_build_target().
In chroot_build_release(), reverse the order evaluating
EMBEDDEDBUILD.

Sponsored by:	The FreeBSD Foundation
2015-05-06 15:20:29 +00:00
Glen Barber
7290c83913 Wrap long lines in comments after previous commits that indented
the file.

Sponsored by:	The FreeBSD Foundation
2015-05-06 15:10:50 +00:00
Glen Barber
3c9143a888 Ensure resolv.conf exists on the build host before attempting
to copy it to the build chroot.

Move where the ldconfig(8) startup script is invoked.

Sponsored by:	The FreeBSD Foundation
2015-05-06 15:05:38 +00:00
Glen Barber
81cfc2845b Move where the configuration file is sourced if '-c'
is specified.  If the configuration file does not exist,
proceed with the default options instead of exiting.

Sponsored by:	The FreeBSD Foundation
2015-05-06 14:59:16 +00:00
Glen Barber
43eee0751f Move the trap after env_check(), since CHROOTDIR may be
redefined.

Sponsored by:	The FreeBSD Foundation
2015-05-06 14:53:34 +00:00
Glen Barber
3ddb84b3bb Shorten long lines.
Sponsored by:	The FreeBSD Foundation
2015-05-06 14:53:01 +00:00
Glen Barber
5dbf38dcca Move PATH and export to the same line.
Handle svn or svnlite being installed in /usr/bin or
/usr/local/bin.

Sponsored by:	The FreeBSD Foundation
2015-05-06 14:48:35 +00:00
Glen Barber
a12fa24967 Add documentation for newly-added functions.
While here, move CHROOT_* and RELEASE_* variables from
env_setup() to env_check() since they may change if
a release.conf file is used.

Sponsored by:	The FreeBSD Foundation
2015-05-06 14:35:43 +00:00
Glen Barber
fb539361f7 Add the following functions to release.sh to organize and make
clear the workflow:
 - env_setup()
 - env_check()
 - chroot_setup()
 - extra_chroot_setup()
 - chroot_build_target()
 - chroot_build_release()

There should be no functional changes at this point.

Sponsored by:	The FreeBSD Foundation
2015-05-06 14:21:51 +00:00
Glen Barber
2252f43bdc MFH: r282315-r282534
Sponsored by:	The FreeBSD Foundation
2015-05-06 11:50:30 +00:00
Glen Barber
20a67b0520 Add initial support for building RPI2 images.
In release.sh, allow overriding buildenv_setup() before
the handoff to arm/release.sh.

Copy arm/RPI-B.conf -> arm/RPI2.conf, set UBOOT_PORT and
the correct KERNEL, and add the buildenv_setup() override
to install the sysutils/u-boot-rpi2 port/package.

Copy tools/arm/crochet-RPI-B.conf -> tools/arm/crochet-RPI2.conf,
and set the correct entries for the RaspberryPi2 board.

Thanks to:	loos@
Sponsored by:	The FreeBSD Foundation
2015-05-05 16:28:04 +00:00