I'm trying to use the UART for my own purposes. I'm using Raspbian

I've edited cmdline.txt and inittab but I still get the one line message

Uncompressing Linux... done, booting the kernel.

How do I stop this message from showing?

Solution: (@joan provided the answer in her link, but It needed tweaking to find the new offset, so here's how to do find the offset)

You need to uncompress kernel.img which is found in the /boot directory (raspbian). kernel.img contains a header and then gzipped data. You first need to inspect the compressed kernel and find the offset to the compressed data (A gzip header in hex is &h1f8b0800).

od -A d -t x1 /boot/kernel.img | grep '1f 8b 08 00'

This should result in a line such as:

0017360 1f 8b 08 00 00 00 00 00 02 03 e4 fd 0b 7c 54 d5


0017360 00 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00

In the first result above, the offset is 0017360, in the second the offset is 0017360+8=0017368

Take YOUR offset and replace the 17360 below

dd if=/boot/kernel.img skip=1 bs=17360 | gzip -d >/boot/kernel_uncompressed.img

If all went to plan, the kernel is now uncompressed, you now need to replace the compressed kernel with the uncompressed one (as root) over the kernel.

cd /boot
#Backup the compressed kernel
cp kernel.img kernel_compressed.img
#Replace the kernel
cp kernel_uncompressed.img kernel.img

You need to boot the Pi from an uncompressed Linux image.

Have a look through http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=33042&p=283774&hilit=uncompressing+kernel for one possibilty.


Just adding information:

I've found 2 "kernel" files on Raspbian "Jessie":

  1. /boot/kernel.img
  2. /boot/kernel7.img

So I had to execute the procedure (well explained by John) with both files in order to "mute" the serial port at boot.

I"m not sure if everyone knows it, so just in case I thought better be clear.

  • The first one is used with BCM2835 models (A/B/+/0), the second, kernel7, is used with the BCM2836 Pi 2 B. If you had to do this with both, it's probably because you are using a Pi 2 and doing it to the first one had no effect because it is not actually used. – goldilocks Mar 16 '16 at 4:54

The issue is fixed in my project Nard SDK

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.