linux-raspberrypi.inc: Make kgdboc kernel param optional

The kernel debugger over console (kgdboc) parameter is being added
unconditionally to the kernel command line but this means that the
kernel will stop and wait for gdb to attach in case of a exception
or when sending a sysrq-g key. This behaviour may not be what most
users wants that are not remotely debugging the kernel over serial
console so make it optional by adding a ENABLE_KGDB config option.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[javier: Extended commit message and made it conditional]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
This commit is contained in:
Mauro Carvalho Chehab
2015-07-30 10:34:07 +02:00
committed by Andrei Gherzan
parent bfe2307cc4
commit b47cbb6996
2 changed files with 19 additions and 9 deletions

23
README
View File

@ -19,10 +19,11 @@ Contents:
2.E. Set overclocking options
2.F. Optional - Video camera support with V4L2 drivers
2.G. Optional - Enable offline compositing support
2.H. Images
2.I. Boot to U-Boot
2.J. Image with Initramfs
2.K. Device tree support
2.H. Optional - Enable kgdb over console support
2.I. Images
2.J. Boot to U-Boot
2.K. Image with Initramfs
2.L. Device tree support
3. Extra apps
3.A. omxplayer
4. Source code and mirrors
@ -138,7 +139,13 @@ Heavily recommended for Wayland/Weston.
See: http://wayland.freedesktop.org/raspberrypi.html
2.H. Images
2.H. Optional - Enable kgdb over console support
================================================
To add the kdbg over console (kgdboc) parameter to the kernel command line,
set this variable in local.conf:
ENABLE_KGDB = "1"
2.I. Images
===========
* rpi-hwup-image
Hardware up image
@ -148,7 +155,7 @@ See: http://wayland.freedesktop.org/raspberrypi.html
Image based on rpi-basic-image which includes most of the packages in this
layer and some media samples.
2.I. Boot to U-Boot
2.J. Boot to U-Boot
===================
To have u-boot load kernel image, set in your local.conf
KERNEL_IMAGETYPE = "uImage"
@ -156,7 +163,7 @@ KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage.
By default, kernel.img is the actual kernel image (ex. Image).
2.J. Image with Initramfs
2.K. Image with Initramfs
=========================
To build an initramfs image :
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@ -169,7 +176,7 @@ To build an initramfs image :
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- KERNEL_INITRAMFS = "-initramfs"
2.K. Device tree support
2.L. Device tree support
=========================
Device tree for RPi is only supported when using linux-raspberrypi 3.18+
kernels.

View File

@ -19,7 +19,10 @@ KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
# CMDLINE for raspberrypi
CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
# Add the kernel debugger over console kernel command line option if enabled
CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=ttyAMA0,115200", "", d)}'
UDEV_GE_141 ?= "1"