[3rdparty,1/6] ccimx6ulsbcexpress: Separate machine configuration into SOM and board

Submitted by Gonzalez, Alex on Feb. 21, 2019, 3:24 p.m. | Patch ID: 158988

Details

Message ID 1550762666-17995-2-git-send-email-alex.gonzalez@digi.com
State New
Headers show

Commit Message

Gonzalez, Alex Feb. 21, 2019, 3:24 p.m.
This commit prepares for the introduction of a second ConnectCore 6UL
System-On-Module based board by grouping the SOM configuration into its
own file avoiding code redundancy.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
---
 conf/machine/ccimx6ulsbcexpress.conf  | 33 +++------------------------------
 conf/machine/include/ccimx6ulsom.conf | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 30 deletions(-)
 create mode 100644 conf/machine/include/ccimx6ulsom.conf

Patch hide | download patch | download mbox

diff --git a/conf/machine/ccimx6ulsbcexpress.conf b/conf/machine/ccimx6ulsbcexpress.conf
index 455087270653..cefc49af1379 100644
--- a/conf/machine/ccimx6ulsbcexpress.conf
+++ b/conf/machine/ccimx6ulsbcexpress.conf
@@ -4,35 +4,8 @@ 
 #@DESCRIPTION: Machine configuration for ConnectCore 6UL SBC Express board.
 #@MAINTAINER: Alex Gonzalez <alex.gonzalez@digi.com>
 
-MACHINEOVERRIDES =. "mx6:mx6ul:ccimx6ul:use-mainline-bsp:"
-
-include conf/machine/include/imx-base.inc
-include conf/machine/include/tune-cortexa7.inc
-
-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-digi"
-PREFERRED_PROVIDER_u-boot = "u-boot-digi"
-
-UBOOT_BOOTSCRIPT = "boot.scr"
-
-UBOOT_CONFIG ??= "ccimx6ulstarter1GB ccimx6ulstarter"
-UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig"
-UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig"
-
-MACHINE_EXTRA_RDEPENDS += " \
-    mtd-utils-ubifs \
-"
-# mkfs.ubifs parameters for boot partition (the one holding kernel and device tree files)
-# Max LEB count (-c 255) calculated for a partition of up to 32 MiB considering 128 KiB erase-block size.
-MKUBIFS_BOOT_ARGS ?= "-m 2048 -e 126976 -c 255"
-
-# mkfs.ubifs parameters for rootfs partition
-# Max LEB count (-c 8191) calculated for a partition of up to 1 GiB considering 128 KiB erase-block size.
-MKUBIFS_ARGS ?= "-m 2048 -e 126976 -c 8191"
-
-IMAGE_CLASSES += "image_types_digi"
-# Overwrite the defaults in imx-base not to include wic images
-IMAGE_FSTYPES = "tar.bz2 ubifs boot.ubifs"
-
-SERIAL_CONSOLE = "115200 ttymxc4"
+include conf/machine/include/ccimx6ulsom.conf
 
 KERNEL_DEVICETREE = "imx6ul-ccimx6ulsbcexpress.dtb"
+
+SERIAL_CONSOLES = "115200;ttymxc4"
diff --git a/conf/machine/include/ccimx6ulsom.conf b/conf/machine/include/ccimx6ulsom.conf
new file mode 100644
index 000000000000..0c15e7308524
--- /dev/null
+++ b/conf/machine/include/ccimx6ulsom.conf
@@ -0,0 +1,34 @@ 
+#@TYPE: Machine
+#@NAME: ConnecCore 6UL SOM
+#@SOC: i.MX6UL
+#@DESCRIPTION: Machine configuration for ConnectCore 6UL System-On-Module.
+#@MAINTAINER: Alex Gonzalez <alex.gonzalez@digi.com>
+
+MACHINEOVERRIDES =. "mx6:mx6ul:ccimx6ul:use-mainline-bsp:"
+
+include conf/machine/include/imx-base.inc
+include conf/machine/include/tune-cortexa7.inc
+
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot-digi"
+PREFERRED_PROVIDER_u-boot = "u-boot-digi"
+
+UBOOT_BOOTSCRIPT = "boot.scr"
+
+UBOOT_CONFIG ??= "ccimx6ulstarter1GB ccimx6ulstarter"
+UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig"
+UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig"
+
+MACHINE_EXTRA_RDEPENDS += " \
+    mtd-utils-ubifs \
+"
+# mkfs.ubifs parameters for boot partition (the one holding kernel and device tree files)
+# Max LEB count (-c 255) calculated for a partition of up to 32 MiB considering 128 KiB erase-block size.
+MKUBIFS_BOOT_ARGS ?= "-m 2048 -e 126976 -c 255"
+
+# mkfs.ubifs parameters for rootfs partition
+# Max LEB count (-c 8191) calculated for a partition of up to 1 GiB considering 128 KiB erase-block size.
+MKUBIFS_ARGS ?= "-m 2048 -e 126976 -c 8191"
+
+IMAGE_CLASSES += "image_types_digi"
+# Overwrite the defaults in imx-base not to include wic images
+IMAGE_FSTYPES = "tar.bz2 ubifs boot.ubifs"