Hello, everyone.
I've built the bare bones tutorial for Raspberry Pi, but it doesn't seem to work.
What I've tried to test on:
- this QEMU port: with both "rapsi" and "raspi2" machine configurations;
- my own Raspberry Pi 2.
Please, can someone confirm that the code is actually correct?
Thanks in advance.
Raspberry Pi bare bones not working?
Raspberry Pi bare bones not working?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
Re: Raspberry Pi bare bones not working?
Its been a while but I managed to get something similar to the bare bones code to work on the 'torlus' qemu port, which as far as I know only supports rpi ver 1, as well as a real rpi v1b.
When you say it doesn't work, what exactly happens? How are you loading the kernel? Through an elf file passed as a -kernel option? If so, you may need to adjust the entry point of your kernel to be 0x10000 rather than 0x8000 (specifically for qemu rather than real hardware).
Regards,
John.
When you say it doesn't work, what exactly happens? How are you loading the kernel? Through an elf file passed as a -kernel option? If so, you may need to adjust the entry point of your kernel to be 0x10000 rather than 0x8000 (specifically for qemu rather than real hardware).
Regards,
John.
Re: Raspberry Pi bare bones not working?
Thank you for your reply!
I also tried to adjust the base address as you suggested, but, unfortunately, it doesn't seem to work.
It neither outputs the "Hello, World!" string to stdio (-serial stdio) in QEMU, nor it does so on my Raspberry Pi 2 (I have an Adafruit cable, which works perfectly under Linux).When you say it doesn't work, what exactly happens?
On QEMU I run it using the '-kernel' option, I also tried the '-bios' option. On RPi 2 I use U-boot and TFTP.How are you loading the kernel?
I also tried to adjust the base address as you suggested, but, unfortunately, it doesn't seem to work.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
Re: Raspberry Pi bare bones not working?
I tried to get the Raspberry Pi Bare Bones tutorial to work yesterday, and can confirm that it seems incomplete. Here's a list of my hangups:
1. Booting the kernel says "Do you still have the SD card with the original Raspbian image on it from when you where testing the hardware above?", but never speaks of testing the hardware or the SD card anywhere.
2. My Raspbian image looks different from the one in the wiki: I don't have a kernel.img, but a vmlinuz-3.18.0-trunk-rpi2 (I installed from the raspbian-ua-netinst image).
3. The wiki page speaks of replacing the kernel.img with the one that I just built. But the instructions only have me build myos.bin and myos.elf - my understanding is that myos.bin is the non-ELF kernel I should use?
4. The wiki says that raspi support is not in qemu yet, but the Torlus fork that's linked from the wiki says that this has since happened, and encourages me to use the official sources.
I tried both booting on the real hardware and in QEMU:
1. I changed config.txt to say kernel=myos.bin, booted my raspi2 from the SD card, and all I get is the rainbow color screen forever, no Hello World.
2. I built qemu from the official qemu github repo, and started it with -kernel myos.elf. This gives me a black window, no Hello World.
3. changed the base address from 0x8000 to 0x10000 according to the suggestion in the wiki, rebuilt, got the same results.
I'm obviously new to this, and have no idea how to proceed or debug my issues. I'm not even more than 50% sure that I did everything right, so even confirmation that what I described is not off the path would be nice.
EDIT: I believe my problems have a lot to do with the fact that I'm using a RPI2, and the tutorial is for the RPI1. The default kernel image name for the 2 is kernel7.img, for example. Also, the bootloader has changed and no longer requires the loader.bin file, so the tutorial is definitely out-of-date.
1. Booting the kernel says "Do you still have the SD card with the original Raspbian image on it from when you where testing the hardware above?", but never speaks of testing the hardware or the SD card anywhere.
2. My Raspbian image looks different from the one in the wiki: I don't have a kernel.img, but a vmlinuz-3.18.0-trunk-rpi2 (I installed from the raspbian-ua-netinst image).
3. The wiki page speaks of replacing the kernel.img with the one that I just built. But the instructions only have me build myos.bin and myos.elf - my understanding is that myos.bin is the non-ELF kernel I should use?
4. The wiki says that raspi support is not in qemu yet, but the Torlus fork that's linked from the wiki says that this has since happened, and encourages me to use the official sources.
I tried both booting on the real hardware and in QEMU:
1. I changed config.txt to say kernel=myos.bin, booted my raspi2 from the SD card, and all I get is the rainbow color screen forever, no Hello World.
2. I built qemu from the official qemu github repo, and started it with -kernel myos.elf. This gives me a black window, no Hello World.
3. changed the base address from 0x8000 to 0x10000 according to the suggestion in the wiki, rebuilt, got the same results.
I'm obviously new to this, and have no idea how to proceed or debug my issues. I'm not even more than 50% sure that I did everything right, so even confirmation that what I described is not off the path would be nice.
EDIT: I believe my problems have a lot to do with the fact that I'm using a RPI2, and the tutorial is for the RPI1. The default kernel image name for the 2 is kernel7.img, for example. Also, the bootloader has changed and no longer requires the loader.bin file, so the tutorial is definitely out-of-date.