jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Alex's OS - not my favourite OS

Tue Aug 13, 2013 4:03 pm

Hello

I have run into an insoluable problem with the implementation of the operating system in the last part of a very good Machine Code Course.

With Input02 the operating system seems to work ok for me for a short time, and then the monitor connected to my RPi (first revision) reports "no HDMI signal" and goes into "power saving mode" and I have not found a way to wake it from this state. I thought at first I was the fact that I use a DVI to HDMI adaptor, but I've just tried it with another monitor which has a HDMI input and the problem is exactly the same.

The system worked fine with all the lessons prior to the OS. So it seems that it the OS that is the problem.

If you've encountered this problem, please post .

All the best
Jeff

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 4:56 pm

It's more likely to be a problem with the power supply you are using not being able to supply enough current.

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 5:07 pm

I doubt it - it is the same power supply that I have been using for normal raspian and RISC implementation of the kernel for the past year. I fail to see why an implementation that runs around a simple loop should draw more current than those.

Jeff

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 6:11 pm

Hello Emyl

I tried your suggestion that it was the power supply by unpluging everything except mouse and keyboard and using a USB lead straight from my 13 port hub that has a power supply rated at 4 Amps. -- Result : No change.

All the best
Jeff

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 8:52 pm

Hi Jeff,

I don't think it's reccomended to run a pi from a usb hub. Even though it can provide 4 amps across all 13 ports, I think USB is usually limited to about 500mA which isn't enough. You need something like this http://uk.farnell.com/raspberry-pi-psu/ ... dp/2254792. A USB port from a computer or from a hub usually won't have enough current to run it reliably.

Cheers,

Emyr

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 9:07 pm

Hello Emyr

Can you explain why you think that my power supply which has not displayed any power issues (it is rated at 1A) cannot deal with this situation. Does the Operating system in Input02 have an unusually high current drain to operate it?

I have not shorted out the safety fuses on the RPi would you recommend I try that?

All the best
Jeff

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 9:37 pm

Hi Jeff,
If you are using a dedicated 1A power supply and not a usb socket on a computer or a hub then yes that should be fine. It may be an issue with the OS in that case. I am getting a similar issue now that I am trying at home...but i don't trust the power supply I am using...I have a better one in work. I'll use that and let you know how I get on.
Of course this is just a toy OS to show what is possible. It's not guaranteed to be 100% reliable. There may be some issues in how it deals with the mailbox and so-on. Maybe fixing it is left as an "exercise for the reader" :D
Cheers,
Emyr

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Tue Aug 13, 2013 9:58 pm

Hello Emyr

I am thinking that if it is an issue with how it deals with the mailbox it could be calling the mailbox too often so that the video system gets too many requests and stops transmitting to the HDMI and therefore the monitor. I think I'll put a 100ms delay in the loop to see if that helps the problem. But that's a task for tomorrow.

All the best
Jeff

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Alex's OS - not my favourite OS

Thu Aug 15, 2013 4:42 pm

I think the problem is with the bootloaders, the latest ver from just before Christmas (2012) do the same to DexOS, when i changed to those bootloaders.
I use the USB driver from Alex's OS, the only way to fix it, is to use old boot loader files.
You can get old ver of bootcode.bin and start.elf in DexBasic/Boot
You can download it here
http://www.dex-os.com/DexBasic/DexBasic.zip

Just save the old vers and than replace with the bootcode.bin and start.elf with the ones from DexBasic/Boot
And then it should works fine.
Batteries not included, Some assembly required.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25042
Joined: Sat Jul 30, 2011 7:41 pm

Re: Alex's OS - not my favourite OS

Thu Aug 15, 2013 7:29 pm

DexOS wrote:I think the problem is with the bootloaders, the latest ver from just before Christmas (2012) do the same to DexOS, when i changed to those bootloaders.
I use the USB driver from Alex's OS, the only way to fix it, is to use old boot loader files.
You can get old ver of bootcode.bin and start.elf in DexBasic/Boot
You can download it here
http://www.dex-os.com/DexBasic/DexBasic.zip

Just save the old vers and than replace with the bootcode.bin and start.elf with the ones from DexBasic/Boot
And then it should works fine.
Has that been reported as a bug?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Fri Aug 16, 2013 1:29 pm

Thanks - DexOS

That fix seems to have cured the problem.

All the best
Jeff

RobertK
Posts: 1
Joined: Thu Aug 22, 2013 11:02 am

Re: Alex's OS - not my favourite OS

Thu Aug 22, 2013 11:21 am

Same here, but I'd like to know why?

- A Linux system that was booted on the Pi with the current bootloader.bin/setup.elf works flawlessly
- Using the *same boot code* and the *same hardware* to start the samples from the "Baking Pi" tutorial produces sporadic crahes as soon as the CSUD USB stack is involved (i.e. all "InputXX" demos).
- using the older boot code from the DexOS download (again the same hardware) makes the crashes go away (though the demos are still not working for me, but that's another story).

-> Somehow, the newer bootcode must be leaving the system in a state wich is not compatible with CSUD, but is well compatible with Linux. How is that possible?

I think reverting to an old bootloader variant which is bound to vanish sooner or later is a workaround at best, but not a solution.

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Thu Aug 22, 2013 1:30 pm

jamesh wrote:
DexOS wrote:I think the problem is with the bootloaders, the latest ver from just before Christmas (2012) do the same to DexOS, when i changed to those bootloaders.
I use the USB driver from Alex's OS, the only way to fix it, is to use old boot loader files.
You can get old ver of bootcode.bin and start.elf in DexBasic/Boot
You can download it here
http://www.dex-os.com/DexBasic/DexBasic.zip

Just save the old vers and than replace with the bootcode.bin and start.elf with the ones from DexBasic/Boot
And then it should works fine.
Has that been reported as a bug?
@ jamesh
How do you report this as a bug? I am not aware of any formal way to communicate this problem to the authors except by posting it here.

Jeff

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Alex's OS - not my favourite OS

Thu Aug 22, 2013 4:35 pm

jeffhaddow wrote:How do you report this as a bug? I am not aware of any formal way to communicate this problem to the authors except by posting it here.
Raise an issue at https://github.com/raspberrypi/firmware

It would probably help if you have a binary that works with a known set of older firmware, doesn't work with a known newer set, and even better if you knew exactly which commit made things break.

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Alex's OS - not my favourite OS

Thu Aug 22, 2013 5:36 pm

What is a binary?

Jeff

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Alex's OS - not my favourite OS

Fri Aug 23, 2013 12:50 am

I am not 100% sure, but i think it was when the Hynix fix was added to the bootloader, RISCOS would also crash, but it was later fix, but i am not sure if it was a fix to the bootloaders or RISCOS code its self that fixed it.
See here: http://www.raspberrypi.org/phpBB3/viewt ... 10#p302510

I am not sure if the 512 byte ver of raspberry pi work OK with the USB driver, as i only have a 256 ver.
Also the person in charge of the boot loader code did say, he will look into it, if i wanted, but i never got round to sending him the info.
Batteries not included, Some assembly required.

chrisgjohnson
Posts: 5
Joined: Tue Aug 20, 2013 11:06 pm

Re: Alex's OS - not my favourite OS

Fri Aug 23, 2013 11:31 am

I also have this issue with the Baking Pi tutorial input code, on a 512MB Pi.

If this is caused by the same bootloader issue that DexOS mentions, might there be a relatively easy fix to the Baking Pi code which just loads it into a different region of memory (after the first MB)?

Return to “Bare metal, Assembly language”