jncronin / rpi-boot

A second stage bootloader for the Raspberry Pi
GNU General Public License v2.0
141 stars 48 forks source link

Facing printf problem. #9

Closed riteshharjani closed 10 years ago

riteshharjani commented 10 years ago

Hi John,

I compiled your kernel.img and build the test_kernel. Followed procedure from README file. But on terminal I am facing some printf issue. The "\n" (newline char) is having some trouble.. see the below output from teraterm (windows). On minicom the print doesn't come fully.

Could you please look into this ? Please mail me if you need any other info.

Thanks Ritesh ritesh.harjani@gmail.com

Successfully set up frame buffer Welcome to Rpi bootloader Compiled on Jun 26 2013 at 14:45:19 ARM system type is c42 Command line: dma.d machans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x3 bcm2708.serial=0xce21771c smsc95xx.macaddr=B8:27:E B:21:77:1C sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000 dwc_otg.lpm_enable=0 console =ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait EMMC: vendor 99, sdversion 2, slot_status 0 SD: found a valid version 3.0x SD card MBR: found valid MBR on device emmc0 FAT: found a FAT16 filesystem on emmc0_0 EXT2: found an ext 2 filesystem on emmc0_1 MBR: found total of 2 partition(s) MAIN: device list: emmc0_1(ext2) emmc0_0(FAT16)

riteshharjani commented 10 years ago

Ok, the above prints on submitting issue on github looks fine but actually the problem is like follows:

the new line print (line2) will start from the new line but from the end of line1. (\t are shown as github is removing the spaces what I meant to keep here) Like this: printing line 1 "\t\t\t\t\t\t\t\t\t\t\t" printing line 2

riteshharjani commented 10 years ago

Hi John,

I think your last patch "Added code to output \r on the serial port after every \n" fixes this issue. I was having trouble with the default arm cross compiler (nothing works with that), so I downloaded some prebuilt binaries of yours from some site (may be this was not having your above mentioned patch.

Now I have downloaded arm-none-eabi-* sourcery toolchain, and your code works fine with it. Great work!!

Thanks Ritesh