Commit graph

144 commits

Author SHA1 Message Date
Jacob Moody be1789d78b kernel: bootrc: add bootloop= 2022-06-14 08:16:57 +00:00
Jacob Moody 774529e440 kernel: add /rc to devroot
This makes it much easier to run a rc
program without needing to bind in all of '#s/boot'.
2022-05-28 02:31:26 +00:00
cinap_lenrek 9cd55a085d nusb/ether: remove csp check for rndis, already done in nusbrc 2022-02-23 17:59:13 +00:00
cinap_lenrek 84b77568cd kernel: fix off by one for $cputype buffer (thanks anthony martin) 2021-07-28 22:55:17 +00:00
cinap_lenrek 37f5069426 kernel: increase bootfs.paq compression level and blocksize
With the intel wifi firmware, this saves around 3MB of the
kernel image size.
2021-07-28 00:38:00 +00:00
cinap_lenrek df04ea8d6c kernel: simplify /boot/boot: 28K down to less than 4K.
- avoid print() format routines (saves alot of code)
- avoid useless opens of /dev/cons (already done by initcode)
- avoid useless binds of /env and /dev (already done by initcode)
- do bind of /shr in bootrc, it is not needed by us
- we'r pid 1 so kernel will print the exit message for us
2021-07-27 18:21:08 +00:00
Sigrid 192c1fd73a nusbrc: rndis with csp 0104ef 2021-04-20 18:12:54 +02:00
cinap_lenrek 777b1949b2 nusbrc: ignore rndis ethernet in /rc/bin/nusbed, handled by /sys/src/9/boot/nusbrc (thanks romano) 2021-04-08 21:57:24 +02:00
Romano a398a09783 [9front] [patch] nusb/ether -t rndis 2021-04-01 12:54:08 +02:00
kvik fa1d6ffd83 bootrc: allow kbmap to be set via plan9.ini (thanks Aaron Bieber) 2020-10-01 17:47:52 +02:00
cinap_lenrek e1da4f1750 kernel: don't strip binaries in bootfs.paq 2020-08-04 16:31:24 +02:00
cinap_lenrek 28f3a3aad8 boorc, nusbrc: fix wrong redirections after &
the rc & operator changes stdin to /dev/null, so we
have to do the <[0=1] inside the {}

this never showed up as an issue because many
fileservers just read 9p messages from standard
output.
2020-03-08 20:53:30 +01:00
cinap_lenrek dfda1cc878 bootrc: fix comment typo (thanks Robert Ransom) 2020-01-11 21:25:05 +01:00
cinap_lenrek c9570c14af 9/boot/net.rc: suppress error from grep if ethernet ifstats file is not found
this can happen with nusb/ether, which does not implement ifstats file.
2019-12-04 21:56:13 +01:00
cinap_lenrek 521a0b336c bootrc: for wireless netbooting, set the WPA/WPA2 preshard key with wpapsk=password boot parameter
this allows automatic netbooting without password prompt
for the wirelss network.
2019-11-17 19:04:38 +01:00
cinap_lenrek b56909157f bootrc: unmount devip *before* starting factotum
we want devip to get reattached after hostowner has been written. factotum
already handles this with a private authdial() routine that mounts devip
when it is not present. so we detach devmnt before starting factotum,
and attach once factotum finishes.
2019-09-21 18:48:14 +02:00
cinap_lenrek 5b7d8e1f6f bootrc: remount devip after /dev/hostowner has been written by factotum
devip remembers the attach uname so after we set hostowner we
remount devip so future connections have the right owner.
2019-09-21 18:11:52 +02:00
cinap_lenrek f22b4ecc77 bootrc: fix $rootdir and $rootspec handling (thanks lucio)
we did not interpret the $rootdir and $rootspec environment
variables right. $rootdir is what gets bound to / (usually /root)
and $rootspec is the mountspec of /root.
2019-05-05 17:02:37 +02:00
BurnZeZ 3f1fefeafb bootrc: simplify if statement 2019-03-30 15:09:00 +00:00
cinap_lenrek 2f5983ba02 bootrc: handle automatic ip configuration on gbe media 2019-03-27 14:17:51 +01:00
cinap_lenrek 8d9f3906fa plan9.ini: add nora6= option to disable automatic ipv6 configuration 2019-03-27 14:11:25 +01:00
cinap_lenrek 1e97adc86b nusbrc: detect "keyboardio model 01", appears as multifuction device with IAD csp(0102EF) (thanks sam-d) 2019-03-21 02:14:40 +01:00
cinap_lenrek c5393d612f bootrc: remove $ff references (was old parsed /boot/boot argument list) 2018-12-04 18:55:56 +01:00
cinap_lenrek 796e5e6000 nusbrc: support for raspi3 ethernet 2018-10-20 19:53:57 +02:00
mischief 67e14807e9 nusbrc: prevent nusb/kb from attaching to sony ps3 controller 2018-10-10 13:49:03 -07:00
cinap_lenrek 2985d53b7a bootrc: add experimental reboot method to load another kernel
syntax: reboot!bootfile[!method...]

this echos bootfile to /dev/reboot, causing bootfile kernel
to be started.

when method is given, we first connect to the filesystem and
set bootargs so that bootfile can be loaded from the target
network or local fileserver.

note, when no bootfile is given, this causes the kernel to
reboot to bios.
2018-09-16 22:35:16 +02:00
mischief 67b24e6dac nusbrc: add LG G5 for nusb/ether 2018-08-30 16:23:36 -07:00
cinap_lenrek cd752a39f8 ipv6 autoconfiguration on ethernet
for ip autoconfiguration, setup ipv6 link local addresses
and do SLAAC in parallel to DHCP.
2018-08-15 21:39:30 +02:00
cinap_lenrek 51b0b0235b bootrc: write fatal error message to fd2 2018-07-14 17:20:49 +02:00
qwx 372d359e28 kernel: let /rc/bin/diskparts attach #k after #S partitions are loaded up 2018-03-17 01:04:31 +02:00
cinap_lenrek f3f9392517 kernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryption 2017-10-29 23:09:54 +01:00
cinap_lenrek befdd7d755 kernel: pass bootargs also in multiboot command line, retire the bootline mechanism to pass arguments to /boot/boot 2017-06-28 18:56:16 +02:00
cinap_lenrek 234137bce3 fix bugs and cleanup cryptsetup code
devfs:

- fix memory leak in devfs leaking the aes key
- allocate aes-xts cipher state in secure memory
- actually check if the hexkey got fully parsed

cryptsetup:

- get rid of stupid "type YES" prompt
- use genrandom() to generate salts and keys
- rewrite cryptsetup to use common pbkdf2 and readcons routines
- fix alot of error handling and simplify the code
- move cryptsetup command to disk/cryptsetup
- update cryptsetup(8) manual page
2016-10-24 20:56:11 +02:00
cinap_lenrek 613578b69f kernel: add srvtls and tlsclient to bootfs.proto for encrypting connection to the file server 2016-05-16 22:55:30 +02:00
cinap_lenrek ecebba779f provide /n and /mnt early in bootrc to allow consistent use in /lib/namespace
theres a bootstrap problem:

when /bin/init is run, it processes /lib/namespace where we might want to
mount or bind resources to /n or /mnt. but mntgen was run later in
cpurc/termrc so these mounts would be ignored.

we already have mntgen in bootfs, so we can provide these mountpoints early.

i keep the termrc/cpurc mntgens where they are, but ignore the error
prints. this way old kernels will continue to work.
2016-02-14 01:42:32 +01:00
cinap_lenrek ccfb9118a3 bootrc: remove usbwait hack, usbd/nusbrc are now synchronous by previous commit 2015-11-22 03:19:27 +01:00
cinap_lenrek 7e3b2cdb55 usbd: intoruce /env/usbbusy
to solve the usb device enumeration race on boot, usbd creates /env/usbbusy
on startup and once all devices have been enumerated and readers have consumed
all the events, we remove the file so nusbrc/bootrc can continue. this makes
sure all the usb devices that where plugged in on boot are made available.
2015-11-22 03:17:15 +01:00
glenda c4fdc6bfdb fix fuckup 2015-08-25 09:35:10 +00:00
mischief 6b402b83cf import E script from bell labs 2015-08-25 02:07:46 -07:00
cinap_lenrek c96efcfef3 kernel/boot: do not handle kfs boot 2015-08-21 19:53:43 +02:00
cinap_lenrek 4aee2b803e nusbrc: handle fat formated usb drives without partition table
on some usb drives, there is no dos partition table, so check
the filesystem type and consider the whole drive.
2015-06-28 21:50:30 +02:00
cinap_lenrek 82aa1d5c78 integrate disk/edisk with diskparts, bootfs and installer (gpt support) 2015-05-31 13:06:18 +02:00
Matthew Veety 2b4a488762 fixed by fuck up 2015-05-13 00:15:18 -04:00
Matthew Veety 80845af98b removed ukill. 2015-05-13 00:11:59 -04:00
cinap_lenrek 74b37c286f bootrc: simplify bootargs splitting avoiding awk 2015-04-09 15:36:20 +02:00
cinap_lenrek 0bc9ad781f boot: allow alternative proto files per kernel and kernel config for bootfs.paq
bootmkfile will now looks for the following proto files in order
and pick the first one it finds to build the bootfs.paq file:

1)	$CONF.boofs.proto		(config specific)
2)	bootfs.proto			(kernel specific)
3)	$BOOTDIR/bootfs.proto	(default generic)
2015-03-25 00:11:54 +01:00
cinap_lenrek 3f4b45c4f1 boot: bind #c to /dev with MREPL instead of MBEFORE to avoid double entries 2015-03-23 03:15:58 +01:00
cinap_lenrek e451804a75 boot: disable group/other permission checking in bootfs paqfs
when building bootfs in d770 mode directory, the other permissions
in bootfs paq are masked off which results in boot to fail. theres
no point in checking group/other permissions on boot, so just disable
permissin checking in paqfs with the -a flag.
2015-03-15 15:27:56 +01:00
cinap_lenrek 07a776fad9 kernel: use new disk/mkfs -o option to get proper source filename list for bootfs.proto 2014-12-15 01:04:05 +01:00
cinap_lenrek 67bed722f2 kernel: get rid of /boot/boot parametrization
there is no use for "bootdisk" variable parametrization
of /boot/boot and no point for the boot section with its
boot methods in the kernel configuration anymore. so
mkboot and boot$CONF.out are gone.

move the rules for bootfs.paq creation in 9/boot/bootmkfile.
location of bootfs.proto is now in 9/boot/bootfs.proto.
our /boot/boot target is now just "boot".
2014-12-14 22:10:34 +01:00