Commit Graph

9 Commits

Author SHA1 Message Date
Tobias Klauser
1a3b71a79e unix: update Dockerfile to Linux 5.3 and use ubuntu 19.04 base image
rsync needs to be explicitly installed for 'make headers_install' to
work.

Change-Id: Icd3d6b3f004a7684b5ae32b4b7cab8d50631900d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/195258
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-09-16 14:18:54 +00:00
Tobias Klauser
6ec70d6a55 unix: update Dockerfile to Linux 5.2 and Go 1.13beta1
Change-Id: I1a63f6ae5fe6b8b6fb4f493837b12dbe3c2860d4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/185497
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-07-10 14:34:15 +00:00
Tobias Klauser
2953c62de4 unix: update Dockerfile to Linux 5.1
Also add KexecFileLoad on linux/arm now that is has SYS_KEXEC_FILE_LOAD.

Change-Id: I519bc2f611b511af994e1c7bbaa07f68cd615ef4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/175158
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-07 05:39:17 +00:00
Visweswara R
a5c9d58dba unix/linux: replace "mksysnum.pl" script with a Go program
Port mksysnum.pl Perl script to mksysnum.go.
mkall scripts are modified to run mksysnum.go.
Running ./mkall.sh does not generate any git diff besides
the command name in comments of generated files.

Updates golang/go#27779

Change-Id: Id62df9d819f00729ab19b6bc4d32dddcf8d9832b
Reviewed-on: https://go-review.googlesource.com/c/151377
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-12-05 08:54:12 +00:00
Tobias Klauser
4e1fef5609 unix: update Dockerfile to Linux 4.18, glibc 2.28 and Go 1.11beta3
Including linux/stat.h in mkerrors.sh is no longer necessary because the
statx types and constants were added to the glibc headers.

Change-Id: I643c35fd2da76dd2c15015556658d7fa862249c4
Reviewed-on: https://go-review.googlesource.com/129100
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-14 07:20:32 +00:00
Joe Richey joerichey@google.com
31e1fafe95 unix: update Linux to v4.13 kernel and v2.26 glibc
This change updates the Linux symbols to correspond to v4.13 of the
kernel and v2.26 of glibc. To get everything building correctly, newer
versions of the build tools are required. Instead of trying to get an
Ubuntu 17.10 docker image working, we just add Artful sources to
/etc/apt/sources.list to get a similar effect.

Now that the kernel UAPI is updated, FS_MAX_KEY_SIZE and fscrypt_key no
longer need to be manually declared, as they are now in the proper
kernel headers.

Change-Id: I5f14c99fd70b43dbb8b44e05f53e4e9f09c9a345
Reviewed-on: https://go-review.googlesource.com/61771
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-07 22:07:22 +00:00
Joe Richey
ea9bcade75 unix: generate all Linux go files from source
Right now the process for adding in new constants, errors, or syscalls
for Linux is a pain and unreliable. The scripts are designed to be run
on the target architecture and use the header files installed on the
user's system. This makes it hard to generate files for all the
architectures or to have consistency between users. See golang/go#15282.

This CL fixes this issue by making all of the files for the 11 supported
architectures directly from source checkouts of Linux, glibc, and bluez.
This is done using Docker, the gcc cross-compilers, and qemu emulation.
Previously discussed here:
    https://go-review.googlesource.com/c/37589/

A README.md file is also added to explain how all the parts of the build
system work.

In order to get the build working for all the architectures, I made
some changes to the other scripts called from mkall_linux.go:
  - Files only used for generating linux code, moved to linux/
  - linux/mksysnum.pl supports a specified CC compiler.
  - The generated C code in mkerrors.sh changed to avoid a warning
  - mkerrors.sh headers changed to fix powerpc64 bug in sys/ioctl.h
  - linux/types.go no longer needs to export Ptrace structs in lowercase

Build instructions:
  - Host system needs to be x86-64 Linux
  - Install Docker (https://docs.docker.com/engine/installation/)
  - ./mkall.sh (That's it!!!)

Change-Id: I87067c14442ba12f8d51991349a43a9d73f38ae0
Reviewed-on: https://go-review.googlesource.com/37943
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-04-21 00:52:44 +00:00
Joe Richey
21f2569f6f unix: update syscall numbers to 4.10 kernel
The syscall numbers for Linux were out of date, so with the release of
the 4.10 kernel, now seemed like a reasonable time to update them. Note
that this change is mostly additive except that it removes some invalid
syscalls for arm, and it removes all constants that refer to either the
syscall base or total number of syscalls. Previous versions had only
removed some of them.

The updated syscall numbers were pulled directly from a header build
of the 4.10 kernel. This required some minor adjustements to the sysnum
generating perl script and is why the comments at the tops of the
generated files look slightly different. I could include the script I
used to do this, but right now it cannot generate the zerrors and ztypes
files.

Change-Id: Id94b967eb917f8f87500f818f2e494df9bccf2e0
Reviewed-on: https://go-review.googlesource.com/37570
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-28 21:18:07 +00:00
Yao Zhang
19ced1583f x/sys/unix: added linux/mips64{,le} support
Change-Id: I4bf8d5e7ebc41b5152ce181c83dc3ff94bddae57
Reviewed-on: https://go-review.googlesource.com/16994
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
2016-02-28 04:28:12 +00:00