Commit graph

96 commits

Author SHA1 Message Date
Conrad Pankoff e1c982e4db Build: Remove grub from default build process
This removes grub and all the loopback device business from the default
build process. Running grub takes about a second, and it turns out it's
inconsistently packaged in different distributions, which has led to
at least one confusing issue so far (grub-install vs grub2-install).
Removing it from the basic path will make it easier for people to try
Serenity out.

There are now two scripts that can be used to build a disk image:

1. `build-image-grub.sh` - this will build an image suitable for writing
   to the IDE hard drive of a physical machine, complete with a partition
   table and bootloader. This can be run in qemu with the `qgrub` target
   for the `run` script.
2. `build-image-qemu.sh` - this is a simpler script which creates a bare
   filesystem image rather than a full MBR disk.

Both of these call out to `build-root-filesystem.sh` to do most of the
work setting up... the root filesystem.

For completeness' sake, I've retained the `sync.sh` script as a simple
forwarding to `build-image-qemu.sh`.

This relies on the functionality from #194 and #195. #195 allows us to
use `/dev/hda` as the root device when nothing else is specified, and #194
works around a strange feature of qemu that appends a space to the kernel
command line.
2019-06-04 07:15:44 -07:00
Robin Burchell 466a817950 sync: Make this work for Fedora
Fedora has grub2-install (rather than grub-install), and it expects
grub.cfg to be placed in boot/grub2/ rather than boot/grub/.
2019-06-02 14:46:59 +02:00
Conrad Pankoff b094fe3f2f Kernel: Add DISK_SIZE option to sync.sh 2019-06-02 12:37:29 +02:00
Conrad Pankoff 6f43f81fb4 Kernel: Implement OffsetDiskDevice to prepare for partition support
This implements a passthrough disk driver that translates the read/write
block addresses by a fixed offset. This could form the basis of MBR
partition support if we were to parse the MBR table at boot and create that
OffsetDiskDevice dynamically, rather than seeking to a fixed offset.

This also introduces a dependency in the form of grub. You'll need to have
32-bit grub binaries installed to build the project now.

As a bonus, divorcing Serenity from qemu's kernel loading means we can now
*technically* boot on real hardware. It just... doesn't get very far yet.
If you write the `_disk_image` file to an IDE hard drive and boot it in a
machine that supports all the basic PC hardware, it *will* start loading
the kernel.
2019-06-02 12:37:29 +02:00
Robin Burchell d31ce9eccd Misc: Add a simple init process
This doesn't do much right now, just fork off a bunch of stuff and set priorities.
2019-05-30 02:57:15 +02:00
Andreas Kling 149b7f92a7 Demos: Start working on a simple WidgetGallery app.
It's good to have a place where we can try out all the different widgets.
This needs some more work on a nice layout, and should also include more
of the widgets. :^)
2019-05-24 22:47:41 +02:00
Robin Burchell 5babcac289 Build: Install most headers to Root (and libcore.a/libgui.a)
This makes out-of-tree linking possible. And at the same time, add a
CMakeToolchain.txt file that can be used to build arbitrary cmake-using
applications on Serenity by pointing to the CMAKE_TOOLCHAIN_FILE when
running cmake:

    -DCMAKE_TOOLCHAIN_FILE=~/code/serenity/Toolchain/CMakeToolchain.txt
2019-05-17 21:59:48 +02:00
Andreas Kling 64b0b81b2a sync.sh: Use mkdir -p for everything. 2019-05-17 18:26:54 +02:00
Andreas Kling b7166385de RetroFetch: Add a silly neofetch-like program.
The idea is to print out various system info suitable for screenshots. :^)
2019-05-13 04:54:48 +02:00
Andreas Kling bd5c79aff2 LibGUI: Start working on a file picker dialog (GFilePicker).
Have LibGUI adopt GDirectoryModel from FileManager since it fits perfectly
for the needs of a file picker.
2019-05-09 01:24:37 +02:00
Andreas Kling 3ae9fc5d88 Move VisualBuilder into a new DevTools directory. 2019-05-08 13:53:34 +02:00
Andreas Kling eaf03d4ddb HelloWorld: Add a simple "Hello World!" app showing the basics.
This also introduces a Demos/ directory where I hope to add cool things.
2019-05-08 01:18:36 +02:00
Andreas Kling fe73543d41 Shell: Move the Shell to a separate directory and let's call it "Shell" :^) 2019-05-07 01:12:08 +02:00
Andreas Kling c4bb9a3ccb sync.sh: Add "-f" option to forcibly regenerate _fs_contents from scratch.
This might be useful e.g if something goes wrong with the filesystem.
2019-05-04 02:56:21 +02:00
Andreas Kling 7aba0058ae sync.sh: Don't regenerate _fs_contents from /dev/zero every time.
This makes sync.sh run a lot faster, especially on slower machines.

Patch contributed by "pd"
2019-05-04 02:50:10 +02:00
Andreas Kling 1bf37db9a9 Ext2FS: Simplify block bitmap stuff.
Block bitmaps are only ever one block in size. I don't know why I thought
otherwise, but use this info to simplify the code. :^)
2019-04-23 14:51:47 +02:00
Andreas Kling 58240fdb33 Do a pass of compiler warning fixes.
This is really making me question not using 64-bit integers more.
2019-04-23 13:00:53 +02:00
Andreas Kling e24e486714 Snake: Flesh out a basic snake game :^) 2019-04-20 03:24:50 +02:00
Andreas Kling 3817f5f619 Kernel+LibC: Add a DebugLogDevice that forwards everything to I/O port 0xe9.
This is then used to implement the userspace dbgprintf() in a far more
efficient way than what we had before. :^)
2019-04-18 16:08:52 +02:00
Andreas Kling 024057b39a Userland: Make sync.sh copy all executables from ../Userland 2019-04-15 13:53:27 +02:00
Andreas Kling c0fe48635b Kernel: Add /proc/uptime file (number of seconds since boot.)
Also added a simple /bin/uptime to pretty-print this information. :^)
2019-04-14 15:19:45 +02:00
Andreas Kling a90e218c71 Minesweeper: Start working on a simple minesweeper game. :^) 2019-04-13 03:08:16 +02:00
Andreas Kling 8268ece1bd VisualBuilder: Start working on an interface builder application.
It's tedious making interfaces programmatically. Let's make a program to
help us with this. :^)
2019-04-11 00:05:47 +02:00
Andreas Kling 37ae00a4dd Kernel+Userland: Add the rename() syscall along with a basic /bin/mv. 2019-04-07 23:35:26 +02:00
Andreas Kling 8f30657390 Start working on a Downloader app and backing classes in LibGUI.
LibGUI is slowly becoming LibKitchensink but I'm okay with this for now.
2019-04-07 14:36:10 +02:00
Andreas Kling 9fbac66a91 Hack sync.sh script to retry umount after a short delay if it fails.
I keep accumulated unwanted mounts because umount sometimes fails.
2019-04-05 16:26:29 +02:00
Andreas Kling a22774ee3f Taskbar: Start working on a taskbar app.
I originally thought I would do this inside WindowServer, but let's try to
make it as a standalone app that communicates with WindowServer instead.
That will allow us to use LibGUI. :^)
2019-04-03 19:38:44 +02:00
Andreas Kling f9864940eb Kernel: Move FS-related files into Kernel/FileSystem/ 2019-04-03 12:25:24 +02:00
Andreas Kling e561ab1b0b Kernel+LibC: Add a simple create_thread() syscall.
It takes two parameters, a function pointer for the entry function,
and a void* argument to be passed to that function on the new thread.
2019-03-23 22:59:08 +01:00
Andreas Kling 42755e98cf SharedGraphics: Implement a simple PNG decoder.
This is extremely unoptimized, but it does successfully load "folder32.png"
so it must be at least somewhat correct. :^)
2019-03-21 03:57:42 +01:00
Andreas Kling d17a91f185 Move WindowServer into Servers. 2019-03-20 04:34:14 +01:00
Andreas Kling 9120b05a40 Rename DNSLookupServer => LookupServer. 2019-03-20 04:26:30 +01:00
Andreas Kling 0e4a1936ca LibC: Implement gethostbyname() by talking to the DNSLookupServer.
We now talk to the lookup server over a local socket and it does the lookup
on our behalf. Including some retry logic, which is nice, because it seems
like DNS requests disappear in the ether pretty damn often where I am.
2019-03-20 01:15:22 +01:00
Andreas Kling fe2fa4ac80 DNSLookupServer: Start working on a userspace DNS resolver.
This doesn't have any server functionality just yet, but it does post
decent-looking DNS queries and parse the responses.
2019-03-19 16:29:06 +01:00
Andreas Kling aa19735c5a IRCClient: Start working on a simple graphical IRC client.
This will be a nice way to exercise both LibGUI and the TCP/IP support. :^)
2019-03-15 12:14:23 +01:00
Andreas Kling 7aba68d51c Userland+LibC: Add a new little "tc" program for testing TCP.
Also added send() and recv() to LibC in support of this. They are just
wrappers around sendto() and recvfrom().
2019-03-13 17:33:40 +01:00
Andreas Kling ea6a537b70 Userland: Add a simple utility for UDP testing. 2019-03-13 15:00:02 +01:00
Andreas Kling a017a77442 Kernel+LibC+Userland: Start working on an IPv4 socket backend.
The first userland networking program will be "ping" :^)
2019-03-12 15:51:42 +01:00
Andreas Kling 9158de6c41 Begin working on a graphical TextEditor.
It's gonna be a wrapper around a new GTextEditor widget so I can easily
reuse the functionality anywhere I need it. :^)
2019-03-07 00:31:06 +01:00
Andreas Kling 166aadc4e1 ProcessManager: Start working on a graphical process manager.
I need a table view widget for this thing, so I'm also using this to
prototype a model/view thingy.
2019-02-28 01:43:50 +01:00
Andreas Kling dda9b9ab1b Userland: Add a simple /bin/stat program. 2019-02-27 21:45:06 +01:00
Andreas Kling 1d2529b4a1 Add chown() syscall and a simple /bin/chown program. 2019-02-27 12:32:53 +01:00
Andreas Kling a7a456002e LibC: Enough compat work to make binutils-2.32 build and run. 2019-02-23 17:24:50 +01:00
Andreas Kling afa6f88039 Throw away the Clock app since we now have a clock in the menubar. :^) 2019-02-22 10:42:29 +01:00
Andreas Kling 6d3e12899b Kernel: Pass process arguments directly on the stack.
Get rid of the convoluted get_arguments and get_environment syscalls.
This patch also adds a simple /bin/env that just prints its environment.
2019-02-22 01:55:22 +01:00
Andreas Kling 920e8e58ed Kernel+Userland: Implement setuid() and setgid() and add /bin/su
Also show setuid and setgid bits in "ls -l" output. :^)
2019-02-21 23:38:10 +01:00
Andreas Kling f5f136931a Kernel: Start adding various file system permission checks.
Fail with EACCES in various situations. Fix userland bugs that were exposed.
2019-02-21 15:45:31 +01:00
Andreas Kling 43075e5878 Add a simple /bin/df which gathers its info from /proc/df. 2019-02-21 14:48:00 +01:00
Andreas Kling 7d288aafb2 Kernel: Add link() syscall to create hard links.
This accidentally grew into a little bit of VFS cleanup as well.

Also add a simple /bin/ln implementation to exercise it.
2019-02-21 13:26:40 +01:00
Andreas Kling 640360e958 Move WindowServer to userspace.
This is a monster patch that required changing a whole bunch of things.
There are performance and stability issues all over the place, but it works.
Pretty cool, I have to admit :^)
2019-02-17 00:13:47 +01:00