This patch adds support for Unix98 pseudo terminals, that is,
posix_openpt(3), grantpt(3), unlockpt(3), /dev/ptmx, and /dev/pts/.
The latter is implemented with a new pseudo file system, PTYFS.
In effect, this patch adds secure support for unprivileged pseudo
terminal allocation, allowing programs such as tmux(1) to be used by
non-root users as well. Test77 has been extended with new tests, and
no longer needs to run as root.
The new functionality is optional. To revert to the old behavior,
remove the "ptyfs" entry from /etc/fstab.
Technical nodes:
o The reason for not implementing the NetBSD /dev/ptm approach is that
implementing the corresponding ioctl (TIOCPTMGET) would require
adding a number of extremely hairy exceptions to VFS, including the
PTY driver having to create new file descriptors for its own device
nodes.
o PTYFS is required for Unix98 PTYs in order to avoid that the PTY
driver has to be aware of old-style PTY naming schemes and even has
to call chmod(2) on a disk-backed file system. PTY cannot be its
own PTYFS since a character driver may currently not also be a file
system. However, PTYFS may be subsumed into a DEVFS in the future.
o The Unix98 PTY behavior differs somewhat from NetBSD's, in that
slave nodes are created on ptyfs only upon the first call to
grantpt(3). This approach obviates the need to revoke access as
part of the grantpt(3) call.
o Shutting down PTY may leave slave nodes on PTYFS, but once PTY is
restarted, these leftover slave nodes will be removed before they
create a security risk. Unmounting PTYFS will make existing PTY
slaves permanently unavailable, and absence of PTYFS will block
allocation of new Unix98 PTYs until PTYFS is (re)mounted.
Change-Id: I822b43ba32707c8815fd0f7d5bb7a438f51421c1
. bitcode fixes
. switch to compiler-rt instead of netbsd libc functions
or libgcc for support functions for both x86 and arm
. minor build fixes
. allow build with llvm without crossbuilding llvm itself
. can now build minix/arm using llvm and eabi - without C++
support for now (hence crossbuilding llvm itself is turned off
for minix/arm)
Change-Id: If5c44ef766f5b4fc4394d4586ecc289927a0d6eb
- Fixed missing variable interpolation because of single quotes
- Replaced /bin/sh in gen_uEnv.txt.sh with /usr/bin/env bash as the default
echo doesn't support '-n'
- Fixed some whitespace errors
- A succesful build requires for now to skip the gold linker on OSX.
Change-Id: Id09bf52f45252026e3a58b74e8448ea24a0dab12
. let you specify IMG as a block device directly. this minimizes
i/o (only write used parts of the filesystem) and so turnaround
time - while still allowing the big default FS size.
Change-Id: Ib738499464e0d350a474a706f688d3f10806207d
- Removed an "export CPPFLAGS=${FLAG}" which prevented proper settings
from the environment to be passed to the build step.
- Re-arranged variable settings at the top, so that we don't need
to evaluate the argument to vfat mkfs command anymore in
arm_sdimage.sh
- "Merged" both script for easier comparison in the future.
Change-Id: Id59f902e4eaeb7f268d5051789462f14421a114a
Rreleasetools/arm_sdimage.sh uses a ".settings" file to allow to override
the defaults settings found in arm_sdimage. This change allows to use an
alternate file for this purpose. We figured out more programs (like eclipse)
use a ".settings" file.
One can tweak the settings files to use by settings the SETTINGS_MINIX
variable
SETTING_MINIX=.settings_minix
Change-Id: I57f5ca64d2ac27c9e015ab24b864b9a5f14c42fb
http://gerrit.minix3.org/#/c/2687/
Check if the .settings entry is a file and not a directory. Eclipse
as we found out also likes creating .settings directories.
Change-Id: I3cbcaa7aa9e5dfb3d51c6c71df7fd72079fe213e
Remove the usage of sloppy files list in the build scripts to
get early errors when files are added.
Change-Id: Id89c1391da675c76d7511a973f7f2dcda8befbb2
import/switch of:
init, getty, reboot, halt, shutdown, wall, last
changes:
. change reboot() call to netbsd prototype and args
. allows pristine <utmp.h>
. use clean <sys/reboot.h> instead of <minix/reboot.h>
. implement TIOCSCTTY for use by getty so getty can get
controlling terminal from init's child(ren)
. allow NULL envp for exec
Change-Id: I5ca02cb4230857140c08794bbfeba7df982c58a3
MKGCCCMDS=yes and MKBINUTILS=yes where added on the build command line
while they should have been left to the developer's discretion.
To build and install binutils and gcc do the following:
$ BUILDVARS='-V MKBINUTILS=yes -V MKGCC=yes -V MKGCCCMDS=yes' \
./releasetools/arm_sdimage.sh
or
$ BUILDVARS='-V MKBINUTILS=yes -V MKGCC=yes -V MKGCCCMDS=yes' \
./releasetools/x86_hdimage.sh
Change-Id: Icb46a3422f527747768fa107d14fc19ff3ac0a63
* Remove static proto.dev
* Update releasetools/*image.sh not to use proto.dev, as well as
minor comments cleanup
* Add TOOL_TOPROTO
Change-Id: If7dc16d4ebb3b0c4e859786fad25d4af000c999f
Make the kernel server and driver binaries indentical for the different
ARM platforms. We no longer need to define the AM335X or DM37XX flags
during compilation. The remaining differences are all located in u-boot.
Change-Id: I14ac60837dd2d7f116bc5fa56d3989b48d7c4fea
Put the boot arguments in uEnv.txt and not in cmdline.txt to allow
a more dynamic configuration of the system. We now also pass the
u-boot board_name parameter to the kernel.
Replaced the wget download of u-boot by a versioned git checkout
this allows us to better manage the u-boot and MLO version we ship
while still allowing us to build ofline.
This changes replaces the BASE_URL setting by U_BOOT_BIN_DIR and
also updates to a newer build of u-boot.
. make filesystems on primary partitions to make it
easier on the minix partition util
. so sfdisk isn't required as an external tool
. also make partition and hitherto x86-only utilities
arch-independent
Change-Id: Ib4e07e45d038d084dde1858917d3deb7f0616532
If present a file called .settings will be sourced when
calling the arm_sdimage.sh script. This allows to configure
the build setting for arm build without the need to specify
the flags each time arm_sdimage.sh is called.
For example to configure arm_sdimage.sh to target the
beaglebone put the following content in your .settings file.
BASE_URL=http://www.minix3.org/arm/beaglebone
FLAG=-DAM335X
CONSOLE=tty00
Change-Id: Ide0341a255bc7f41dc5c30d0a43e71b01a8ea55c
We are planning on using the NetBSD config system to perform build
system configuration when targeting different hardware variants.
This functionality however is not integrated yet and we currently
rely on using ifdef's in the code. This commit add the DDM37XX flag.
Change-Id: Ia25dfa520c7df4b648f4d1a583808de774acff63
- Added the possibility to define the number of parallel jobs from the
command line with (example, default is 1):
$ JOBS=8 ./releasetools/arm_sdimage.sh
- Generate filesystem filling the reserved partition area, instead of
being smaller.
- Added a possibility to specify additional parameter to the build.sh
script from the command line with (example):
$ BUILDVARS='-N0 -V MYVAR=yes' ./releasetools/arm_sdimage.sh
Change-Id: I5c34268ebf7d45a8d3408b45b1dc5051d775826c
There where two reasons for needing root access while making ARM builds. The
first reason was that we needed root permissions to create device nodes and
assign permissions to files. The second reason we needed root was that we used
loop mounted files to copy the build output to the file backed storage.
The first problem is solved by building in unprivileged mode (adding -U) during
compilation. The second problem is solved by using mcopy to put files on the
fat partition and use the mkfs.mfs proto files to create MFS file system.
Future work might be to replace this script by the netbsd makefs tool.
Change-Id: Ibba61d4cad053f7c1ede26169d5214065a4939d8
* Use the same output directory as was previously the standard.
* Add copying of uEnv and cmdline to the obj directory to allow booting from tftp.
* No longer start qemu at the end of the process.
* Use sudo if the script was called as non root user.
Change-Id: I53143b1ce6633e764d173c3eb883c2efa3e6a5b7
To use the new SD building script, Linux has to be configured with
loop.max_part=15 on the command line (or set at module load time)
to make the loopback device see the partitions.
This commit removes a lot of differences between the ARM and x86
boot ramdisk and rc scripts. It changes the ARM build from running
from ramdisk to requiring a full filesystem on the SD image and
booting into it.
. ramdisk: remove some arm-only utilities only used for running
from the shell
. remove ARM-only rc.arm, proto.arm.small, ttys and mylogin.sh
boot-time ramdisk files
. change kernel to add "arch" variable so userland knows what
we're running on from sysenv
. make ARM use the regular ramdisk rc file, changed to distinguish
i386-only and ARM-only drivers; requires rootdevname to be set
. change /etc/rc and /usr/etc/rc to start i386-only drivers only on
i386 systems
. change the kernel/arm to have a special case for the memory
driver to load it higher so it can be bigger
. add uEnv.txt, cmdline.txt and a for now highly linux-dependent
SD preparation script arm_sdimage.sh to the git repository in
releasetools/
Change-Id: I68910ba4e96ee80f7a12b65e48b5d39b43ca6397