From owner-freebsd-riscv@freebsd.org Wed Dec 9 11:44:44 2020 Return-Path: Delivered-To: freebsd-riscv@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA73F47934E; Wed, 9 Dec 2020 11:44:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrZwD254gz4nj2; Wed, 9 Dec 2020 11:44:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 2106329D88; Wed, 9 Dec 2020 11:44:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id CFC814E18F; Wed, 9 Dec 2020 12:44:42 +0100 (CET) From: "Kristof Provost" To: "Dimitry Andric" Cc: freebsd-riscv@freebsd.org, toolchain@freebsd.org Subject: Re: devel/glib20 build issue Date: Wed, 09 Dec 2020 12:44:42 +0100 X-Mailer: MailMate (1.13.2r5673) Message-ID: In-Reply-To: <3BC510E6-F7FC-4341-B715-66472F3640BF@FreeBSD.org> References: <54177870-E411-4DF1-901E-94FE7E5F553F@FreeBSD.org> <3BC510E6-F7FC-4341-B715-66472F3640BF@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 11:44:44 -0000 On 19 Nov 2020, at 11:59, Dimitry Andric wrote: > On 19 Nov 2020, at 11:57, Kristof Provost wrote: >> >> While trying to build assorted ports on RISC-V I found that >> devel/glib20 doesn’t build. >> It turns out to be due to a missing >> __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 define. That define is implicitly >> set by the toolchain. Or, at least, it is on other platforms (ARM, >> MIPS, x86, …), but not on RISC-V. >> >> That’s likely just been forgotten. The following toolchain patch >> fixes that for me: >> >> diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp >> b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp >> index 4ba703c8dd1..73f1b5bc446 100644 >> --- a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp >> +++ b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp >> @@ -115,8 +115,14 @@ void RISCVTargetInfo::getTargetDefines(const >> LangOptions &Opts, >> Builder.defineMacro("__riscv_muldiv"); >> } >> >> - if (HasA) >> + if (HasA) { >> Builder.defineMacro("__riscv_atomic"); >> + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); >> + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); >> + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); >> + if (Is64Bit) >> + >> Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); >> + } >> >> if (HasF || HasD) { >> Builder.defineMacro("__riscv_flen", HasD ? "64" : "32"); > > Hi Kristof, > > Can you please submit this upstream? We already have way too many > gratuitous RISC-V differences that haven't been upstreamed. > This https://reviews.llvm.org/D91784 got merged upstream. How do you feel about cherry-picking that into our tree? (I can do it, or you can, I don’t have feelings either way). It’d fix building glib20 on RISC-V and unblock a bunch of ports. We’ll get it eventually though the next LLVM update, but I’m impatient. Best regards, Kristof From owner-freebsd-riscv@freebsd.org Fri Dec 11 06:53:48 2020 Return-Path: Delivered-To: freebsd-riscv@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D78247DF81 for ; Fri, 11 Dec 2020 06:53:48 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CshMZ5rf3z4tT8 for ; Fri, 11 Dec 2020 06:53:46 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: by mail-wr1-x431.google.com with SMTP id m5so7875499wrx.9 for ; Thu, 10 Dec 2020 22:53:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=TYMtAX6U+V1Jzjpy1TWecC3X/CbIGV+wTU/BrrdwD4s=; b=ikOccttqFbVjhGShqWFaNyZ3uJl8KvHjWQ0RStQxtth/ssOeDI3HPCn2fwf904Mh7i LVOVSaHbE9oYDot0PfQFYsDfOaWkTnpEor4UduZ9NybxnCDgz5R9thhgGR8hR3CZFPW0 jjgJPeL8cDeiz9mWx8k39IzJsw8TG35VzjoQLAX4MDPrFpmazTiVbLaMp3tKlRsWG+hu gTb5omZx8Va15kUr9BYRDd6GsVOK+1MPrs40pCQEVIcg1YL+SkVMVRrK/zvTMsOxl4mZ RKnMBjrjCPN4a1JsbjN2noYZAEEfEcftJka3vx8yMNspe62Sl7OqoCCxGkGjYUY9r3Lu PW+Q== X-Gm-Message-State: AOAM5308g4gj35OcgUPDawqshOCsOLcI7368ebTY5beXtYRE927p32X2 zakGXcSnDNTLldOI4lndVJcPfDwcgTI= X-Google-Smtp-Source: ABdhPJx2FZpohcve1NDoxQoGL7QBUfDFp0VetMeoTCQCE7jBEXrf6RcRa6k9xEpLIS2A2bVdo/5zXQ== X-Received: by 2002:a5d:6749:: with SMTP id l9mr12317133wrw.395.1607669625291; Thu, 10 Dec 2020 22:53:45 -0800 (PST) Received: from [192.168.1.167] (dynamic-046-114-107-068.46.114.pool.telefonica.de. [46.114.107.68]) by smtp.googlemail.com with ESMTPSA id a12sm13067751wrq.58.2020.12.10.22.53.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2020 22:53:44 -0800 (PST) From: Klaus Cucinauomo Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: any prebuilt-sd card-image image available for HiFive Unleashed ? Message-Id: Date: Fri, 11 Dec 2020 07:53:42 +0100 To: freebsd-riscv@freebsd.org X-Mailer: Apple Mail (2.3654.20.0.2.21) X-Rspamd-Queue-Id: 4CshMZ5rf3z4tT8 X-Spamd-Bar: + X-Spamd-Result: default: False [1.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[googlemail.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[googlemail.com:+]; DMARC_POLICY_ALLOW(-0.50)[googlemail.com,quarantine]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::431:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[googlemail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[googlemail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[46.114.107.68:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-riscv@freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::431:from:127.0.2.255]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::431:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-riscv] X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 06:53:48 -0000 `found that SD-card-images from = https://download.freebsd.org/ftp/snapshots/riscv/riscv64/ISO-IMAGES/13.0/ do not boot the HiFive Unleashed board.Is there any prebuilt-image = incl. u-boot or has it to be done by hand? thanks K.= From owner-freebsd-riscv@freebsd.org Fri Dec 11 16:59:12 2020 Return-Path: Delivered-To: freebsd-riscv@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7AC74B5590 for ; Fri, 11 Dec 2020 16:59:12 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Csxp84Fn3z4ckh for ; Fri, 11 Dec 2020 16:59:12 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 7C633229BA for ; Fri, 11 Dec 2020 16:59:12 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f171.google.com with SMTP id r127so8613703yba.10 for ; Fri, 11 Dec 2020 08:59:12 -0800 (PST) X-Gm-Message-State: AOAM531i1nqqElguwP5elYYiXXXKQ3sHE9+6h1S2aF8EHc+WtYyJUWPd LrXA7y+DwGcN1kZLSRnsN2wPo5fRNU+jhLnAYxI= X-Google-Smtp-Source: ABdhPJxb+RSHMHvoF5tp03CHWKX3eaqiXC6UqHKLYrJ6vEjy6+IsGX9LC5BOoi/C4GR69MC4wkkzY/iYcqwj5w/B53Q= X-Received: by 2002:a25:6c5:: with SMTP id 188mr21522689ybg.36.1607705948578; Fri, 11 Dec 2020 08:59:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Mitchell Horne Date: Fri, 11 Dec 2020 12:58:23 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: any prebuilt-sd card-image image available for HiFive Unleashed ? To: Klaus Cucinauomo Cc: freebsd-riscv Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 16:59:12 -0000 On Fri, Dec 11, 2020 at 2:53 AM Klaus Cucinauomo via freebsd-riscv wrote: > > `found that SD-card-images from https://download.freebsd.org/ftp/snapshots/riscv/riscv64/ISO-IMAGES/13.0/ > do not boot the HiFive Unleashed board.Is there any prebuilt-image incl. u-boot or has it to be done by hand? > Hi Klaus, At present, u-boot needs to be built and flashed by hand. This is motivated by the low availability of the HiFive Unleashed. I have a patch to create a sysutils/u-boot-sifive-fu540 port, which could make this slightly easier for you. It has not been committed due to lack of interest/testing (I do not have an Unleashed myself). If you are willing to test this on your board, it would be quite helpful. The patch contains a README file with instructions for formatting the SD card, see the review: https://reviews.freebsd.org/D25737 Cheers, Mitchell > thanks > K. > _______________________________________________ > freebsd-riscv@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-riscv > To unsubscribe, send any mail to "freebsd-riscv-unsubscribe@freebsd.org" From owner-freebsd-riscv@freebsd.org Sat Dec 12 02:35:34 2020 Return-Path: Delivered-To: freebsd-riscv@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D66C47C33C for ; Sat, 12 Dec 2020 02:35:34 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtBbB1X1Pz3nFq; Sat, 12 Dec 2020 02:35:33 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: by mail-wr1-x42f.google.com with SMTP id w5so7124029wrm.11; Fri, 11 Dec 2020 18:35:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=73rHMgsH55Xt6TCSdIsSVv/mG0ToFGbEbIMpiY67p0g=; b=Cz6fFTlrM3VIzJvkWmJ2vYVD/GvVSdfIMiIafdLToSGjC57G02ymCHqBIo2BH20C+T NwRli+1ZePAtKfaQWFwpXCFXPdx/xIMIjIpdeLPHiTGFuc+thG8VXdT5knO7FyazQSIZ 7iBrRV+tZ4jWYpOIuWhrm9g0+HdIGmXeGp4/Xz3zyfuTmf+/TwEXdqz+wC33zeDoy2Kz 7Jj/xLfaoRHbTtJmvDK1+BaWXt+ScW8OwNXxOLMHdVu8R8u17CWIyJcDwGdZwGghUtuy nVuEI+gxrcVJHKt2JOXt2LBsPsbSod2METdNrK65ZHI1sQdF0Sjp4bG7MPtJETUO3GVs /qNQ== X-Gm-Message-State: AOAM532AEi1QemMcpku1lN/Dli1IOhmlJECck+dxBMwEPtb3Y92/oO4g RAR/CCWvYNQfo4HOZ8gMpeS7kl4uKfM= X-Google-Smtp-Source: ABdhPJx57Q5S++nwRhs99TC2nXhEIa6wQhfJK1wQZRE2oZK/XI1nOqJnLkk5mR1Ot6RDw48Id+Yanw== X-Received: by 2002:a5d:4c4d:: with SMTP id n13mr17124101wrt.356.1607740532393; Fri, 11 Dec 2020 18:35:32 -0800 (PST) Received: from [192.168.1.167] (dynamic-046-114-111-201.46.114.pool.telefonica.de. [46.114.111.201]) by smtp.googlemail.com with ESMTPSA id a13sm18316326wrt.96.2020.12.11.18.35.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2020 18:35:31 -0800 (PST) From: Klaus Cucinauomo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: any prebuilt-sd card-image image available for HiFive Unleashed ? Date: Sat, 12 Dec 2020 03:35:29 +0100 References: To: Mitchell Horne , freebsd-riscv@freebsd.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3654.20.0.2.21) X-Rspamd-Queue-Id: 4CtBbB1X1Pz3nFq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 02:35:34 -0000 Hi Mitchell, thanks, after I had rebased my chaotic ports-tree ;-) , your port has = built fine. Well, for now the best I can get out of uSD-boot with your port is : =E2=80=94 your port:------ U-Boot SPL 2020.10 (Dec 11 2020 - 22:20:01 +0000) Trying to boot from MMC1 Unhandled UUnhanldd excleled excepti:on:n=20 0EPrucnisntr Euct0i0o0n IPllegc0aln=20 RE 0P0C: 00000000:800200000 0R00A:# 000000000008=20 000 7500#aP TV0AeL: = 0000t0#00E0E000P00000r ### ERhROR ### Please RESET the board ### =E2=80=94------------ with boot jumper MSEL2 switched up(required to boot from u-boot) . Well, no FreeBSD-Kernel installed=E2=80=A6.only u-boot. -- Compared to: =E2=80=94 https://github.com/sifive/freedom-u-sdk ---- U-Boot SPL 2020.07 (Nov 20 2020 - 12:10:09 +0000) Trying to boot from MMC1 U-Boot 2020.07 (Nov 20 2020 - 12:10:09 +0000) CPU: rv64imafdc Model: SiFive HiFive Unleashed A00 DRAM: 8 GiB MMC: spi@10050000:mmc@0: 0 In: serial@10010000 Out: serial@10010000 Err: serial@10010000 Net: eth0: ethernet@10090000 Hit any key to stop autoboot: 0=20 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:3=E2=80=A6 =E2=80=94=E2=80=94=E2=80=A6.Boots into Linux=E2=80=A6 =E2=80=94---------- well ,freedom-u-sdk has a visible (msdos)- Partition which contains a = dtb: / hifive-unleashed-a00.dtb /=20 And a configuration file extlinux.conf: default OpenEmbedded label OpenEmbedded-SiFive-HiFive-Unleashed kernel /bbla.gz fdt /hifive-unleashed-a00.dtb append root=3D/dev/mmcblk0p4 rootfstype=3Dext4 rootwait = console=3DttySIF0,115200 earlycon=3Dsbi =E2=80=94 This is the freedom-u-sdk partition table: =E2=80=94=E2=80=94=E2=80=94 boots fine: --- root@freebsd:/usr/local/share/u-boot/u-boot-sifive-fu540 # gpart show = da2 =3D> 34 13918175 da2 GPT (30G) [CORRUPT] 34 2048 1 !5b193300-fc78-40cd-8002-e86c45580b47 (1.0M) 2082 8192 2 !2e54b353-1271-4842-806f-e436d6af6985 (4.0M) 10274 6110 - free - (3.0M) 16384 266240 3 ms-basic-data (130M) 282624 4096 - free - (2.0M) 286720 13631488 4 linux-data (6.5G) 13918208 1 - free - (512B) =E2=80=94=E2=80=94 dd' =C3=ACng=20 = https://download.freebsd.org/ftp/snapshots/riscv/riscv64/ISO-IMAGES/13.0/F= reeBSD-13.0-CURRENT-riscv-riscv64-GENERICSD-20201210-7578a4862f0.img.xz directly to uSD also shows / [CORRUPT] / from # gpart show da2 well, at the moment I haven`t any further idea where to start hacking it = but trying to dd=20 /fw_dynamic.bin/ to the !2e54b353-1271-4842-806f-e436d6af6985 - = partition in your port=20 also didn`t succeed and no idea how I had to apply your port to the = GENERICSD-20201210. Do you have any further idea/instruction ? Thanks=20 Best Regards =20 Klaus= From owner-freebsd-riscv@freebsd.org Sat Dec 12 09:47:53 2020 Return-Path: Delivered-To: freebsd-riscv@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B78B34AF765 for ; Sat, 12 Dec 2020 09:47:53 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtNB04wwNz4hl2; Sat, 12 Dec 2020 09:47:52 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: by mail-wm1-x32d.google.com with SMTP id g185so10757382wmf.3; Sat, 12 Dec 2020 01:47:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=D2DS/xPzxeq4s10e1oXAZYt2bF2tJ9MeYVfHFwb6ZHw=; b=o5hj+3VlDoBE/bdKl4o/CB9SEGBfRpk1rNPTQj5ZVM+TlU1TN6GhImf3kf/JD5kWRE Z+EyMiOnywBdcYJAWwTosKsswJUHy2K1bm1GKGd9sZkP+cP7xXPwmLCeC9GEyQY+BUT4 iv0zwt2udUiPROohsZBwx1nCYtq+1qYV9NhX8JuTXUcoGKOJOLHiy9AcbdGVP3uUVTjU /porJ6s97EI2nsQYzguh5o72EWMXM7v2M4IKgQz16PQa+kGv1sKydlTzXWSqwOOkaqAQ FysdQsq2SeDTmKw3NA2UWmKqOYk5eT5SmfJHDWo+vS5fmDmETujSu+RXYKk6zVHes+xq EF/w== X-Gm-Message-State: AOAM530mszRajpnZvuxrYBW09tZ6oT60Co3ayIhymUh9llMrUXpM5PdT lnq1cLW8T8/rOsPzopk76K4Ghs70mdk= X-Google-Smtp-Source: ABdhPJwckBslX6P+xoXHzDZe0DUAXniE7FsICt2qjhQIOBHAlGbAjl2wfuuZR63yL3UwJ1sj3xMNYA== X-Received: by 2002:a05:600c:274d:: with SMTP id 13mr17831820wmw.77.1607765975876; Sat, 12 Dec 2020 01:39:35 -0800 (PST) Received: from [172.20.10.3] (dynamic-046-114-104-149.46.114.pool.telefonica.de. [46.114.104.149]) by smtp.googlemail.com with ESMTPSA id j10sm1431119wmj.7.2020.12.12.01.39.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Dec 2020 01:39:34 -0800 (PST) From: =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: any prebuilt-sd card-image image available for HiFive Unleashed ? Date: Sat, 12 Dec 2020 10:39:33 +0100 References: To: Mitchell Horne , freebsd-riscv@freebsd.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3654.20.0.2.21) X-Rspamd-Queue-Id: 4CtNB04wwNz4hl2 X-Spamd-Bar: +++++++ X-Spamd-Result: default: False [7.51 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GREYLIST(0.00)[pass,body]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[googlemail.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[googlemail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(0.00)[googlemail.com,quarantine]; NEURAL_HAM_SHORT(-0.99)[-0.995]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::32d:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[googlemail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[googlemail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[46.114.104.149:received]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.152.189.144:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[46.114.104.149:received]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; BAD_REP_POLICIES(0.10)[]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::32d:from:127.0.2.255]; DBL_PROHIBIT(0.00)[0.152.189.144:email]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32d:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-riscv] X-Spam: Yes X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 09:47:53 -0000 Well, some more details: --this is my current partition table, dd`ed GENERIC-fbsd-image(mounted) = to ufs&efi : root@freebsd:/usr/ports/sysutils/u-boot-sifive-fu540 # gpart show da2 =3D> 40 124735408 da2 GPT (59G) 40 24 - free - (12K) 64 2048 1 !5b193300-fc78-40cd-8002-e86c45580b47 = (1.0M) 2112 8192 2 !2e54b353-1271-4842-806f-e436d6af6985 = (4.0M) 10304 112640 3 efi (55M) 122944 8192000 4 freebsd-ufs (3.9G) 8314944 116420504 - free - (56G) , `have also added(with gpart) empty ms-basic-data partition(not got = auto-mounted under MacOS like the one from freedom-sdk) , still hanging = =E2=80=A6 UnhandledUnUhnhelthanndled excepn tioen: Illegral in0.. = guessing it doesn=E2=80=99t detect the DeviceTree... --------------------------from freedom-u-sdk u-boot:--------- =3D> printenv arch=3Driscv baudrate=3D115200 board=3Dfu540 board_name=3Dfu540 boot_a_script=3Dload ${devtype} ${devnum}:${distro_bootpart} = ${scriptaddr} ${prefix}${script}; source ${scriptaddr} boot_efi_binary=3Dif fdt addr ${fdt_addr_r}; then bootefi bootmgr = ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} = ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; = if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} = ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi boot_extlinux=3Dsysboot ${devtype} ${devnum}:${distro_bootpart} any = ${scriptaddr} ${prefix}${boot_syslinux_conf} boot_prefixes=3D/ /boot/ boot_script_dhcp=3Dboot.scr.uimg boot_scripts=3Dboot.scr.uimg boot.scr boot_syslinux_conf=3Dextlinux/extlinux.conf boot_targets=3Dmmc0 dhcp=20 bootcmd=3Drun distro_bootcmd bootcmd_dhcp=3Dif dhcp ${scriptaddr} ${boot_script_dhcp}; then source = ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci = ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci = PXEClient:Arch:00027:UNDI:003000;setenv bootp_arch 0x1b;if dhcp = ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt = addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else = bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci = ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv = efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci; bootcmd_mmc0=3Ddevnum=3D0; run mmc_boot bootdelay=3D2 cpu=3Dfu540 distro_bootcmd=3Dfor target in ${boot_targets}; do run = bootcmd_${target}; done efi_dtb_prefixes=3D/ /dtb/ /dtb/current/ ethaddr=3D70:b3:d5:92:f1:d5 fdt_addr_r=3D0x88000000 fdt_high=3D0xffffffffffffffff fdtcontroladdr=3Dff75f770 initrd_high=3D0xffffffffffffffff kernel_addr_r=3D0x84000000 kernel_comp_addr_r=3D0x90000000 kernel_comp_size=3D0x4000000 load_efi_dtb=3Dload ${devtype} ${devnum}:${distro_bootpart} = ${fdt_addr_r} ${prefix}${efi_fdtfile} mmc_boot=3Dif mmc dev ${devnum}; then devtype=3Dmmc; run = scan_dev_for_boot_part; fi = partitions=3Dname=3Dloader1,start=3D17K,size=3D1M,type=3D${type_guid_gpt_l= oader1};name=3Dloader2,size=3D4MB,type=3D${type_guid_gpt_loader2};name=3Ds= ystem,size=3D-,bootable,type=3D${type_guid_gpt_system}; preboot=3Dsetenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr}; pxefile_addr_r=3D0x88200000 ramdisk_addr_r=3D0x88300000 scan_dev_for_boot=3Decho Scanning ${devtype} = ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run = scan_dev_for_extlinux; run scan_dev_for_scripts; done;run = scan_dev_for_efi; scan_dev_for_boot_part=3Dpart list ${devtype} ${devnum} -bootable = devplist; env exists devplist || setenv devplist 1; for distro_bootpart = in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} = bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist scan_dev_for_efi=3Dsetenv efi_fdtfile ${fdtfile}; for prefix in = ${efi_dtb_prefixes}; do if test -e ${devtype} = ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run = load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} = efi/boot/bootriscv64.efi; then echo Found EFI removable media binary = efi/boot/bootriscv64.efi; run boot_efi_binary; echo EFI LOAD FAILED: = continuing...; fi; setenv efi_fdtfile scan_dev_for_extlinux=3Dif test -e ${devtype} = ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo = Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT = FAILED: continuing...; fi scan_dev_for_scripts=3Dfor script in ${boot_scripts}; do if test -e = ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo = Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT = FAILED: continuing...; fi; done scriptaddr=3D0x88100000 serial#=3D000001d5 stderr=3Dserial@10010000 stdin=3Dserial@10010000 stdout=3Dserial@10010000 type_guid_gpt_loader1=3D5B193300-FC78-40CD-8002-E86C45580B47 type_guid_gpt_loader2=3D2E54B353-1271-4842-806F-E436D6AF6985 type_guid_gpt_system=3D0FC63DAF-8483-4772-8E79-3D69D8477DE4 vendor=3Dsifive Environment size: 3870/131068 bytes ------------------------------------- --------- boot-script from freedom-u-sdk : ----------- '=05=19V=EF=BF=BDtK=EF=BF=BD_=EF=BF=BD=EF=BF=BD=EF=BF=BD=00=00=02=EF=BF=BD= =00=00=00=00=00=00=00=00=EF=BF=BDY=EF=BF=BDg=05=07=06=00U-Boot boot = script=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=02=EF=BF=BD=00=00=00= =00# This is the MMC u-boot boot script # 1. MMC load a uEnv.txt # 2. MMC load a Image.gz # See if we have a MMC uEnv.txt file if fatload ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} = /uEnv.txt; then env import -t ${scriptaddr} ${filesize} run bootcmd fi; # Try to load DTB from the MMC load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} = hifive-unleashed-a00-microsemi.dtb setenv kernel_comp_addr_r 0x90000000 setenv kernel_comp_size 0x4000000 setenv bootargs root=3D/dev/mmcblk0p4 rootfstype=3Dext4 rootwait = console=3DttySIF0,115200 earlycon=3Dsbi # Try to boot a Image.gz from the MMC if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} = Image.gz; then booti ${kernel_addr_r} - ${fdt_addr_r} fi; Regards K.=