summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-07-30 10:34:07 +0200
committerAndrei Gherzan <andrei@gherzan.ro>2015-08-10 00:36:20 +0200
commitb47cbb69968c3e731cefa3ee1223fceade91758e (patch)
tree483b8d3e22a0fbd6863eefe5d53c50c68d322738
parentbfe2307cc4f546e8534fb21cb7c11b1644fdde5b (diff)
downloadmeta-raspberrypi-b47cbb69968c3e731cefa3ee1223fceade91758e.tar.gz
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>
-rw-r--r--README23
-rw-r--r--recipes-kernel/linux/linux-raspberrypi.inc5
2 files changed, 19 insertions, 9 deletions
diff --git a/README b/README
index 3913f41..d70f21f 100644
--- a/README
+++ b/README
@@ -19,10 +19,11 @@ Contents:
19 2.E. Set overclocking options 19 2.E. Set overclocking options
20 2.F. Optional - Video camera support with V4L2 drivers 20 2.F. Optional - Video camera support with V4L2 drivers
21 2.G. Optional - Enable offline compositing support 21 2.G. Optional - Enable offline compositing support
22 2.H. Images 22 2.H. Optional - Enable kgdb over console support
23 2.I. Boot to U-Boot 23 2.I. Images
24 2.J. Image with Initramfs 24 2.J. Boot to U-Boot
25 2.K. Device tree support 25 2.K. Image with Initramfs
26 2.L. Device tree support
263. Extra apps 273. Extra apps
27 3.A. omxplayer 28 3.A. omxplayer
284. Source code and mirrors 294. Source code and mirrors
@@ -138,7 +139,13 @@ Heavily recommended for Wayland/Weston.
138 139
139See: http://wayland.freedesktop.org/raspberrypi.html 140See: http://wayland.freedesktop.org/raspberrypi.html
140 141
1412.H. Images 1422.H. Optional - Enable kgdb over console support
143================================================
144To add the kdbg over console (kgdboc) parameter to the kernel command line,
145set this variable in local.conf:
146ENABLE_KGDB = "1"
147
1482.I. Images
142=========== 149===========
143* rpi-hwup-image 150* rpi-hwup-image
144 Hardware up image 151 Hardware up image
@@ -148,7 +155,7 @@ See: http://wayland.freedesktop.org/raspberrypi.html
148 Image based on rpi-basic-image which includes most of the packages in this 155 Image based on rpi-basic-image which includes most of the packages in this
149 layer and some media samples. 156 layer and some media samples.
150 157
1512.I. Boot to U-Boot 1582.J. Boot to U-Boot
152=================== 159===================
153To have u-boot load kernel image, set in your local.conf 160To have u-boot load kernel image, set in your local.conf
154KERNEL_IMAGETYPE = "uImage" 161KERNEL_IMAGETYPE = "uImage"
@@ -156,7 +163,7 @@ KERNEL_IMAGETYPE = "uImage"
156This will make kernel.img be u-boot image which will load uImage. 163This will make kernel.img be u-boot image which will load uImage.
157By default, kernel.img is the actual kernel image (ex. Image). 164By default, kernel.img is the actual kernel image (ex. Image).
158 165
1592.J. Image with Initramfs 1662.K. Image with Initramfs
160========================= 167=========================
161To build an initramfs image : 168To build an initramfs image :
162 * Set this 3 kernel variables (in linux-raspberrypi.inc for example) 169 * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -169,7 +176,7 @@ To build an initramfs image :
169 * Set the meta-rasberrypi variable (in raspberrypi.conf for example) 176 * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
170 - KERNEL_INITRAMFS = "-initramfs" 177 - KERNEL_INITRAMFS = "-initramfs"
171 178
1722.K. Device tree support 1792.L. Device tree support
173========================= 180=========================
174Device tree for RPi is only supported when using linux-raspberrypi 3.18+ 181Device tree for RPi is only supported when using linux-raspberrypi 3.18+
175kernels. 182kernels.
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index 7e36408..d60a3e9 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -19,7 +19,10 @@ KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
19KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" 19KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
20 20
21# CMDLINE for raspberrypi 21# CMDLINE for raspberrypi
22CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" 22CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
23
24# Add the kernel debugger over console kernel command line option if enabled
25CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=ttyAMA0,115200", "", d)}'
23 26
24UDEV_GE_141 ?= "1" 27UDEV_GE_141 ?= "1"
25 28