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