blob: 7ed108839aac911d8d6a64c7f202580685762fc8 [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 "
44KERNEL_IMAGETYPE ?= "Image"
45
46MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
47
48# Raspberry Pi has no hardware clock
49MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
50
51MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
52
53# Set Raspberrypi splash image
54SPLASH = "psplash-raspberrypi"
55
Brad Bishop6e60e8b2018-02-01 10:27:11 -050056def make_dtb_boot_files(d):
57 # Generate IMAGE_BOOT_FILES entries for device tree files listed in
58 # KERNEL_DEVICETREE.
59 alldtbs = d.getVar('KERNEL_DEVICETREE')
60 imgtyp = d.getVar('KERNEL_IMAGETYPE')
61
62 def transform(dtb):
63 if dtb.endswith('dtb'):
64 # eg: whatever/bcm2708-rpi-b.dtb has:
65 # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
66 # destination: bcm2708-rpi-b.dtb
67 base = os.path.basename(dtb)
68 src = '{}-{}'.format(imgtyp, base)
69 dst = base
70 return '{};{}'.format(src, dst)
71 elif dtb.endswith('dtbo'):
72 # overlay dtb:
73 # eg: overlays/hifiberry-amp.dtbo has:
74 # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo
75 # destination: overlays/hifiberry-amp.dtbo
76 base = os.path.basename(dtb)
77 src = '{}-{}'.format(imgtyp, base)
78 dst = dtb
79 return '{};{}'.format(src, dtb)
80
81 return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
82
83
84IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
85 ${@make_dtb_boot_files(d)} \
86 ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', \
87 '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \
88 '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \
89 "
90do_image_wic[depends] += " \
91 bcm2835-bootfiles:do_deploy \
92 ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
93 "
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060094
95# The kernel image is installed into the FAT32 boot partition and does not need
96# to also be installed into the rootfs.
97RDEPENDS_kernel-base = ""