From 0803bcf8a974fb242175c26dd61b4158d02d24cb Mon Sep 17 00:00:00 2001 From: Pierre-Jean TEXIER Date: Sun, 1 Apr 2018 00:49:05 +0200 Subject: warp7: configs: enable CONFIG_CMD_FS_GENERIC This enable generic file system commands (load, ls). Signed-off-by: Pierre-Jean TEXIER Reviewed-by: Fabio Estevam Acked-by: Bryan O'Donoghue --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 3901a2741b..b04814804a 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DFU_MMC=y CONFIG_FSL_ESDHC=y -- cgit From c727bba74a44dd49d71fa3fab9f57ed1e0c277d3 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 24 Apr 2018 18:46:34 +0100 Subject: warp7: defconfig: Enable OPTEE for WaRP7 Requires setting CONFIG_OPTEE=y and setting an OPTEE TrustZone DRAM base in include/configs/warp7.h. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index b04814804a..c72e6b3f4e 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -44,3 +44,4 @@ CONFIG_USB_ETHER=y CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y +CONFIG_OPTEE=y -- cgit From 4bcbfcf458744a84bd82bd7239593f371574bd2c Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 24 Apr 2018 18:46:37 +0100 Subject: warp7: Specify CONFIG_OPTEE_LOAD_ADDR In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. This patch makes the OPTEE_LOAD_ADDR available via u-boot.cfg for further parsing by external tools. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index c72e6b3f4e..8152e8e959 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -45,3 +45,4 @@ CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y +CONFIG_OPTEE_LOAD_ADDR=0x84000000 -- cgit From 9fb2c1faa18201ab1fb7efed4140eff97b453870 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 24 Apr 2018 18:46:38 +0100 Subject: warp7: defconfig: Enable CONFIG_SECURE_BOOT Various function associated with booting the WaRP7 in High Assurance Boot (HAB) mode are enabled by switching on CONFIG_SECURE_BOOT. This patch enables CONFIG_SECURE_BOOT for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 8152e8e959..2e65b8da6e 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_MX7=y +CONFIG_SECURE_BOOT=y CONFIG_SYS_TEXT_BASE=0x87800000 CONFIG_TARGET_WARP7=y # CONFIG_ARMV7_VIRT is not set -- cgit From 42fcabdb26ca009db7cda97b3199fc57105377b3 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 24 Apr 2018 18:46:39 +0100 Subject: warp7: defconfig: Enable CONFIG_BOOTM_TEE This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to chain-load Linux through OPTEE. Loading kernel to 0x80800000 => run loadimage Load FDT to 0x83000000 => run loadfdt Load OPTEE to 0x84000000 => fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee Then chain-load to the kernel via OPTEE => bootm 0x84000000 - 0x83000000 Image Name: Image Type: ARM Trusted Execution Environment Kernel Image (uncompressed) Data Size: 249844 Bytes = 244 KiB Load Address: 9dffffe4 Entry Point: 9e000000 Verifying Checksum ... OK Loading Kernel Image ... OK Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 2e65b8da6e..8a8dfc097c 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -47,3 +47,4 @@ CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y CONFIG_OPTEE_LOAD_ADDR=0x84000000 +CONFIG_BOOTM_OPTEE=y -- cgit From baea5ecd26888263bd614ff86f93df89302b3627 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 24 Apr 2018 18:46:46 +0100 Subject: warp7: defconfig: Enable CMD_SETEXPR setexpr allows us to do arithmetic for env variables - something that is both useful and required when doing HAB authentication without hard-coding HAB load addresses. This patch enables CMD_SETEXPR for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 8a8dfc097c..16631a4d55 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -20,7 +20,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_SETEXPR=y CONFIG_CMD_DHCP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y -- cgit From e426e193539e4fa5f52bc55499f66c4159a3372d Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 24 Apr 2018 18:44:30 +0100 Subject: warp7: defconfig: Fix CAAM on boot with tip-of-tree Booting the following image with tip-of-tree we get a CAAM DECO error (and subsequent crash due to a kernel bug in 4.1). http://freescale.github.io/#download -> BoardsWaRPboard community - WaRP - Wearable Reference PlatformFSL Community BSP 2.3fsl-image-multimediawayland Image: fsl-image-multimedia-imx7s-warp-20180323-90.rootfs.sdcard Error: caam 30900000.caam: Entropy delay = 3200 caam 30900000.caam: failed to acquire DECO 0 caam 30900000.caam: failed to acquire DECO 0 caam 30900000.caam: Entropy delay = 12400 caam 30900000.caam: failed to acquire DECO 0 caam 30900000.caam: failed to instantiate RNG ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at /home/jenkins/workspace/fsl-community-bsp-pyro_xwayland_2/build/tmp/work-shared/imx7s-warp/kernel-source/mm/vmalloc.c:1465 caam_remove+0x6) Trying to vfree() nonexistent vm area (88047000) Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.36-4.1-1.0.x-imx-warp7+ga543d1b #1 Hardware name: Freescale i.MX7 Dual (Device Tree) [<80015d54>] (unwind_backtrace) from [<80012688>] (show_stack+0x10/0x14) [<80012688>] (show_stack) from [<8076e810>] (dump_stack+0x78/0x8c) [<8076e810>] (dump_stack) from [<800346a0>] (warn_slowpath_common+0x80/0xb0) [<800346a0>] (warn_slowpath_common) from [<80034700>] (warn_slowpath_fmt+0x30/0x40) [<80034700>] (warn_slowpath_fmt) from [<8054c278>] (caam_remove+0x6c/0x3f4) [<8054c278>] (caam_remove) from [<8054ce74>] (caam_probe+0x874/0xfa8) [<8054ce74>] (caam_probe) from [<80382a7c>] (platform_drv_probe+0x48/0xa4) [<80382a7c>] (platform_drv_probe) from [<80381328>] (driver_probe_device+0x174/0x2a8) [<80381328>] (driver_probe_device) from [<8038152c>] (__driver_attach+0x8c/0x90) [<8038152c>] (__driver_attach) from [<8037f9d4>] (bus_for_each_dev+0x68/0x9c) [<8037f9d4>] (bus_for_each_dev) from [<80380a68>] (bus_add_driver+0xf4/0x1e8) [<80380a68>] (bus_add_driver) from [<80381b38>] (driver_register+0x78/0xf4) [<80381b38>] (driver_register) from [<80009738>] (do_one_initcall+0x8c/0x1d0) [<80009738>] (do_one_initcall) from [<80a66dac>] (kernel_init_freeable+0x140/0x1d0) [<80a66dac>] (kernel_init_freeable) from [<8076aa38>] (kernel_init+0x8/0xe8) [<8076aa38>] (kernel_init) from [<8000f468>] (ret_from_fork+0x14/0x2c) ---[ end trace d5f941204ed8cb28 ]--- caam: probe of 30900000.caam failed with error -11 Unable to handle kernel NULL pointer dereference at virtual address 00000004 pgd = 80004000 [00000004] *pgd=00000000 Internal error: Oops: 805 [#1] PREEMPT SMP ARM [<8055cdf8>] (caam_sm_startup) from [<80aa83c8>] (caam_sm_init+0x50/0x58) [<80aa83c8>] (caam_sm_init) from [<80009738>] (do_one_initcall+0x8c/0x1d0) [<80009738>] (do_one_initcall) from [<80a66dac>] (kernel_init_freeable+0x140/0x1d0) [<80a66dac>] (kernel_init_freeable) from [<8076aa38>] (kernel_init+0x8/0xe8) [<8076aa38>] (kernel_init) from [<8000f468>] (ret_from_fork+0x14/0x2c) Code: e59d300c e2832010 e5843008 e5834068 (e58a2004) ---[ end trace d5f941204ed8cb29 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Fix: Enable the CAAM correctly by setting CONFIG_ARMV7_BOOT_SEC_DEFAULT=y in the upstream defconfig. Signed-off-by: Bryan O'Donoghue Cc: Fabio Estevam Cc: Breno Lima Reviewed-by: Fabio Estevam Tested-by: Breno Lima --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/warp7_defconfig') diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 16631a4d55..b936f4aab1 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -3,6 +3,7 @@ CONFIG_ARCH_MX7=y CONFIG_SECURE_BOOT=y CONFIG_SYS_TEXT_BASE=0x87800000 CONFIG_TARGET_WARP7=y +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y # CONFIG_ARMV7_VIRT is not set CONFIG_IMX_RDC=y CONFIG_IMX_BOOTAUX=y -- cgit