From patchwork Fri Aug 31 11:58:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 964419 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 421z6b3hF7z9s2P for ; Fri, 31 Aug 2018 22:23:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 26930C21DFA; Fri, 31 Aug 2018 11:58:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A2A9BC21D8A; Fri, 31 Aug 2018 11:58:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D66ABC21C3F; Fri, 31 Aug 2018 11:58:44 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 7B111C21C27 for ; Fri, 31 Aug 2018 11:58:44 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 421yYw1Zwzz1qvnC; Fri, 31 Aug 2018 13:58:44 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 421yYv6kvNz1qqkT; Fri, 31 Aug 2018 13:58:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id j8Lp6sn9tQeX; Fri, 31 Aug 2018 13:58:43 +0200 (CEST) X-Auth-Info: pjDGBgDfqrcqCI1tSo76JF780cADphwuLyTtR99ECE4= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 31 Aug 2018 13:58:43 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Fri, 31 Aug 2018 13:58:25 +0200 Message-Id: <20180831115828.15831-1-lukma@denx.de> X-Mailer: git-send-email 2.11.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 1/4] ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The 'rootpath' can be provided by DHCP server. Removing this line prevents from overwriting it. To do that on the DHCP server side (isc-dhcp-server) modify dhcpd.conf and add 'option root-path "192.168.X.Y:/srv/tftp/rootfs";' Signed-off-by: Lukasz Majewski --- board/k+p/bootscripts/tpcboot.cmd | 1 - 1 file changed, 1 deletion(-) diff --git a/board/k+p/bootscripts/tpcboot.cmd b/board/k+p/bootscripts/tpcboot.cmd index 16b93ebe3f..9290317730 100644 --- a/board/k+p/bootscripts/tpcboot.cmd +++ b/board/k+p/bootscripts/tpcboot.cmd @@ -65,7 +65,6 @@ fi" # # Provide 'boot_nfs' command #------------------------------------------------------------ -setenv rootpath "/srv/tftp/KP/rootfs" setenv nfsargs "setenv bootargs root=/dev/nfs rw \ nfsroot=${serverip}:${rootpath},nolock,nfsvers=3" setenv addip "setenv bootargs ${bootargs} \ From patchwork Fri Aug 31 11:58:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 964416 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 421z0t4948z9s47 for ; Fri, 31 Aug 2018 22:18:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7B8F3C21E3E; Fri, 31 Aug 2018 11:59:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8B15FC21DED; Fri, 31 Aug 2018 11:58:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8DE65C21D83; Fri, 31 Aug 2018 11:58:46 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 6A389C21C27 for ; Fri, 31 Aug 2018 11:58:45 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 421yYx1fDlz1qxQN; Fri, 31 Aug 2018 13:58:45 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 421yYx0k2kz1qrWP; Fri, 31 Aug 2018 13:58:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id amqvQSS3HRBX; Fri, 31 Aug 2018 13:58:44 +0200 (CEST) X-Auth-Info: gkAxDuVTESx95uhNfeHEab6X5IaS9wJi7x+rcKTN+us= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 31 Aug 2018 13:58:44 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Fri, 31 Aug 2018 13:58:26 +0200 Message-Id: <20180831115828.15831-2-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180831115828.15831-1-lukma@denx.de> References: <20180831115828.15831-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH 2/4] ARM: bootscript: Replace tftpboot with dhcp when downloading kernel X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The 'dhcp' command is more versatile as it allows working with the DHCP server to obtain serverip, ipaddress and other network parameters. The configuration necessary to obtain the serverip (dhcpd.conf): option option-150 code 150 = ip-address; and in the subnet definition: option option-150 192.168.X.Y; Signed-off-by: Lukasz Majewski --- board/k+p/bootscripts/tpcboot.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/k+p/bootscripts/tpcboot.cmd b/board/k+p/bootscripts/tpcboot.cmd index 9290317730..ebd2d4ec2a 100644 --- a/board/k+p/bootscripts/tpcboot.cmd +++ b/board/k+p/bootscripts/tpcboot.cmd @@ -52,7 +52,7 @@ fi;" # # Provide 'boot_tftp_kernel' command #------------------------------------------------------------ -setenv download_kernel "tftpboot ${loadaddr} ${kernel_file}" +setenv download_kernel "dhcp ${loadaddr} ${kernel_file}" setenv boot_tftp_kernel " if run download_kernel; then From patchwork Fri Aug 31 11:58:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 964418 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 421z0t5kPbz9s55 for ; Fri, 31 Aug 2018 22:18:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1A1B4C21D8A; Fri, 31 Aug 2018 11:59:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3DF54C21E12; Fri, 31 Aug 2018 11:58:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BBFC9C21DAF; Fri, 31 Aug 2018 11:58:50 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 91D5BC21DD4 for ; Fri, 31 Aug 2018 11:58:47 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 421yYz31vpz1qvp3; Fri, 31 Aug 2018 13:58:47 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 421yYz2g2Jz1qqkT; Fri, 31 Aug 2018 13:58:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id U4_QB6kjooH2; Fri, 31 Aug 2018 13:58:46 +0200 (CEST) X-Auth-Info: +1AaB2yfJDLChkVUspl+Q7etMTdLv74BOMseKcfrcPw= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 31 Aug 2018 13:58:46 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Fri, 31 Aug 2018 13:58:28 +0200 Message-Id: <20180831115828.15831-4-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180831115828.15831-1-lukma@denx.de> References: <20180831115828.15831-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH 4/4] ARM: bootscript: For nfsargs only use rootpath (and remove not needed serverip) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The serverip part is provided from DHCP server with 'option root-path "192.168.3.1:/srv/tftp/rootfs";' parameter in dhcpd.conf Signed-off-by: Lukasz Majewski --- board/k+p/bootscripts/tpcboot.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/k+p/bootscripts/tpcboot.cmd b/board/k+p/bootscripts/tpcboot.cmd index e26fd72825..0576e81140 100644 --- a/board/k+p/bootscripts/tpcboot.cmd +++ b/board/k+p/bootscripts/tpcboot.cmd @@ -65,7 +65,7 @@ fi" # # Provide 'boot_nfs' command #------------------------------------------------------------ -setenv nfsargs "setenv bootargs root=/dev/nfs rw nfsroot='${serverip}':'${rootpath}',nolock,nfsvers=3" +setenv nfsargs "setenv bootargs root=/dev/nfs rw nfsroot='${rootpath}',nolock,nfsvers=3" setenv addip "setenv bootargs '${bootargs}' ip='${ipaddr}':'${serverip}':'${gatewayip}':'${netmask}':'${hostname}':eth0:on" setenv boot_nfs "