[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
some /boot diffs
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: some /boot diffs
- From: Marcus Watts <mdw_(_at_)_umich_(_dot_)_edu>
- Date: Thu, 05 Sep 2002 03:58:32 -0400
Ok, I had posted on misc@ that I had diffs for "machine boot hd0a", and
spoke of APM weirdness. I think Theo wants very badly for me to work
on Ultra-3 stuff not boot, so I'm going to try hard to spend as little
time on this as possible. I had talked to one of the developers who I
think is responsible for this code, but ran into weird communications
difficulties explaining the things that annoyed me. Hence, I don't
know how likely it is any of this will make it into an "official" obsd
release. Probably the right solution would be to break this down as a
bunch of separate diffs, and submit each as its own bug to bugs_(_at_)__(_dot_)_
Obviously I haven't gotten around to doing this work. However, I think
the person I was trying to help on misc@ was about to discover one of
the gotchas I had run into, so in the hopes of saving someone else work
figuring this all out, I want to at least make my diffs available. You
all can argue if I was on drugs or need to read more code.
The diffs are at:
These are against openBSD 3.1-current as of approximately 20020801.
In no particular order, I claim this set of patches does:
(1) apm: disconnect from apm before doing "machine boot".
Windows XP (using ACPI) doesn't care.
DOS 6.x (which is not APM-aware) won't do the "default"
APM thing if it's left connected like it should.
I forget what OpenBSD does if APM is already "connected".
It may have been "bad".
(2) "machine off"
It's not always obvious if there's any way to power the machine
off. Sometimes it's press & hold "power" 5 seconds, on others
it can be <fn>-<power>, and I have one machine which has a
separate "real" hardware power switch camoflaged in black
against black on the back of the system unit. Most people's
documentation for this layer of stuff was written by people
trying very hard not to use any big scary words whatsoever,
which means it takes half an hour to find the right paragraph,
in the documentation which gets misplaced the first week so you
never get it with your used machine. Yes, "halt -p" works, but
you hafta be able to boot obsd first. I really hate powering
things down by yanking the power plug or battery.
(3) make "machine boot hd0a" behave analogously to "machine boot hd0b"
or "machine boot hd0c" not exactly like "machine boot hd0".
That's two s/>/>=/ substitutions.
(4) don't read floppy boot at startup, wait until it is needed.
Many machines have fdc hardware, but no fd. The fd drive is
in this case removable. Both of my laptops are like this.
There's usually a bios setting to enable/disable fdc, but this
fix is less annoying. I think I have this right,
but it does deserve testing.
(5) cmd.timeout / readline changes: Separate returns for
timeout, just a <return>, and "found a command". I don't
remember the exact original annoying behavior, just that it
really really annoyed me. Too, at the time I did this, I did not
understand the ^U^U^M bug. Looks to me, though, that I wanted
explicit user interaction to disable the implicit timeout,
which I think was not present in the original code, but
I also think is very very justifiable.
Probably these changes make /boot very slightly larger. Yes, space
on those boot floppies is limited. On my system, I got a /boot that
had the same size text+data, & 8 more bytes of .bss. Obviously, I was
lucky and didn't overflow a 4k runtime page.
However, if you feel that you need more room on the boot floppies, here
are some places where space can be freed: eliminate rsh. Build dmesg
with "NOKVM". Run man pages through "col -b" for fdisk and disklabel
built-in help. Build special "ksh" without EMACS and VI support. I'm
sure there's yet more fat; "less" looks amazingly corpulent. (I had
another project where I wanted to squish space to make room for other
None of this fixes boot >8G. I think it's kinda embarassing that
openbsd doesn't yet do this. It's fixed in freebsd - using ".code16"
which comes for free with Elf but could be made to work on openbsd
several different ways. I've heard there's already work to fix the >8G
boot issue, but I did start digging into this all the same. I found
one trick: don't check for EDD bios extension until a boot sector > 8G
is needed. Help me fight the temptation to fix this by fixing it first?
I've probably spent too much time explaining all this. Hope it all
makes sense to somebody.
Visit your host, monkey.org