configs/kontron_pitx_imx8m: new defconfig

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
[yann.morin.1998@free.fr: drop "exit $?" in post-image.sh]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021.08.x
Heiko Thiery 2021-06-29 12:06:31 +02:00 committed by Yann E. MORIN
parent a7ca24784a
commit 4c9bc44534
7 changed files with 161 additions and 0 deletions

View File

@ -1121,6 +1121,8 @@ F: package/python-sip/
F: package/uhd/
N: Heiko Thiery <heiko.thiery@gmail.com>
F: board/kontron/pitx-imx8m/
F: configs/kontron_pitx_imx8m_defconfig
F: package/altera-stapl/
F: package/ipmitool/
F: package/libnetconf2/

View File

@ -0,0 +1,8 @@
echo "Root File Sytem on MMC${devnum}"
setenv rootfs /dev/mmcblk${devnum}p1
setenv bootargs root=${rootfs} rootwait rw ${extrabootargs}
load ${devtype} ${devnum} ${kernel_addr_r} boot/Image
load ${devtype} ${devnum} ${fdt_addr_r} boot/imx8mq-kontron-pitx-imx8m.dtb
booti ${kernel_addr_r} - ${fdt_addr_r}

View File

@ -0,0 +1,16 @@
image sdcard.img {
hdimage {
}
partition imx-boot {
in-partition-table = "no"
image = "imx8-boot-sd.bin"
offset = 33k
}
partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
offset = 8M
}
}

View File

@ -0,0 +1,4 @@
#!/bin/sh
mkdir -p $TARGET_DIR/boot/
cp $BINARIES_DIR/boot.scr $TARGET_DIR/boot/boot.scr

View File

@ -0,0 +1,3 @@
#!/bin/sh
support/scripts/genimage.sh -c $(dirname $0)/genimage.cfg

View File

@ -0,0 +1,74 @@
Kontron pitx-imx8m
==================
https://www.kontron.com/produkte/pitx-imx8m/p155258
How to build it
===============
Configure buildroot:
$ make kontron_pitx_imx8m_defconfig
Change settings to fit your needs (optional):
$ make menuconfig
Compile everything and buildr the rootfs image:
$ make
Result of the build
===================
After building, the output/images directory contains:
output/images/
├── bl31.bin
├── boot.scr
├── ddr_fw.bin
├── Image
├── imx8-boot-sd.bin
├── imx8mq-kontron-pitx-imx8m.dtb
├── lpddr4_pmu_train_fw.bin
├── rootfs.ext2
├── rootfs.ext4 -> rootfs.ext2
├── rootfs.tar
├── sdcard.img
├── signed_hdmi_imx8m.bin
├── u-boot.bin
├── u-boot.itb
├── u-boot-nodtb.bin
├── u-boot-spl.bin
└── u-boot-spl-ddr.bin
Flashing the SD card image
==========================
To install the image on a SDCard simply copy sdcard.img to the storage (e.g. SD, eMMC)
$ sudo dd if=output/images/sdcard.img of=<your-sd-device>
Preparing the board
===================
* Connect a serial line to the board
* Insert the SD card
* Make sure the boot source selection DIP switches are set correctly
* SW1 1-4 OFF
* SW1 2-3 OFF
* Power-up the board
Booting the board
=================
By default the bootloader will search for the first valid image, starting
with the internal eMMC. To make sure the bootloader loads bootscript from
the correct location (SD card) set the boot_targets environment variable:
$ setenv boot_targets mmc1

View File

@ -0,0 +1,54 @@
# Architecture
BR2_aarch64=y
BR2_ARM_FPU_VFPV3=y
# System
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc2"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/kontron/pitx-imx8m/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/kontron/pitx-imx8m/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/pitx-imx8mq.dtb"
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.13"
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mq-kontron-pitx-imx8m"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_13=y
BR2_PACKAGE_FREESCALE_IMX=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y
BR2_PACKAGE_FIRMWARE_IMX=y
# Filesystem / image
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
# Bootloader
BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq"
BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://gitlab.kontron.com/imx/u-boot-imx/-/archive/PITX-IMX8M-R12/u-boot-imx-PITX-IMX8M-R12.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pitx-imx8m"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin"
BR2_TARGET_UBOOT_SPL=y
# Required host tools to create the SD/eMMC image
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_IMX_MKIMAGE=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/kontron/pitx-imx8m/boot.cmd"