This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Sorry for the random topic but I'm so utterly uber-chuffed I felt I had to shout it to the world: I just successfully ported bash 3.2
Apart from hax0ring the config.h file because autoconf is a pile of sheep poo when cross-compiling, and adding in a few thousand stub "errno=EBUSY;return -1" functions, there wasn't much I had to do!
Screeny attached
BTW: a big thankyou to all the team at GNU bash for making their program so portable. I tried bash 2.0 and that was an absolute NIGHTMARE to port, so ty ty!
PS: kernel panic is due to my waitpid () function not working when execve fails. (and I haven't wrapped up execve in nice libc wrappers yet).
Haha, cool! Congratulations! I'm very close to the same goal... all I'm left to do is get my fork() working, then some tweaks on execve() and same waitpid(). Oh yeah... and I guess later I'll need exit() too..
JamesM wrote:Sorry for the random topic but I'm so utterly uber-chuffed I felt I had to shout it to the world: I just successfully ported bash 3.2
Well done
Once I get my file i/o stuff figured out and my message passing works well enough, I'll be writing my execve implementation and then I'll port bash (and GCC, and binutils, and lots of other *nix tools).
PS: kernel panic is due to my waitpid () function not working when execve fails. (and I haven't wrapped up execve in nice libc wrappers yet).
Tell us when you get there without panics - it'd be nice to see a fully functional bash port working in a hobby OS.
Heh, I made some changes to my libc and tried to recompile bash yesterday -- only to find that my doctored config.h had been overwritten. So now I can't remember what flags I had set, and bash keeps trying to compile in stuff which requires dirent.h -- which I haven't ported yet! D'oh! I'll have to port that tonight
JamesM wrote:Heh, I made some changes to my libc and tried to recompile bash yesterday -- only to find that my doctored config.h had been overwritten. So now I can't remember what flags I had set, and bash keeps trying to compile in stuff which requires dirent.h -- which I haven't ported yet! D'oh! I'll have to port that tonight
That sucks... I had to mess with config.h (and several other source files) too. But luckily, I've got dynamic libs working, so I don't have to recompile bash when I change newlib.
pcmattman: as per your request here is a progress update:
Now have bash working,executing files without panicing. Also ( ) tab autocomplete works -- I was so unbelievably shocked!
It prints out it's autocomplete list dead slowly, one char at a time. I'll have to see if it's using write() or fwrite() because some buffering should be going on.
Some builtins work, like 'time' - although my 'times()' func is still a stub so it returns all zeroes.
I'm doing things the other way around: getting all the functionality I'll need to port bash, then porting it. So I already have a times() function, a gettimeofday() function, and I'm trying to figure out the best way to write my execve() function.
Now you just need to port GCC/binutils and then you can be fully self-hosting.
That's the plan. However I noticed a bug in my scheduler last night and haven't managed to fix it yet. It comes out when I stick yield()s in the main() loops of my driver processes, but I can replicate it by adding a printf() line in the scheduler. Causes the program to jump to an illegal location - can't work out why atm!
JamesM wrote:but I can replicate it by adding a printf() line in the scheduler. Causes the program to jump to an illegal location - can't work out why atm!
Is your printf safe concurency wise? Could it be that someone is printing and timer interrupt causes scheduler to run, and scheduler tries to print at the same time? I had the same problem recently when I wanted to print some debug stuff in my scheduler.
Soon-ish. There are still some stability issues. I'm really just porting bash so I can get some ruby analysis tools I'm making to interact with my kernel over a serial connection.