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

New commands #125

Open
6 of 13 tasks
double-fault opened this issue Dec 31, 2016 · 24 comments
Open
6 of 13 tasks

New commands #125

double-fault opened this issue Dec 31, 2016 · 24 comments

Comments

@double-fault
Copy link
Member

double-fault commented Dec 31, 2016

I'm going to make a few new command for BoneOS.

  • logname - prints current login name
  • man - help manual
  • pwd - print current working directory
  • uname - print system info
  • watch - execute a program periodically
  • time - get current time for process
  • date - get current date
  • whatis - displays a one line description of a command
  • whoami - just like logname prints the current user
  • uptime - displays total time since the computer started
  • alias - makes another temporary name for a command till the terminal is closed
  • shutdown - already implemented by 'poweroff', but need some more improvements
  • tldr - simplified man pages, not installed by default
@double-fault
Copy link
Member Author

If anyone has more ideas for commands, please post a comment, and if possible, I will add it to the list.

@srifqi
Copy link
Collaborator

srifqi commented Dec 31, 2016

time - check and set time

double-fault added a commit that referenced this issue Dec 31, 2016
@double-fault
Copy link
Member Author

@srifqi I'm afraid that is not possible right now. We have no way to get UTC time in the OS, and if we start the clock once the OS starts, it will be way too inaccurate.

@sajadbanooie
Copy link
Collaborator

How about RTC?

@double-fault
Copy link
Member Author

@sajadbanooie you mean a clock which starts when the OS boots up?

@sajadbanooie
Copy link
Collaborator

CMOS RTC(real time clock)
http://wiki.osdev.org/CMOS#The_Real-Time_Clock

@double-fault
Copy link
Member Author

@sajadbanooie I see that, but the current state of the OS is not as advanced to do all that.

@sajadbanooie
Copy link
Collaborator

it doesn't require any thing specific does it?

@double-fault
Copy link
Member Author

@sajadbanooie how exactly will the OS tick the clock when the OS is not running? Most of us run it using vbox or qemu, not on a real computer.

If you can implement it, it'll be great, but AFAIK, it cannot be implemented in the current state of the OS.

@sajadbanooie
Copy link
Collaborator

AFAIK RTC updates the clock it self.so that is not the job of OS.

@double-fault
Copy link
Member Author

@sajadbanooie I really don't know much about an RTC, so it would be great if you could implement it, but I can't.

@amanuel2
Copy link
Member

@Fortunate-MAN and @sajadbanooie rtc is easy not hard. I will implement it after memory man's ger

@amanuel2
Copy link
Member

Or you can implement it by looking at this @Fortunate-MAN https://github.com/levex/osdev/blob/master/drivers/rtc.c

@amanuel2
Copy link
Member

@Fortunate-MAN to get i/o functions just #include<io/io.h> and do outb8 for outportb

@double-fault
Copy link
Member Author

@amanuel2 huh, will have a look at that. Thanks

@sajadbanooie
Copy link
Collaborator

@Fortunate-MAN told you its not hard

double-fault added a commit that referenced this issue Dec 31, 2016
double-fault added a commit that referenced this issue Dec 31, 2016
double-fault added a commit that referenced this issue Jan 1, 2017
double-fault added a commit that referenced this issue Jan 1, 2017
@double-fault
Copy link
Member Author

@sajadbanooie @srifqi @amanuel2 I have completed the basic function for the Real Time Clock. See the commit I referenced above. It is right now printing the UTC time at least when I run it on my computer.

@amanuel2
Copy link
Member

amanuel2 commented Jan 1, 2017

@Fortunate-MAN no that's noottt how u do uname lol. Not everyone is running 64 bit platform.. Ypu is ill need cpuid

@amanuel2
Copy link
Member

amanuel2 commented Jan 1, 2017

Don't do cpuid yet, since it's arch dépendant and we need to setup Amd64 first.

@amanuel2
Copy link
Member

amanuel2 commented Jan 3, 2017

@Fortunate-MAN added date command, but you add the options so i can work on memory manager and amd64 capability... Thanks .. Here is the manpage for date command : http://man7.org/linux/man-pages/man1/date.1.html .. Ofcourse you can add your twists as it dosent have to follow Linux , but just the *NIX Standard.

@ghost
Copy link

ghost commented Jan 4, 2017

Hey, why there's no one say cd when we have pwd?
I want cd command!

@amanuel2
Copy link
Member

amanuel2 commented Jan 4, 2017

@khanh2003 basically we need to implement an actual file system for cd. The current directory is put in a variable so for pwd we just store that variable and print it.. To change it u need to implement a file system (Virtual File system to be previce) whicb we will do.

@double-fault
Copy link
Member Author

I have added a bunch of commands to the list of pending commands. If someone wants a new command, or does not like a command in the list of pending commands, please comment.

@double-fault
Copy link
Member Author

Finished command watch. The uptime command has some problems so won't check that for now.

amanuel2 pushed a commit that referenced this issue Jan 22, 2017
amanuel2 pushed a commit that referenced this issue Jan 22, 2017
amanuel2 pushed a commit that referenced this issue Jan 22, 2017
amanuel2 pushed a commit that referenced this issue Jan 22, 2017
amanuel2 pushed a commit that referenced this issue Jan 22, 2017
amanuel2 pushed a commit that referenced this issue Jan 22, 2017
amanuel2 pushed a commit that referenced this issue Jan 22, 2017
double-fault added a commit that referenced this issue Feb 4, 2017
double-fault added a commit that referenced this issue Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants