Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made cluido work again #41

Merged
merged 37 commits into from
Jun 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
91b2c4e
Started working on making programs compilable again.
perlun May 22, 2015
ae52749
Started working on making cludido compilable.
perlun May 22, 2015
057cede
Need to copy in the startup script to the disk image when running the…
perlun May 23, 2015
7c57d09
Merge remote-tracking branch 'origin/master' into feature/make-cluido…
perlun May 24, 2015
356202f
The -f flag is nice, so we overwrite files that happen to exist on th…
perlun May 26, 2015
a1ae565
We don't need these droids any more.
perlun May 26, 2015
61acf2a
Trivial whitespace fix.
perlun May 26, 2015
424763a
We don't need this one either.
perlun May 26, 2015
a6112af
Again, removed old cruft.
perlun May 26, 2015
eda2f04
Reversed some stupidity introduced in a1ae565943ae62e50e6e22b78ca1e1c…
perlun May 26, 2015
c65b3ba
Be more informative when creating the ISO image.
perlun May 26, 2015
a17f336
Let's add cluido to the list.
perlun May 27, 2015
e7d61f1
Attempt to overwrite the startup script if it already exists.
perlun May 27, 2015
3240034
Merge remote-tracking branch 'origin/master' into feature/make-cluido…
perlun May 28, 2015
63e7a26
Enabled compilation of cluido.
perlun May 28, 2015
c489e34
Merge branch 'master' into feature/make-cluido-work-again
perlun May 28, 2015
01c5d9d
OCD compliance + added -Wno-pointer-sign.
perlun May 28, 2015
df9fdc2
Merge branch 'master' into feature/make-cluido-work-again
perlun May 28, 2015
d7e0dca
Whee! cluido.c compiles again.
perlun May 28, 2015
066a852
Merge branch 'master' into feature/make-cluido-work-again
perlun May 28, 2015
6dfea38
Removed unused stuff.
perlun May 28, 2015
04ade85
Removed usage of multiline strings.
perlun May 29, 2015
a2e47f5
Dead code is bad code.
perlun May 29, 2015
552e97f
This file shouldn't be listed here.
perlun May 29, 2015
79a1799
Uncommented some #if-disabled stuff.
perlun May 29, 2015
c4d340e
Weird. We need this flag to work around gcc oddness.
perlun May 29, 2015
93a3567
Added missing library dependencies.
perlun May 29, 2015
bc3d2df
Merge remote-tracking branch 'origin/master' into feature/make-cluido…
perlun May 30, 2015
cbe9401
Removing this was a mistake.
perlun May 30, 2015
22141de
Added missing library dependencies.
perlun May 30, 2015
cca44b5
Let's go with -lgcc now.
perlun May 30, 2015
eddd6a2
Updated ignore list.
perlun May 30, 2015
a54690c
programs should be installed under the /programs folder.
perlun May 30, 2015
0d3cd69
Added cluido to the startup list.
perlun May 30, 2015
c0933ad
Removed extra whitespace that made stuff look odd.
perlun May 30, 2015
22d61fc
Force overwrite when outputting the gzip file.
perlun May 30, 2015
4a275cb
Don't rely on values of unitialized memory.
perlun Jun 8, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ storm/include/storm/current-arch
storm_tests/ia32/ia32_tests

# These are painful but what do we do...
programs/cluido/cluido
servers/block/initial_ramdisk/initial_ramdisk
servers/block/initial_ramdisk/ramdisk-auto.h
servers/block/initial_ramdisk/ramdisk.image
Expand Down
12 changes: 8 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Top-level Rakefile which is responsible for running all the other Rakefiles.

# TODO: Uncomment the rest here as soon as we have updated their build process to rake also.
FOLDERS = [:storm, :libraries, :servers] # :programs
FOLDERS = [:storm, :libraries, :programs, :servers]

verbose false

Expand Down Expand Up @@ -39,12 +39,14 @@ end

desc 'Builds a bootable ISO image with the kernel, servers and programs.'
task :iso_image do

FileUtils.mkdir_p "#{INSTALL_ROOT}/boot/grub"
FileUtils.cp 'menu.lst', "#{INSTALL_ROOT}/boot/grub"

# I suspect this is actually an x86 binary, even though it resides in a folder that seems to indicate the opposite.
FileUtils.cp '/usr/lib/grub/x86_64-pc/stage2_eltorito', "#{INSTALL_ROOT}/boot/grub"

print 'Creating ISO image...'.cyan.bold
sh "genisoimage \
-R \
-b boot/grub/stage2_eltorito \
Expand All @@ -54,6 +56,7 @@ task :iso_image do
-input-charset ascii \
-quiet \
-o chaos.iso #{INSTALL_ROOT}"
puts ' done.'
end

desc "Compiles the 'storm' kernel."
Expand All @@ -75,10 +78,11 @@ task :libraries => [:storm] do |folder|
sh "cd #{folder} && #{RAKE_COMMAND}"
end

task :programs do |folder|
system "cd #{folder} && rake"
end

task :servers do |folder|
sh "cd #{folder} && rake"
end

# task :programs do |folder|
# system "cd #{folder} && rake"
# end
27 changes: 0 additions & 27 deletions libraries/file/autochaos.rules

This file was deleted.

18 changes: 0 additions & 18 deletions libraries/file/changelog

This file was deleted.

1 change: 1 addition & 0 deletions menu.lst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ module /servers/virtual_file_system.gz
module /servers/fat.gz
module /servers/initial_ramdisk.gz
module /servers/boot.gz
module /programs/cluido.gz
26 changes: 26 additions & 0 deletions programs/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Rake.application.options.rakelib = [pwd + '/../rakelib'] if Rake.application.options.rakelib.first == 'rakelib'

SUBFOLDERS = %w(
cluido
)

task :default => SUBFOLDERS do |t|
t.prerequisites.each do |folder|
sh "cd #{folder} && #{RAKE_COMMAND}"
end
end

task :clean do
SUBFOLDERS.each do |folder|
sh "cd #{folder} && #{RAKE_COMMAND} clean"
end
end

task :install => :default do
# Disabled for now, since the code that generates the folder structure isn't here yet.
#sh 'mcopy -o startup u:/config/servers/boot'

SUBFOLDERS.each do |folder|
sh "cd #{folder} && #{RAKE_COMMAND} install"
end
end
25 changes: 25 additions & 0 deletions programs/cluido/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
OBJECTS = %w(
cluido.o
command.o
init.o
nibbles.o
)

LIBRARIES = %w(
console
execute_elf
file
ipc
ipv4
memory
pci
random
string
system
time
unicode
)

OUTPUT = 'cluido'

load '../programs.rake'
39 changes: 0 additions & 39 deletions programs/cluido/autochaos.rules

This file was deleted.

85 changes: 0 additions & 85 deletions programs/cluido/changelog

This file was deleted.

7 changes: 4 additions & 3 deletions programs/cluido/cluido.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ static void string_input(unsigned int max_length, bool do_syntax_check, bool com
// Allocate memory for scratchpad.
memory_allocate((void **) &string, max_length);

memory_set_u8((u8 *) &keyboard_packet, 0, sizeof(keyboard_packet_type));

while (!(keyboard_packet.key_pressed &&
keyboard_packet.has_special_key &&
keyboard_packet.special_key == IPC_KEYBOARD_SPECIAL_KEY_ENTER))
Expand Down Expand Up @@ -726,9 +728,8 @@ void main_loop(void)
// Before we begin, we have to know which user's config files to read.
// FIXME: This functionality should _NOT_ lie in this program.
console_print(&console_structure, "\
I now need to know who you are, so I can read your personal configuration
files from your home directory. Please enter your username, or just press
enter if you don't care: ");
I now need to know who you are, so I can read your personal configuration files from your home directory. Please enter your \
username, or just press enter if you don't care: ");

string_input(50, FALSE, FALSE, user_name_string);

Expand Down
41 changes: 19 additions & 22 deletions programs/cluido/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,24 +804,21 @@ void command_ports(int number_of_arguments, char *argument[] UNUSED)
void command_processes(int number_of_arguments UNUSED, char **argument UNUSED)
{
kernelfs_process_info_type kernelfs_process_info;
kernelfs_thread_info_type kernelfs_thread_info;
u32 processes = KERNELFS_CLASS_PROCESS_AMOUNT;

system_call_kernelfs_entry_read(&processes);
console_print(&console_structure, "PROCESS_ID THREADS NAME\n");
kernelfs_process_info.kernelfs_class = KERNELFS_CLASS_PROCESS_INFO;

for (kernelfs_process_info.process_number = 0;
kernelfs_process_info.process_number < processes;
kernelfs_process_info.process_number++)
kernelfs_process_info.process_number < processes;
kernelfs_process_info.process_number++)
{
system_call_kernelfs_entry_read(&kernelfs_process_info);
console_print_formatted(&console_structure, "%-10lu %-7u %s.\n",
kernelfs_process_info.process_id,
kernelfs_process_info.number_of_threads,
kernelfs_process_info.name);

kernelfs_thread_info.process_id = kernelfs_process_info.process_id;
}
}

Expand Down Expand Up @@ -1005,27 +1002,27 @@ void command_shutdown(int number_of_arguments UNUSED, char **argument UNUSED)
// FIXME: Let the console server handle longer messages.
console_clear(&console_structure);
console_print(&console_structure, "\
\e[2J\e[37;44m







\e[34;47m chaos 2000 \e[37;44m");
console_print(&console_structure, "\n
\e[1;37mA fatal exception 0E has occured at 0028:080054f3 in VXD VMM(01) +
\e[1;37mC0CAC01A. The current application will be terminated.

");
\e[2J\e[37;44m\n\
\n\
\n\
\n\
\n\
\n\
\n\
\n\
\e[34;47m chaos 2000 \e[37;44m\n");
console_print(&console_structure, "\
\n\
\e[1;37mA fatal exception 0E has occured at 0028:080054f3 in VXD VMM(01) +\n\
\e[1;37mC0CAC01A. The current application will be terminated.\n\
\n");

console_print(&console_structure, "\
\e[1;37m* Press any key to terminate the current application.
\e[1;37m* Press CTRL+ALT+DEL again to restart the computer. You will
\e[1;37m* Press any key to terminate the current application.\n\
\e[1;37m* Press CTRL+ALT+DEL again to restart the computer. You will\n\
\e[1;37m lose any unsaved information in all applications");
console_print(&console_structure, "\

\n\
\e[1;37mPress any key to continue");
while (TRUE);
}
Expand Down