rpi-base.inc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. include conf/machine/include/rpi-default-settings.inc
  2. include conf/machine/include/rpi-default-versions.inc
  3. include conf/machine/include/rpi-default-providers.inc
  4. SOC_FAMILY = "rpi"
  5. include conf/machine/include/soc-family.inc
  6. IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
  7. XSERVER = " \
  8. xserver-xorg \
  9. ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xserver-xorg-extension-glx", "", d)} \
  10. ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \
  11. "
  12. KERNEL_DEVICETREE ?= " \
  13. bcm2708-rpi-0-w.dtb \
  14. bcm2708-rpi-b.dtb \
  15. bcm2708-rpi-b-plus.dtb \
  16. bcm2709-rpi-2-b.dtb \
  17. bcm2710-rpi-3-b.dtb \
  18. bcm2708-rpi-cm.dtb \
  19. bcm2710-rpi-cm3.dtb \
  20. \
  21. overlays/hifiberry-amp.dtbo \
  22. overlays/hifiberry-dac.dtbo \
  23. overlays/hifiberry-dacplus.dtbo \
  24. overlays/hifiberry-digi.dtbo \
  25. overlays/i2c-rtc.dtbo \
  26. overlays/iqaudio-dac.dtbo \
  27. overlays/iqaudio-dacplus.dtbo \
  28. overlays/lirc-rpi.dtbo \
  29. overlays/pitft22.dtbo \
  30. overlays/pitft28-resistive.dtbo \
  31. overlays/pitft35-resistive.dtbo \
  32. overlays/pps-gpio.dtbo \
  33. overlays/rpi-ft5406.dtbo \
  34. overlays/w1-gpio.dtbo \
  35. overlays/w1-gpio-pullup.dtbo \
  36. overlays/pi3-disable-bt.dtbo \
  37. overlays/pi3-miniuart-bt.dtbo \
  38. overlays/vc4-kms-v3d.dtbo \
  39. "
  40. KERNEL_IMAGETYPE ?= "Image"
  41. MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
  42. # Raspberry Pi has no hardware clock
  43. MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
  44. MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
  45. # Set Raspberrypi splash image
  46. SPLASH = "psplash-raspberrypi"
  47. def make_dtb_boot_files(d):
  48. # Generate IMAGE_BOOT_FILES entries for device tree files listed in
  49. # KERNEL_DEVICETREE.
  50. alldtbs = d.getVar('KERNEL_DEVICETREE')
  51. imgtyp = d.getVar('KERNEL_IMAGETYPE')
  52. def transform(dtb):
  53. if dtb.endswith('dtb'):
  54. # eg: whatever/bcm2708-rpi-b.dtb has:
  55. # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
  56. # destination: bcm2708-rpi-b.dtb
  57. base = os.path.basename(dtb)
  58. src = '{}-{}'.format(imgtyp, base)
  59. dst = base
  60. return '{};{}'.format(src, dst)
  61. elif dtb.endswith('dtbo'):
  62. # overlay dtb:
  63. # eg: overlays/hifiberry-amp.dtbo has:
  64. # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo
  65. # destination: overlays/hifiberry-amp.dtbo
  66. base = os.path.basename(dtb)
  67. src = '{}-{}'.format(imgtyp, base)
  68. dst = dtb
  69. return '{};{}'.format(src, dtb)
  70. return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
  71. IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
  72. ${@make_dtb_boot_files(d)} \
  73. ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE} \
  74. "
  75. # The kernel image is installed into the FAT32 boot partition and does not need
  76. # to also be installed into the rootfs.
  77. RDEPENDS_kernel-base = ""