freescale: Create the board/freescale/common/imx/ directory
authorFabio Estevam <festevam@gmail.com>
Sun, 6 Nov 2016 22:43:27 +0000 (20:43 -0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 7 Nov 2016 22:05:34 +0000 (23:05 +0100)
In order to have a better hierarchy for the genimage scripts used by
NXP mx25, mx51, mx53, mx6, mx7 SoCs, let's place them inside the
board/freescale/common/imx/ directory.

This helps in creating a more natural separation between the mxs scripts
that are placed inside the board/freescale/common/mxs/ directory.

Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
24 files changed:
board/freescale/common/genimage.cfg.template [deleted file]
board/freescale/common/imx/genimage.cfg.template [new file with mode: 0644]
board/freescale/common/imx/post-image.sh [new file with mode: 0755]
board/freescale/common/post-image.sh [deleted file]
board/freescale/imx25pdk/readme.txt
board/freescale/imx51evk/readme.txt
board/freescale/imx6sabre/readme.txt
board/freescale/imx6ulevk/readme.txt
board/freescale/imx7dsdb/readme.txt
board/technexion/imx6ulpico/readme.txt
configs/freescale_imx6dlsabreauto_defconfig
configs/freescale_imx6dlsabresd_defconfig
configs/freescale_imx6qsabreauto_defconfig
configs/freescale_imx6qsabresd_defconfig
configs/freescale_imx6sololiteevk_defconfig
configs/freescale_imx6sxsabresd_defconfig
configs/freescale_imx6ulevk_defconfig
configs/freescale_imx7dsabresd_defconfig
configs/imx6ulpico_defconfig
configs/mx25pdk_defconfig
configs/mx51evk_defconfig
configs/mx53loco_defconfig
configs/warp7_defconfig
configs/warpboard_defconfig

diff --git a/board/freescale/common/genimage.cfg.template b/board/freescale/common/genimage.cfg.template
deleted file mode 100644 (file)
index acce058..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# Minimal SD card image for the Freescale boards Template
-#
-# We mimic the .sdcard Freescale's image format:
-# * the SD card must have 1 kB free space at the beginning,
-# * U-Boot is dumped as is,
-# * a FAT partition at offset 8 MB is containing zImage/uImage and DTB files
-# * a single root filesystem partition is required (ext2, ext3 or ext4)
-#
-
-image boot.vfat {
-  vfat {
-    files = {
-      %FILES%
-    }
-  }
-  size = 16M
-}
-
-image sdcard.img {
-  hdimage {
-  }
-
-  partition u-boot {
-    in-partition-table = "no"
-    image = "u-boot.imx"
-    offset = 1024
-  }
-
-  partition boot {
-    partition-type = 0xC
-    bootable = "true"
-    image = "boot.vfat"
-    offset = 8M
-  }
-
-  partition rootfs {
-    partition-type = 0x83
-    image = "rootfs.ext2"
-  }
-}
diff --git a/board/freescale/common/imx/genimage.cfg.template b/board/freescale/common/imx/genimage.cfg.template
new file mode 100644 (file)
index 0000000..acce058
--- /dev/null
@@ -0,0 +1,40 @@
+# Minimal SD card image for the Freescale boards Template
+#
+# We mimic the .sdcard Freescale's image format:
+# * the SD card must have 1 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a FAT partition at offset 8 MB is containing zImage/uImage and DTB files
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image boot.vfat {
+  vfat {
+    files = {
+      %FILES%
+    }
+  }
+  size = 16M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "u-boot.imx"
+    offset = 1024
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+    offset = 8M
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
new file mode 100755 (executable)
index 0000000..9e4da82
--- /dev/null
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+
+#
+# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME
+# in ${BR_CONFIG}, then prints the corresponding list of file names for the
+# genimage configuration file
+#
+dtb_list()
+{
+       local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})"
+
+       for dt in $DTB_LIST; do
+               echo -n "\"$dt.dtb\", "
+       done
+}
+
+#
+# linux_image extracts the Linux image format from BR2_LINUX_KERNEL_UIMAGE in
+# ${BR_CONFIG}, then prints the corresponding file name for the genimage
+# configuration file
+#
+linux_image()
+{
+       if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
+               echo "\"uImage\""
+       else
+               echo "\"zImage\""
+       fi
+}
+
+main()
+{
+       local FILES="$(dtb_list) $(linux_image)"
+       local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
+       local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+       sed -e "s/%FILES%/${FILES}/" \
+               board/freescale/common/imx/genimage.cfg.template > ${GENIMAGE_CFG}
+
+       rm -rf "${GENIMAGE_TMP}"
+
+       genimage \
+               --rootpath "${TARGET_DIR}" \
+               --tmppath "${GENIMAGE_TMP}" \
+               --inputpath "${BINARIES_DIR}" \
+               --outputpath "${BINARIES_DIR}" \
+               --config "${GENIMAGE_CFG}"
+
+       rm -f ${GENIMAGE_CFG}
+
+       exit $?
+}
+
+main $@
diff --git a/board/freescale/common/post-image.sh b/board/freescale/common/post-image.sh
deleted file mode 100755 (executable)
index 7d48550..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME
-# in ${BR_CONFIG}, then prints the corresponding list of file names for the
-# genimage configuration file
-#
-dtb_list()
-{
-       local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})"
-
-       for dt in $DTB_LIST; do
-               echo -n "\"$dt.dtb\", "
-       done
-}
-
-#
-# linux_image extracts the Linux image format from BR2_LINUX_KERNEL_UIMAGE in
-# ${BR_CONFIG}, then prints the corresponding file name for the genimage
-# configuration file
-#
-linux_image()
-{
-       if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
-               echo "\"uImage\""
-       else
-               echo "\"zImage\""
-       fi
-}
-
-main()
-{
-       local FILES="$(dtb_list) $(linux_image)"
-       local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
-       local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-       sed -e "s/%FILES%/${FILES}/" \
-               board/freescale/common/genimage.cfg.template > ${GENIMAGE_CFG}
-
-       rm -rf "${GENIMAGE_TMP}"
-
-       genimage \
-               --rootpath "${TARGET_DIR}" \
-               --tmppath "${GENIMAGE_TMP}" \
-               --inputpath "${BINARIES_DIR}" \
-               --outputpath "${BINARIES_DIR}" \
-               --config "${GENIMAGE_CFG}"
-
-       rm -f ${GENIMAGE_CFG}
-
-       exit $?
-}
-
-main $@
index df7c617264b60e79f50d3c196d9447b9989df673..1aece6c9b3c1cb46d2ea75aa23d997507f764ad5 100644 (file)
@@ -40,7 +40,7 @@ command as root:
 *** WARNING! This will destroy all the card content. Use with care! ***
 
 For details about the medium image layout, see the definition in
-board/freescale/common/genimage.cfg.template.
+board/freescale/common/imx/genimage.cfg.template.
 
 Boot the i.MX25 PDK board
 =========================
index bf739fd6596cf377a34d9860a36273545d9f4bbd..d67a3fd7247e46c8d94864af69e08939b327d486 100644 (file)
@@ -40,7 +40,7 @@ command as root:
 *** WARNING! This will destroy all the card content. Use with care! ***
 
 For details about the medium image layout, see the definition in
-board/freescale/common/genimage.cfg.template.
+board/freescale/common/imx/genimage.cfg.template.
 
 Boot the i.MX51 EVK board
 =========================
index e409d8f190e88c6e488f6f367a6ecec50b296e2a..a1bd82fdc7032c41d14765e7ba463bc3853de7ed 100644 (file)
@@ -71,7 +71,7 @@ command as root:
 *** WARNING! The script will destroy all the card content. Use with care! ***
 
 For details about the medium image layout, see the definition in
-board/freescale/common/genimage.cfg.template.
+board/freescale/common/imx/genimage.cfg.template.
 
 Boot the SABRE board
 ====================
index 98de2775dbe2120986d31f78136ad215d2785383..25b95fec524bd18b3ea9884d7d56053f2b5b2b5d 100644 (file)
@@ -43,7 +43,7 @@ command as root:
 *** WARNING! This will destroy all the card content. Use with care! ***
 
 For details about the medium image layout, see the definition in
-board/freescale/common/genimage.cfg.template.
+board/freescale/common/imx/genimage.cfg.template.
 
 Boot the i.MX6UL EVK board
 =========================
index 9aeeb166d828208296116e42f7daa3955095b503..c6030f696526d40b11ae603e5728386a028bba8a 100644 (file)
@@ -40,7 +40,7 @@ command as root:
 *** WARNING! This will destroy all the card content. Use with care! ***
 
 For details about the medium image layout, see the definition in
-board/freescale/common/genimage.cfg.template.
+board/freescale/common/imx/genimage.cfg.template.
 
 Boot the i.MX7D SDB board
 =========================
index a7c3a445d0a8f447639b02162f3569b8fdb15ac9..7eab3f6b86fc6094a7063c37056de83ec959f6fb 100644 (file)
@@ -46,7 +46,7 @@ command as root:
 *** WARNING! This will destroy all the card content. Use with care! ***
 
 For details about the medium image layout, see the definition in
-board/freescale/common/genimage.cfg.template.
+board/freescale/common/imx/genimage.cfg.template.
 
 Boot the i.MX6UL Pico board
 =========================
index ed5f67cab2007dd2d8366d56bb8a12a90a17c589..1cf5fee0fdd3d6655f3197760f58c4a773878ef2 100644 (file)
@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabreauto"
 
 # filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 0cbe974477040417b75b69a2ea8b8a30b3b0ef0e..904f0a2442bb484de076a37ba7a547cf0cef313c 100644 (file)
@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabresd"
 
 # filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 
 # required tools to create the microSD image
index 9ae2f813e7ca2b378d7bbd653169e5cef981e8e5..64efd421959c1fc4a02dfa987307fff1f41e13a1 100644 (file)
@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabreauto"
 
 # filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 913a724212c5cda81d4f979302c9e7d76dcbd428..962c274d600cab3eff52789454aae3971732ea07 100644 (file)
@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd"
 
 # filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 79ebcb83c22cf8741fada4c03359d287e3db0d81..bf0b9e5f2de6cbd9e6dabba7f68017e2ee9de2d8 100644 (file)
@@ -18,7 +18,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sl-evk"
 
 # filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 
 # required tools to create the microSD image
index fed1a3e08a58cd290a35e0e7f1a02277b5d4a0f8..9b5cdb85e4b81eec53b642eef3af8a3fa2ef6d13 100644 (file)
@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-sdb"
 
 # filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 
 # required tools to create the microSD image
index d033b9950c20c1bbb75ab77f1715c1e17cfc04e1..3c5a9099a0d4dc02e8fd13c3eb0ee157a247cc7a 100644 (file)
@@ -31,6 +31,6 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # filesystem / image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
index 4bedef10bedff1109e20d8b99c4a3944c151e27b..97d3cde16ead4aecdec5407baeda31b85594dcc5 100644 (file)
@@ -33,4 +33,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
index 71277d9b829647168fb72580cb825303cc15a64f..88604a662782f4875f8a76999631b79bb7a24d00 100644 (file)
@@ -45,6 +45,6 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # filesystem / image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
index 645fe8a13ad9e46d8faec4484e747afdf8aa9286..65a6d12f56eca4b2a85b5dbbab64f7cc617887a8 100644 (file)
@@ -14,7 +14,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # Filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 1fca282536f745109d8f1502de990b010eb7c925..db82a36eaabb01b5ee0aa19c2611de0751ac05b3 100644 (file)
@@ -14,7 +14,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # Filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 94ac818d1b20b83fa7458c0f5c5bf793f33cc01d..7597ae9ca74e447d09d0d4dcf6306583c96eb321 100644 (file)
@@ -14,7 +14,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # Filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 31251f464589a52de2f7e1ff88f53a97b82db6d2..a55a5049cf99b11ceee8734825563751356d382f 100644 (file)
@@ -38,7 +38,7 @@ BR2_PACKAGE_WPA_SUPPLICANT=y
 BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
 
 # Filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
index 5e9c0514b7dd90e857bb18002fdb07b1248e2ea3..531a8783b12556a4a3b446a8860b16e95ecde30b 100644 (file)
@@ -42,7 +42,7 @@ BR2_PACKAGE_HOST_DFU_UTIL=y
 BR2_PACKAGE_HOST_IMX_USB_LOADER=y
 
 # Filesystem
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y