From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AASMLph/Q2LySgEAgWs5BA (envelope-from ) for ; Tue, 29 Mar 2022 23:52:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QDAELJh/Q2J1mQAA9RJhRA (envelope-from ) for ; Tue, 29 Mar 2022 23:52:24 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 990783F80F for ; Tue, 29 Mar 2022 23:52:23 +0200 (CEST) Received: from localhost ([::1]:39006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZJlG-0008I4-Qq for larch@yhetil.org; Tue, 29 Mar 2022 17:52:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZJl3-0008HE-5S for help-guix@gnu.org; Tue, 29 Mar 2022 17:52:09 -0400 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZJkz-0001PW-W4 for help-guix@gnu.org; Tue, 29 Mar 2022 17:52:07 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1648590723; cv=none; d=zohomail.com; s=zohoarc; b=iFCLvnZour4E8bYS6/Rkw9cUmmQUFoXCIJ+ZttWW3Cyq7E3CjASACydSuZsy9bE7K3u17XA0QDRDNcuj28i+OfpGN5YyGRi7LhjNeCsAPPtLLz544rhQkj1T/61poWqJJFXBMXuhrXINb+b5sJVmu2HnshfNz/FBl6f/kmUxNOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648590723; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=o2Hia6C2OKKibcxeLfjQZ2NlrbftIz+PznFz4T40Sdk=; b=HrrSU96BdVckho6ZzOkwoQz3/aW0mwxqf5soVDIoQgc2efEFQp6ngVPFjFzWeIAQZeSLrAR4o08aGkp497F7Id36TmzLFVDvML/NRllJqjjfNDSReLJzfmiv96R9FfqhGC4h0/Lr5cWPAJMRRUXTLLkVpbD5crpuxXZEKSp2Xs4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1648590723; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=o2Hia6C2OKKibcxeLfjQZ2NlrbftIz+PznFz4T40Sdk=; b=HDb6fVh29xMrAYwN7cyj44EwP71J/GmY+ZQCNqyKe+jmfYEnEkP27NpKILAXi6fh WKZMgqCbDHMluKO4XoQktR7ZV2Mc/Flshxlg6HY7X1SCxXXABeReOFxEYO+479P4i2G R6sOURedZmpfUaB+OPYUWJHcwFkUfG7emu1bsk0g= Received: from localhost (248-110-142-46.pool.kielnet.net [46.142.110.248]) by mx.zohomail.com with SMTPS id 1648590717648922.8836087060353; Tue, 29 Mar 2022 14:51:57 -0700 (PDT) References: <87h78g1qu5.fsf@mdc-berlin.de> <871qzkfc9j.fsf@contorta> User-agent: mu4e 1.6.10; emacs 28.0.50 From: Ricardo Wurmus To: Vagrant Cascadian Subject: Re: cannot boot from microSD card on aarch64 machine Date: Tue, 29 Mar 2022 23:45:54 +0200 In-reply-to: <871qzkfc9j.fsf@contorta> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87sfr077gl.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.50; envelope-from=rekado@elephly.net; helo=sender4-of-o50.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648590744; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=o2Hia6C2OKKibcxeLfjQZ2NlrbftIz+PznFz4T40Sdk=; b=kPgI5hiim0fqUKajZqXxSVABjP7ZM/wsahlJDecdenFWentkNPuwwNZUHfHolYTbetPbta M/J7kHStSv5IuokuAgWcM65SAvnuIbvnqMq1iW5WDEOCtk0d/ZAj5AwVRGjeBmPwemKxjc xvL+MMA+GZf9T4xDttvCy2d4jUmwblX4bFzsfJ18ILE1RenznutMPrGxdKbm+RB8l5l9NJ UbWzpsjvhAKL4HXMA6fMPGlSB66CvOQpHq87eOYKVt/zCS2bGyBsm4+x9YEAgjL4jVb/ur dwRvycbfAKkh7jEK2NtatkmrSykJuS33uatSaFa5cFZdc2+QNgIa0dQkjMbJ/g== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1648590744; a=rsa-sha256; cv=pass; b=TGvgK39Dej9XWEQfqYlCGOnJDFk8U6c6RVpGFbqgM1Lb5+qisvtJU0/7Q/LmLDuoagaifY PAOS+Pax0lQ0HFGQrwaikykgPX8S0RNPJ7dzJvuXNuSbNq0KxrTwt2qch5QucYO6+tFc8Z iVcSV0lw1dwdPxeQvRcvvr3L/pkvL3o87X2gwHamUqoCVPPwMgEw6yTRob83zfZh3ZbqsL UZ8+bJnpeEs7Zc/zzJL8zbe6zVZS/P0BbsnpwVa3X23ePEm8ZINOhK3alTzjA42akIjQG9 KCW24eRsnEXAlIH6BOYSLlTa+TUrvrNWjoHu3wbzklBt4Yq5L3uOC+J1w9Ghlg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=HDb6fVh2; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.17 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=HDb6fVh2; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 990783F80F X-Spam-Score: -6.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: haVRLf6cHgQi Hi Vagrant, > On 2022-03-02, Ricardo Wurmus wrote: >> I got myself a rockpro64 board. > ... >> So I then decided to build my own system and install a new u-boot onto >> the microSD card. Here=E2=80=99s the system I built: > ... >> (bootloader (bootloader-configuration >> (bootloader u-boot-rockpro64-rk3399-bootloader) >> ;; SD card/eMMC (SD priority) storage >> (target "/dev/mmcblk1"))) > > You need to leave a pretty generous gap at the partition table of your > microSD, either a GPT partition table with various partitions for the > various u-boot bits: > > http://opensource.rock-chips.com/wiki_Partitions > > or an MBR partition table with the first partition starting at sector > 32768, and the previous sectors empty. > > Otherwise, the u-boot installation may clobber parts of your partition > table or vice-versa. Thank you, this was interesting. I still don=E2=80=99t quite understand how the partition layout relates to = what Guix does when it writes the files to the offsets. I tried building this exact partition table (the default settings of partitioning tools force some other sector alignment, which makes this impossible without overriding alignment settings in expert mode) and then used dd to write the u-boot files to the partitions, but I wasn=E2=80=99t successful as the microsd card seemed not to work at all. Using dd to copy the two files to the expected offsets did let me into u-boot and allowed me to boot from USB. I haven=E2=80=99t yet tried puttin= g the system on a partition on the microsd card, because I=E2=80=99m still confus= ed about how I should build the partition table. > Also, if you have a different u-boot installed to SPI or eMMC, those > will take priority over microSD on most rockchip platforms. Good to know. No u-boot has been installed to SPI yet. >> Does it perhaps install the u-boot files at the wrong offsets? How >> would I begin to debug this? > > It is also entirely possible something is wrong with rockpro64 u-boot > offsets or u-boot itself ... been a while since I've tested. When I used the same offsets with dd it works fine. So I=E2=80=99m clearly missing some information about how to prepare the microsd card. --=20 Ricardo