Welcome
Welcome to a320

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Way to use programs without minicom or telnet

Any and all A320 homebrew topics

Moderator: Moderators

Way to use programs without minicom or telnet

Postby ainu on Thu Jun 11, 2009 11:10 pm

I found way for run programs and commands (like menu) without PC. In fact, I found two ways: first way without programs, and write program (menu) on c - second way.
I maked video, but my photo device do it very big (300 mb .MOV). Later I share it on youtube.
First way is very simple. When you use shell, linux store you commands in history. You may get previous command by pressing up. You can list history of commands by pressing up and down. This way works on all consoles, on alll systems (in MSDOS too).
Linux store commands list in RAM, but on init, it get previous list from special file (in my file system it named /root/.ash_history)
So, I add line to my /etc/inittab file (for windows users, it autorun analog in linux):
::sysinit:cat /mnt/fat/history > /root/.ash_history
Then, I add to my fat partition on MicroSD text file named history
For example, my list is:
Code: Select all
cd /mnt/fat/rs ; ./run
./run
cd /mnt/fat
echo hi 4 alll
cat /etc/inittab
cd /usr/games ; ./prboom
cd /mnt/fat/hexen ; ./hhx
ls -la

When Linux run, it open console (dont ask for username and password). It init last commands from history file. I may change it from Windows like common text file. Then I may select command by pressing up or down (without any menus - all in shell), and run it by pressing on start. For example, cd /usr/games ; ./prboom running prboom.
Also, I write 2 programs. First is menu, it get text file from /mnt/fat (MicroSD), format of it like next:
Code: Select all
Music
/mnt/fat/rs/flist /mnt/fat/music madplay
copycat
cat /etc/inittab > /mnt/fat/inittab2
init tab on dingoo
cat /mnt/fat/inittb > /etc/inittab
DOOM
cd /usr/games ; ./prboom
HEXEN
cd /mnt/fat/hexen ; ./hhx
thanks for using!
echo yes!

Format very simple: title, command, title, command.
Also I write second program, you may see it on first line:
/mnt/fat/rs/flist /mnt/fat/music madplay
proogram flist (I keep it in /mnt/fat/rs) gets two or more parameters. In sample, when it run, it draw menu, where I can choose file from directory /mnt/fat/music. After selet file by pressing start, it run second paremetr (in sample - madplay), using selected file. So, we can choose mp3 file and run it over madplay, or choose game for emulator, or choose wad file for prboom etc.
Absolutly all actions I do from windows. For running Linux I run one bat file. Later, this ways - easy for using linux with dual boot.
And also, I write beta cgi script for compiling program c using toolchain (mipsel-linux-gcc) (Not ./configure and make! only .c files). Later I may share adress, if anybody need. Script (in fact - web-page) get .c file, compile it, and share for dowloading)
And finally, I found way for compiling and making programs in Windows, without LiveCD or Virtual PC. It way - putty + web server (I pay for using my server about 10$ every month).
What you think about all this?
P.S. Sorry for poor english, Im from Russia))
Dingoo Linux user & programmer from Russia
Sorry for my poor English
ainu
 
Posts: 35
Joined: Mon May 18, 2009 8:27 pm

Re: Way to use programs without minicom or telnet

Postby eule on Fri Jun 12, 2009 8:38 am

That was an interesting read, and i really like your idea of a console menu. :)
Anonymous said: is a fake.
Tobias said: it seems to run very slow ...so it could be real ...
Eläkeläiset - Humppa rules!
User avatar
eule
 
Posts: 170
Joined: Tue Apr 14, 2009 11:54 am


Return to Homebrew

Who is online

Users browsing this forum: No registered users and 1 guest