From patchwork Tue Oct 18 21:52:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 120527 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 7DA0B1007E2 for ; Wed, 19 Oct 2011 08:52:47 +1100 (EST) Received: from kryten (ppp121-44-79-234.lns20.syd6.internode.on.net [121.44.79.234]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPSA id 6C6C8B71B9 for ; Wed, 19 Oct 2011 08:52:42 +1100 (EST) Date: Wed, 19 Oct 2011 08:52:41 +1100 From: Anton Blanchard To: yaboot-devel@lists.ozlabs.org Subject: [PATCH] Fix netboot on POWER5 Message-ID: <20111019085241.2998b8d2@kryten> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.24.4; i686-pc-linux-gnu) Mime-Version: 1.0 X-BeenThere: yaboot-devel@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical and development discussion regarding yaboot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: yaboot-devel-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: yaboot-devel-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org We weren't specifying any network parameters on POWER5 so firmware would BOOTP for everything when we asked it to load a file. This fails on a network without a local BOOTP server. This patch fixes the issue by adding the parameters that the POWER5 tftp package understands. Thanks to Tony for the idea. Signed-off-by: Anton Blanchard Index: yaboot/second/fs_of.c =================================================================== --- yaboot.orig/second/fs_of.c 2011-10-19 08:46:20.711411958 +1100 +++ yaboot/second/fs_of.c 2011-10-19 08:46:26.503512279 +1100 @@ -168,18 +168,19 @@ of_net_open(struct boot_file_t* file, new_tftp = (prom_finddevice("/packages/cas") != PROM_INVALID_HANDLE); DEBUG_F("Using %s tftp style\n", (new_tftp? "new": "old")); - if (new_tftp) { - strcat(buffer, fspec->siaddr); - strcat(buffer, ","); + strcat(buffer, fspec->siaddr); + strcat(buffer, ","); - if (fspec->is_ipv6 && (strstr(filename, "filename=") == NULL)) - strcat(buffer, "filename="); + if (fspec->is_ipv6 && (strstr(filename, "filename=") == NULL)) + strcat(buffer, "filename="); - strcat(buffer, filename); - strcat(buffer, ","); - strcat(buffer, fspec->ciaddr); - strcat(buffer, ","); - strcat(buffer, fspec->giaddr); + strcat(buffer, filename); + strcat(buffer, ","); + strcat(buffer, fspec->ciaddr); + strcat(buffer, ","); + strcat(buffer, fspec->giaddr); + + if (new_tftp) { strcat(buffer, ","); strcat(buffer, fspec->bootp_retries); strcat(buffer, ","); @@ -188,9 +189,6 @@ of_net_open(struct boot_file_t* file, strcat(buffer, fspec->subnetmask); strcat(buffer, ","); strcat(buffer, fspec->addl_params); - } else { - strcat(buffer, ","); - strcat(buffer, filename); } DEBUG_F("Opening: \"%s\"\n", buffer);