From patchwork Tue Feb 19 12:09:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harkin X-Patchwork-Id: 14982 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8334723E1F for ; Tue, 19 Feb 2013 12:09:45 +0000 (UTC) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by fiordland.canonical.com (Postfix) with ESMTP id 32774A188E9 for ; Tue, 19 Feb 2013 12:09:45 +0000 (UTC) Received: by mail-ve0-f170.google.com with SMTP id 14so5740700vea.15 for ; Tue, 19 Feb 2013 04:09:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:subject:date:message-id:x-mailer :x-gm-message-state; bh=Yj6nZbTTgC3oALsBUkuXCt83oe6Wrwc6/QoN5UcQ2KQ=; b=mLd1ZoEfQtRzXQ9qVRur1JmwJ7M86/vdS2THAEIHNumG5BvnrIW0gh8r2efgT7OnQs F3ZJeefALS0jHYTh7/XEeaSKPpOpqmt4GZ82jwDyhDXia95TFKLSkMjs4Gt3C732Pggt hmqNg5LqZegc7heAvHr/rfg1abPLBHV9gce00VMPEixO3/NH5kviXGgWCwWTWh2uNc2i 3dEqvLtA3cKnGcgU2cIUaQgbpqw96gwpIhz5Ca/3svw1bvCt0svLHQu1qsp07dC84x6M Cr4891Kb2pEpv468lgLsF/z2mZGLTfe4q5QBpo28HxNerKfvZ3gGuAg5xnDhfdTVfta0 JP6A== X-Received: by 10.52.29.18 with SMTP id f18mr12886267vdh.57.1361275784717; Tue, 19 Feb 2013 04:09:44 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp137884veb; Tue, 19 Feb 2013 04:09:43 -0800 (PST) X-Received: by 10.194.235.196 with SMTP id uo4mr25674759wjc.30.1361275782398; Tue, 19 Feb 2013 04:09:42 -0800 (PST) Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]) by mx.google.com with ESMTPS id uz4si23331668wjc.251.2013.02.19.04.09.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 04:09:42 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22a is neither permitted nor denied by best guess record for domain of ryan.harkin@linaro.org) client-ip=2a00:1450:400c:c05::22a; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::22a is neither permitted nor denied by best guess record for domain of ryan.harkin@linaro.org) smtp.mail=ryan.harkin@linaro.org Received: by mail-wi0-f170.google.com with SMTP id hm11so4900532wib.5 for ; Tue, 19 Feb 2013 04:09:39 -0800 (PST) X-Received: by 10.194.122.131 with SMTP id ls3mr25724467wjb.55.1361275773903; Tue, 19 Feb 2013 04:09:33 -0800 (PST) Received: from qpc.config (46-65-80-248.zone16.bethere.co.uk. [46.65.80.248]) by mx.google.com with ESMTPS id q13sm26465933wie.0.2013.02.19.04.09.32 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 04:09:33 -0800 (PST) From: Ryan Harkin To: ryan.harkin@linaro.org, boot-architecture@lists.linaro.org, patches@linaro.org, linaro-enterprise@lists.linaro.org, olivier.martin@arm.com Subject: [PATCH] MdeModulePkg/PartitionDxe: hack MBR unique signature to zero Date: Tue, 19 Feb 2013 12:09:28 +0000 Message-Id: <1361275768-21616-1-git-send-email-ryan.harkin@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQk4rf98zAK+ZttKIXcwzskaGggs9oPRGWwpgPITnC8mCDJXtdyWvJFCVl9v8LuR8xReIwss This is a hack and is not intended to go upstream, but will be useful for Linaro's short term goals. Linaro's development boards use SD cards, currently we have a problem where each unique SD card has a different UUID when created with linaro-media-create / linaro-android-media create. This means that no one Boot Device configuration can boot Linaro images without some manual intervention from the user. This hack will zero the signature (UUID) read from the card meaning that all SD cards will appear to be the same card. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin --- MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c index 4c64663..ef16396 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c @@ -155,6 +155,15 @@ PartitionInstallMbrChildHandles ( BlockSize, Mbr ); + + // RMH - hack - Linaro's development boards use SD cards, currently we have + // a problem where each unique SD card has a different UUID when created + // with linaro-media-create / linaro-android-media create. + // This means that no one Boot Device configuration can boot Linaro images + // without some manual intervention from the user. + // This hack will zero the signature (UUID) read from the card. + ZeroMem(&(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature)); + if (EFI_ERROR (Status)) { Found = Status; goto Done;