From 24e9657f5bea1ae709b12844006f8b44d2d53bf7 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 4 Jun 2018 15:44:28 +0200 Subject: apalis-t30: mainline kernel machine This patch adds mainline linux based Apalis T30 machine. Just the bare minimum to run the Toradex Easy Installer. It does not yet include any compatible recipes for graphics. Signed-off-by: Marcel Ziswiler Acked-by: Stefan Agner --- conf/machine/apalis-t30-mainline.conf | 70 +++++++++++++++++++++ .../u-boot/files/tegra3m/Apalis_T30_2GB_800Mhz.bct | Bin 0 -> 6128 bytes .../u-boot/files/tegra3m/apalis_t30.img.cfg | 22 +++++++ recipes-bsp/u-boot/files/tegra3m/fw_env.config | 15 +++++ recipes-bsp/u-boot/u-boot-toradex_git.bb | 11 ++++ 5 files changed, 118 insertions(+) create mode 100644 conf/machine/apalis-t30-mainline.conf create mode 100644 recipes-bsp/u-boot/files/tegra3m/Apalis_T30_2GB_800Mhz.bct create mode 100644 recipes-bsp/u-boot/files/tegra3m/apalis_t30.img.cfg create mode 100644 recipes-bsp/u-boot/files/tegra3m/fw_env.config diff --git a/conf/machine/apalis-t30-mainline.conf b/conf/machine/apalis-t30-mainline.conf new file mode 100644 index 0000000..fd9f009 --- /dev/null +++ b/conf/machine/apalis-t30-mainline.conf @@ -0,0 +1,70 @@ +#@TYPE: Machine +#@NAME: Toradex Apalis T30 Mainline +#@SOC: Tegra T30 +#@DESCRIPTION: Mainline Machine configuration for Toradex Apalis T30 SOM +#@MAINTAINER: Marcel Ziswiler + +require conf/machine/include/soc-family.inc + +SOC_FAMILY = "tegram:tegra3m" + +PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-mainline" + +KERNEL_IMAGETYPE = "uImage" +KERNEL_DEFCONFIG = "tegra_defconfig" +KERNEL_DEVICETREE += "tegra30-apalis-eval.dtb" +# The kernel lives in a seperate FAT or UBI partition, don't deploy it in /boot +RDEPENDS_kernel-base = "" + +PREFERRED_PROVIDER_u-boot = "u-boot-toradex" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex" +UBOOT_MACHINE = "apalis_t30_defconfig" +UBOOT_ENTRYPOINT = "0x82008000" +UBOOT_LOADADDRESS = "${UBOOT_ENTRYPOINT}" +# The payload offsets are given in number of 512 byte blocks. +OFFSET_BOOTROM_PAYLOAD = "0" + +TEZI_DISTRO_BOOT_SCRIPTS = "boot.scr" +TEZI_UBOOT_BINARY_EMMC = "apalis_t30.img" + +# require u-boot-dtb-tegra.bin to be used +UBOOT_IMAGE = "u-boot-dtb-tegra-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_BINARY = "u-boot-dtb-tegra.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "u-boot-dtb-tegra-${MACHINE}.${UBOOT_SUFFIX}" + +PREFERRED_PROVIDER_lxde-icon-theme_apalis-t30-mainline = "lxde-icon-theme" +PREFERRED_PROVIDER_lxsession-lite_apalis-t30-mainline = "lxsession" +PREFERRED_PROVIDER_virtual/psplash = "psplash-angstrom" +PREFERRED_PROVIDER_psplash-support = "psplash-angstrom" + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +PREFERRED_VERSION_xserver-xorg_tegram = "99:1.19%" +PREFERRED_PROVIDER_virtual/mesa ?= "mesa" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa" + +#TBD +#swrast,tegra +GALLIUMDRIVERS_append_armv7a =",tegra" +XSERVER ?= "xserver-xorg \ + mesa-driver-swrast \ + mesa-driver-tegra \ + xf86-input-evdev \ + xf86-input-keyboard \ + xf86-input-mouse \ + xf86-video-modesetting \ + xf86-video-opentegra \ + " + +MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g pci " +EXTRA_IMAGEDEPENDS += "u-boot" + +# used by sysvinit_2 +SERIAL_CONSOLE = "115200 ttyS0" +IMAGE_CLASSES += "image_type_tezi" +IMAGE_FSTYPES = "tar.xz teziimg" + +TORADEX_PRODUCT_IDS = "0025 0026 0031" +TORADEX_FLASH_TYPE = "emmc" + +DEFAULTTUNE = "armv7athf-neon" +require conf/machine/include/tune-cortexa9.inc diff --git a/recipes-bsp/u-boot/files/tegra3m/Apalis_T30_2GB_800Mhz.bct b/recipes-bsp/u-boot/files/tegra3m/Apalis_T30_2GB_800Mhz.bct new file mode 100644 index 0000000..f228cd2 Binary files /dev/null and b/recipes-bsp/u-boot/files/tegra3m/Apalis_T30_2GB_800Mhz.bct differ diff --git a/recipes-bsp/u-boot/files/tegra3m/apalis_t30.img.cfg b/recipes-bsp/u-boot/files/tegra3m/apalis_t30.img.cfg new file mode 100644 index 0000000..6fbdc0d --- /dev/null +++ b/recipes-bsp/u-boot/files/tegra3m/apalis_t30.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2014 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = Apalis_T30_2GB_800Mhz.bct; +BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-bsp/u-boot/files/tegra3m/fw_env.config b/recipes-bsp/u-boot/files/tegra3m/fw_env.config new file mode 100644 index 0000000..d2be4ee --- /dev/null +++ b/recipes-bsp/u-boot/files/tegra3m/fw_env.config @@ -0,0 +1,15 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. +# On a block device a negative offset is treated as a backwards offset from the +# end of the device/partition, rather than a forwards offset from the start. + +# Colibri T30/Apalis T30 +# U-Boot environment is stored at the end of the first eMMC boot partition +# hence use a negative value. The environment is just in front of the config +# block which occupies the last sector (hence -0x200) + +# Block device name Device offset Env. size +/dev/mmcblk0boot0 -0x2200 0x2000 + diff --git a/recipes-bsp/u-boot/u-boot-toradex_git.bb b/recipes-bsp/u-boot/u-boot-toradex_git.bb index 6fa380c..1649d5c 100644 --- a/recipes-bsp/u-boot/u-boot-toradex_git.bb +++ b/recipes-bsp/u-boot/u-boot-toradex_git.bb @@ -4,6 +4,7 @@ inherit tegra-u-boot-localversion PROVIDES = "u-boot virtual/bootloader" DEPENDS += "dtc-native" +DEPENDS_append_apalis-t30-mainline = " cbootimage-native" DEPENDS_append_apalis-tk1 = " cbootimage-native" DEPENDS_append_apalis-tk1-mainline = " cbootimage-native" @@ -25,6 +26,10 @@ SRCBRANCH = "2016.11-toradex" SRCREV_use-head-next = "${AUTOREV}" SRCBRANCH_use-head-next = "2016.11-toradex-next" SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=${SRCBRANCH}" +SRC_URI_append_apalis-t30-mainline = " \ + file://apalis_t30.img.cfg \ + file://Apalis_T30_2GB_800Mhz.bct \ +" SRC_URI_append_apalis-tk1 = " \ file://apalis-tk1.img.cfg \ file://PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct \ @@ -39,6 +44,12 @@ PR = "${TDX_VER_INT}+gitr${SRCPV}" PACKAGE_ARCH = "${MACHINE_ARCH}" +do_deploy_append_apalis-t30-mainline() { + cd ${DEPLOYDIR} + cp ${WORKDIR}/Apalis_T30_2GB_800Mhz.bct . + cbootimage -s tegra30 ${WORKDIR}/apalis_t30.img.cfg apalis_t30.img + rm Apalis_T30_2GB_800Mhz.bct +} do_deploy_append_apalis-tk1() { cd ${DEPLOYDIR} cp ${WORKDIR}/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct . -- cgit v1.2.3