From patchwork Fri Oct 12 22:41:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Sheriker X-Patchwork-Id: 983331 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W/9v3PXx"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42X2tp6CNjz9s3l for ; Sat, 13 Oct 2018 09:43:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-ID:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=GrGPQ8KBTErS0XWatr8F1AcoJGHcsqnvxZJj1jLhXoo=; b=W/9v3PXxXslhoTcoBGVcnPzDmh ISFNivK73bIZ47eLfjlktMLH0kV1o1ALpM7qEJrejvthmXkEZdQHAY/QCl40Muk9IY0yLPFZFRvAX Q1LiXieDjLXiWZuPiFSAJ3ys68Ug9QgXAdTUv2OfZHs0V5XfWfcmQnDH7D0gUVRwvAYA1pATpop3c whHWTKF7Y/HIjIUOGOpW5mh+zz7DIIPRqAPOT/NfLF68Gw27htFTCv50coxah+Af2XkFcaVl3Hy+i LxKRnadsCcKEe7hQ0M7X1JOvhGFEAdSV+RV71p+BzQlwlzL8yy8GyAQ6UYq5aH1pVoGYNDzAllfXw i/La2neQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gB69j-0006r2-A2; Fri, 12 Oct 2018 22:43:39 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gB67y-00064B-Rs for openwrt-devel@lists.openwrt.org; Fri, 12 Oct 2018 22:41:55 +0000 X-IronPort-AV: E=Sophos;i="5.54,374,1534834800"; d="scan'208";a="22364841" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Oct 2018 15:41:20 -0700 Received: from sandeep-office.microchip.com (10.10.76.4) by chn-sv-exch05.mchp-main.com (10.10.76.106) with Microsoft SMTP Server id 14.3.352.0; Fri, 12 Oct 2018 15:41:19 -0700 From: Sandeep Sheriker Mallikarjun To: Date: Fri, 12 Oct 2018 15:41:18 -0700 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181012_154150_935940_7A3AB725 X-CRM114-Status: UNSURE ( 7.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [68.232.147.91 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [openwrt-devel][PATCH 8/8] at91: Add uboot environment's X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Add uboot environment's to sdcard image. Signed-off-by: Sandeep Sheriker Mallikarjun --- target/linux/at91/image/Makefile | 16 ++++++++++++++-- target/linux/at91/image/uboot-env.txt | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 target/linux/at91/image/uboot-env.txt diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile index 6c22c38..7bf9be5 100644 --- a/target/linux/at91/image/Makefile +++ b/target/linux/at91/image/Makefile @@ -62,7 +62,11 @@ define Build/at91-sdcard mcopy -i $@.boot \ $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \ - ::$(DEVICE_NAME:at91-%=%)-fit.itb , + ::$(DEVICE_NAME:at91-%=%)-fit.itb + + sed -i '2d;3d' ./uboot-env.txt + sed -i '2i board='"$(DEVICE_NAME:at91-%=%)"'' ./uboot-env.txt + sed -i '3i board_name='"$(DEVICE_NAME:at91-%=%)"'' ./uboot-env.txt , mcopy -i $@.boot $(BIN_DIR)/u-boot-*_mmc/u-boot.bin ::u-boot.bin @@ -70,7 +74,15 @@ define Build/at91-sdcard $(BIN_DIR)/at91bootstrap-*sd*/at91bootstrap.bin ::BOOT.bin mcopy -i $@.boot \ - $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb ::$(DEVICE_NAME)-fit.itb) + $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb ::$(DEVICE_NAME)-fit.itb + + sed -i '2d;3d' ./uboot-env.txt + sed -i '2i board='"$(DEVICE_NAME)"'' ./uboot-env.txt + sed -i '3i board_name='"$(DEVICE_NAME)"'' ./uboot-env.txt) + + mkenvimage -s 0x4000 -o $(BIN_DIR)/uboot.env ./uboot-env.txt + + mcopy -i $@.boot $(BIN_DIR)/uboot.env ::uboot.env ./gen_at91_sdcard_img.sh \ $@.img \ diff --git a/target/linux/at91/image/uboot-env.txt b/target/linux/at91/image/uboot-env.txt new file mode 100644 index 0000000..6eb859c --- /dev/null +++ b/target/linux/at91/image/uboot-env.txt @@ -0,0 +1,14 @@ +/* Do Not remove First 2 lines, Makefile will modify these lines with proper board names */ +board=at91sam9x25ek +board_name=at91sam9x25ek +bootargs=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 +bootargsd2=console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4 +bootargsxx=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 +bootcmd=run setbootargs; run fatload_mmc; bootm 0x21000000 +bootdelay=1 +fatload_mmc=if test ${board_name} = sama5d2_xplained; then fatload mmc 1:1 0x21000000 ${board_name}-fit.itb; else fatload mmc 0:1 0x21000000 ${board_name}-fit.itb; fi +setbootargs=if test ${board_name} = sama5d2_xplained; then setenv bootargs ${bootargsd2}; else setenv bootargs ${bootargsxx}; fi +ethact=gmac0 +stderr=serial +stdin=serial +stdout=serial