aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2019-03-05 10:59:38 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2019-03-05 10:59:38 +0100
commitda49312af9e0c3e7f6df50e7d6f77e1fa2921b7a (patch)
tree4831ddfa987ac9181b59f82e587af5ad6ed3a70f /board
parentd29ec62899ed7fafefd0a3fddee61683648421fa (diff)
parente675e9a0473f39b60ab66d94a61ac9c077ed438f (diff)
downloadbuildroot-da49312af9e0c3e7f6df50e7d6f77e1fa2921b7a.tar.gz
buildroot-da49312af9e0c3e7f6df50e7d6f77e1fa2921b7a.tar.bz2
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/common/imx/genimage.cfg.template_imx82
-rwxr-xr-xboard/freescale/common/imx/imx8-bootloader-prepare.sh20
-rwxr-xr-xboard/freescale/common/imx/post-image.sh13
-rw-r--r--board/freescale/imx8qxpmek/readme.txt67
4 files changed, 96 insertions, 6 deletions
diff --git a/board/freescale/common/imx/genimage.cfg.template_imx8 b/board/freescale/common/imx/genimage.cfg.template_imx8
index 2f8842f8e0..bd5f6cdc73 100644
--- a/board/freescale/common/imx/genimage.cfg.template_imx8
+++ b/board/freescale/common/imx/genimage.cfg.template_imx8
@@ -23,7 +23,7 @@ image sdcard.img {
partition imx-boot {
in-partition-table = "no"
image = "imx8-boot-sd.bin"
- offset = 33K
+ offset = %IMXOFFSET%
}
partition boot {
diff --git a/board/freescale/common/imx/imx8-bootloader-prepare.sh b/board/freescale/common/imx/imx8-bootloader-prepare.sh
index cc12666ae6..e98e93a857 100755
--- a/board/freescale/common/imx/imx8-bootloader-prepare.sh
+++ b/board/freescale/common/imx/imx8-bootloader-prepare.sh
@@ -7,12 +7,22 @@ main ()
echo "ERROR: couldn't find dtb: $UBOOT_DTB"
exit 1
fi
- cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
- BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
- ${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
- rm -f ${BINARIES_DIR}/u-boot.its
- ${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+ if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+ cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
+ BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
+ ${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
+ rm -f ${BINARIES_DIR}/u-boot.its
+
+ ${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+ else
+ ${HOST_DIR}/bin/mkimage_imx8 -commit > ${BINARIES_DIR}/mkimg.commit
+ cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit > ${BINARIES_DIR}/u-boot-hash.bin
+ cp ${BINARIES_DIR}/bl31.bin ${BINARIES_DIR}/u-boot-atf.bin
+ dd if=${BINARIES_DIR}/u-boot-hash.bin of=${BINARIES_DIR}/u-boot-atf.bin bs=1K seek=128
+
+ ${HOST_DIR}/bin/mkimage_imx8 -soc QX -rev B0 -append ${BINARIES_DIR}/ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qx-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a35 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+ fi
exit $?
}
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
index 6590beda3e..12a5bea73b 100755
--- a/board/freescale/common/imx/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -34,6 +34,8 @@ genimage_type()
{
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
echo "genimage.cfg.template_imx8"
+ elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
+ echo "genimage.cfg.template_imx8"
elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
echo "genimage.cfg.template_spl"
else
@@ -41,6 +43,15 @@ genimage_type()
fi
}
+imx_offset()
+{
+ if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+ echo "33K"
+ else
+ echo "32K"
+ fi
+}
+
uboot_image()
{
if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then
@@ -53,11 +64,13 @@ uboot_image()
main()
{
local FILES="$(dtb_list) $(linux_image)"
+ local IMXOFFSET="$(imx_offset)"
local UBOOTBIN="$(uboot_image)"
local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
sed -e "s/%FILES%/${FILES}/" \
+ -e "s/%IMXOFFSET%/${IMXOFFSET}/" \
-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}
diff --git a/board/freescale/imx8qxpmek/readme.txt b/board/freescale/imx8qxpmek/readme.txt
new file mode 100644
index 0000000000..45f7915fe4
--- /dev/null
+++ b/board/freescale/imx8qxpmek/readme.txt
@@ -0,0 +1,67 @@
+***************************
+Freescale i.MX8QXP MEK board
+***************************
+
+This file documents the Buildroot support for the Freescale i.MX8QXP
+MEK board.
+
+Build
+=====
+
+First, configure Buildroot for the i.MX8QXP MEK board:
+
+ make freescale_imx8qxpmek_defconfig
+
+Build all components:
+
+ make
+
+You will find in output/images/ the following files:
+ - ahab-container.img
+ - bl31.bin
+ - boot.vfat
+ - fsl-imx8qxp-mek.dtb
+ - Image
+ - imx8-boot-sd.bin
+ - mkimg.commit
+ - mx8qx-mek-scfw-tcm.bin
+ - mx8qx-val-scfw-tcm.bin
+ - rootfs.ext2
+ - rootfs.ext4
+ - rootfs.tar
+ - sdcard.img
+ - u-boot-atf.bin
+ - u-boot.bin
+ - u-boot-hash.bin
+
+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
+
+Buildroot prepares a bootable "sdcard.img" image in the output/images/
+directory, ready to be dumped on a SD card. Launch the following
+command as root:
+
+ dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** 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/imx/genimage.cfg.template_imx8.
+
+Boot the i.MX8QXP MEK board
+==========================
+
+To boot your newly created system:
+- insert the SD card in the SD slot of the board;
+- Configure the boot switch as follows:
+SW2: ON ON OFF OFF
+- put a micro USB cable into the Debug USB Port and connect using a terminal
+ emulator at 115200 bps, 8n1;
+- power on the board.
+
+Enjoy!