aboutsummaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2016-12-01 22:22:06 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2016-12-01 22:29:56 +0100
commit8852f08eeda3c9ff4c5f9cc90a169338bda1bff9 (patch)
tree8b22aaa4e3c283a73fe2af2eccdfa3926a5430ef /board/freescale
parent42dd856ca930f79a831361e337d25fb8dd6e0dd1 (diff)
parent4f29cc436b24a8007b065253babe27b9346a479e (diff)
downloadbuildroot-8852f08eeda3c9ff4c5f9cc90a169338bda1bff9.tar.gz
buildroot-8852f08eeda3c9ff4c5f9cc90a169338bda1bff9.tar.bz2
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/common/imx/genimage.cfg.template (renamed from board/freescale/common/genimage.cfg.template)0
-rwxr-xr-xboard/freescale/common/imx/post-image.sh (renamed from board/freescale/common/post-image.sh)2
-rw-r--r--board/freescale/common/mxs/genimage.cfg.template39
-rwxr-xr-xboard/freescale/common/mxs/post-image.sh54
-rw-r--r--board/freescale/imx23evk/readme.txt48
-rw-r--r--board/freescale/imx25pdk/readme.txt2
-rw-r--r--board/freescale/imx28evk/genimage.cfg29
-rwxr-xr-xboard/freescale/imx28evk/post-image.sh14
-rw-r--r--board/freescale/imx51evk/readme.txt2
-rw-r--r--board/freescale/imx6sabre/readme.txt2
-rw-r--r--board/freescale/imx6ulevk/readme.txt2
-rw-r--r--board/freescale/imx7dsdb/readme.txt2
12 files changed, 147 insertions, 49 deletions
diff --git a/board/freescale/common/genimage.cfg.template b/board/freescale/common/imx/genimage.cfg.template
index acce058b2a..acce058b2a 100644
--- a/board/freescale/common/genimage.cfg.template
+++ b/board/freescale/common/imx/genimage.cfg.template
diff --git a/board/freescale/common/post-image.sh b/board/freescale/common/imx/post-image.sh
index 7d48550a5a..9e4da82dc7 100755
--- a/board/freescale/common/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -35,7 +35,7 @@ main()
local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
sed -e "s/%FILES%/${FILES}/" \
- board/freescale/common/genimage.cfg.template > ${GENIMAGE_CFG}
+ board/freescale/common/imx/genimage.cfg.template > ${GENIMAGE_CFG}
rm -rf "${GENIMAGE_TMP}"
diff --git a/board/freescale/common/mxs/genimage.cfg.template b/board/freescale/common/mxs/genimage.cfg.template
new file mode 100644
index 0000000000..e094fb7f2c
--- /dev/null
+++ b/board/freescale/common/mxs/genimage.cfg.template
@@ -0,0 +1,39 @@
+# Minimal SD card image for the Freescale MX23/MX28 Template
+#
+# We mimic the .sdcard Freescale's MX23/MX28 image format:
+# * u-boot.sb is placed at offset 1M,
+# * a FAT partition at offset 16 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 {
+ partition-type = 0x53
+ image = "u-boot.sd"
+ offset = 1M
+ size = 16M
+ }
+
+ partition kernel {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext2"
+ }
+}
diff --git a/board/freescale/common/mxs/post-image.sh b/board/freescale/common/mxs/post-image.sh
new file mode 100755
index 0000000000..0bfb835c6e
--- /dev/null
+++ b/board/freescale/common/mxs/post-image.sh
@@ -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/mxs/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/imx23evk/readme.txt b/board/freescale/imx23evk/readme.txt
new file mode 100644
index 0000000000..6574577dcc
--- /dev/null
+++ b/board/freescale/imx23evk/readme.txt
@@ -0,0 +1,48 @@
+**************************
+Freescale i.MX23 EVK board
+**************************
+
+This file documents the Buildroot support for the Freescale i.MX23 EVK board.
+
+Build
+=====
+
+First, configure Buildroot for your i.MX23 EVK board:
+
+ make imx23evk_defconfig
+
+Build all components:
+
+ make
+
+You will find in output/images/ directory the following files:
+ - imx23-evk.dtb
+ - rootfs.tar
+ - u-boot.sd
+ - zImage
+
+Create a bootable SD card
+=========================
+
+To determine the device associated to the SD card have a look in the
+/proc/partitions file:
+
+ cat /proc/partitions
+
+Then, run the following command:
+
+*** WARNING! The command will destroy all the card content. Use with care! ***
+
+ sudo dd if=output/images/sdcard.img of=/dev/<your-microsd-device>
+
+Boot the i.MX23 EVK board
+=========================
+
+- Put the Boot Mode Select jumper as 1 0 0 1 so that it can boot
+ from the SD card
+- Insert the SD card in the SD Card slot of the board;
+- Connect an RS232 UART cable to the Debug UART Port and connect using a
+ terminal emulator at 115200 bps, 8n1;
+- power on the board.
+
+Enjoy!
diff --git a/board/freescale/imx25pdk/readme.txt b/board/freescale/imx25pdk/readme.txt
index df7c617264..1aece6c9b3 100644
--- a/board/freescale/imx25pdk/readme.txt
+++ b/board/freescale/imx25pdk/readme.txt
@@ -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
=========================
diff --git a/board/freescale/imx28evk/genimage.cfg b/board/freescale/imx28evk/genimage.cfg
deleted file mode 100644
index 4df432f994..0000000000
--- a/board/freescale/imx28evk/genimage.cfg
+++ /dev/null
@@ -1,29 +0,0 @@
-image kernel.vfat {
- vfat {
- files = {
- "zImage", "imx28-evk.dtb"
- }
- }
- size = 16M
-}
-
-image sdcard.img {
- hdimage {
- }
- partition boot {
- partition-type = 0x53
- image = "u-boot.sd"
- offset = 1M
- size = 16M
- }
-
- partition kernel {
- partition-type = 0xC
- image = "kernel.vfat"
- }
-
- partition rootfs {
- partition-type = 0x83
- image = "rootfs.ext2"
- }
-}
diff --git a/board/freescale/imx28evk/post-image.sh b/board/freescale/imx28evk/post-image.sh
deleted file mode 100755
index b4ac4608ff..0000000000
--- a/board/freescale/imx28evk/post-image.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
- --rootpath "${TARGET_DIR}" \
- --tmppath "${GENIMAGE_TMP}" \
- --inputpath "${BINARIES_DIR}" \
- --outputpath "${BINARIES_DIR}" \
- --config "${GENIMAGE_CFG}"
diff --git a/board/freescale/imx51evk/readme.txt b/board/freescale/imx51evk/readme.txt
index bf739fd659..d67a3fd724 100644
--- a/board/freescale/imx51evk/readme.txt
+++ b/board/freescale/imx51evk/readme.txt
@@ -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
=========================
diff --git a/board/freescale/imx6sabre/readme.txt b/board/freescale/imx6sabre/readme.txt
index e409d8f190..a1bd82fdc7 100644
--- a/board/freescale/imx6sabre/readme.txt
+++ b/board/freescale/imx6sabre/readme.txt
@@ -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
====================
diff --git a/board/freescale/imx6ulevk/readme.txt b/board/freescale/imx6ulevk/readme.txt
index 98de2775db..25b95fec52 100644
--- a/board/freescale/imx6ulevk/readme.txt
+++ b/board/freescale/imx6ulevk/readme.txt
@@ -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
=========================
diff --git a/board/freescale/imx7dsdb/readme.txt b/board/freescale/imx7dsdb/readme.txt
index 9aeeb166d8..c6030f6965 100644
--- a/board/freescale/imx7dsdb/readme.txt
+++ b/board/freescale/imx7dsdb/readme.txt
@@ -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
=========================