Commit Graph

2838 Commits

Author SHA1 Message Date
Ruslan Bukin
d440ef2d73 Rename files: keep codename only to make it shorter. 2014-08-01 15:10:55 +00:00
Ruslan Bukin
835b36e211 Add support for Chromebook2 -- next-generation 8-core
(4 in operation), 4GB ram (3.5 usable) ARM machine.

Support covers device drivers for:
- Serial Peripheral Interface (SPI)
- Chrome Embedded Controller (EC) - SPI-based version
- XHCI and USB 3.0 dual-role device PHY

Also:
- Add support for Exynos5420 in Pad module
- Move power-related functions to separate driver --
  Power Management Unit (PMU)
- Enable XHCI for Chromebook1

Special thanks to grehan@ for hardware, and to
hselasky@ for r269139.
2014-08-01 06:20:25 +00:00
Marcel Moolenaar
e9759f8bd3 Add pkgfs, a file system implementation for reading files out of a
compressed tarball, aka package. The file system assumes that the
files are layed-out in the same order as needed to allow for the
package to be streamed. As such, it does not read an entire package
into memory first.

Some properties of the file system:
o   Files that start with '+' are silently skipped. These are found
    in FreeBSD package files.
o   Files smaller than or equal to 4KB will be cached in memory and
    as such allow for some flexibility in accessing files out of
    order.
o   Files with the .tgz suffix are assumed to be (sub-)packages and
    signal the end for a directory scan.

Obtained from:	Juniper Networks, Inc.
2014-07-31 23:25:13 +00:00
Marcel Moolenaar
a2a6914f06 1. Suppress output for the TFTP-based PXE loader, but leave it in
place for the NFS-based PXE loader. Information like rootpath
    or rootip aren't that useful for TFTP and the gateway IP is
    typically already printed by the firmware.
2.  Only set boot.nfsroot.* environment variables for NFS. This
    makes it possible for the OS to work either way by checking
    for the presence or absence of environment variables.
3.  Set boot.netif.server when using TFTP so that the OS can fetch
    files as well. A typical use case for this is network-based
    installations with the installation process implemented on
    top of FreeBSD.
4.  The pxelinux loader has a set of alternative names it tries
    for configuration files. Make it easier to do something
    similar in Forth by providing the IP address as a 32-bit hex
    number in the pxeboot.ip variable and the MAC address with
    dashes in the pxeboot.hwaddr environment variable.

Obtained from:	Juniper Networks, Inc.
2014-07-27 16:29:57 +00:00
Marcel Moolenaar
7fe0b4f160 Give loaders more control over the Forth initialization process. In
particular, allow loaders to define the name of the RC script the
interpreter needs to use. Use this new-found control to have the
PXE loader (when compiled with TFTP support and not NFS support)
read from ${bootfile}.4th, where ${bootfile} is the name of the
file fetched by the PXE firmware.

The normal startup process involves reading the following files:
1.  /boot/boot.4th
2.  /boot/loader.rc or alternatively /boot/boot.conf

When these come from a FreeBSD-defined file system, this is all
good. But when we boot over the network, subdirectories and fixed
file names are often painful to administrators and there's really
no way for them to change the behaviour of the loader.

Obtained from:	Juniper Networks, Inc.
2014-07-27 16:12:51 +00:00
Simon J. Gerraty
5b6dc2efc9 Reviewed by: imp
LDFLAGS is supposed to be given to CC not LD.
Define _LDFLAGS as a filtered version of LDFLAGS safe to give to LD
2014-07-26 04:38:09 +00:00
Ian Lepore
8926f21ce1 Enable at91 systems to boot from high capacity SD cards.
This also fixes a few minor violations of the SD protocol, such as running
the bus at high speed during the card identification sequence.

The sdcard_init() routine now probes for SDHC cards so that later read
requests can make needed adjustments between block and byte offsets based
on card type.

There is a new MCI_readblocks() function that takes block number and block
count parameters instead of byte-offset values.  Using this routine, boot
loader code can load a kernel from any location on an SDHC or standard SD.

The old MCI_read() interface remains unchanged so that existing customized
boot loader code will still keep working without changes.  Using this
routine, boot loaders can load a kernel from anywhere in the first 4GB of
an SDHC card (or of course any location on a standard SD card).

A new sdcard_use4wire() routine allows boot loaders to request 4-bit
transfers; it should be called after sdcard_init().  The sdcard_init()
routine no longer assumes the hardware is 4-wire capable and by default
sets things up for 1-bit transfers.  (4-wire mode is unreliable on
at91rm9200, works on later SoCs.)

PR:		155894
Submitted by:	me.  years ago.
2014-07-26 04:16:04 +00:00
Ian Lepore
3ed6efc4ac The 'flags' variable is conflicting with some inline code in a header file
("variable flags shadows a global..."), just rename this variable to
wish away the problem.
2014-07-26 04:09:43 +00:00
Ian Lepore
a6fc334653 Eliminate "no previous prototype for main" warnings. 2014-07-26 03:33:19 +00:00
Ian Lepore
3e479cb537 Silence a clang warning about a while loop with an empty body. 2014-07-26 03:19:13 +00:00
Sean Bruno
2cc5128147 Delete the entire cleandepend/cleanmachine target thing now that its been
cleared out in r269029

Reviewed by:	emaste@freebsd.org
2014-07-23 22:58:00 +00:00
Sean Bruno
c6ac3a1de9 Add .NOPATH to the machine target so that builds in sys/boot work and don't
error out building zfs loader.

Submitted by:	sjg@freebsd.org
2014-07-23 22:12:05 +00:00
Sean Bruno
8b3e2e0fee Update so that clean target in sys/boot will delete the symlink
created for machine

Reviewed by:	emaste
2014-07-23 22:11:04 +00:00
Roger Pau Monné
f5417a03e3 don't set CR4 PSE bit on amd64
Setting PSE together with PAE or in long mode just makes the PSE bit
completely ignored, so don't set it.

Sponsored by: Citrix Systems R&D
Reviewed by: kib
2014-07-23 15:53:29 +00:00
Sean Bruno
12857dd1ea copyin/copyout should return 0 if they are truly emulating copyin/copyout behavior.
remove stray %s in printf

rewrite printf to display 64bit type without warning.
2014-07-22 04:47:19 +00:00
Ruslan Bukin
40d7d6323b Enable Freescale i.MX I2C driver for i.MX6. 2014-07-22 04:39:32 +00:00
Sean Bruno
67bff9b155 Remove boot1.efi during clean target. 2014-07-22 04:38:28 +00:00
Sean Bruno
38d02a94fa Supress clang warning for FreeBSD printf %b and %D formats
MFC after:	2 weeks
2014-07-22 04:37:47 +00:00
Ruslan Bukin
f040f3b317 Add support for Toradex Apalis i.MX6 development board.
Sponsored by:	Toradex AG
2014-07-18 08:23:53 +00:00
Ruslan Bukin
241dd1aa1e Fix typo. 2014-07-18 08:08:45 +00:00
Ruslan Bukin
e18aa9229a o Enable GPIO device driver for i.MX6.
It was originally written for i.MX5 and compatible with newer chip.
o Extend device tree information
o style(9) fixes

Discussed with:	ian
2014-07-18 07:47:50 +00:00
Ian Lepore
0f822edead Fix the Zedboard/Zynq ethernet driver to handle media speed changes so
that it can connect to switches at speeds other than 1gb.

This requires changing the reference clock speed.  Since we still don't
have a general clock API that lets a SoC-independant driver manipulate its
own clocks, this change includes a weak reference to a routine named
cgem_set_ref_clk().  The default implementation is a no-op; SoC-specific
code can provide an implementation that actually changes the speed.

Submitted by:	Thomas Skibo <ThomasSkibo@sbcglobal.net>
2014-07-14 20:58:57 +00:00
Warner Losh
aa0b5651c1 Compile boot2 with clang on pc98. 2014-07-10 00:15:50 +00:00
Warner Losh
53dda6a8d5 Make SERIAL support optional again. Enable it for i386 because a huge
percentage of machines has a 16550. Disable it for pc98 since only a
tiny fraction of them have one. These changes save 293 bytes when
building with clang, but preserves the ability to build with serial if
you really want.  We now have 92 bytes free (412 with the in-tree gcc).
2014-07-10 00:15:42 +00:00
Warner Losh
522d68a17f Merge the clang support from i386. Don't move to clang yet. 2014-07-10 00:15:38 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
John-Mark Gurney
962ce8cf82 add a hit that you can enable this by default if you want... necessary
if you want the keyboard break to work early in boot..

MFC after:	1 week
2014-07-04 14:49:40 +00:00
Ed Maste
b560f3ffa1 Display efi framebuffer dimensions on boot
The EFI framebuffer produces corrupted output on certain systems.  For
now display the framebuffer parameters (address, dimensions, etc.) on
boot to aid in tracking down these issues.

Sponsored by:	The FreeBSD Foundation
2014-07-03 17:53:28 +00:00
Xin LI
29441ba3fa MFV r267565:
4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks

MFC after:	2 weeks
2014-07-01 06:43:15 +00:00
Joel Dahl
45129f3233 mdoc: fix AUTHORS section. 2014-06-09 19:36:08 +00:00
Bryan Drewery
864c53ead8 In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable
it should changed to opt-out and be enabled by default along with ASLR.

Each application Makefile uses opt-out to ensure that ASLR will be enabled by
default in new directories when the system is compiled with PIE/ASLR. [2]

Mark known build failures as NO_PIE for now.

The only known runtime failure was rtld.

[1] http://www.bsdcan.org/2014/schedule/events/452.en.html
Submitted by:		Shawn Webb <lattera@gmail.com>
Discussed between:	des@ and Shawn Webb [2]
2014-06-08 17:29:31 +00:00
Rui Paulo
ea72ad9031 Mov p2041rdb.dts, p3041ds.dts, and p5020ds.dts to the powerpc directory. 2014-06-07 02:55:53 +00:00
Rui Paulo
a1e332c5b8 Fix the script to run make_dtb.sh instead of just dtc. 2014-06-07 02:38:13 +00:00
Rui Paulo
76b29e9c4f Add Makefiles to automatically test all the DTS files.
There are several broken DTS files right now in the arm directory.
2014-06-06 23:53:59 +00:00
Hans Petter Selasky
c440229d62 Compilation fixes. 2014-06-06 19:02:45 +00:00
Luiz Otavio O Souza
d6cf3c637e FreeBSD, historically, has always used 8-bit addresses for i2c devices
(7-bit device address << 1), always leaving the room for the read/write bit.

This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them
compatible with 8-bit addresses.  Previous to this commit an i2c device
would have different addresses depending on the controller it was attached
to (by example, when compared to any iicbb(4) based i2c controller), which
was a pretty annoying behavior.

Also, update the PMIC i2c address on beaglebone* DTS files to match the new
address scheme.

Now the userland utilities need to do the correct slave address shifting
(but it is going to work with any i2c controller on the system).

Discussed with:	ian
MFC after:	2 weeks
2014-06-03 19:24:53 +00:00
Ruslan Bukin
1e57235626 Add support for Exynos 5420 Octa - 8-core
heterogeneous (big.LITTLE) ARM machine
(4 x Cortex-A15 @ 1.8Ghz, 4 x Cortex-A7 @ 1Ghz)

Add configuration for Arndale Octa development board
2014-06-01 08:15:34 +00:00
Craig Rodrigues
7bfe91e85c Allow customization of the brand displayed in the boot menu.
If the user specifies in /boot/loader.conf:

    loader_brand="mycustom-brand"

Then "mycustom-brand" will be executed instead of "fbsd-logo".

Submitted by:    alfred
Obtained from:   FreeNAS
2014-06-01 04:08:45 +00:00
Hans Petter Selasky
5e6464df33 Use own memory pool of 128K until further, hence that works the best.
Sponsored by:	DARPA, AFRL
2014-05-30 16:49:12 +00:00
Hans Petter Selasky
b589760a6f Add optional support for USB to BERI loader. Fix the linker script so
that the garbage collection feature can be used when linking.

Sponsored by:	DARPA, AFRL
2014-05-30 16:47:54 +00:00
Hans Petter Selasky
237f18c95a Resolve issue with resolving malloc() and free() functions at linking time.
Sponsored by:	DARPA, AFRL
2014-05-30 14:30:52 +00:00
Hans Petter Selasky
70d843035e Export structure(s) properly.
Sponsored by:	DARPA, AFRL
2014-05-30 14:05:31 +00:00
Hans Petter Selasky
6cdd2fc633 Fix delay() function in the BERI loader code.
Reviewed by:	brooks @
Sponsored by:	DARPA, AFRL
2014-05-30 13:53:37 +00:00
Hans Petter Selasky
ccc29eb1b9 USB boot library improvements:
- Make the USB boot library more configurable.
- Resolve compile issues when cross building.
- Allow use of separate malloc.
- Allow use of separate endian macros.

Sponsored by:	DARPA, AFRL
2014-05-30 13:39:58 +00:00
Hans Petter Selasky
6eda7f75c1 Add support for USB mass storage to libusbboot.
Sponsored by:	DARPA, AFRL
2014-05-30 13:10:49 +00:00
Ruslan Bukin
45d909c6dc Reset HSIC hub during EHCI initialization. This makes devices connected
to external USB ports available to the system.

Submitted by:	Maxim Ignatenko <gelraen.ua@gmail.com>
2014-05-30 07:48:55 +00:00
Ruslan Bukin
17f65b3a8d o Make keyboard-related properties to be compatible with vendor standard
o Allow setting keymap in FDT, use hardcoded one by default
o Represent fallback keymap as a list rather than directly usable M*N array

Submitted by:	Maxim Ignatenko <gelraen.ua@gmail.com>
2014-05-30 06:45:50 +00:00
Ganbold Tsagaankhuu
1a31ec5e51 Add common kernel config file for Rockchip RK3188 systems by splitting
current RADXA config. Radxa Rock (RR) boards have few types such as
RR (full version), RR Lite and some variants of RR engineering samples.
Add kernel config and FDT file for RR Lite board.

Approved by:	stas (mentor)
2014-05-30 06:37:06 +00:00
Hans Petter Selasky
0b4dc07df8 Hook the ISP/SAF1761 driver into MIPS kernel builds.
- Update FDT file for BERI DE4 boards.
- Add needed kernel configuration keywords.
- Rename module to saf1761otg so that the device unit number does not
interfere with the hardware ID in dmesg.

Sponsored by:	DARPA, AFRL
2014-05-29 10:46:09 +00:00
Ruslan Bukin
ff4590bed7 Describe I2C arbitrator device in DTS and use it for Chromebook Snow only.
Submitted by:	Maxim Ignatenko <gelraen.ua@gmail.com>
2014-05-28 06:11:12 +00:00