krfkeith / fpos

Automatically exported from code.google.com/p/fpos
GNU General Public License v2.0
0 stars 0 forks source link

Code review request #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Purpose of code changes on this branch:

updates..

When reviewing my code changes, please focus on:
buildability. I can't seem to re-build the sources.

I'm on Debian x86.So far no luck with compiling the sources.

After the review, I'll merge this branch into:
/trunk(if you mind showing me how...)

I re-wrote some things for accuracy, added a bit to expand on what we had.I
found some multi-tasking and threading sources we should be able to use.All
we [mostly] need is a filesystem now.

NOTE:

Error 12: invalid device requested ONLY comes up when booting off a SATA
cdrom drive
[in my case Blu-ray]

switch drives to IDE, and the OS boots.

this is not an issue with grub.

NOW:
based off info from flash32 for windows, SATA can be found on 1 of 4
addresses.these are controlled individually, not like IDE, where it is
two to a bus.
[yes, i do my bit of hacking...]

PORT:[on intel 945 GCNL mobo]
0x01F0 <sata1>
0x0170 <sata2>
0x<sata3>
0x<sata4>
[i have four.the latter two i dont have memorized or written down.]

on my VIA expansion board:
[proper numbers are found in dos with dosflash]
0x1147
0x1157
0x1137 [should be the external port]

 we need to probe these for cdroms to get this to load correctly and
insert a check to determine if we are on IDE or SATA when booting.

otherwise, not bad for a working point release. makers of Haiku OS can't
even get this far natively.They emulate the entire OS and pretend at one
point that they will EVENTUALLY get thier OS to run natively.Thier
bootloader only works in an emulator.HA!

 if we add some [internal] commands for basic fileIO,[chdir,cd,etc...] then
we only need
a filesystem like ext3 or fat[16?]32, and we should be off and
running.please use 'clear' not cls.I know its probably the 'DOS man' in you.

filesystem wise: we can pull what we need [source-wise] from a linux
kernel if we need to.FPC allows calling C functions.Didn't realize how much
a pain C was to look at.

SEE.the way i see it, linux has a major FLAW.  TWO actually.....

DOS has internalized commands, and linux does not. [when it was created
from CP/M, we did not have enough ram to do this.this process was never
changed.HENCE:  cd,ls,rm,ln for commands. UGLY!!

NOTICE that these files exist [in /bin or /sbin, i forget which] and
removing them will issue GREAT warnings upon startup and shutdown.
WILL ALSO FILL YOUR /TMP folder and there is nothing you can do about it.

nearly every binary written on UNIX is Dependant on these files
existing.You cannot internalize these commands without REWRITING the
base kernel sources.

HENCE NEVER ALLOW ROOT ACCESS TO UNKNOWN USERS]

SECONDLY:

UNIX assumes too much on startup.Interrupt sysVinit in ANY manner, and
now you have root access without being root.
[discovered this building a python 'shell']

[I AM GOD, I have HACKED YOUR SYSTEM.THERE IS NOTHING YOU CAN DO ABOUT
IT.....]

The way unix is designed, this cannot be avoided.There is NO known
'system' user or lock-out process.The system just runs as root,
assuming it is GOD.This is WAY WAY before you even login.ASSUME ROOT or
'system' at this level and your system has ALREADY been annihilated.YOU
ARE TOAST.

DOS at least had this going for it. DISABLE CTRL-C and CTRL-BREAK and
the OS [or app even..] CANNOT be stopped.

files are zipped and attached.if i missed a licensing issue, let me know,
I'm a little new to that sort of thing.we still need crt and stringIO
routines, that I think are not in this, I'll have to grep for them.I have
included ANSI for now.The stringIO should fix the 'missing' writeln function.

we also need a 'procedure not implemented' debug message.

also compiler options, I had to cut the last three from the makefile, but I
wound up with a backtrace on build.I'm using the latest CVS snapshot with
lazarus.please be consistent with the tools you are using, some are win32,
some are dos based.i know this, as it requires wine to run some of them.

--Jazz

Original issue reported on code.google.com by jasm...@lavabit.com on 17 Jan 2009 at 5:56

GoogleCodeExporter commented 9 years ago
You know - another "flaw" in OS's in general is that programs run at user's 
priviledges. I think a better approach would be treating binaries like user's 
in 
that by default - they don't have rights to resources at all unless granted. 
This 
allows an unsuspecting root to run a program and see what resources it wanted 
before 
it was let loose.

Just a thought - I'm already a fan of this project. Native runtime and 
FreePascal? - 
Sweet.

Original comment by Jegas...@gmail.com on 8 Apr 2009 at 6:44

GoogleCodeExporter commented 9 years ago
I agree, we should, it would add a little overhead right now, though.

Linux doesn't implement this properly, managed to break into system before the 
login
manager started.I don't want this to happen.The login should be handled at the 
end of
kernel load,authentication throughout the entire operation. I dont think we are 
there
yet.

ATM I am the only one working on this, Mario will be back as soon as summer 
starts,
hes in class right now.

Original comment by jasm...@lavabit.com on 9 Apr 2009 at 4:22