diff options
author | Jeff Ithier <ithijme@gmail.com> | 2020-07-25 08:56:56 +0200 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2020-08-06 11:00:29 +0100 |
commit | f046b4128c9ca3420614887006101fa2b10fc6e7 (patch) | |
tree | 21d8c714b7f9548b84a09b24d6520ac53ef4517a | |
parent | 11318d2da103626761f0be0b03a166452416a09f (diff) | |
download | meta-raspberrypi-f046b4128c9ca3420614887006101fa2b10fc6e7.tar.gz |
Generalize the naming of the bootfiles deploy directory
The raspberry pi 4 variant has a BCM2711 chip, however it still
uses the same boot files as the BCM2835 used in previous generations.
This change generalizes the naming of the directory generated in the
$DEPLOY_DIR to avoid the implication that the files are only
meant for the BCM2835.
Signed-off-by: Jeff Ithier <ithijme@gmail.com>
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 4 | ||||
-rw-r--r-- | conf/machine/include/rpi-base.inc | 8 | ||||
-rw-r--r-- | recipes-bsp/bootfiles/bootfiles.bb (renamed from recipes-bsp/bootfiles/bcm2835-bootfiles.bb) | 2 | ||||
-rw-r--r-- | recipes-bsp/bootfiles/rpi-config_git.bb | 148 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi.inc | 4 |
5 files changed, 85 insertions, 81 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 779a9e2..9bf42db 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -26,7 +26,7 @@ inherit image_types | |||
26 | IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" | 26 | IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" |
27 | 27 | ||
28 | # Set kernel and boot loader | 28 | # Set kernel and boot loader |
29 | IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" | 29 | IMAGE_BOOTLOADER ?= "bootfiles" |
30 | 30 | ||
31 | # Kernel image name | 31 | # Kernel image name |
32 | SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" | 32 | SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" |
@@ -115,7 +115,7 @@ IMAGE_CMD_rpi-sdimg () { | |||
115 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') | 115 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') |
116 | rm -f ${WORKDIR}/boot.img | 116 | rm -f ${WORKDIR}/boot.img |
117 | mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS | 117 | mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS |
118 | mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* into boot.img" | 118 | mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* into boot.img" |
119 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then | 119 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then |
120 | mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img" | 120 | mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img" |
121 | fi | 121 | fi |
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc index 5f9a1e3..cd6d0b0 100644 --- a/conf/machine/include/rpi-base.inc +++ b/conf/machine/include/rpi-base.inc | |||
@@ -85,6 +85,10 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "${@oe.utils.conditional('ENABLE_IR', '1' | |||
85 | 85 | ||
86 | SERIAL_CONSOLES_CHECK ??= "${SERIAL_CONSOLES}" | 86 | SERIAL_CONSOLES_CHECK ??= "${SERIAL_CONSOLES}" |
87 | 87 | ||
88 | # The name of the deploy directory for raspberry pi boot files. | ||
89 | # This variable is referred to by recipes fetching / generating the files. | ||
90 | BOOTFILES_DIR_NAME ?= "bootfiles" | ||
91 | |||
88 | # Set Raspberrypi splash image | 92 | # Set Raspberrypi splash image |
89 | SPLASH = "psplash-raspberrypi" | 93 | SPLASH = "psplash-raspberrypi" |
90 | 94 | ||
@@ -111,14 +115,14 @@ def make_dtb_boot_files(d): | |||
111 | return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) | 115 | return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) |
112 | 116 | ||
113 | 117 | ||
114 | IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \ | 118 | IMAGE_BOOT_FILES ?= "${BOOTFILES_DIR_NAME}/* \ |
115 | ${@make_dtb_boot_files(d)} \ | 119 | ${@make_dtb_boot_files(d)} \ |
116 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ | 120 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ |
117 | '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ | 121 | '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ |
118 | '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ | 122 | '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ |
119 | " | 123 | " |
120 | do_image_wic[depends] += " \ | 124 | do_image_wic[depends] += " \ |
121 | bcm2835-bootfiles:do_deploy \ | 125 | bootfiles:do_deploy \ |
122 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ | 126 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ |
123 | " | 127 | " |
124 | 128 | ||
diff --git a/recipes-bsp/bootfiles/bcm2835-bootfiles.bb b/recipes-bsp/bootfiles/bootfiles.bb index d20312c..80e226d 100644 --- a/recipes-bsp/bootfiles/bcm2835-bootfiles.bb +++ b/recipes-bsp/bootfiles/bootfiles.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835." | 1 | DESCRIPTION = "Closed source binary files to help boot all raspberry pi devices." |
2 | LICENSE = "Broadcom-RPi" | 2 | LICENSE = "Broadcom-RPi" |
3 | 3 | ||
4 | LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d" | 4 | LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d" |
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index be84aa6..9489951 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb | |||
@@ -33,208 +33,208 @@ CAN_OSCILLATOR ?= "16000000" | |||
33 | inherit deploy nopackages | 33 | inherit deploy nopackages |
34 | 34 | ||
35 | do_deploy() { | 35 | do_deploy() { |
36 | install -d ${DEPLOYDIR}/bcm2835-bootfiles | 36 | install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} |
37 | 37 | ||
38 | cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/ | 38 | cp ${S}/config.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/ |
39 | 39 | ||
40 | if [ -n "${KEY_DECODE_MPG2}" ]; then | 40 | if [ -n "${KEY_DECODE_MPG2}" ]; then |
41 | sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 41 | sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
42 | fi | 42 | fi |
43 | if [ -n "${KEY_DECODE_WVC1}" ]; then | 43 | if [ -n "${KEY_DECODE_WVC1}" ]; then |
44 | sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 44 | sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
45 | fi | 45 | fi |
46 | if [ -n "${DISABLE_OVERSCAN}" ]; then | 46 | if [ -n "${DISABLE_OVERSCAN}" ]; then |
47 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 47 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
48 | fi | 48 | fi |
49 | if [ "${DISABLE_SPLASH}" = "1" ]; then | 49 | if [ "${DISABLE_SPLASH}" = "1" ]; then |
50 | sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 50 | sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
51 | fi | 51 | fi |
52 | 52 | ||
53 | # Set overclocking options | 53 | # Set overclocking options |
54 | if [ -n "${ARM_FREQ}" ]; then | 54 | if [ -n "${ARM_FREQ}" ]; then |
55 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 55 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
56 | fi | 56 | fi |
57 | if [ -n "${GPU_FREQ}" ]; then | 57 | if [ -n "${GPU_FREQ}" ]; then |
58 | sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 58 | sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
59 | fi | 59 | fi |
60 | if [ -n "${CORE_FREQ}" ]; then | 60 | if [ -n "${CORE_FREQ}" ]; then |
61 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 61 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
62 | fi | 62 | fi |
63 | if [ -n "${SDRAM_FREQ}" ]; then | 63 | if [ -n "${SDRAM_FREQ}" ]; then |
64 | sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 64 | sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
65 | fi | 65 | fi |
66 | if [ -n "${OVER_VOLTAGE}" ]; then | 66 | if [ -n "${OVER_VOLTAGE}" ]; then |
67 | sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 67 | sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
68 | fi | 68 | fi |
69 | 69 | ||
70 | # GPU memory | 70 | # GPU memory |
71 | if [ -n "${GPU_MEM}" ]; then | 71 | if [ -n "${GPU_MEM}" ]; then |
72 | sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 72 | sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
73 | fi | 73 | fi |
74 | if [ -n "${GPU_MEM_256}" ]; then | 74 | if [ -n "${GPU_MEM_256}" ]; then |
75 | sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 75 | sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
76 | fi | 76 | fi |
77 | if [ -n "${GPU_MEM_512}" ]; then | 77 | if [ -n "${GPU_MEM_512}" ]; then |
78 | sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 78 | sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
79 | fi | 79 | fi |
80 | if [ -n "${GPU_MEM_1024}" ]; then | 80 | if [ -n "${GPU_MEM_1024}" ]; then |
81 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 81 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
82 | fi | 82 | fi |
83 | 83 | ||
84 | # Set boot delay | 84 | # Set boot delay |
85 | if [ -n "${BOOT_DELAY}" ]; then | 85 | if [ -n "${BOOT_DELAY}" ]; then |
86 | sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 86 | sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
87 | fi | 87 | fi |
88 | if [ -n "${BOOT_DELAY_MS}" ]; then | 88 | if [ -n "${BOOT_DELAY_MS}" ]; then |
89 | sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 89 | sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
90 | fi | 90 | fi |
91 | 91 | ||
92 | # Set HDMI and composite video options | 92 | # Set HDMI and composite video options |
93 | if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then | 93 | if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then |
94 | sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 94 | sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
95 | fi | 95 | fi |
96 | if [ -n "${HDMI_DRIVE}" ]; then | 96 | if [ -n "${HDMI_DRIVE}" ]; then |
97 | sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 97 | sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
98 | fi | 98 | fi |
99 | if [ -n "${HDMI_GROUP}" ]; then | 99 | if [ -n "${HDMI_GROUP}" ]; then |
100 | sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 100 | sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
101 | fi | 101 | fi |
102 | if [ -n "${HDMI_MODE}" ]; then | 102 | if [ -n "${HDMI_MODE}" ]; then |
103 | sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 103 | sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
104 | fi | 104 | fi |
105 | if [ -n "${CONFIG_HDMI_BOOST}" ]; then | 105 | if [ -n "${CONFIG_HDMI_BOOST}" ]; then |
106 | sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 106 | sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
107 | fi | 107 | fi |
108 | if [ -n "${SDTV_MODE}" ]; then | 108 | if [ -n "${SDTV_MODE}" ]; then |
109 | sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 109 | sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
110 | fi | 110 | fi |
111 | if [ -n "${SDTV_ASPECT}" ]; then | 111 | if [ -n "${SDTV_ASPECT}" ]; then |
112 | sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 112 | sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
113 | fi | 113 | fi |
114 | if [ -n "${DISPLAY_ROTATE}" ]; then | 114 | if [ -n "${DISPLAY_ROTATE}" ]; then |
115 | sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 115 | sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
116 | fi | 116 | fi |
117 | 117 | ||
118 | # Video camera support | 118 | # Video camera support |
119 | if [ "${VIDEO_CAMERA}" = "1" ]; then | 119 | if [ "${VIDEO_CAMERA}" = "1" ]; then |
120 | echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 120 | echo "# Enable video camera" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
121 | echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 121 | echo "start_x=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
122 | fi | 122 | fi |
123 | 123 | ||
124 | # Offline compositing support | 124 | # Offline compositing support |
125 | if [ "${DISPMANX_OFFLINE}" = "1" ]; then | 125 | if [ "${DISPMANX_OFFLINE}" = "1" ]; then |
126 | echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 126 | echo "# Enable offline compositing" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
127 | echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 127 | echo "dispmanx_offline=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
128 | fi | 128 | fi |
129 | 129 | ||
130 | # SPI bus support | 130 | # SPI bus support |
131 | if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then | 131 | if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then |
132 | echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 132 | echo "# Enable SPI bus" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
133 | echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 133 | echo "dtparam=spi=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
134 | fi | 134 | fi |
135 | 135 | ||
136 | # I2C support | 136 | # I2C support |
137 | if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then | 137 | if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then |
138 | echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 138 | echo "# Enable I2C" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
139 | echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 139 | echo "dtparam=i2c1=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
140 | echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 140 | echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
141 | fi | 141 | fi |
142 | 142 | ||
143 | # PiTFT22 display support | 143 | # PiTFT22 display support |
144 | if [ "${PITFT22}" = "1" ]; then | 144 | if [ "${PITFT22}" = "1" ]; then |
145 | echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 145 | echo "# Enable PITFT22 display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
146 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 146 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
147 | fi | 147 | fi |
148 | if [ "${PITFT28r}" = "1" ]; then | 148 | if [ "${PITFT28r}" = "1" ]; then |
149 | echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 149 | echo "# Enable PITFT28r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
150 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 150 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
151 | fi | 151 | fi |
152 | if [ "${PITFT28c}" = "1" ]; then | 152 | if [ "${PITFT28c}" = "1" ]; then |
153 | echo "# Enable PITFT28c display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 153 | echo "# Enable PITFT28c display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
154 | echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 154 | echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
155 | echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 155 | echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
156 | fi | 156 | fi |
157 | if [ "${PITFT35r}" = "1" ]; then | 157 | if [ "${PITFT35r}" = "1" ]; then |
158 | echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 158 | echo "# Enable PITFT35r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
159 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 159 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
160 | fi | 160 | fi |
161 | 161 | ||
162 | # UART support | 162 | # UART support |
163 | if [ "${ENABLE_UART}" = "1" ]; then | 163 | if [ "${ENABLE_UART}" = "1" ]; then |
164 | echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 164 | echo "# Enable UART" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
165 | echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 165 | echo "enable_uart=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
166 | fi | 166 | fi |
167 | 167 | ||
168 | # Infrared support | 168 | # Infrared support |
169 | if [ "${ENABLE_IR}" = "1" ]; then | 169 | if [ "${ENABLE_IR}" = "1" ]; then |
170 | echo "# Enable infrared" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 170 | echo "# Enable infrared" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
171 | echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 171 | echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
172 | echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 172 | echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
173 | fi | 173 | fi |
174 | 174 | ||
175 | # VC4 Graphics support | 175 | # VC4 Graphics support |
176 | if [ "${VC4GRAPHICS}" = "1" ]; then | 176 | if [ "${VC4GRAPHICS}" = "1" ]; then |
177 | echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 177 | echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
178 | echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 178 | echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
179 | fi | 179 | fi |
180 | 180 | ||
181 | # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) | 181 | # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) |
182 | if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then | 182 | if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then |
183 | echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 183 | echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
184 | echo "max_usb_current=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 184 | echo "max_usb_current=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
185 | echo "hdmi_group=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 185 | echo "hdmi_group=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
186 | echo "hdmi_mode=87" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 186 | echo "hdmi_mode=87" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
187 | echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 187 | echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
188 | echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 188 | echo "hdmi_drive=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
189 | fi | 189 | fi |
190 | 190 | ||
191 | # DWC2 USB peripheral support | 191 | # DWC2 USB peripheral support |
192 | if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then | 192 | if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then |
193 | echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 193 | echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
194 | echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 194 | echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
195 | fi | 195 | fi |
196 | 196 | ||
197 | # AT86RF23X support | 197 | # AT86RF23X support |
198 | if [ "${ENABLE_AT86RF}" = "1" ]; then | 198 | if [ "${ENABLE_AT86RF}" = "1" ]; then |
199 | echo "# Enable AT86RF23X" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 199 | echo "# Enable AT86RF23X" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
200 | echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 200 | echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
201 | fi | 201 | fi |
202 | 202 | ||
203 | # ENABLE DUAL CAN | 203 | # ENABLE DUAL CAN |
204 | if [ "${ENABLE_DUAL_CAN}" = "1" ]; then | 204 | if [ "${ENABLE_DUAL_CAN}" = "1" ]; then |
205 | echo "# Enable DUAL CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 205 | echo "# Enable DUAL CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
206 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 206 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
207 | echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 207 | echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
208 | # ENABLE CAN | 208 | # ENABLE CAN |
209 | elif [ "${ENABLE_CAN}" = "1" ]; then | 209 | elif [ "${ENABLE_CAN}" = "1" ]; then |
210 | echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 210 | echo "# Enable CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
211 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 211 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
212 | fi | 212 | fi |
213 | 213 | ||
214 | # Append extra config if the user has provided any | 214 | # Append extra config if the user has provided any |
215 | printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 215 | printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
216 | 216 | ||
217 | # Handle setup with armstub file | 217 | # Handle setup with armstub file |
218 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then | 218 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then |
219 | echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 219 | echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
220 | echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 220 | echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
221 | case "${ARMSTUB}" in | 221 | case "${ARMSTUB}" in |
222 | *-gic.bin) | 222 | *-gic.bin) |
223 | echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 223 | echo "enable_gic=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
224 | ;; | 224 | ;; |
225 | esac | 225 | esac |
226 | fi | 226 | fi |
227 | } | 227 | } |
228 | 228 | ||
229 | do_deploy_append_raspberrypi3-64() { | 229 | do_deploy_append_raspberrypi3-64() { |
230 | echo "# have a properly sized image" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 230 | echo "# have a properly sized image" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
231 | echo "disable_overscan=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 231 | echo "disable_overscan=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
232 | 232 | ||
233 | echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 233 | echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
234 | echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 234 | echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
235 | } | 235 | } |
236 | 236 | ||
237 | addtask deploy before do_build after do_install | 237 | addtask deploy before do_build after do_install |
238 | do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" | 238 | do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" |
239 | 239 | ||
240 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 240 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc index 3c3a8e5..f7dee77 100644 --- a/recipes-kernel/linux/linux-raspberrypi.inc +++ b/recipes-kernel/linux/linux-raspberrypi.inc | |||
@@ -131,10 +131,10 @@ do_compile_append() { | |||
131 | 131 | ||
132 | do_deploy_append() { | 132 | do_deploy_append() { |
133 | # Deploy cmdline.txt | 133 | # Deploy cmdline.txt |
134 | install -d ${DEPLOYDIR}/bcm2835-bootfiles | 134 | install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} |
135 | PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" | 135 | PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" |
136 | if [ ${PITFT} = "1" ]; then | 136 | if [ ${PITFT} = "1" ]; then |
137 | PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8" | 137 | PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8" |
138 | fi | 138 | fi |
139 | echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt | 139 | echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/cmdline.txt |
140 | } | 140 | } |