Commit 9dc59c32399110a76b2dcedf03160b611b2e72a6

Authored by Eric Lee
1 parent e0f0466e22

Minor bugs fixed and remove redundant files

Showing 6 changed files with 11 additions and 675 deletions Inline Diff

1 diff --git a/conf/machine/include/smarc-common.inc b/conf/machine/include/smarc-common.inc File was deleted
2 index b5c7db6..6606669 100644
3 --- a/conf/machine/include/smarc-common.inc
4 +++ b/conf/machine/include/smarc-common.inc
5 @@ -73,3 +73,8 @@ MACHINE_FEATURES_remove_smarcimx8mq2g = "qca6174"
6 MACHINE_FEATURES_append_smarcimx8mq2g = " mrvl8997 jailhouse"
7 MACHINE_FEATURES_remove_smarcimx8mq4g = "qca6174"
8 MACHINE_FEATURES_append_smarcimx8mq4g = " mrvl8997 jailhouse"
9 +
10 +MACHINE_FEATURES_remove_smarcimx8mm2g = "qca6174"
11 +MACHINE_FEATURES_append_smarcimx8mm2g = " mrvl8997 jailhouse"
12 +MACHINE_FEATURES_remove_smarcimx8mm4g = "qca6174"
13 +MACHINE_FEATURES_append_smarcimx8mm4g = " mrvl8997 jailhouse"
14 diff --git a/conf/machine/smarcimx8mm2g.conf b/conf/machine/smarcimx8mm2g.conf
15 new file mode 100644
16 index 0000000..bca4d4b
17 --- /dev/null
18 +++ b/conf/machine/smarcimx8mm2g.conf
19 @@ -0,0 +1,92 @@
20 +#@TYPE: Machine
21 +#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY
22 +#@SOC: i.MX8MQ
23 +#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
24 +#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
25 +#
26 +# http://www.www.embedian.com
27 +
28 +MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
29 +
30 +require conf/machine/include/imx-base.inc
31 +require conf/machine/include/tune-cortexa53.inc
32 +require conf/machine/include/smarc-common.inc
33 +
34 +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
35 +
36 +# Embedian BSP default providers
37 +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm2g ?= "linux-smarcimx8mm"
38 +PREFERRED_VERSION_linux-smarcimx8mm2g_smarcimx8mm2g = "5.4"
39 +
40 +KERNEL_DEVICETREE = " \
41 + embedian/imx8mm-smarc.dtb \
42 + embedian/imx8mm-smarc-m4.dtb \
43 +"
44 +MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
45 +IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
46 +IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
47 +
48 +PREFERRED_PROVIDER_u-boot_smarcimx8mm2g = "u-boot-smarcimx8mm"
49 +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm2g = "u-boot-smarcimx8mm"
50 +
51 +UBOOT_CONFIG ??= "sd"
52 +UBOOT_CONFIG[sd] = "smarcimx8mm_2g_ser3_defconfig,sdcard"
53 +SPL_BINARY = "spl/u-boot-spl.bin"
54 +
55 +# Set DDR FIRMWARE
56 +DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
57 +
58 +# Set U-Boot DTB
59 +UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
60 +
61 +# Set imx-mkimage boot target
62 +IMXBOOT_TARGETS = "flash_evk"
63 +
64 +SERIAL_CONSOLE = "115200 ttymxc1"
65 +
66 +IMAGE_BOOTLOADER = "imx-boot"
67 +
68 +LOADADDR = ""
69 +UBOOT_MAKE_TARGET = ""
70 +IMX_BOOT_SEEK = "33"
71 +
72 +MACHINE_EXTRA_RDEPENDS += " \
73 + imx-boot \
74 + packagegroup-tools-bluetooth \
75 + pm-utils \
76 + kmod \
77 + hdparm \
78 + gptfdisk \
79 + lftp \
80 + vim \
81 + ntp \
82 + boost \
83 + nodejs \
84 + networkmanager \
85 + imx-gpu-viv \
86 + "
87 +
88 +# Packages added to all images (including core-image-minimal)
89 +
90 +# eIQ Machine Learning. Note that many of the features require Qt 5. Disable
91 +# this when you build image without QT 5.
92 +IMAGE_INSTALL_append = " \
93 + packagegroup-imx-ml \
94 + firmware-imx-sdma \
95 + firmware-imx-regulatory \
96 + fsl-rc-local \
97 + android-tools \
98 + "
99 +#IMAGE_INSTALL_append = " \
100 +# firmware-imx-sdma \
101 +# firmware-imx-regulatory \
102 +# fsl-rc-local \
103 +# android-tools \
104 +# "
105 +
106 +IMAGE_FSTYPES = "tar.bz2"
107 +
108 +# Ship all kernel modules by default
109 +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
110 +
111 +MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
112 diff --git a/conf/machine/smarcimx8mm4g.conf b/conf/machine/smarcimx8mm4g.conf
113 new file mode 100644
114 index 0000000..4640f62
115 --- /dev/null
116 +++ b/conf/machine/smarcimx8mm4g.conf
117 @@ -0,0 +1,92 @@
118 +#@TYPE: Machine
119 +#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY
120 +#@SOC: i.MX8MQ
121 +#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
122 +#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
123 +#
124 +# http://www.www.embedian.com
125 +
126 +MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
127 +
128 +require conf/machine/include/imx-base.inc
129 +require conf/machine/include/tune-cortexa53.inc
130 +require conf/machine/include/smarc-common.inc
131 +
132 +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
133 +
134 +# Embedian BSP default providers
135 +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm4g ?= "linux-smarcimx8mm"
136 +PREFERRED_VERSION_linux-smarcimx8mm4g_smarcimx8mm4g = "5.4"
137 +
138 +KERNEL_DEVICETREE = " \
139 + embedian/imx8mm-smarc.dtb \
140 + embedian/imx8mm-smarc-m4.dtb \
141 +"
142 +MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
143 +IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
144 +IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
145 +
146 +PREFERRED_PROVIDER_u-boot_smarcimx8mm4g = "u-boot-smarcimx8mm"
147 +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm4g = "u-boot-smarcimx8mm"
148 +
149 +UBOOT_CONFIG ??= "sd"
150 +UBOOT_CONFIG[sd] = "smarcimx8mm_4g_ser3_defconfig,sdcard"
151 +SPL_BINARY = "spl/u-boot-spl.bin"
152 +
153 +# Set DDR FIRMWARE
154 +DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
155 +
156 +# Set U-Boot DTB
157 +UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
158 +
159 +# Set imx-mkimage boot target
160 +IMXBOOT_TARGETS = "flash_evk"
161 +
162 +SERIAL_CONSOLE = "115200 ttymxc1"
163 +
164 +IMAGE_BOOTLOADER = "imx-boot"
165 +
166 +LOADADDR = ""
167 +UBOOT_MAKE_TARGET = ""
168 +IMX_BOOT_SEEK = "33"
169 +
170 +MACHINE_EXTRA_RDEPENDS += " \
171 + imx-boot \
172 + packagegroup-tools-bluetooth \
173 + pm-utils \
174 + kmod \
175 + hdparm \
176 + gptfdisk \
177 + lftp \
178 + vim \
179 + ntp \
180 + boost \
181 + nodejs \
182 + networkmanager \
183 + imx-gpu-viv \
184 + "
185 +
186 +# Packages added to all images (including core-image-minimal)
187 +
188 +# eIQ Machine Learning. Note that many of the features require Qt 5. Disable
189 +# this when you build image without QT 5.
190 +IMAGE_INSTALL_append = " \
191 + packagegroup-imx-ml \
192 + firmware-imx-sdma \
193 + firmware-imx-regulatory \
194 + fsl-rc-local \
195 + android-tools \
196 + "
197 +#IMAGE_INSTALL_append = " \
198 +# firmware-imx-sdma \
199 +# firmware-imx-regulatory \
200 +# fsl-rc-local \
201 +# android-tools \
202 +# "
203 +
204 +IMAGE_FSTYPES = "tar.bz2"
205 +
206 +# Ship all kernel modules by default
207 +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
208 +
209 +MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
210 diff --git a/recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch b/recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch
211 new file mode 100644
212 index 0000000..5a0a416
213 --- /dev/null
214 +++ b/recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch
215 @@ -0,0 +1,14 @@
216 +diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
217 +index 049192880..57c404675 100644
218 +--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
219 ++++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
220 +@@ -58,7 +58,8 @@ static const struct imx_rdc_cfg rdc[] = {
221 + RDC_MDAn(RDC_MDA_M4, DID1),
222 +
223 + /* peripherals domain permission */
224 +- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
225 ++ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
226 ++ RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W),
227 + RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
228 +
229 + /* memory region */
230 diff --git a/recipes-bsp/imx-atf/imx-atf_2.2.bbappend b/recipes-bsp/imx-atf/imx-atf_2.2.bbappend
231 index 7e0f6f9..b8758c5 100644
232 --- a/recipes-bsp/imx-atf/imx-atf_2.2.bbappend
233 +++ b/recipes-bsp/imx-atf/imx-atf_2.2.bbappend
234 @@ -2,4 +2,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
235
236 SRC_URI_append = " \
237 file://imx8m-atf-ddr-timing.patch \
238 + file://imx8mm-atf-uart4.patch \
239 "
240 diff --git a/recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb b/recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb
241 new file mode 100644
242 index 0000000..b9b853b
243 --- /dev/null
244 +++ b/recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb
245 @@ -0,0 +1,57 @@
246 +# Copyright (C) 2013-2016 Freescale Semiconductor
247 +# Copyright 2017-2019 NXP
248 +
249 +DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
250 +require recipes-bsp/u-boot/u-boot-common.inc
251 +require recipes-bsp/u-boot/u-boot.inc
252 +inherit pythonnative
253 +
254 +FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
255 +
256 +PROVIDES += "u-boot"
257 +DEPENDS_append = " dtc-native"
258 +
259 +LICENSE = "GPLv2+"
260 +LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
261 +
262 +UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
263 +SRCBRANCH = "smarc_8mm-imx_v2020.04_5.4.24_2.1.0"
264 +SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
265 +SRCREV = "2d41934ee1ca738d6a2083dc43304fa55ff5e547"
266 +
267 +S = "${WORKDIR}/git"
268 +
269 +inherit fsl-u-boot-localversion
270 +
271 +LOCALVERSION ?= "-${SRCBRANCH}"
272 +
273 +BOOT_TOOLS = "imx-boot-tools"
274 +
275 +do_deploy_append_mx8m () {
276 + # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary
277 + if [ -n "${UBOOT_CONFIG}" ]
278 + then
279 + for config in ${UBOOT_MACHINE}; do
280 + i=$(expr $i + 1);
281 + for type in ${UBOOT_CONFIG}; do
282 + j=$(expr $j + 1);
283 + if [ $j -eq $i ]
284 + then
285 + install -d ${DEPLOYDIR}/${BOOT_TOOLS}
286 + install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
287 + install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
288 + fi
289 + done
290 + unset j
291 + done
292 + unset i
293 + fi
294 +
295 +}
296 +
297 +PACKAGE_ARCH = "${MACHINE_ARCH}"
298 +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
299 +
300 +UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
301 +UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
302 +UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
303 diff --git a/recipes-core/systemd/systemd-serialgetty.bbappend b/recipes-core/systemd/systemd-serialgetty.bbappend
304 new file mode 100644
305 index 0000000..fdb94d8
306 --- /dev/null
307 +++ b/recipes-core/systemd/systemd-serialgetty.bbappend
308 @@ -0,0 +1,39 @@
309 +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
310 +
311 +SRC_URI_append_smarcimx8mm2g = " \
312 + file://disable-serialgetty.sh \
313 + file://disable-serialgetty.service \
314 +"
315 +FILES_${PN}_append_smarcimx8mm2g = " \
316 + /lib/systemd/system/* \
317 + /etc/systemd/system/* \
318 +"
319 +
320 +do_install_append_smarcimx8mm2g() {
321 + install -d ${D}${systemd_unitdir}/system
322 + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
323 + install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system
324 + install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system
325 +
326 + ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \
327 + ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service
328 +}
329 +
330 +SRC_URI_append_smarcimx8mm4g = " \
331 + file://disable-serialgetty.sh \
332 + file://disable-serialgetty.service \
333 +"
334 +FILES_${PN}_append_smarcimx8mm4g = " \
335 + /lib/systemd/system/* \
336 + /etc/systemd/system/* \
337 +"
338 +
339 +do_install_append_smarcimx8mm4g() {
340 + install -d ${D}${systemd_unitdir}/system
341 + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
342 + install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system
343 + install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system
344 +
345 + ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \
346 + ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service
347 +}
348 diff --git a/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service
349 new file mode 100644
350 index 0000000..4c98261
351 --- /dev/null
352 +++ b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service
353 @@ -0,0 +1,11 @@
354 +[Unit]
355 +Description=Disable redundant serial getty service
356 +After=systemd-remount-fs.service
357 +ConditionPathIsReadWrite=/etc
358 +
359 +[Service]
360 +Type=oneshot
361 +ExecStart=/lib/systemd/system/disable-serialgetty.sh
362 +
363 +[Install]
364 +WantedBy=sysinit.target
365 diff --git a/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh
366 new file mode 100755
367 index 0000000..6dbc806
368 --- /dev/null
369 +++ b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh
370 @@ -0,0 +1,20 @@
371 +#!/bin/sh
372 +
373 +UART0_SERVICE=serial-getty@ttymxc0.service
374 +UART1_SERVICE=serial-getty@ttymxc1.service
375 +UART2_SERVICE=serial-getty@ttymxc2.service
376 +UART3_SERVICE=serial-getty@ttymxc3.service
377 +
378 +tty_service_enabled()
379 +{
380 + test -f /etc/systemd/system/getty.target.wants/$1
381 +}
382 +
383 +if tty_service_enabled ${UART0_SERVICE}; then
384 + systemctl stop ${UART0_SERVICE}
385 + systemctl disable ${UART0_SERVICE}
386 + systemctl enable ${UART1_SERVICE}
387 +fi
388 +
389 +
390 +
391 diff --git a/recipes-kernel/linux/linux-smarcimx8mm_5.4.bb b/recipes-kernel/linux/linux-smarcimx8mm_5.4.bb
392 new file mode 100644
393 index 0000000..94fe8c3
394 --- /dev/null
395 +++ b/recipes-kernel/linux/linux-smarcimx8mm_5.4.bb
396 @@ -0,0 +1,62 @@
397 +# Copyright (C) 2013-2016 Freescale Semiconductor
398 +# Copyright 2017-2019 NXP
399 +# Copyright 2018-2019 Embedian, Inc.
400 +# Released under the MIT license (see COPYING.MIT for the terms)
401 +
402 +SUMMARY = "Linux kernel provided and supported by Embedian"
403 +DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_5.4.24_2.1.0 provided by NXP) \
404 +with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
405 +
406 +require recipes-kernel/linux/linux-imx.inc
407 +
408 +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
409 +
410 +DEPENDS += "lzop-native bc-native"
411 +
412 +SRCBRANCH = "smarc_8mm_imx_5.4.24_2.1.0"
413 +LOCALVERSION = "-2.1.0"
414 +KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mm_defconfig"
415 +
416 +KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
417 +SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
418 +SRCREV = "8b44baa3bf3c4262181cfd1e77017ed58fbd4e3c"
419 +
420 +S = "${WORKDIR}/git"
421 +FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo "
422 +
423 +KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig"
424 +
425 +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
426 +
427 +DEFAULT_PREFERENCE = "1"
428 +
429 +addtask copy_defconfig after do_patch before do_preconfigure
430 +
431 +do_copy_defconfig () {
432 + install -d ${B}
433 + # copy kernel defconfig smarcimx8mm_defconfig to use for mx8
434 + mkdir -p ${B}
435 + cp ${KERNEL_DEFCONFIG} ${B}/.config
436 + cp ${KERNEL_DEFCONFIG} ${B}/../defconfig
437 +}
438 +
439 +DELTA_KERNEL_DEFCONFIG ?= ""
440 +#DELTA_KERNEL_DEFCONFIG_prepend_mx8 = "sdk_imx.config "
441 +
442 +do_merge_delta_config[dirs] = "${B}"
443 +do_merge_delta_config() {
444 + for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
445 + if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then
446 + ${KERNEL_CONFIG_COMMAND}
447 + oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg}
448 + elif [ -f "${WORKDIR}/${deltacfg}" ]; then
449 + ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
450 + elif [ -f "${deltacfg}" ]; then
451 + ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
452 + fi
453 + done
454 + cp .config ${WORKDIR}/defconfig
455 +}
456 +addtask merge_delta_config before do_preconfigure after do_copy_defconfig
457 +
458 +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
459 diff --git a/scripts/emb_mk_yocto_sdcard/README.txt b/scripts/emb_mk_yocto_sdcard/README.txt
460 index 8747d67..5f3d08c 100644
461 --- a/scripts/emb_mk_yocto_sdcard/README.txt
462 +++ b/scripts/emb_mk_yocto_sdcard/README.txt
463 @@ -11,7 +11,7 @@ Before running this script you need to bitbake fsl-image-gui.
464
465
466 Usage:
467 -sudo MACHINE=<smarcimx8m2g|smarcimx8m4g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX
468 +sudo MACHINE=<smarcimx8mm2g|smarcimx8mm4g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX
469 (Change /dev/sdX to your device name)
470
471 options:
472 diff --git a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
473 index 59c2410..fbadf48 100755
474 --- a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
475 +++ b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
476 @@ -22,7 +22,6 @@ ROOTFS_IMAGE=rootfs.tar.bz2
477 BOOTLOADER_RESERVED_SIZE=2
478 PART1_SIZE=48
479 BOOTLOADER_OFFSET=33
480 -DISPLAY=-hdmi
481 PART=p
482 BOOTPART=1
483 ROOTFSPART=2
484 @@ -30,16 +29,11 @@ BOOTDIR=/boot
485
486 check_board()
487 {
488 - if grep -q "i.MX8M" /sys/devices/soc0/soc_id; then
489 - BOARD=smarc-imx8m
490 - DTB_PREFIX=imx8mq-smarc
491 + if grep -q "i.MX8MM" /sys/devices/soc0/soc_id; then
492 + BOARD=smarc-imx8mm
493 + DTB_PREFIX=imx8mm-smarc
494 BLOCK=mmcblk0
495
496 - if [[ $DISPLAY != "-lvds" && $DISPLAY != "-hdmi" && \
497 - $DISPLAY != "-dual-display" && $DISPLAY != "" ]]; then
498 - red_bold_echo "ERROR: invalid display, should be lvds, hdmi, dual-display or empty"
499 - exit 1
500 - fi
501 else
502 red_bold_echo "ERROR: Unsupported board"
503 exit 1
504 @@ -65,8 +59,8 @@ check_images()
505 exit 1
506 fi
507
508 - if [[ ! -f $IMGS_PATH/${DTB_PREFIX}${DISPLAY}.dtb ]] ; then
509 - red_bold_echo "ERROR: \"$IMGS_PATH/${DTB_PREFIX}${DISPLAY}.dtb\" does not exist"
510 + if [[ ! -f $IMGS_PATH/${DTB_PREFIX}.dtb ]] ; then
511 + red_bold_echo "ERROR: \"$IMGS_PATH/${DTB_PREFIX}.dtb\" does not exist"
512 exit 1
513 fi
514
515 @@ -149,7 +143,7 @@ install_kernel_to_emmc()
516 mount /dev/${BLOCK}${PART}${BOOTPART} ${MOUNTDIR}
517 mkdir -p ${MOUNTDIR}/dtbs/
518 cp -v ${IMGS_PATH}/${KERNEL_IMAGE} ${MOUNTDIR}
519 - cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/imx8mq-smarc.dtb
520 + cp -v ${IMGS_PATH}/${DTB_PREFIX}.dtb ${MOUNTDIR}/dtbs/imx8mm-smarc.dtb
521 cp -v ${IMGS_PATH}/uEnv.txt ${MOUNTDIR}
522
523 echo
524 @@ -171,7 +165,7 @@ install_rootfs_to_emmc()
525 tar --warning=no-timestamp -jxvf ${IMGS_PATH}/${ROOTFS_IMAGE} -C ${MOUNTDIR} --checkpoint=.1200
526
527 # Create DTB symlink
528 - (cd ${MOUNTDIR}/${BOOTDIR}; ln -fs ${DTB_PREFIX}${DISPLAY}.dtb ${DTB_PREFIX}.dtb)
529 + (cd ${MOUNTDIR}/${BOOTDIR}; ln -fs ${DTB_PREFIX}.dtb ${DTB_PREFIX}.dtb)
530
531 echo
532 sync
533 @@ -198,7 +192,7 @@ start_udev()
534 usage()
535 {
536 echo
537 - echo "This script installs Yocto Rootfs on the SMARC-iMX8M's internal eMMC storage device"
538 + echo "This script installs Yocto Rootfs on the SMARC-iMX8MM's internal eMMC storage device"
539 echo
540 echo " Usage: $(basename $0) <option>"
541 echo
542 @@ -224,7 +218,7 @@ if [[ $EUID != 0 ]] ; then
543 exit 1
544 fi
545
546 -blue_underlined_bold_echo "*** Embedian SMARC-iMX8M on-module eMMC Recovery ***"
547 +blue_underlined_bold_echo "*** Embedian SMARC-iMX8MM on-module eMMC Recovery ***"
548 echo
549
550 while getopts d:h OPTION;
551 diff --git a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
552 index 69b4522..9712e14 100755
553 --- a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
554 +++ b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
555 @@ -21,9 +21,6 @@ readonly YOCTO_DEFAULT_IMAGE=fsl-image-qt5-validation-imx
556 readonly YOCTO_SCRIPTS_PATH=${SCRIPT_POINT}
557 readonly YOCTO_IMGS_PATH=${YOCTO_BUILD}/tmp/deploy/images/${MACHINE}
558
559 -## display (one of "-hdmi", "-lcdif-lvds", "-dp", "-dcss-lvds", "-dual-display", "-edp")
560 -readonly DISPLAY="-hdmi"
561 -
562 # $1 -- block device
563 # $2 -- output images dir
564 readonly LPARAM_BLOCK_DEVICE=${1}
565 @@ -100,7 +97,7 @@ echo "================================================"
566
567 help() {
568 bn=`basename $0`
569 - echo " Usage: MACHINE=<smarcimx8mq2g|smarcimx8mq4g> $bn <options> device_node"
570 + echo " Usage: MACHINE=<smarcimx8mm2g|smarcimx8mm4g> $bn <options> device_node"
571 echo
572 echo " options:"
573 echo " -h display this Help message"
574 @@ -117,7 +114,7 @@ if [[ $EUID -ne 0 ]] ; then
575 exit 1
576 fi
577
578 -if [[ $MACHINE != "smarcimx8mq2g" && $MACHINE != "smarcimx8mq4g" ]] ; then
579 +if [[ $MACHINE != "smarcimx8mm2g" && $MACHINE != "smarcimx8mm4g" ]] ; then
580 help
581 exit 1
582 fi
583 @@ -262,7 +259,7 @@ function install_yocto
584 echo "Flashing \"Image, device tree and uEnv.txt\" partition"
585 cp -v ${YOCTO_IMGS_PATH}/Image ${P1_MOUNT_DIR}/
586 mkdir -p ${P1_MOUNT_DIR}/dtbs/
587 - cp -v ${YOCTO_IMGS_PATH}/imx8mq-smarc${DISPLAY}.dtb ${P1_MOUNT_DIR}/dtbs/imx8mq-smarc.dtb
588 + cp -v ${YOCTO_IMGS_PATH}/imx8mm-smarc.dtb ${P1_MOUNT_DIR}/dtbs/imx8mm-smarc.dtb
589 cp -v ${YOCTO_SCRIPTS_PATH}/uEnv.txt ${P1_MOUNT_DIR}/
590
591 echo
592 @@ -296,7 +293,7 @@ function copy_images
593 echo "Copying Kernel Parameter uEnv.txt to /opt/images/"
594 cp -v ${YOCTO_SCRIPTS_PATH}/uEnv_emmc.txt ${P2_MOUNT_DIR}/opt/images/Yocto/uEnv.txt
595
596 - if [[ $MACHINE = "smarcimx8mq2g" || ${MACHINE} = "smarcimx8mq4g" ]]; then
597 + if [[ $MACHINE = "smarcimx8mm2g" || ${MACHINE} = "smarcimx8mm4g" ]]; then
598 cp ${YOCTO_IMGS_PATH}/imx-boot-${MACHINE}-sd.bin-* ${P2_MOUNT_DIR}/opt/images/Yocto
599 (cd ${P2_MOUNT_DIR}/opt/images/Yocto; ln -fs imx-boot-${MACHINE}-sd.bin-flash_evk imx-boot-sd.bin)
600 else
601 diff --git a/scripts/emb_mk_yocto_sdcard/uEnv.txt b/scripts/emb_mk_yocto_sdcard/uEnv.txt
602 index fab33cb..080d766 100644
603 --- a/scripts/emb_mk_yocto_sdcard/uEnv.txt
604 +++ b/scripts/emb_mk_yocto_sdcard/uEnv.txt
605 @@ -1,14 +1,11 @@
606 -optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
607 -#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
608 -#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
609 #console port SER3
610 -console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
611 +console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
612 #console port SER2
613 -#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
614 -#console port SER1
615 #console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
616 +#console port SER1
617 +#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200
618 #console port SER0
619 -#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200
620 +#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
621 mmcdev=1
622 mmcpart=1
623 image=Image
624 @@ -22,7 +19,7 @@ ethact=FEC0
625 ipaddr=192.168.1.150
626 serverip=192.168.1.53
627 gatewayip=192.168.1.254
628 -mmcargs=setenv bootargs cma=960M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
629 +mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} cma=400M
630 uenvcmd=run loadimage; run loadfdt; run mmcboot
631 # USB Boot
632 #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
633 diff --git a/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt b/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
634 index 64692b6..7650031 100644
635 --- a/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
636 +++ b/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
637 @@ -1,14 +1,11 @@
638 -optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
639 -#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
640 -#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
641 #console port SER3
642 -console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
643 +console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
644 #console port SER2
645 -#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
646 -#console port SER1
647 #console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
648 +#console port SER1
649 +#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200
650 #console port SER0
651 -#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200
652 +#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
653 mmcdev=0
654 mmcpart=1
655 image=Image
656 @@ -22,7 +19,7 @@ ethact=FEC0
657 ipaddr=192.168.1.150
658 serverip=192.168.1.53
659 gatewayip=192.168.1.254
660 -mmcargs=setenv bootargs cma=960M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
661 +mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} cma=400M
662 uenvcmd=run loadimage; run loadfdt; run mmcboot
663 # USB Boot
664 #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
665 1 diff --git a/conf/machine/include/smarc-common.inc b/conf/machine/include/smarc-common.inc
1 # We have a conf and classes directory, add to BBPATH 1 # We have a conf and classes directory, add to BBPATH
2 BBPATH .= ":${LAYERDIR}" 2 BBPATH .= ":${LAYERDIR}"
3 3
4 # We have a packages directory, add to BBFILES 4 # We have a packages directory, add to BBFILES
5 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ 5 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend" 6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7 7
8 BBFILE_COLLECTIONS += "smarcimx8mq" 8 BBFILE_COLLECTIONS += "smarcimx8mm"
9 BBFILE_PATTERN_smarcimx8mq := "^${LAYERDIR}" 9 BBFILE_PATTERN_smarcimx8mm := "^${LAYERDIR}"
10 BBFILE_PRIORITY_smarcimx8mq = "12" 10 BBFILE_PRIORITY_smarcimx8mm = "12"
11 LAYERSERIES_COMPAT_smarcimx8mq = "warrior zeus" 11 LAYERSERIES_COMPAT_smarcimx8mm = "warrior zeus"
12 12
13 # Define new EULAs and add them to the list defined in meta-freescale. 13 # Define new EULAs and add them to the list defined in meta-freescale.
14 # See fsl-eula-unpack.bbclass. 14 # See fsl-eula-unpack.bbclass.
15 FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10 = "fd4b227530cd88a82af6a5982cfb724d" 15 FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10 = "fd4b227530cd88a82af6a5982cfb724d"
16 FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11 = "228c72f2a91452b8a03c4cab30f30ef9" 16 FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11 = "228c72f2a91452b8a03c4cab30f30ef9"
17 FSL_EULA_FILE_MD5SUMS_append = " \ 17 FSL_EULA_FILE_MD5SUMS_append = " \
18 ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10} \ 18 ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10} \
19 ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11} \ 19 ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11} \
20 " 20 "
21 21
22 # Override the EULA defined in meta-freescale. 22 # Override the EULA defined in meta-freescale.
23 FSL_EULA_FILE = "${LAYERDIR}/../EULA.txt" 23 FSL_EULA_FILE = "${LAYERDIR}/../EULA.txt"
24 FSL_EULA_FILE_MD5SUM = "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11}" 24 FSL_EULA_FILE_MD5SUM = "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11}"
25 25
26 HOSTTOOLS_NONFATAL_append = " bc rsync xxd" 26 HOSTTOOLS_NONFATAL_append = " bc rsync xxd"
27 27
28 # optee is no longer a valid distro feature. Use machine feature to remove, like this: 28 # optee is no longer a valid distro feature. Use machine feature to remove, like this:
29 # MACHINE_FEATURES_remove = "optee" 29 # MACHINE_FEATURES_remove = "optee"
30 # DEPRECATED: The ability to remove optee from the build is deprecated and 30 # DEPRECATED: The ability to remove optee from the build is deprecated and
31 # will be removed in some future release. 31 # will be removed in some future release.
32 32
33 EMB_UBOOT_MIRROR ?= "git://git@git.embedian.com/developer/smarc-t335x-uboot.git" 33 EMB_UBOOT_MIRROR ?= "git://git@git.embedian.com/developer/smarc-t335x-uboot.git"
34 EMB_KERNEL_MIRROR ?= "git://git@git.embedian.com/developer/smarc-fsl-linux-kernel.git" 34 EMB_KERNEL_MIRROR ?= "git://git@git.embedian.com/developer/smarc-fsl-linux-kernel.git"
35 35
36 MIRRORS += " \ 36 MIRRORS += " \
37 ${EMB_UBOOT_MIRROR} git://github.com/embedian/smarc-uboot.git;protocol=git;branch=${SRCBRANCH} \n \ 37 ${EMB_UBOOT_MIRROR} git://github.com/embedian/smarc-uboot.git;protocol=git;branch=${SRCBRANCH} \n \
38 ${EMB_KERNEL_MIRROR} git://github.com/embedian/smarc-fsl-linux-kernel.git;protocol=git;branch=${SRCBRANCH} \n \ 38 ${EMB_KERNEL_MIRROR} git://github.com/embedian/smarc-fsl-linux-kernel.git;protocol=git;branch=${SRCBRANCH} \n \
39 " 39 "
40 40
41 41
conf/machine/smarcimx8mm2g.conf
1 #@TYPE: Machine 1 #@TYPE: Machine
2 #@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY 2 #@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 2GB LPDDR4 MEMORY
3 #@SOC: i.MX8MQ 3 #@SOC: i.MX8M Mini
4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M 4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8MM
5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com> 5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com>
6 # 6 #
7 # http://www.www.embedian.com 7 # http://www.www.embedian.com
8 8
9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" 9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
10 10
11 require conf/machine/include/imx-base.inc 11 require conf/machine/include/imx-base.inc
12 require conf/machine/include/tune-cortexa53.inc 12 require conf/machine/include/tune-cortexa53.inc
13 require conf/machine/include/smarc-common.inc 13 require conf/machine/include/smarc-common.inc
14 14
15 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth" 15 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
16 16
17 # Embedian BSP default providers 17 # Embedian BSP default providers
18 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm2g ?= "linux-smarcimx8mm" 18 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm2g ?= "linux-smarcimx8mm"
19 PREFERRED_VERSION_linux-smarcimx8mm2g_smarcimx8mm2g = "5.4" 19 PREFERRED_VERSION_linux-smarcimx8mm2g_smarcimx8mm2g = "5.4"
20 20
21 KERNEL_DEVICETREE = " \ 21 KERNEL_DEVICETREE = " \
22 embedian/imx8mm-smarc.dtb \ 22 embedian/imx8mm-smarc.dtb \
23 embedian/imx8mm-smarc-m4.dtb \ 23 embedian/imx8mm-smarc-m4.dtb \
24 " 24 "
25 MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos" 25 MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
26 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy" 26 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
27 IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin" 27 IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
28 28
29 PREFERRED_PROVIDER_u-boot_smarcimx8mm2g = "u-boot-smarcimx8mm" 29 PREFERRED_PROVIDER_u-boot_smarcimx8mm2g = "u-boot-smarcimx8mm"
30 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm2g = "u-boot-smarcimx8mm" 30 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm2g = "u-boot-smarcimx8mm"
31 31
32 UBOOT_CONFIG ??= "sd" 32 UBOOT_CONFIG ??= "sd"
33 UBOOT_CONFIG[sd] = "smarcimx8mm_2g_ser3_defconfig,sdcard" 33 UBOOT_CONFIG[sd] = "smarcimx8mm_2g_ser3_defconfig,sdcard"
34 SPL_BINARY = "spl/u-boot-spl.bin" 34 SPL_BINARY = "spl/u-boot-spl.bin"
35 35
36 # Set DDR FIRMWARE 36 # Set DDR FIRMWARE
37 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin" 37 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
38 38
39 # Set U-Boot DTB 39 # Set U-Boot DTB
40 UBOOT_DTB_NAME = "imx8mm-smarc.dtb" 40 UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
41 41
42 # Set imx-mkimage boot target 42 # Set imx-mkimage boot target
43 IMXBOOT_TARGETS = "flash_evk" 43 IMXBOOT_TARGETS = "flash_evk"
44 44
45 SERIAL_CONSOLE = "115200 ttymxc1" 45 SERIAL_CONSOLE = "115200 ttymxc1"
46 46
47 IMAGE_BOOTLOADER = "imx-boot" 47 IMAGE_BOOTLOADER = "imx-boot"
48 48
49 LOADADDR = "" 49 LOADADDR = ""
50 UBOOT_MAKE_TARGET = "" 50 UBOOT_MAKE_TARGET = ""
51 IMX_BOOT_SEEK = "33" 51 IMX_BOOT_SEEK = "33"
52 52
53 MACHINE_EXTRA_RDEPENDS += " \ 53 MACHINE_EXTRA_RDEPENDS += " \
54 imx-boot \ 54 imx-boot \
55 packagegroup-tools-bluetooth \ 55 packagegroup-tools-bluetooth \
56 pm-utils \ 56 pm-utils \
57 kmod \ 57 kmod \
58 hdparm \ 58 hdparm \
59 gptfdisk \ 59 gptfdisk \
60 lftp \ 60 lftp \
61 vim \ 61 vim \
62 ntp \ 62 ntp \
63 boost \ 63 boost \
64 nodejs \ 64 nodejs \
65 networkmanager \ 65 networkmanager \
66 imx-gpu-viv \ 66 imx-gpu-viv \
67 " 67 "
68 68
69 # Packages added to all images (including core-image-minimal) 69 # Packages added to all images (including core-image-minimal)
70 70
71 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable 71 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable
72 # this when you build image without QT 5. 72 # this when you build image without QT 5.
73 IMAGE_INSTALL_append = " \ 73 IMAGE_INSTALL_append = " \
74 packagegroup-imx-ml \ 74 packagegroup-imx-ml \
75 firmware-imx-sdma \ 75 firmware-imx-sdma \
76 firmware-imx-regulatory \ 76 firmware-imx-regulatory \
77 fsl-rc-local \ 77 fsl-rc-local \
78 android-tools \ 78 android-tools \
79 " 79 "
80 #IMAGE_INSTALL_append = " \ 80 #IMAGE_INSTALL_append = " \
81 # firmware-imx-sdma \ 81 # firmware-imx-sdma \
82 # firmware-imx-regulatory \ 82 # firmware-imx-regulatory \
83 # fsl-rc-local \ 83 # fsl-rc-local \
84 # android-tools \ 84 # android-tools \
85 # " 85 # "
86 86
87 IMAGE_FSTYPES = "tar.bz2" 87 IMAGE_FSTYPES = "tar.bz2"
88 88
89 # Ship all kernel modules by default 89 # Ship all kernel modules by default
90 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" 90 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
91 91
92 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k" 92 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
93 93
conf/machine/smarcimx8mm4g.conf
1 #@TYPE: Machine 1 #@TYPE: Machine
2 #@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY 2 #@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY
3 #@SOC: i.MX8MQ 3 #@SOC: i.MX8M Mini
4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M 4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8MM
5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com> 5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com>
6 # 6 #
7 # http://www.www.embedian.com 7 # http://www.www.embedian.com
8 8
9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" 9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
10 10
11 require conf/machine/include/imx-base.inc 11 require conf/machine/include/imx-base.inc
12 require conf/machine/include/tune-cortexa53.inc 12 require conf/machine/include/tune-cortexa53.inc
13 require conf/machine/include/smarc-common.inc 13 require conf/machine/include/smarc-common.inc
14 14
15 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth" 15 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
16 16
17 # Embedian BSP default providers 17 # Embedian BSP default providers
18 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm4g ?= "linux-smarcimx8mm" 18 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm4g ?= "linux-smarcimx8mm"
19 PREFERRED_VERSION_linux-smarcimx8mm4g_smarcimx8mm4g = "5.4" 19 PREFERRED_VERSION_linux-smarcimx8mm4g_smarcimx8mm4g = "5.4"
20 20
21 KERNEL_DEVICETREE = " \ 21 KERNEL_DEVICETREE = " \
22 embedian/imx8mm-smarc.dtb \ 22 embedian/imx8mm-smarc.dtb \
23 embedian/imx8mm-smarc-m4.dtb \ 23 embedian/imx8mm-smarc-m4.dtb \
24 " 24 "
25 MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos" 25 MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
26 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy" 26 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
27 IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin" 27 IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
28 28
29 PREFERRED_PROVIDER_u-boot_smarcimx8mm4g = "u-boot-smarcimx8mm" 29 PREFERRED_PROVIDER_u-boot_smarcimx8mm4g = "u-boot-smarcimx8mm"
30 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm4g = "u-boot-smarcimx8mm" 30 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm4g = "u-boot-smarcimx8mm"
31 31
32 UBOOT_CONFIG ??= "sd" 32 UBOOT_CONFIG ??= "sd"
33 UBOOT_CONFIG[sd] = "smarcimx8mm_4g_ser3_defconfig,sdcard" 33 UBOOT_CONFIG[sd] = "smarcimx8mm_4g_ser3_defconfig,sdcard"
34 SPL_BINARY = "spl/u-boot-spl.bin" 34 SPL_BINARY = "spl/u-boot-spl.bin"
35 35
36 # Set DDR FIRMWARE 36 # Set DDR FIRMWARE
37 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin" 37 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
38 38
39 # Set U-Boot DTB 39 # Set U-Boot DTB
40 UBOOT_DTB_NAME = "imx8mm-smarc.dtb" 40 UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
41 41
42 # Set imx-mkimage boot target 42 # Set imx-mkimage boot target
43 IMXBOOT_TARGETS = "flash_evk" 43 IMXBOOT_TARGETS = "flash_evk"
44 44
45 SERIAL_CONSOLE = "115200 ttymxc1" 45 SERIAL_CONSOLE = "115200 ttymxc1"
46 46
47 IMAGE_BOOTLOADER = "imx-boot" 47 IMAGE_BOOTLOADER = "imx-boot"
48 48
49 LOADADDR = "" 49 LOADADDR = ""
50 UBOOT_MAKE_TARGET = "" 50 UBOOT_MAKE_TARGET = ""
51 IMX_BOOT_SEEK = "33" 51 IMX_BOOT_SEEK = "33"
52 52
53 MACHINE_EXTRA_RDEPENDS += " \ 53 MACHINE_EXTRA_RDEPENDS += " \
54 imx-boot \ 54 imx-boot \
55 packagegroup-tools-bluetooth \ 55 packagegroup-tools-bluetooth \
56 pm-utils \ 56 pm-utils \
57 kmod \ 57 kmod \
58 hdparm \ 58 hdparm \
59 gptfdisk \ 59 gptfdisk \
60 lftp \ 60 lftp \
61 vim \ 61 vim \
62 ntp \ 62 ntp \
63 boost \ 63 boost \
64 nodejs \ 64 nodejs \
65 networkmanager \ 65 networkmanager \
66 imx-gpu-viv \ 66 imx-gpu-viv \
67 " 67 "
68 68
69 # Packages added to all images (including core-image-minimal) 69 # Packages added to all images (including core-image-minimal)
70 70
71 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable 71 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable
72 # this when you build image without QT 5. 72 # this when you build image without QT 5.
73 IMAGE_INSTALL_append = " \ 73 IMAGE_INSTALL_append = " \
74 packagegroup-imx-ml \ 74 packagegroup-imx-ml \
75 firmware-imx-sdma \ 75 firmware-imx-sdma \
76 firmware-imx-regulatory \ 76 firmware-imx-regulatory \
77 fsl-rc-local \ 77 fsl-rc-local \
78 android-tools \ 78 android-tools \
79 " 79 "
80 #IMAGE_INSTALL_append = " \ 80 #IMAGE_INSTALL_append = " \
81 # firmware-imx-sdma \ 81 # firmware-imx-sdma \
82 # firmware-imx-regulatory \ 82 # firmware-imx-regulatory \
83 # fsl-rc-local \ 83 # fsl-rc-local \
84 # android-tools \ 84 # android-tools \
85 # " 85 # "
86 86
87 IMAGE_FSTYPES = "tar.bz2" 87 IMAGE_FSTYPES = "tar.bz2"
88 88
89 # Ship all kernel modules by default 89 # Ship all kernel modules by default
90 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" 90 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
91 91
92 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k" 92 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
93 93
recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend
1 # Workaround to fix do_compile() failure due to missing fsl-imx8mq-evk.dtb 1 # Workaround to fix do_compile() failure due to missing imx8mm-evk.dtb
2 do_compile_prepend() { 2 do_compile_prepend() {
3 echo "Copying DTB" 3 echo "Copying DTB"
4 if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mm-smarc.dtb ]; then 4 if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mm-smarc.dtb ]; then
5 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mm-smarc.dtb ${S}/iMX8M/imx8mm-evk.dtb 5 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mm-smarc.dtb ${S}/iMX8M/imx8mm-evk.dtb
6 fi 6 fi
7 } 7 }
8 8
recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb
1 # Copyright (C) 2013-2016 Freescale Semiconductor 1 # Copyright (C) 2013-2016 Freescale Semiconductor
2 # Copyright 2017-2019 NXP 2 # Copyright 2017-2019 NXP
3 3
4 DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." 4 DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
5 require recipes-bsp/u-boot/u-boot-common.inc 5 require recipes-bsp/u-boot/u-boot-common.inc
6 require recipes-bsp/u-boot/u-boot.inc 6 require recipes-bsp/u-boot/u-boot.inc
7 inherit pythonnative 7 inherit pythonnative
8 8
9 FILESEXTRAPATHS_prepend := "${THISDIR}/files:" 9 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
10 10
11 PROVIDES += "u-boot" 11 PROVIDES += "u-boot"
12 DEPENDS_append = " dtc-native" 12 DEPENDS_append = " dtc-native"
13 13
14 LICENSE = "GPLv2+" 14 LICENSE = "GPLv2+"
15 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" 15 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
16 16
17 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh" 17 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
18 SRCBRANCH = "smarc_8mm-imx_v2020.04_5.4.24_2.1.0" 18 SRCBRANCH = "smarc_8mm-imx_v2020.04_5.4.24_2.1.0"
19 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}" 19 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
20 SRCREV = "2d41934ee1ca738d6a2083dc43304fa55ff5e547" 20 SRCREV = "2d41934ee1ca738d6a2083dc43304fa55ff5e547"
21 21
22 S = "${WORKDIR}/git" 22 S = "${WORKDIR}/git"
23 23
24 inherit fsl-u-boot-localversion 24 inherit fsl-u-boot-localversion
25 25
26 LOCALVERSION ?= "-${SRCBRANCH}" 26 LOCALVERSION ?= "-${SRCBRANCH}"
27 27
28 BOOT_TOOLS = "imx-boot-tools" 28 BOOT_TOOLS = "imx-boot-tools"
29 29
30 do_deploy_append_mx8m () { 30 do_deploy_append_mx8m () {
31 # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary 31 # Deploy the mkimage, u-boot-nodtb.bin and imx8mm-XX.dtb for mkimage to generate boot binary
32 if [ -n "${UBOOT_CONFIG}" ] 32 if [ -n "${UBOOT_CONFIG}" ]
33 then 33 then
34 for config in ${UBOOT_MACHINE}; do 34 for config in ${UBOOT_MACHINE}; do
35 i=$(expr $i + 1); 35 i=$(expr $i + 1);
36 for type in ${UBOOT_CONFIG}; do 36 for type in ${UBOOT_CONFIG}; do
37 j=$(expr $j + 1); 37 j=$(expr $j + 1);
38 if [ $j -eq $i ] 38 if [ $j -eq $i ]
39 then 39 then
40 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 40 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
41 install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 41 install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
42 install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} 42 install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
43 fi 43 fi
44 done 44 done
45 unset j 45 unset j
46 done 46 done
47 unset i 47 unset i
48 fi 48 fi
49 49
50 } 50 }
51 51
52 PACKAGE_ARCH = "${MACHINE_ARCH}" 52 PACKAGE_ARCH = "${MACHINE_ARCH}"
53 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 53 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
54 54
55 UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 55 UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
56 UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 56 UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
57 UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 57 UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
58 58