First, get the requisite files and compile busybox and netselect with Bedrock Linux's settings:
git clone --branch 1.0beta3-brg https://github.com/bedrocklinux/bedrocklinux-userland.git
cd bedrocklinux-userland
make busybox netselect
$ # rust port - includes sanity check | |
$ ./target/x86_64-unknown-linux-musl/release/brc arch ls | |
brc: error chdir("..")'ing in the dirt while breaking out of chroot. Maybe your user lacks necessary permissions. Check the permissions on the file path along/in /bedrock/strata/ | |
$ brc arch ls | |
^C | |
$ # had to ctrl-c due to infinite loop. |
brg will be a Bedrock Linux utility which, primarily, acquires software from other distributions for use as Bedrock Linux strata.
Typical Bedrock Linux installations acquire most of their software through package managers provided by other distributions. If one would like some package (e.g. vim) from some distribution (e.g. Debian), this is acquired through the distribution's package manager (e.g. apt-get install vim). However, this results in a bootstrapping problem: how does one get the package manager
/* | |
* $ gcc test.c | |
* $ time sudo brc init ./a.out 7 fork >/dev/null | |
* sudo brc init ./a.out 7 fork > /dev/null 0.00s user 0.00s system 0% cpu 1.207 total | |
* $ time sudo brc init ./a.out 121 vfork >/dev/null | |
* sudo brc init ./a.out 121 vfork > /dev/null 0.00s user 0.00s system 0% cpu 0.982 total | |
* $ time sudo brc init ./a.out 121 nofork >/dev/null | |
* sudo brc init ./a.out 121 nofork > /dev/null 0.02s user 0.02s system 4% cpu 0.999 total | |
*/ |
/* | |
* $ gcc test.c && sudo brc init ./a.out | |
* void | |
* arch | |
* jessie | |
* crux | |
*/ | |
#include <sys/types.h> | |
#include <sys/stat.h> |
# mkdir -p /tmp/test | |
# mount -t tmpfs tmpfs /tmp/test | |
# cd /tmp/test | |
# umount /tmp/test | |
umount: /tmp/test: target is busy | |
(In some cases useful info about processes that | |
use the device is found by lsof(8) or fuser(1).) |
#!/bin/sh | |
sudo pacman -S base-devel fakeroot | |
wget "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=packer" -O PKGBUILD | |
makepkg | |
sudo pacman -U packer-*.pkg.tar.xz && rm packer-*.pkg.tar.xz |
ioctl() not implemented in bru (hoping it'd avoid the memory copy): | |
16757 17:06:07 open("/etc/resolv.conf", O_RDONLY) = 13 | |
16757 17:06:07 ioctl(13, FS_IOC32_GETFLAGS or FS_IOC_GETFLAGS, 0x7ffc26d2fa34) = -1 ENOSYS (Function not implemented) | |
16757 17:06:07 close(13) = 0 | |
16757 17:06:07 open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = 13 | |
16757 17:06:07 writev(13, [{"*** ", 4}, {"stack smashing detected", 23}, {" ***: ", 6}, {"/usr/sbin/NetworkManager", 24}, {" terminated\n", 12}], 5) = 69 | |
ioctl() implemented in bru: |
$ sudo ./brp /tmp/brp-test | |
FUSE library version: 2.9.4 | |
nullpath_ok: 0 | |
nopath: 0 | |
utime_omit_ok: 0 | |
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 | |
INIT: 7.23 | |
flags=0x0003f7fb | |
max_readahead=0x00020000 | |
INIT: 7.19 |