Re: blackscreen on boot with first compiled kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Anil,
Thanks a lot for your reply. Your approach worked for me!!
Maybe I missed reading in the FirstKernelPatch tutorial that compile steps are OS dependent.

I am running Ubuntu 14.04 and here is what I ended up doing (Based on Anil's steps) for anyone having a similar problem in future:


1. Copy old configuration (Use old configuration to built the kernel): 
cp /boot/config-`'uname -r ` ./.config 

2. Clean Working Directory 
"make-kpkg clean".

3. Compile the Kernel

"export CONCURRENCY_LEVEL=3" ( For parallel builds, faster compilation).

"make-kpkg --initrd --revision=0.1CustomKernel kernel-image kernel-headers --rootcmd fakeroot"

( "0.1CustomKernel" can be any name of your choice to give the kernel you build a unique name. There are some restrictions on the names mentioned on 
make-kpkg man page
 --rootcmd fakeroot complained of permission denied while building kernel so I used --rootcmd sudo)

4. Install the kernel 
"sudo dpkg -i ../linux-header.deb"
"sudo dpkg -i ../linux-image.deb"

5. Reboot machine into new kernel.

Compile the kernel in home directory don't use sudo except for
installing the kernel.


Thanks again Anil! I can finally start familiarizing with subsystems and drivers and work towards my first kernel patch! 

-Hrushit
________________________________________
From: Anil Nair <anilcoll90@xxxxxxxxx>
Sent: Thursday, March 31, 2016 6:09 PM
To: Hrushit Parikh
Cc: kernelnewbies@xxxxxxxxxxxxxxxxx
Subject: Re: blackscreen on boot with first compiled kernel

Hi Hrushit,

> I am trying linux kernel hacking for the very first time and following the
> FirstKernelPatch tutorial.
>
>
> On compiling, installing and rebooting from the kernel I get a blackscreen
> and I do not get my Ubuntu login screen or any display. I can get to a
>
> bash prompt with ctrl+alt+F1.
>

Since you are using ubuntu I recommend distro specific kernel
compilation steps because following the manual steps sometimes does
not work. Though i recommend you learn them. :).

Next time also try to mention the Ubuntu version you are using.

>
> The linux kernel of my repo is 4.5.0-rc+. I copied the existing .config file
> from /boot to my source tree and ran 1. make olddefconfig, 2. make 3. make
> modules_install install.
>

Try the below steps let me know if it works for you,

1. Copy old configuration cp /boot/config-`'uname -r ` ./.config (Use
old configuration to built the kernel)
2. Clean Working Directory "make-kpkg clean".
3. Compile the Kernel

"export CONCURRENCY_LEVEL=3" ( For parallel builds, faster compilation).

"fakeroot make-kpkg –-initrd –-append-to-version=-some-string-here
kernel-image kernel-headers"
(In append-to-version please mention the name you would like to give
your custom kernel)

4. Install the kernel "sudo dpkg -i linux-header.deb"
                            "sudo dpkg -i linux-image.deb"

5. Restart the kernel.

Finally compile the kernel in home directory don't use sudo except for
installing the kernel.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux