yepsar
Posts: 17
Joined: Mon Mar 04, 2013 12:08 pm

framebuffer - use framebuffer channel or property channel?

Sun Mar 10, 2013 10:09 am

Hi,

I'm following BakingPi but had a lot of trouble with screen01. It didn't work reliably (or not at all at most times) even after I updated the firmware, added 0x40000000 to the address, etc.

Then I tried this project (https://github.com/brianwiddas/pi-baremetal) and it works great. So I had a look at the code, and found that it doesn't use the framebuffer channel, but rather channel 8, the property tags channel.

So I rewrote my fb_init according to pi-baremetal. And to my great joy, it works :)

Now I'm wondering, is it better to use channel 8?

P.S. I pushed my code to https://github.com/zhangsen/rasp-os. The current one prints a rainbow pattern to the screen (something like https://pbs.twimg.com/media/BE_G541CEAETYgb.jpg). If someone wants to debug my problem (although I think I'll go ahead with channel 8), the code using channel 1 is at the "use-fb-channel" branch.

P.P.S If someone is interested in pi-baremetal's fb code, just checkout the third commit (2fa9b74c2443). It didn't have too many features at that moment, and I found the code a bit easier to understand.

yepsar
Posts: 17
Joined: Mon Mar 04, 2013 12:08 pm

Re: framebuffer - use framebuffer channel or property channe

Sun Mar 10, 2013 10:14 am

Btw, the code runs without any tuning in config.txt.

yepsar
Posts: 17
Joined: Mon Mar 04, 2013 12:08 pm

Re: framebuffer - use framebuffer channel or property channe

Sun Mar 10, 2013 10:17 am

Just tried, and it runs on Torlus' qemu (https://github.com/Torlus/qemu-rpi).

Code: Select all

$ ~/src/qemu/arm-softmmu/qemu-system-arm -kernel kernel.img -cpu arm1176 -m 512 -M raspi

Return to “Bare metal, Assembly language”