From patchwork Sat Oct 12 18:27:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 283009 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4E6AD2C0084 for ; Sun, 13 Oct 2013 05:28:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37A0E4A07A; Sat, 12 Oct 2013 20:28:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 m7+yjKfYYvFa; Sat, 12 Oct 2013 20:28:27 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 938434A0B8; Sat, 12 Oct 2013 20:28:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E55974A066 for ; Sat, 12 Oct 2013 20:27:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 im1mhe31ekzZ for ; Sat, 12 Oct 2013 20:27:42 +0200 (CEST) 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 mail-yh0-f53.google.com (mail-yh0-f53.google.com [209.85.213.53]) by theia.denx.de (Postfix) with ESMTPS id 486CF4A081 for ; Sat, 12 Oct 2013 20:27:33 +0200 (CEST) Received: by mail-yh0-f53.google.com with SMTP id z20so697351yhz.40 for ; Sat, 12 Oct 2013 11:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :organization; bh=mN3ieGODy5Sk2PnuWftqUAXwVCe8oDHu/qT/GSP+b54=; b=TeNmdgiiriN9RcSioZ33+w09LkDP1G5RSVT/aZPJjZV70xLEVUB029FW89giYz1oH5 ElmMrqj+ddeNOJz/z0YMdkW9xq60HJKy95U7rPj0sq6di/50aHINNRSRCDcLRRXlu9ZR yj1xI1xL7IaxM9oLackTeCISDqhs/pTyceiiRqYtyLkOyBv39xV5a067SqwpYUzExLnn zCIU14MMaQki9teMQ6/zA7Bviar69CxharEI/QxbSkdwCwoQBiUcg6KLKPx6pikMExff KeqaCBK/8npXaIH5f8hLKw2TUcLMCgmQwCEnEteCyV2wXk2FzxCGku1m4pyFJADINZ3D u0MA== X-Received: by 10.236.75.202 with SMTP id z50mr18341520yhd.6.1381602452750; Sat, 12 Oct 2013 11:27:32 -0700 (PDT) Received: from nano.lab.ossystems.com.br ([177.194.208.225]) by mx.google.com with ESMTPSA id r1sm88809380yhf.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Oct 2013 11:27:31 -0700 (PDT) From: Otavio Salvador To: U-Boot Mailing List Date: Sat, 12 Oct 2013 15:27:09 -0300 Message-Id: <1381602429-20912-4-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381602429-20912-1-git-send-email-otavio@ossystems.com.br> References: <1381602429-20912-1-git-send-email-otavio@ossystems.com.br> Organization: O.S. Systems Software LTDA. Cc: Fabio Estevam , Otavio Salvador Subject: [U-Boot] [PATCH 3/3] mx28evk: Extend environment to easy write of NAND system X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This adds following new targets: - update_nand_kernel - update_nand_fdt - update_nand_filesystem and to avoid confusion, the 'update_nand_full' has been renamed to 'update_nand_firmware_full'. Signed-off-by: Otavio Salvador --- include/configs/mx28evk.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index e40df09..5e43226 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -161,6 +161,7 @@ /* Extra Environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ + "ubifs_file=filesystem.ubifs\0" \ "update_nand_full_filename=u-boot.nand\0" \ "update_nand_firmware_filename=u-boot.sb\0" \ "update_nand_firmware_maxsz=0x100000\0" \ @@ -171,7 +172,7 @@ "nand info ; " \ "setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \ "setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \ - "update_nand_full=" /* Update FCB, DBBT and FW */ \ + "update_nand_firmware_full=" /* Update FCB, DBBT and FW */ \ "if tftp ${update_nand_full_filename} ; then " \ "run update_nand_get_fcb_size ; " \ "nand scrub -y 0x0 ${filesize} ; " \ @@ -190,6 +191,38 @@ "nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \ "nand write ${loadaddr} ${fw_off} ${filesize} ; " \ "fi\0" \ + "update_nand_kernel=" /* Update kernel */ \ + "mtdparts default; " \ + "nand erase.part kernel; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${uimage}; " \ + "nand write ${loadaddr} kernel ${filesize}\0" \ + "update_nand_fdt=" /* Update fdt */ \ + "mtdparts default; " \ + "nand erase.part fdt; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${fdt_file}; " \ + "nand write ${loadaddr} fdt ${filesize}\0" \ + "update_nand_filesystem=" /* Update filesystem */ \ + "mtdparts default; " \ + "nand erase.part filesystem; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${ubifs_file}; " \ + "ubi part filesystem; " \ + "ubi create filesystem; " \ + "ubi write ${loadaddr} filesystem ${filesize}\0" \ "nandargs=setenv bootargs console=${console_mainline},${baudrate} " \ "rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \ "nandboot=" /* Boot from NAND */ \