blob: 688227c0968db14c64a7abf34b01c2ee1f8fe4e1 [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001include conf/machine/include/rpi-default-settings.inc
2include conf/machine/include/rpi-default-versions.inc
3include conf/machine/include/rpi-default-providers.inc
4
5SOC_FAMILY = "rpi"
6include conf/machine/include/soc-family.inc
7
8IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
9
10XSERVER = " \
11 xserver-xorg \
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060012 ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xserver-xorg-extension-glx", "", d)} \
13 ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \
Patrick Williams8b8bc412016-08-17 15:02:23 -050014 "
15
Patrick Williams8b8bc412016-08-17 15:02:23 -050016KERNEL_DEVICETREE ?= " \
Brad Bishop3a5fbf52017-12-04 02:17:07 -050017 bcm2708-rpi-0-w.dtb \
Patrick Williams8b8bc412016-08-17 15:02:23 -050018 bcm2708-rpi-b.dtb \
19 bcm2708-rpi-b-plus.dtb \
20 bcm2709-rpi-2-b.dtb \
21 bcm2710-rpi-3-b.dtb \
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060022 bcm2708-rpi-cm.dtb \
23 bcm2710-rpi-cm3.dtb \
Patrick Williams8b8bc412016-08-17 15:02:23 -050024 \
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060025 overlays/hifiberry-amp.dtbo \
26 overlays/hifiberry-dac.dtbo \
27 overlays/hifiberry-dacplus.dtbo \
28 overlays/hifiberry-digi.dtbo \
29 overlays/i2c-rtc.dtbo \
30 overlays/iqaudio-dac.dtbo \
31 overlays/iqaudio-dacplus.dtbo \
32 overlays/lirc-rpi.dtbo \
33 overlays/pitft22.dtbo \
34 overlays/pitft28-resistive.dtbo \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035 overlays/pitft35-resistive.dtbo \
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060036 overlays/pps-gpio.dtbo \
37 overlays/rpi-ft5406.dtbo \
38 overlays/w1-gpio.dtbo \
39 overlays/w1-gpio-pullup.dtbo \
40 overlays/pi3-disable-bt.dtbo \
41 overlays/pi3-miniuart-bt.dtbo \
42 overlays/vc4-kms-v3d.dtbo \
Patrick Williams8b8bc412016-08-17 15:02:23 -050043 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050044
45# By default:
46#
47# * When u-boot is disabled use the "Image" format which can be directly loaded
48# by the rpi firmware.
49#
50# * When u-boot is enabled use the "uImage" format and the "bootm" command
51# within u-boot to load the kernel.
52KERNEL_BOOTCMD ??= "bootm"
53KERNEL_IMAGETYPE_UBOOT ??= "uImage"
54KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', '${KERNEL_IMAGETYPE_UBOOT}', 'Image', d)}"
Patrick Williams8b8bc412016-08-17 15:02:23 -050055
56MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
57
58# Raspberry Pi has no hardware clock
59MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
60
61MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
62
63# Set Raspberrypi splash image
64SPLASH = "psplash-raspberrypi"
65
Brad Bishop6e60e8b2018-02-01 10:27:11 -050066def make_dtb_boot_files(d):
67 # Generate IMAGE_BOOT_FILES entries for device tree files listed in
68 # KERNEL_DEVICETREE.
69 alldtbs = d.getVar('KERNEL_DEVICETREE')
70 imgtyp = d.getVar('KERNEL_IMAGETYPE')
71
72 def transform(dtb):
73 if dtb.endswith('dtb'):
74 # eg: whatever/bcm2708-rpi-b.dtb has:
75 # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
76 # destination: bcm2708-rpi-b.dtb
77 base = os.path.basename(dtb)
78 src = '{}-{}'.format(imgtyp, base)
79 dst = base
80 return '{};{}'.format(src, dst)
81 elif dtb.endswith('dtbo'):
82 # overlay dtb:
83 # eg: overlays/hifiberry-amp.dtbo has:
84 # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo
85 # destination: overlays/hifiberry-amp.dtbo
86 base = os.path.basename(dtb)
87 src = '{}-{}'.format(imgtyp, base)
88 dst = dtb
89 return '{};{}'.format(src, dtb)
90
91 return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
92
93
94IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
95 ${@make_dtb_boot_files(d)} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050096 ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050097 '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \
98 '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \
99 "
100do_image_wic[depends] += " \
101 bcm2835-bootfiles:do_deploy \
102 ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
103 "
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -0600104
105# The kernel image is installed into the FAT32 boot partition and does not need
106# to also be installed into the rootfs.
107RDEPENDS_kernel-base = ""