blob: 97db4e36f05028f414da4bd4c683ad9ae6b372bd [file] [log] [blame]
Andrew Geissler26e4bea2020-11-30 19:54:03 -06001SUMMARY = "cmdline.txt file used to boot the kernel on a Raspberry Pi device"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5COMPATIBLE_MACHINE = "^rpi$"
6INHIBIT_DEFAULT_DEPS = "1"
7inherit deploy nopackages
8
9CMDLINE_DWC_OTG ?= "dwc_otg.lpm_enable=0"
10CMDLINE_ROOTFS ?= "root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
11
12CMDLINE_SERIAL ?= "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}"
13
14CMDLINE_CMA ?= "${@oe.utils.conditional("RASPBERRYPI_CAMERA_V2", "1", "cma=64M", "", d)}"
15
16CMDLINE_PITFT ?= "${@bb.utils.contains("MACHINE_FEATURES", "pitft", "fbcon=map:10 fbcon=font:VGA8x8", "", d)}"
17
18# Add the kernel debugger over console kernel command line option if enabled
19CMDLINE_KGDB ?= '${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
20
21# Disable rpi logo on boot
22CMDLINE_LOGO ?= '${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nologo", "", d)}'
23
24# You can define CMDLINE_DEBUG as "debug" in your local.conf or distro.conf
25# to enable kernel debugging.
26CMDLINE_DEBUG ?= ""
27
28CMDLINE = " \
29 ${CMDLINE_DWC_OTG} \
30 ${CMDLINE_SERIAL} \
31 ${CMDLINE_ROOTFS} \
32 ${CMDLINE_CMA} \
33 ${CMDLINE_KGDB} \
34 ${CMDLINE_LOGO} \
35 ${CMDLINE_PITFT} \
36 ${CMDLINE_DEBUG} \
37 "
38
39do_compile() {
40 echo "${CMDLINE}" > "${WORKDIR}/cmdline.txt"
41}
42
43do_deploy() {
44 install -d "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
45 install -m 0644 "${WORKDIR}/cmdline.txt" "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
46}
47
48addtask deploy before do_build after do_install
49do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"