From patchwork Wed Mar 9 10:09:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 63713 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2560515lbc; Wed, 9 Mar 2016 02:15:38 -0800 (PST) X-Received: by 10.28.221.9 with SMTP id u9mr18842977wmg.92.1457518538702; Wed, 09 Mar 2016 02:15:38 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id j12si9089794wjn.187.2016.03.09.02.15.38; Wed, 09 Mar 2016 02:15:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 19F17A7731; Wed, 9 Mar 2016 11:14:28 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZmtxhwW6P5Sl; Wed, 9 Mar 2016 11:14:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4B400A774C; Wed, 9 Mar 2016 11:14:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59F02A7722 for ; Wed, 9 Mar 2016 11:13:56 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NR_lw7VUtDiH for ; Wed, 9 Mar 2016 11:13:56 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id AFB5EA76FD for ; Wed, 9 Mar 2016 11:13:46 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u29ADiOb029647; Wed, 9 Mar 2016 04:13:44 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u29ADiYq011490; Wed, 9 Mar 2016 04:13:44 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Wed, 9 Mar 2016 04:13:43 -0600 Received: from a0131933.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u29ADHLq023115; Wed, 9 Mar 2016 04:13:41 -0600 From: Lokesh Vutla To: , Date: Wed, 9 Mar 2016 15:39:38 +0530 Message-ID: <1457518179-25947-10-git-send-email-lokeshvutla@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1457518179-25947-1-git-send-email-lokeshvutla@ti.com> References: <1457518179-25947-1-git-send-email-lokeshvutla@ti.com> MIME-Version: 1.0 Cc: Sekhar Nori , ceh@ti.com, Tero Kristo , yan-liu@ti.com Subject: [U-Boot] [PATCH 09/10] keystone2: env: add env script for booting with an initramfs with firmware X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Murali Karicheri This patch updates the env script to include a initramfs with firmware loaded and provided to kernel through second argument of bootz command during boot. Defined DEFAULT_FW_INITRAMFS_BOOT_ENV to have all of the required env variables and use it in evm specific config file. The K2 linux drivers for PCIe and NetCP (1G, 10G) requires serdes firmwares. These requires firmware to be available early through the boot process in some cases to satisfy firmware requests from driver. Hence use a small initramfs to provide the same and update boot env to accommodate this in the boot flow. This method is used when rootfs is nfs and ubifs. This fs contains just lib/firmware folder with all required firmware. When rootfs is on initramfs, then the filesystem has the firmware under lib/firmware and this early initramfs is not required and is not used. Signed-off-by: Murali Karicheri Signed-off-by: Lokesh Vutla --- include/configs/k2e_evm.h | 1 + include/configs/k2g_evm.h | 2 ++ include/configs/k2hk_evm.h | 1 + include/configs/k2l_evm.h | 1 + include/configs/ti_armv7_keystone2.h | 15 ++++++++++++--- 5 files changed, 17 insertions(+), 3 deletions(-) -- 2.1.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h index e053a54..daf37f6 100644 --- a/include/configs/k2e_evm.h +++ b/include/configs/k2e_evm.h @@ -16,6 +16,7 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DEFAULT_FW_INITRAMFS_BOOT_ENV \ "addr_mon=0x0c140000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index 2c70df1..2e47763 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -21,6 +21,7 @@ "console=ttyS0,115200n8\0" \ "bootpart=0:2\0" \ "bootdir=/boot\0" \ + "rd_spec=-\0" \ "addr_mon=0x0c040000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ @@ -34,6 +35,7 @@ "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ "${bootdir}/${name_kern}\0" \ "get_mon_mmc=load mmc ${bootpart} ${addr_mon} ${bootdir}/${name_mon}\0"\ + "name_fs=arago-base-tisdk-image-k2g-evm.cpio\0" #define CONFIG_BOOTCOMMAND \ "run envboot; " \ diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index 3cd2a85..a031ae4 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -16,6 +16,7 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DEFAULT_FW_INITRAMFS_BOOT_ENV \ "addr_mon=0x0c5f0000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h index 9bacfa4..829daa2 100644 --- a/include/configs/k2l_evm.h +++ b/include/configs/k2l_evm.h @@ -16,6 +16,7 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DEFAULT_FW_INITRAMFS_BOOT_ENV \ "addr_mon=0x0c140000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,4096\0" \ diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index e1effc0..9ea6392 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -224,6 +224,15 @@ /* EDMA3 */ #define CONFIG_TI_EDMA3 +#define DEFAULT_FW_INITRAMFS_BOOT_ENV \ + "name_fw_rd=k2-fw-initrd.cpio.gz\0" \ + "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \ + "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \ + "run set_rd_spec\0" \ + "init_fw_rd_ramfs=setenv rd_spec -\0" \ + "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \ + "run set_rd_spec\0" \ + #define DEFAULT_PMMC_BOOT_ENV \ "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \ "dev_pmmc=0\0" \ @@ -249,7 +258,7 @@ "addr_secdb_key=0xc000000\0" \ "name_kern=zImage\0" \ "run_mon=mon_install ${addr_mon}\0" \ - "run_kern=bootz ${loadaddr} - ${fdtaddr}\0" \ + "run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ "init_net=run args_all args_net\0" \ "init_ubi=run args_all args_ubi; " \ "ubi part ubifs; ubifsmount ubi:rootfs;\0" \ @@ -286,8 +295,8 @@ #ifndef CONFIG_BOOTCOMMAND #define CONFIG_BOOTCOMMAND \ - "run init_${boot} get_fdt_${boot} get_mon_${boot} " \ - "get_kern_${boot} run_mon run_kern" + "run init_${boot} init_fw_rd_${boot} get_fdt_${boot} " \ + "get_mon_${boot} get_kern_${boot} run_mon run_kern" #endif #define CONFIG_BOOTARGS \