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