configs: update beaglebone_defconfig
PATCH 1/2 configs: update beaglebone_defconfig
This patch updates the target config for the beaglebone based on the AM335x CPU. It also supports the beagleboneblack, the TI evm and evmsk. Device tree blobs for am335x-evm, am335x-evmsk, am335x-bone, am335x-boneblack will be built and a sd card image is created with a post-image script. The kernel and driver versions match the ti-processor-sdk 02.00.00.00. Patches allow the use of old AM335x evm revisions (1 bit sd card) and JTAG debugging.
Kernel JTAG patch:
By default the kernel will disable the JTAG clock, access via the JTAG port will not work after the kernel booted. The AM335x-evm has a JTAG header fitted, this patch keeps the JTAG clock alive.
Uboot SD card patch:
Early AM335x-evm boards can only use 1 bit communication to the SD card, on newer board revisions this might be fixed.
Forcing 1 bit communication slows down the communication but will work regardless if the SD card is attached via 1 or 4 bits.
If the board has a working 4 bit SD card interface, this patch can be removed, this will speed up the access.
--- board/beaglebone/genimage.cfg | 4 +- board/beaglebone/linux-3.12.config | 251 --------------------- .../0001-keep-jtag-clock-alive-for-debugger.patch | 16 ++ ...cache-flush-management-symbols-when-MULTI.patch | 34 --- .../uboot/0001-mmc-force-1bit-bus-width.patch | 35 +++ board/beaglebone/post-image.sh | 3 +- board/beaglebone/readme.txt | 74 +++--- board/beaglebone/uEnv.txt | 3 +- configs/beaglebone_defconfig | 46 ++-- 9 files changed, 113 insertions(+), 353 deletions(-) delete mode 100644 board/beaglebone/linux-3.12.config create mode 100644 board/beaglebone/patches/linux/0001-keep-jtag-clock-alive-for-debugger.patch delete mode 100644 board/beaglebone/patches/linux/linux-0001-arm-Export-cache-flush-management-symbols-when-MULTI.patch create mode 100644 board/beaglebone/patches/uboot/0001-mmc-force-1bit-bus-width.patch
board/beaglebone/genimage.cfg +3 -1
@@ -5,8 +5,10 @@ image boot.vfat { "u-boot.img", "zImage", "uEnv.txt", + "am335x-evm.dtb", + "am335x-evmsk.dtb", "am335x-bone.dtb", - "am335x-boneblack.dtb" + "am335x-boneblack.dtb", } } size = 16M
board/beaglebone/linux-3.12.config deleted +0 -251
251 lines not on this page · raw message
board/beaglebone/patches/linux/0001-keep-jtag-clock-alive-for-debugger.patch new file +16 -0
@@ -0,0 +1,16 @@ +This patch keeps the debugSS clock alive, it clocks the JTAG macro and enables +access to the SoC via JTAG after the kernel booted. + +Signed-off-by: Lothar Felten <[email protected]> +--- +diff -Naur linux-orig/arch/arm/mach-omap2/omap_hwmod_33xx_data.c linux-52c4aa7cdb93d61f8008f380135beaf7b8fa6593/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +--- linux-orig/arch/arm/mach-omap2/omap_hwmod_33xx_data.c 2015-10-02 17:30:56.000000000 +0200 ++++ linux-52c4aa7cdb93d61f8008f380135beaf7b8fa6593/arch/arm/mach-omap2/omap_hwmod_33xx_data.c 2016-08-15 11:28:55.017617612 +0200 +@@ -208,6 +208,7 @@ + .name = "debugss", + .class = &am33xx_debugss_hwmod_class, + .clkdm_name = "l3_aon_clkdm", ++ .flags = (HWMOD_INIT_NO_IDLE|HWMOD_INIT_NO_RESET), /* keep debugSS clock alive for JTAG */ + .main_clk = "trace_clk_div_ck", + .prcm = { + .omap4 = {
board/beaglebone/patches/linux/linux-0001-arm-Export-cache-flush-management-symbols-when-MULTI.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 29885f2f3d700341d322274db6ad085e601c0994 Mon Sep 17 00:00:00 2001 -From: Pantelis Antoniou <[email protected]> -Date: Fri, 4 Jan 2013 00:32:33 +0200 -Subject: [PATCH 3/3] arm: Export cache flush management symbols when - !MULTI_CACHE - -When compiling a kernel without CONFIG_MULTI_CACHE enabled the -dma access functions end up not being exported. Fix it. - -Signed-off-by: Pantelis Antoniou <[email protected]> ---- - arch/arm/kernel/setup.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index da1d1aa..dcb678c 100644 ---- a/arch/arm/kernel/setup.c -+++ b/arch/arm/kernel/setup.c -@@ -923,3 +923,12 @@ const struct seq_operations cpuinfo_op = { - .stop = c_stop, - .show = c_show - }; -+ -+/* export the cache management functions */ -+#ifndef MULTI_CACHE -+ -+EXPORT_SYMBOL(__glue(_CACHE,_dma_map_area)); -+EXPORT_SYMBOL(__glue(_CACHE,_dma_unmap_area)); -+EXPORT_SYMBOL(__glue(_CACHE,_dma_flush_range)); -+ -+#endif --- -1.7.10.4 -
board/beaglebone/patches/uboot/0001-mmc-force-1bit-bus-width.patch new file +35 -0
@@ -0,0 +1,35 @@ +This patch forces the MMC interface to work in 1-bit-mode. +Early AM335x-evm boards can only use 1 bit communication to the SD card, on +newer board revisions this might be fixed. + +Signed-off-by: Lothar Felten <[email protected]> +--- +diff -Naur a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c +--- a/drivers/mmc/mmc.c 2016-05-16 16:40:32.000000000 +0200 ++++ b/drivers/mmc/mmc.c 2016-07-11 13:23:13.235880737 +0200 +@@ -1351,25 +1351,6 @@ + mmc->card_caps &= mmc->cfg->host_caps; + + if (IS_SD(mmc)) { +- if (mmc->card_caps & MMC_MODE_4BIT) { +- cmd.cmdidx = MMC_CMD_APP_CMD; +- cmd.resp_type = MMC_RSP_R1; +- cmd.cmdarg = mmc->rca << 16; +- +- err = mmc_send_cmd(mmc, &cmd, NULL); +- if (err) +- return err; +- +- cmd.cmdidx = SD_CMD_APP_SET_BUS_WIDTH; +- cmd.resp_type = MMC_RSP_R1; +- cmd.cmdarg = 2; +- err = mmc_send_cmd(mmc, &cmd, NULL); +- if (err) +- return err; +- +- mmc_set_bus_width(mmc, 4); +- } +- + if (mmc->card_caps & MMC_MODE_HS) + mmc->tran_speed = 50000000; + else
board/beaglebone/post-image.sh +2 -1
@@ -1,6 +1,7 @@ #!/bin/sh -# post-image.sh for BeagleBone +# post-image.sh for CircuitCo BeagleBone and TI am335x-evm # 2014, Marcin Jabrzyk <[email protected]> +# 2016, Lothar Felten <[email protected]> BOARD_DIR="$(dirname $0)"
board/beaglebone/readme.txt +41 -33
85 lines not on this page · raw message
board/beaglebone/uEnv.txt +2 -1
@@ -1,3 +1,4 @@ bootpart=0:1 bootdir= -uenvcmd=run loadimage;run loadramdisk;run findfdt;run loadfdt;run ramboot +bootargs=console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait +uenvcmd=run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr};
configs/beaglebone_defconfig +14 -32
58 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/2 configs: new defconfig for beaglebone_qt5
Add a target configuration for the beaglebone that supports the SGX530 graphics acceleration and builds the qt5 demos with the eglfs backend. The imagination technologies demos and fbv are also included. The linux kernel is based on the omap2plus defconfig, a config fragment adds the required settings for SGX accelerator support.
--- board/beaglebone/linux-4.1-sgx.fragment | 12 ++++++++++ board/beaglebone/readme.txt | 2 +- configs/beaglebone_qt5_defconfig | 39 +++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 board/beaglebone/linux-4.1-sgx.fragment create mode 100644 configs/beaglebone_qt5_defconfig
board/beaglebone/linux-4.1-sgx.fragment new file +12 -0
@@ -0,0 +1,12 @@ +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_OMAP2_DSS_INIT=y +CONFIG_OMAP_DSS_BASE=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_DSS_DPI=y +CONFIG_DRM_OMAP=y +CONFIG_DRM_OMAP_NUM_CRTCS=2 +CONFIG_DRM_OMAP_WB_M2M=y +CONFIG_DRM_TILCDC=y +CONFIG_DRM_I2C_NXP_TDA998X=y +CONFIG_DRM=y
board/beaglebone/readme.txt +1 -1
@@ -8,7 +8,7 @@ This configuration will build a complete image for the beaglebone and the TI AM335x-EVM, the board type is identified by the on-board EEPROM. The configuration is based on the ti-processor-sdk-02.00.00.00. Device tree blobs for beaglebone variants and the evm-sk are built too. - +For Qt5 support support use the beaglebone_qt5_defconfig How to build it ===============
configs/beaglebone_qt5_defconfig new file +39 -0
@@ -0,0 +1,39 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyO0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="52c4aa7cdb93d61f8008f380135beaf7b8fa6593" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/linux-4.1-sgx.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-evmsk" +BR2_PACKAGE_FBV=y +BR2_PACKAGE_QT5=y +BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y +BR2_PACKAGE_QT5BASE_EXAMPLES=y +BR2_PACKAGE_QT5BASE_EGLFS=y +BR2_PACKAGE_QT5QUICKCONTROLS=y +BR2_PACKAGE_TI_SGX_DEMOS=y +BR2_PACKAGE_TI_SGX_KM=y +BR2_PACKAGE_TI_SGX_UM=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm" +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
1.9.1
Thomas Petazzoni
AppliedPATCH 2/2 configs: new defconfig for beaglebone_qt5
Hello,
Quoted 6 lines · Lothar Felten
Add a target configuration for the beaglebone that supports the SGX530 graphics acceleration and builds the qt5 demos with the eglfs backend. The imagination technologies demos and fbv are also included. The linux kernel is based on the omap2plus defconfig, a config fragment adds the required settings for SGX accelerator support.
Quoted 8 lines
Signed-off-by Lothar Felten <[email protected]>--- board/beaglebone/linux-4.1-sgx.fragment | 12 ++++++++++ board/beaglebone/readme.txt | 2 +- configs/beaglebone_qt5_defconfig | 39 +++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 board/beaglebone/linux-4.1-sgx.fragment create mode 100644 configs/beaglebone_qt5_defconfig
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 configs: update beaglebone_defconfig
In reply to Lothar FeltenHello,
Quoted 21 lines · Lothar Felten
This patch updates the target config for the beaglebone based on the AM335x CPU. It also supports the beagleboneblack, the TI evm and evmsk. Device tree blobs for am335x-evm, am335x-evmsk, am335x-bone, am335x-boneblack will be built and a sd card image is created with a post-image script. The kernel and driver versions match the ti-processor-sdk 02.00.00.00. Patches allow the use of old AM335x evm revisions (1 bit sd card) and JTAG debugging.
Kernel JTAG patch:
By default the kernel will disable the JTAG clock, access via the JTAG port will not work after the kernel booted. The AM335x-evm has a JTAG header fitted, this patch keeps the JTAG clock alive.Uboot SD card patch:
Early AM335x-evm boards can only use 1 bit communication to the SD card, on newer board revisions this might be fixed.
Forcing 1 bit communication slows down the communication but will work regardless if the SD card is attached via 1 or 4 bits.
If the board has a working 4 bit SD card interface, this patch can be removed, this will speed up the access.
Quoted 1 line
Signed-off-by Lothar Felten <[email protected]>
Thanks, I've applied your patch. However, after discussing with Peter, I removed the 1-bit MMC patch. Indeed, this defconfig is mainly used by BeagleBone users, and this platform is not affected by the 1-bit problem. Therefore, we found it to be really annoying to reduce their MMC performance in U-Boot by a factor of four just because some early 335x EVM boards that almost nobody has access to are broken.
If you really want to have a nice support for these early broken boards, then we recommend you to cook a U-Boot patch that detects the board revision, and applies the quirk only in this case. Such a quirk can be upstreamed in U-Boot.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com