From nobody Wed Jan 19 22:05:08 2022 X-Original-To: freebsd-riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 73B6D196CFDA for ; Wed, 19 Jan 2022 22:05:18 +0000 (UTC) (envelope-from jakob@alvermark.net) Received: from out.alvermark.net (out.alvermark.net [185.34.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JfKSs4McXz3CDk; Wed, 19 Jan 2022 22:05:17 +0000 (UTC) (envelope-from jakob@alvermark.net) Received: from c-d24b235c.06-431-73746f70.bbcust.telenor.se ([92.35.75.210] helo=mail.alvermark.net) by out.alvermark.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1nAJ4n-0004jL-B5; Wed, 19 Jan 2022 23:05:09 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alvermark.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=z/TVmTs+aRbUzoClytkpzgBu+XAGGgFwtODMQt7QgKw=; b=HTGNf92UrWT8NskC6A9cdZR69b 4BDgXVsXfUlI0zTzQedmuG2mqZ+kNwaxh8H+kq+vsghivvDhdvoRo7BuhBRHTRmCKPnJlPdEIaLiq 0PM97B8OgfdoqFmeVFl9NEoEdRM/GAK/IzL0vgnkBP37JjqmTsy16725appEvCC1tNP6jZ8Df8zVN 1flVd6/+X44fmkLQDvA4c9tcyjaA2xOhjv7ctXJOi7mwn4BZkfBDPHfzE1YQTq5iTDMb55cS8oASU zOgGZfTaG0Gn5Tax8eqjYuO+KiTkIb9ilHRJ0XefoA7kR1zeDEvpjk5cvTBxUQzPx3z5xdZyiExrE UB98p4dw==; Received: from [192.168.67.27] by mail.alvermark.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1nAJ4m-0002XC-Qe; Wed, 19 Jan 2022 23:05:08 +0100 Message-ID: Date: Wed, 19 Jan 2022 23:05:08 +0100 List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Sipeed Lichee RV (Allwinner D1) Content-Language: en-US To: Mitchell Horne , freebsd-riscv@FreeBSD.org References: From: Jakob Alvermark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4JfKSs4McXz3CDk X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=alvermark.net header.s=x header.b=HTGNf92U; dmarc=none; spf=pass (mx1.freebsd.org: domain of jakob@alvermark.net designates 185.34.136.138 as permitted sender) smtp.mailfrom=jakob@alvermark.net X-Spamd-Result: default: False [-1.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[alvermark.net:s=x]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:185.34.136.138]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[alvermark.net: no valid DMARC record]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[alvermark.net:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-0.995]; MLMMJ_DEST(0.00)[freebsd-riscv]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:34971, ipnet:185.34.136.0/23, country:IT]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 1/19/22 17:24, Mitchell Horne wrote: > > > On 1/17/22 15:02, Jakob Alvermark wrote: >> Hi, >> >> >> With RISC-V SBCs now coming down in price, I got curios and got >> myself a Lichee RV (with the dock). >> >> https://linux-sunxi.org/Sipeed_Lichee_RV >> >> The instructions here, https://linux-sunxi.org/Allwinner_Nezha along >> with some patching got me a working U-boot. >> >> Cross-building and putting together and image for and SD card got me >> this far: >> >> Loading kernel... >> /boot/kernel/kernel text=0x609ddc text=0x133abc data=0xf4420 >> data=0xb54+0x1d73e4 syms=[0x8+0xcd188+0x8+0xee5ae] >> Loading configured modules... >> can't find '/etc/hostid' >> can't find '/boot/entropy' >> Using DTB provided by EFI at 0x47ef5000. >> Kernel entry at 0x56a0002e... >> Kernel args: (null) >> >> ----- >> >> And here it stops forĀ  ~16 seconds then restarts, that's the watchdog >> resetting it. >> >> So where do I go from here? >> > Hi Jakob, > > Looks like it bails somewhere in the initial kernel setup, before the > first output to the console. This is a wide range, so it's difficult > to say exactly where things are going wrong. > > I will say that generally FreeBSD is not expected to work on the D1; > as far as I know you are the first to try it. This hardware has some > quirks requiring special support, which we are entirely lacking. > Specifically, there is one related to virtual memory management, which > requires custom (spec-breaking) bits in the page tables to be set, to > properly specify the attributes of physical and device memory. This > _may_ have something to do with why it is failing where it is. It > would take a motivated party to add the support required for this SoC, > and I'm not aware of anyone currently taking this on. This board has > caused some headaches in Linux-land for the same reasons, but there > are more hands to do the work there. I just want to set the > expectations properly :) > > If you wanted to debug this further, you might rebuild the kernel > after adding 'options EARLY_PRINTF' to the config file, as this should > enable a couple early outputs and narrow down the search slightly. Hi Mitchell, I did not expect it to work. But it would be nice if it did. I have a long experience with FreeBSD and I have played around with a couple of different ARM-boards, but I'm not very experienced with kernel hacking. I built a kernel with EARLY_PRINTF, but it did not give me any more output... Is there anything else I could try? Jakob