Also add functionality to the terminal to toggle it on and off.
There's a small, but nice-to-have performance increase from disabling
alpha transparency in the terminal.
Also, the display server sets DISPLAY=... to the shmem endpoint for the
compositor, so if getenv("DISPLAY") returns a pointer, you can assume
you are in a graphical environment, instead of having to rely on things
like arguments. Good for those applications that want to be able to run
both full-screen and windowed.
* Patched crt0 to support a pre_main
* pre_main sets up environment variables, can do other things later,
but then just jumps to main with the same arguments.
* Updated a bunch of apps to pass environment variables around.
- libc functions not implemented yet
- see `env` for an example of reading variables
- see `esh` for an example of how to set and maintain variables for
sending to other applications
Both of the above will be the basis for the libc implementation.
* Remove old login background [unused]
* Remove glock (graphical lock) [outdated]
* Have toolchain/activate set pkg-config variables
XXX: You will have unset PKG_CONFIG_LIBDIR to configure native
software if you have activated the toolchain! Otherwise, your
pkgconfig information will be incorrect.
* Fixed a bug in the compositor where we would give window stack order 0
to applications that didn't ask for it because depths were assigned by
wid which starts at 0. Make it start at 1 instead, no chance of an app
getting the wrong stack order (this shoudn't have any effect on how
things work with a login app, since it grabs wid 0; but if you boot
directly into a non-login environment, minor timing issues can do odd
things.)
The compositor itself still needs work, but the compositing engine
within now does full blitting and is faster than the old method.
Transparency is now supported properly, though telling the compositor to
use it on a window will degrade performance. One terminal is usually
okay, and everything runs faster than it did before; two terminals is
pushing it; three will make you very sad. The stacking logic has also
been updated. Presumably, alpha blitting for transparent windows could
be done with SIMD instructions and be extremely fast.
All graphics libraries have also been updated to (hopefully) work
properly with alpha bits.
You can log out by exiting the terminal for now, this will later be "by
exiting the wallpaper application" or something to that effect, and will
be triggered by an on-screen button or keybinding.
[ci skip]
* Also cleaning up some kernel logging options here.
* You can log in as local or root with passwords local and toor
* Graphical sessions are still buggy, so don't kill that terminal.
* Fresh new wallpaper as a PNG from gnome-look:
http://gnome-look.org/content/show.php/Echo?content=137142
(By user hyperdude111, released as "do whatever you want")
* Terminal bug fix for --geometry option, which was derping on height
vs. width.
* Compositor bug fix for wallpaper app not showing up at the bottom.
Fixed by doing a better job of reordering the windows on a REORDER
call (which we weren't actually doing).
* Also some minor updates to the toolchain in general.
* Replacing the old bitmap wallpaper (not the actual wallpaper, but the
terminal one) with a fresh new wallpaper as a PNG.
* A minor bug has been fixed in bim's write_file method
* The VL Gothic fonts have been updated (and the proportional version of
the font is now included)
* The README and TODO have both been updated to reflect current plans.
:tabp and :tabn will switch between them.
:q will try to (fully) close the current tab, :q! will force it.
:qall will try to close all tabs; maybe I'll :qall! later.
- Write support!
- The widths of characters is now determined with freetype ;-;
I really wish wcwidth() was a real thing, but it's not.
This is a sacrifice that had to be made.
If you are building FOR Linux -rather than toaru- you might need to
poke at some things to make sure it builds, but in my experience it is
working just fine (and IMEs now work properly).
[ci skip]
It's an editor, but it is incomplete. For example, write is not
supported yet, so you can open existing files and make modifications,
but you can not save them. Use it as a fun little scratchpad, I guess.
\033[1003z will stuff them into stdin like 80,24.
This is a hack, just like the "disable local echo" hack used for
passwords and it should, ideally, be replaced with a proper system as
defined in POSIX for terminal control, but for, it works, and that's
pretty cool because it means `ls` can stop being stupid.
* Some applications now support UTF-8 text through the use of a very
simple decoder.
* The terminal uses a slow, but accurate method to determine the width
of a character the first time it is printed to the screen. Characters
are now stored in the terminal in two bytes, rather than one, and may
in the future be increased to 3 or 4 bytes to ensure support for
Unicode supplemental planes.
* A simple font-fallback method is employed in the applications that
support unicode that will make use of the VL Gothic fonts if the
DejaVu font does not have a character. No guarantees are made for
support of writing systems other than extended Latin and Japanese.
* Finally bring syscall.h up to speed and include all syscalls in the
syscall module of the C library.
* Remove the third-party obfuscated C demos (we have nyancat, good
enough)
* Fix userspace apps to build without complaining about undeclared
strtok_r by disable __STRICT_ANSI__
* Fix .eh_frame by including the proper stuff with libgcc.
- Can now register a userspace file descriptor as the output for kernel
print statements through kprintf()
- Can set logging levels for debug print messages, which are separate
from kernel log events and meant to be more readily visible. Log
events are recorded in a buffer to be viewed later, though nothing
actually using logging at the moment.
- Serial output is disabled by default now. You can enable it yourself
by appending the logtoserial argument to the kernel on boot.
This is an automated system by which we boot qemu headless and use the
serial line to capture output from a testing application that is started
on bootup, running with the VGA terminal shell. This might be expanded
to boot to the graphical display within VNC and perform more advanced
tests with the Python shim using a VNC module for Python; we'll see.
All graphics library commands now take a gfx_context_t pointer, which
points to a simple datastructure describing a rendering context (width,
height, depth, total size, front buffer, backbuffer; where backbuffer =
front buffer when not in double-buffering mode, thus we always render to
backbuffer except on a flip). This may have caused a minor speed
reduction, but I don't really care as it's far more important that we
support multiple graphics contexts.
TODO:
- Shared Memory Fonts library (there are a couple of apps that use these
so-called "shmem fonts" on their own; we need a dedicated library for
them)
- Break off "TTK" GUI toolkit into its own library. Since it's just a
callback-based button framework, this shouldn't be too hard right now.
Also, with the previous tick, I'll be able to put labels on controls
and start using text in more places.
We know longer accept DAMAGE and REDRAW commands. Instead, we just loop
and redraw everything anyway (efficiently, mind you). Pipes still have
issues when closed and various other different things.
Still need to pass sizes around to shm_* functions as a pointer rather
than the actual size so we can retreive sizes; additionally, *p = 0
should mean "we don't want to create this buffer, we only want to
access it if it exists".
It doesn't even need one; eventually, we'll have window management and
you'll just close the app. It should technically just sit in a loop
endlessly after rendering (or waitforsignal, which we don't have yet).
[init] Reenable freetype in the Terminal spawned from init
[nyancat] Fix timing and update animations
[esh] Fix bug with child pid collection and signal handling
This update includes support for shadow passwords, stored in
/etc/master.passwd, as well as support for an /etc/passwd file
containing user/uid/full name/shell associations, which are used by the
shell to get your username for display purposes, as well as by whoami
for the same reason. The login tool does not yet select the right shell
though this is planned.
* root's password is `toor` (a throwback to older times)
* local's password is `local` (because it's obvious)
Without flushing, this doesn't work properly with the terminal pipe.
Technically, this is an issue in the pipe implementation, but as that's
not technically what we're testing there's no sense having it be broken.
For the record, everything works wonderfully.
Completely removes:
* The kernel terminal (both VGA and graphical)
* The kernel ANSI parser (obviously)
* kgets() function
* Dozens of other functions that were made useless
Adds:
* Userspace terminal that should work (relatively) well
* Keyboard device driver (implemented with a "pipe" object)
* Stabalized interrupt interface
* `clear` uses the c library
* All panic screens and kprintf() output goes to the serial line ONLY
* The kernel boots directly into /bin/terminal (no arguments, unless you
want to add them (such as -f))
Need to replace the bitfont with freetype, get the thing attached to a
pipe, start getting other stuff to run under it, and then we can remove
the kernel's graphical terminal.
BIOS execution is provided through the `v8086` module, which provides
software emulation of an 8086 processor. It is not currently working
with some BIOSes and may (read: probably will be) replaced with another
emulator (x86emu comes to mind) at some point in the near future. In the
meantime, the default video mode for QEMU works with this and it's
enough to get us on real VESA instead of fake VBE. The `bochs` module
will be renamed in a future commit. Userspace programs have been
adjusted to work at bitrates other than 32 *POORLY*. If you write pixels
left-to-right, they should work fine. They only work with 24-bpp
otherwise, and then you need to be careful of what pixels you are
writing when, or you will overwrite things in other pixels.
You may pass a commandline argument like the following to set display
modes:
vid=vesa,1024,768
Or for stranger modes under QEMU or Bochs, use the bochs VBE
initializer:
vid=bochs,1280,720
Note that the address of the linear framebuffer is still found via
hackish probing instead of PCI or trusting the VBE information, so if
you have things in the wrong memory ranges (0xE0000000+), be prepared to
have them get read.
Once again, this entire commit is a massive hack. I am happy that it
worked, and I will continue to make it less hacky, but in the meantime,
this is what we've got.
Happy holidays.
- Free process resources when a process exits (reaped in next process
cycle; should probably reap after a wait() or something)
- Free process struct after wait()
- Fix page allocation
- Fix fork() return value for child process (attempted to write to an
invalid point in kernel-stack memory)
We shouldn't be triple faulting randomly anymore!
Continue investigating the fork() return value, as there was a bugged
return at some point during executon of a test run of thrash-process.