Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm-rpi build don't boot on raspberry pi (bcm2835) #12

Open
inaciose opened this issue Oct 2, 2017 · 5 comments
Open

arm-rpi build don't boot on raspberry pi (bcm2835) #12

inaciose opened this issue Oct 2, 2017 · 5 comments

Comments

@inaciose
Copy link

inaciose commented Oct 2, 2017

The build successfuly complete.
The xinu.boot is copied to kernel.img on boot partition on sdcard
There is no output on serial console.

@tomlazar
Copy link

tomlazar commented Oct 2, 2017

Assuming you have confirmed that the serial cable you are using works. Do have the correct versions of the required files also on the SD card?

@hzhou81
Copy link
Contributor

hzhou81 commented Oct 3, 2017

@inaciose
Copy link
Author

inaciose commented Oct 4, 2017

Hello thank you for your replies.

My pi is a PI B (the one with 512M and just 2USB ports).

I did the compilation again, using the hzhou81 commands:

make -C compile clean
make -C compile PLATFORM=arm-rpi COMPILER_ROOT=/usr/bin/arm-none-eabi-

Then I copy and rename "xinu.boot" to "kernel.img" to my sdcard root directory. The bootcode.bin and start.elf are already there, because I use the sdcard with a raspian distro (so threre is more files in there).

Boot the pi, and get garbled output as bellow:

Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

▒+▒▒H▒V2▒/BX▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒x>▒▒#-▒▒

Did i need to only have the 3 files (bootcode.bin, start.elf and kernel.img) in that partition root?
If i put a xv6 kernel as kernel.img its boot, in the same sdcard, with all the other files. (see log bellow)

Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

..............
Boot starting...

Hello World from xv6
ARM memory is 0 1c000000
init: starting sh
$ cat README
xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix
Version 6 (v6). xv6 loosely follows the structure and style of v6,
but is implemented for a modern x86-based multiprocessor using ANSI C.

@hzhou81
Copy link
Contributor

hzhou81 commented Oct 4, 2017

Setting console input/output.Buy a USB to TTL module,follow method to connect to raspberry pi tty connect diagram

https://github.com/hzhou81/xinu-documents/blob/master/images/TTL.png

Connect using minicom。First running sudo apt install minicom to install "minicom" software module。Make USB to TTL module connect to your computer,as a /dev/ttyUSB1 device,Open "minicom" setting port to "/dev/ttyUSB1"、rate to "115200" and "Hardware Flow Control" to "No"

https://github.com/hzhou81/xinu-documents/blob/master/images/minicom.png

Starting debug. You will see through PL011 chip, XINU output TTL signals using GPIO,and finally output message on your computer screen minicom debug picture

@inaciose
Copy link
Author

inaciose commented Oct 4, 2017

I have USB to TTL module, its configured and working, I also use it to send binary files to run them without saving to sdcard, w/o any problems.
If you look at my xv6 log above, its prove that the Serial Connection it is working ok.
So no problems with Serial Connection, no problems to load a kernel.img (xv6 kernel, linux kernel, my bare metal experiments kernels) from sd card.

I use kermit, not minicom, but configured as you said, and works good.

Summary: my Raspberry Pi B its incompatible with xinu.

Can you give me some hints on how to change the code to init the uart as early as possible to check what is wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants