GrafFonDracula
Posts: 2
Joined: Mon Feb 11, 2013 10:39 am

Serial Console

Mon Feb 11, 2013 10:49 am

Доброго времени суток . Подключился я к малинке через rs232 консоль . Поработал в консоли и дал команду на остановку системы. И в консоли начали отображаться какие-то символы. Я так понял, что малина отсылает информацию даже когда ОС не загружена? Кто-то знает что это за инфа. Просто надо к малине контроллер подсоединить и не хочется ловить не понятно что

User avatar
bgreat
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm

Re: Serial Console

Tue Feb 12, 2013 1:04 pm

Здравствуй,

Чтобы отключить последовательный порт в сообщениях Raspian Wheezy:

1. Отключение входа на редактирование "/etc/inittab"
Изменить:

Code: Select all

T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
To:

Code: Select all

#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
2. Отключить загрузку сообщений от редактирования "/boot/cmdline.txt"
Изменить:

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
To:

Code: Select all

dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Наслаждайтесь!
Bill

(Извините, если Google Translate плохо ...)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6177
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Serial Console

Wed Feb 13, 2013 4:49 am

bgreat, I think you have mistranslated the question a little.

What he's saying is that when he halts the OS, he gets output over console outputting gibberish. He took it to mean that the videocore is outputting some sort of information (perhaps debug info). He was wondering what that info means and since his pi will be connected to a microcontroller, he doesn't want to have gibberish transmitted to it.

I am pretty sure that there is no info being transmitted and that it's just noise, but I don't know, so I haven't answered in Russian.

PS: Google translate is just terrible when it comes to Russian. =P

User avatar
bgreat
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm

Re: Serial Console

Wed Feb 13, 2013 12:51 pm

:oops: Thanks. I debated on the stock answer because of the translation quality. But seeing as no answers were posted, I wanted to be sure he was aware of the set up required.

Enjoy!
Bill

GrafFonDracula
Posts: 2
Joined: Mon Feb 11, 2013 10:39 am

Re: Serial Console

Fri Feb 15, 2013 6:49 am

I did all these items. But on boot Rasp send on console some rubbish and "Uncompressing kernel" . And I don't know how can I turn off this message.

User avatar
bgreat
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm

Re: Serial Console

Fri Feb 15, 2013 1:01 pm

There is a thread that discusses eliminating the uart: "Uncompressing Linux..." message. The key was to use an uncompressed kernel image.

Command summary from thread (as root):

Code: Select all

# dd if=kernel.img skip=1 bs=17836 | gzip -d >kernel_uncompressed.img
The "bs" value may be different for you depending on your kernel version. For me with "Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux", I had to use "bs=17840". If you are good with the command line, you can locate the gzip signature in the file and use it as the offset. I used "od -x kernel.img | grep 8b1f | head -1", then converted the octal offset to decimal.

Example for my system:

Code: Select all

$ sudo -i
# cd /boot
# od -x kernel.img | grep 8b1f | head -1
0042660 8b1f 0008 0000 0000 0302 fde4 780b d515
# printf "%d\n" 0042660
17840
# mv kernel.img kernel.img.orig
# dd if=kernel.img.orig skip=1 bs=17840 | gzip -d >kernel.img
If gzip fails, just copy back the kernel.img.orig to kernel.img. If it succeeds, but you can not boot with the change, you can put the SD card in another computer and restore the kernel.img.orig file.

Enjoy!
Bill

Return to “Русский”