Commit Graph

7782 Commits

Author SHA1 Message Date
Glen Barber
6ac4304a0f Invoke the growfs rc script for each boot on GCE.
PR:		230275
Submitted by:	gustavo.scalet@collabora.com
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-08-09 23:43:10 +00:00
Glen Barber
0366e18e5a Update and replace old rc daemons for GCE images.
PR:		229000
Submitted by:	helen.koike@collabora.com
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-08-09 23:31:18 +00:00
Colin Percival
4222a490f2 Fix copy-and-paste error in previous commit. 2018-08-07 00:51:49 +00:00
Colin Percival
a7ec419d93 Add EC2PUBLICSNAP option to EC2 builds; this passes a (recently added)
flag to bsdec2-image-upload instructing it to mark the snapshot of its
root disk as public (which is independent from marking the created AMIs
as public).

Requested by:	Amazon
2018-08-06 19:21:32 +00:00
Emmanuel Vadot
7b7dbfa9b3 release: arm: Copy the dtb to the fat partition
When booting via EFI on arm we have no way to know the dtb file to load
and we always use the one provided from the bootloader.
This works in most case but :

 U-Boot have some really old DTB for some boards, the sync from Linux isn't done automatically for all boards
 Some boards (like TI BeagleBone series) use one u-boot for all the model and it doesn't embed the DTBs
 Some boards (like IMX6 based ones), don't embed the DTB

We want u-boot to load and patch the DTB with the mac address or the display
node enabled or not.

Reviewed by:	gjb, imp
Differential Revision:	https://reviews.freebsd.org/D16596
2018-08-06 17:21:20 +00:00
Glen Barber
768a8d8d44 Fix the ftp-stage target for arm embedded builds.
The images were renamed from KERNCONF to BOARDNAME when
specified, which would result in an image name of:

 12.0-CURRENT-arm-armv7-GENERIC.img

which would then be renamed to use the BOARDNAME for the
SoC the image is targeted to use.  BOARDNAME was specified
for all images as of r336994, which now causes the ftp-stage
target to fail, as the rename is no longer necessary.

Sponsored by:	The FreeBSD Foundation
2018-08-02 18:51:44 +00:00
Emmanuel Vadot
5a88ea3214 release: arm64: Add PINE64-LTS configuration file
Pine64 isn't produced anymore but Pine64-LTS is.
This image works on the LTS release and the Sopine module.

Reviewed by:	gjb
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16487
2018-07-31 19:14:52 +00:00
Emmanuel Vadot
a8d0ee755c release: arm: Enable multicons for arm64
Since we have now EFI framebuffer enabled for ARM64 if we boot on a board
with an screen, u-boot will set up a EFI GOP framebuffer and we won't boot
using the serial console.
Also on RPI3 the firmware always setup the framebuffer area resulting in u-boot
always setup the EFI GOP and FreeBSD never using the serial console.

Reviewed by:	gjb, lwshu (previous version)
Differential Revision:	https://reviews.freebsd.org/D16472
2018-07-31 19:13:50 +00:00
Emmanuel Vadot
33bec6889a release: arm: Always boot armv6/v7 image with EFI
boot.scr is a u-boot script that loads and execute ubldr.bin
If not present u-boot will automatically boot loader.efi which
is already installed.

This means that all armv6/armv7 images are now booted via EFI

Tested-On: RPI-B
Tested-On: RPI2
Tested-On: OrangePi One
Tested-On: All lot of other boards
MFC after:	Never
Relnotes:	yes
2018-07-31 19:12:31 +00:00
Emmanuel Vadot
89f81528b3 release: Restore copy of boot.scr for some board
This is not a problem for 12-CURRENT as EFI boot works but it doesn't
for 11.
While here some board arm_install_uboot also copy ubldr.bin et create
firstboot files but it's already done in arm_install_boot

Reviewed by:	gjb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D16481
2018-07-31 19:10:50 +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
2e81004069 release: rpi-b: add BOARDNAME variable
Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D16514
2018-07-31 18:54:06 +00:00
Emmanuel Vadot
8b66e85493 release: arm: Use GENERIC kernel for IMX6 based boards
Switch the IMX.6 based board to GENERIC the kernel config.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D16511
2018-07-31 18:52:43 +00:00
Emmanuel Vadot
4b99ca8e4c release: arm: Add a GENERIC sdcard image
This produce a generic sdcard image using armv7 GENERIC kernel that
just need some u-boot (or none if the board have u-boot or a SPI flash
for example).

Reviewed by:	imp, gjb
Differential Revision:	https://reviews.freebsd.org/D16410
2018-07-28 20:45:36 +00:00
Conrad Meyer
858178a142 Remove insecure ciphers from GCE sshd configuration
They were added for unclear reasons in r277263.  The current OpenSSH
defaults (7.5+) are reasonable, and do not include the insecure rc4 cipher:

                   chacha20-poly1305@openssh.com,
                   aes128-ctr,aes192-ctr,aes256-ctr,
                   aes128-gcm@openssh.com,aes256-gcm@openssh.com,
                   aes128-cbc,aes192-cbc,aes256-cbc

I think I recall there being a reason for a specific list of ciphers on GCE
at the time, but I do not recall what it was, and cannot find any
current GCE documentation of such a list.

So, just revert the explicit configuration and use sane openssh defaults.

PR:		230092
Submitted by:	Gustavo Scalet <gustavo.scalet AT collabora.com>
MFC after:	3 days
Security:	yes
2018-07-28 19:35:49 +00:00
Warner Losh
c680645566 Remove the hopelessly confused GUMSTIX.conf config
This config never worked. At no time did u-boot match the kenrel match
the userland. As all the GUMSTIX gear we support is quite old and/or
not working, remove it. The duovero stuff might work, but nobody
has the hardware for it and GUMSTIX hasn't sold it in years.
2018-07-27 19:25:09 +00:00
Glen Barber
cc893d5822 Fix OL_DIR definition following r336721.
Sponsored by:	The FreeBSD Foundation
2018-07-26 19:42:23 +00:00
Emmanuel Vadot
d904ce8a52 release: Add OL_DIR forgot in r336600
Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D16439
2018-07-25 17:45:56 +00:00
Matt Macy
38c0c78e50 fix use of empty in Makefile.ec2
empty() takes a variable name - not the expanded value

Reported by:	sjg
2018-07-22 23:33:48 +00:00
Matt Macy
16bb9a49ad Correctly reference SRCTOP, avoid multiple invocations of svn
Reported by:	sjg
2018-07-22 23:20:24 +00:00
Matt Macy
87faf66318 fix build non-svn checkouts post r336593
The change made in r336593 assumes that the build is happening in a
svn checkout resulting in misleading debug output. Check that we're
actually working in an svn checkout before proceeding to call svn.
2018-07-22 22:57:52 +00:00
Emmanuel Vadot
016ba82470 release: Add rpi firmware dtb and mmc overlays for RPI-B and RPI2
This is needed with new u-boot that uses the rpi-firmware dtbs.

Reviewed by:	gjb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D16240
2018-07-22 12:04:21 +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
Emmanuel Vadot
1f8b431d18 release: Uniform release arm image size
Create a 50m fat16 for all boards.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D16238
2018-07-22 12:02:07 +00:00
Colin Percival
049775cef3 Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch
and revision number announced in SNS notifications about new EC2 AMIs.

While I'm here, incorporate that information into the AMI "description"
fields, since it's more useful than simply echoing the information
already provided via the AMI "name".

Approved by:	gjb
2018-07-21 22:54:43 +00:00
Colin Percival
43fbd222cc Check that EC2SNSTOPIC and EC2PUBLIC are non-empty, along with being
defined, in order to avoid problems with thermite.sh.

Reported by:	gjb
2018-07-17 23:16:05 +00:00
Colin Percival
a6fe18b04b Teach EC2 AMI release code to send an SNS notification after publishing
new AMIs if EC2SNSTOPIC is defined.

Reviewed by:	gjb
Requested by:	Amazon
2018-07-17 19:05:30 +00:00
Brad Davis
f59e535254 Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is
the most common usage.

Approved by:	bapt (mentor)
2018-06-28 13:48:59 +00:00
Brad Davis
7c3f17c5d5 Chase the pwd_mkdb endian changes.
Approved by:	bapt (mentor)
2018-06-27 19:10:32 +00:00
Edward Tomasz Napierala
4fe984fdae Enable USB OTG serial terminal on ARM SD card images. This configures
the system to make use of USB device mode / USB OTG to provide a "virtual
serial port" on release images.

Reviewed by:	gjb@
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D15602
2018-06-12 16:45:52 +00:00
Marius Strobl
470f228f62 - Once we have shifted arguments up to thrice, base-bits-dir is $1 rather
than $4. Introduce $BASEBITSDIR for clarity and to avoid repeating this
  mistake in the future. Fixing this ensures that we pick up newly built
  boot bits native to the target rather for/from the host.
- Apply some of the argument quoting fixes done in r287635 but missing in
  later revisions.
2018-06-07 18:24:25 +00:00
Ed Maste
075bac9787 switch amd64 memstick installer images to MBR
A good number of BIOSes have trouble booting from GPT in non-UEFI mode.
This is commonly reported with Lenovo desktops and laptops (including
X220, X230, T430, and E31) and Dell systems.  Although UEFI is the
preferred amd64 boot method on recent hardware, older hardware does not
support UEFI, a user may wish to boot via BIOS/CSM, and some systems
that support UEFI fail to boot FreeBSD via UEFI (such as an old
AMD FX-6100 that I have).

With this change amd64 memsticks remain dual-mode (booting from either
UEFI or CSM); the partitioning type is just switched from GPT to MBR.

The "vestigial swap partition" in the GPT scheme was added in r265017 to
work around some issue with loader's GPT support, so we should not need
it when using MBR.

There is some concern that future UEFI systems may not boot from MBR,
but I am not aware of any today.  In any case the likely path forward
for our installers is to migrate to CD/USB combo images, and if it
becomes necessary introduce a separate memstick specifically for the
MBR BIOS/CSM case.

PR:		227954
Reviewed by:	gjb, imp, tsoome
MFC after:	3 days
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D15599
2018-05-29 15:06:13 +00:00
Edward Tomasz Napierala
a4ccdf9091 Revert r333493, which was a temporary fix for 11.2-RELEASE, and instead
switch the default kldxref_enable to YES.

The reason is that it's required for every image that's being cross-built,
as kldxref(8) cannot handle files for non-native architectures.  For the
one that is not - amd64 - having it on by default doesn't change anything;
the script is noop if the linker.hints already exists.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-05-26 11:13:17 +00:00
Emmanuel Vadot
785724755a release: arm64: Use loader.efi as bootaa64.efi for RPI3 and PINE64
boot1.efi have some trouble to read MBR partitions, it needs them to be
aligned a certain way while loader.efi can cope with them either way.
We want to switch to loader.efi as the main efi loader everywhere, it seems
that arm64 using MBR partition will be the guinea pig.

Tested On: RPI3, Pine64
Reviewed by:	imp
Approved by:	gjb
2018-05-21 11:58:02 +00:00
Emmanuel Vadot
78f78afc70 release: rpi3: Copy the special rpi3 config.txt
RPI* 32bits and RPI* 64bits have a different config.txt
Copy to correct config.txt to the fat partition of the release image.
Also copy pwm.dtbo as some people want to use it.

Reviewed by:	gjb
2018-05-17 19:10:13 +00:00
Emmanuel Vadot
2397aecf28 release: arm: Format FAT partition as FAT16
r332674 raised the size of the FAT partition from 2MB to 41MB for some
boards. But we format them in FAT12 and this size appears to be to big
for FAT12 and some SoC bootrom cannot cope with that.
Format the msdosfs partition as FAT16,

PR:		228285
MFC after:	soon
2018-05-17 16:21:12 +00:00
Edward Tomasz Napierala
896eb70c80 Set kldxref_enable="YES" for ARM images. Without it, the images are missing
the /boot/kernel/linker.hints file, which breaks loading some of the modules
with dependencies, eg cfiscsi.ko.

This is a minimal fix for ARM images, in order to safely MFC it before
11.2-RELEASE.  Afterwards, however, I believe we should actually just change
the default (as in, etc/defaults/rc.conf).  The reason is that it's required
for every image that's being cross-built, as kldxref(1) cannot handle files
for non-native architectures.  For the one that is not - amd64 - having it
on by default doesn't change anything - the script is noop if the linker.hints
already exists.

The long-term solution would be to rewrite kldxref(1) to handle other
architectures, and generate linker.hints at build time.

Reviewed by:	gjb@
MFC after:	3 days
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D14534
2018-05-11 14:52:35 +00:00
Glen Barber
c3955757a9 Add a special GCE_LICENSE variable to Makefile.gce, which when set,
will include license metadata in the resultant GCE image.

GCE_LICENSE is unset by default, as it primarily pertains to images
produced by the FreeBSD Project, but for downstream FreeBSD consumers,
it can be set in the make(1) environment in the format of:

 --licenses="projects/PROJECT_ID/global/licenses/LICENSE_NAME"

The "license" is not a license, per se, but required metadata that
is required by the GCE marketplace.  For the FreeBSD Project, the
license name is simply 'freebsd', with the description of 'FreeBSD'.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-05-10 21:46:58 +00:00
Glen Barber
43613f74dd Use vYYYYMMDD in the timestamp suffix for Google Compute Engine
snapshot images for consistency with other OSes.

MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
2018-05-08 17:15:12 +00:00
Glen Barber
ef470d031a Fix a typo.
Submitted by:	lidl
MFC after:	3 days
MFC with:	r333262
Sponsored by:	The FreeBSD Foundation
2018-05-04 21:17:29 +00:00
Glen Barber
d55f0e89c8 Ensure the ports and src trees are available on GCE images,
satisfying a requirement to allow FreeBSD to be considered
a top-tier supported OS in Google Compute Engine.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-05-04 20:38:26 +00:00
Benno Rice
6ea2984738 Allow etdump, makefs and mkimg to be overridden.
Recent changes to makefs and mkimg have led to situations where the
disconnect between this script and the versions installed on the host cause
failures. Provide a way to work around this that doesn't require the
installation of new versions to the host system if that's not desired.

With this change mkisoimages.sh will honour the $ETDUMP, $MAKEFS and $MKIMG
environment variables but fall back to the previous behaviour of finding them
within $PATH.

Reviewed by:	gjb
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D15181
2018-04-25 18:47:52 +00:00
Glen Barber
f8b865d1d6 Increase the msdosfs partition size on arm SoC images where the
current size may not be sufficiently large for development and/or
testing.

PR:		227548
Submitted by:	trasz
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-04-18 14:34:33 +00:00
Colin Percival
b6028b0ba1 Move debug.{trace,debugger}_on_panic and kern.panic_reboot_wait_time in
EC2 instances from sysctl.conf to loader.conf; these can all be set as
loader tunables, and setting them in loader.conf gives us the right
behaviour in the event of a kernel panic taking place prior to when
sysctl.conf is processed.

MFC after:	1 week
2018-04-18 05:58:27 +00:00
Benno Rice
0279ac04ed Generate hybrid ISO images for amd64.
This keeps the existing El Torito entries for BIOS and UEFI boot code and
adds a GPT in the ISO image's System Area containing boot code for BIOS that
will load /boot/loader from the ISO filesystem and execute it. We then use
etdump to find the EFI System Partition image in the El Torito catalog and
add an entry to the GPT that allows EFI to find it.

Reviewed by:	gjb, imp
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D15051
2018-04-17 22:33:41 +00:00
Ed Maste
bf249c5a0a switch i386 memstick installer images to MBR
Some BIOSes have trouble booting from GPT in non-UEFI mode.  This is
commonly reported with Lenovo laptops, including my x220.  As we do not
currently support booting FreeBSD/i386 via UEFI there's no reason to
prefer GPT.

The "vestigial swap partition" was added in r265017 to work around an
issue with loader's GPT support, so we should not need it when using
MBR.

We may want to make the same change to amd64, although the issue there is
mitigated by such systems booting via UEFI in the common case.

PR:		227422
Reviewed by:	gjb
MFC after:	3 weeks
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2018-04-12 19:00:22 +00:00
Ed Maste
8ea90e075c make-memstick.sh: put partition args on separate lines
This makes it easier to identify the individual partition types and
facilitates comparisons across architectures.

Reviewed by:	gjb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-04-10 19:49:04 +00:00
Glen Barber
32c434538a Following r331292, many of the files (such as the LICENSE file)
have moved from the u-boot-rpi3 share directory to the default
rpi-firmware share directory.  Remove the files from UBOOT_FILES
and append the DTB file to a DTB_FILES list so the correct path
is used, fixing a build failure.

Sponsored by:	The FreeBSD Foundation
2018-04-10 17:40:44 +00:00
Benno Rice
eb5c194032 Fix the position of $bootable so that -o platformid=efi applies correctly.
Sponsored by:	iXsystems, Inc.
Pointy hat to:	benno (again)
2018-04-10 02:49:53 +00:00