From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=lHJpQAa1; spf=pass (domain: linaro.org, ip: 209.85.221.68, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by groups.io with SMTP; Wed, 07 Aug 2019 08:02:21 -0700 Received: by mail-wr1-f68.google.com with SMTP id p13so17141061wru.10 for ; Wed, 07 Aug 2019 08:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bBQy672qtqG+nsw7D9drjb5YKjL7O5NGcz9I9iXWGNo=; b=lHJpQAa1s99StISbBOZqMAPHbNjahaPQgKOtbLfcfL/+xDPm51dhrS+3SJCIw2ssLB a2QuXCH/2omOl7R/8lnFALd0dV8rC+p+TmglaL6EhEfuxIV/R1DtP4VOkt3o4pa5Zlqq DtQ8KMsJ++AZV4PTLu9aGweYp4e8E5lZoVZnxGYWp/l3bvq2PCQZ9xIfgYf8RWxbaR3T lEuf0Xf97wiSqo1DpJ9M1UfN3+y/yIyJgZcfeWoc+3zTBIzw4wkL0fKO1/lxe8S5RWjO RJLrO8kDA/rf1FxOyoGL6vGco0bx4siLpxL/kQHXVO1xSjxvVBz7MF2I6GyKWX7WLHTV 0/Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bBQy672qtqG+nsw7D9drjb5YKjL7O5NGcz9I9iXWGNo=; b=Dj8XE/aaJkVQ/AdHfDglwPhy2taa6tOovf5bYrdlydkVWd8MsmCFY4yNbCdAPNwguZ ePEoES16DovkbZudvAGbUO1lCURebTYKNjk+P5sQaKVFBHk4sK1QL79AHZbxCLNeM72I 7gWuoXkML5uwach4DyWoNbSxMqqG0UdQWfM4UWPDteZac+08FtDbnpJro90NlRA0Jqib F4DkB2hsBU/V4eQ33JS7txGf6n/656BnHKkavsqdjcq/2Vhv7tnrHFc018Ki/qXwtUKL Ap3IvjoPrI96OFpQSlK79rAZLmaCPV2KXpObvVNMQmZI0WhZ15LmaGMkFrFbddLE4H3o tLEQ== X-Gm-Message-State: APjAAAWVJTYIhP6stQE8Cs0POVixZ4iH56uEsidelu9yDeToyZPpnOh+ eZ4WPHa+/8twjLfYO2y6jZ4Vlw== X-Google-Smtp-Source: APXvYqw4HWR9cVrlaXKfVi9QFs4NN4Pek4CN78Qk4TIJlOyppOHdgDS/aAW/+1K4rXVwQUJ4BSIuJw== X-Received: by 2002:adf:e4c3:: with SMTP id v3mr11294297wrm.107.1565190139851; Wed, 07 Aug 2019 08:02:19 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id w25sm271837wmk.18.2019.08.07.08.02.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 08:02:19 -0700 (PDT) Date: Wed, 7 Aug 2019 16:02:17 +0100 From: "Leif Lindholm" To: Pete Batard Cc: devel@edk2.groups.io, ard.biesheuvel@linaro.org Subject: Re: [edk2-platforms: PATCH v2 1/1] Platform/RPi3: Add Debian 10 installation in Systems.md Message-ID: <20190807150217.GO25813@bivouac.eciton.net> References: <20190725152248.10212-1-pete@akeo.ie> <20190725152248.10212-2-pete@akeo.ie> <20190806172522.GK25813@bivouac.eciton.net> <7fbd53c0-44f5-4fce-c234-6c55786ed610@akeo.ie> MIME-Version: 1.0 In-Reply-To: <7fbd53c0-44f5-4fce-c234-6c55786ed610@akeo.ie> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Pete, On Wed, Aug 07, 2019 at 03:24:10PM +0100, Pete Batard wrote: > > > +Below are steps you can follow to install Debian 10 onto an SD card: > > > +* Partition the media as MBR and create a ~300 MB partition on it with MBR type `0x0e`. > > > + __Note:__ Make sure that the partition scheme is MBR (not GPT) and the type `0x0e` (not > > > + `0xef` for instance), as the ondie Broadcom bootloader supports neither the GPT scheme nor > > > > ondie -> on-die (or on-SoC may be even more clear to civilians). > > I think I'll use "on-CPU" then, as this should be even more explicit. Works for me. > > > + the ESP MBR type. > > > +* Set the partition as active/bootable. This is needed as the Debian partition manager can > > > + not detect it as ESP otherwise, which we need for GRUB installation. If using `fdisk` on > > > + Linux, you can use the `a` command to set a partition as active. On Windows, you can use > > > + `DISKPART` and then type `active` after selecting the relevant disk and partition. > > > +* Format the partition as FAT. Here again you should make sure that you use FAT rather than > > > + FAT32 else the Debian partition manager will not detect the partition as ESP. If you > > > + are using Windows `DISKPART` then `format fs=fat quick` should do it. On Linux, `mkfs.vfat` > > > + with the default options should do the same as long as the partition isn't too large. > > > > It would be preferable if we could have an actual number here - the > > 12-bit, 16-bit and 32-bit fat size switchover points are known. I > > assume it is the 32-bit breakpoint (2 or 4Gb?) we want to avoid? > > The switchover point actually depends of the utility, since there is overlap > between 12, 16 and 32. But that's not actually a problem with diskpart on > Windows as 'fs=fat' does force FAT16 so you'll get an error if the partition > is too large and can only accommodate FAT32 (which should usually occur past > the 2 GB point). > > In other words, the only potential issue here is with Linux' mkfs.vfat. But > there too we can add a switch (-F 16) to force FAT16, so I'll alter the > documentation to have that, plus a note that mentions that the partition > should be under 2 GB. Sure, this is fine. > I'll also take this opportunity to stress out that the only reason we are > trying to force FAT16 here is because the Debian installer's partition > manager is very temperamental with regards to its detection of an ESP that > doesn't have either the relevant GUID for GPT or type 0xef for MBR, none of > which can be used on a Pi. There are actually cases where I have seen that > utility also detect a FAT32 MBR partition without type 0xef as an ESP. Yeah, well. This is pretty much stacking ice cubes next to a furnace, trying to create an ABI where there is none. Which is fine, because we do need to provide documentation for non-experts - but this is also why it needs to be precise, so we don't mislead experts. > However, I have found out that, in most cases, the presence of FAT32 vs > FAT16 acts as a switch to demote the partition from ESP, which is the reason > why the notes promote the use of FAT16 over FAT32. But as mentioned in the > additional notes however, it's still relatively easy to fix the ESP issue if > you use FAT32 and/or if the Debian partition manager fails to detect it as > ESP. Sure. May be worth adding a forward-pointer to the additional notes from here then? > Now, one can only wish that Broadcom had anticipated UEFI usage for their > hardcoded boot loader, as they'd only needed to have added 0xef, alongside > the other FAT based MBR partition types they recognize for this whole > annoyance to be avoided... In my most optimistic hours, I sometimes dare to hope that the EBBR explicitly stating these requirements will at some point in the future start to make a difference. > I'll send a v3 when I get a chance. Thanks! Regards. Leif