From owner-freebsd-arm@freebsd.org Mon Sep 16 10:06:20 2019 Return-Path: Delivered-To: freebsd-arm@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 C9843FAEDA for ; Mon, 16 Sep 2019 10:06:20 +0000 (UTC) (envelope-from me@mko.io) Received: from sender4-of-o58.zoho.com (sender4-of-o58.zoho.com [136.143.188.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46X22M62jPz4QQf for ; Mon, 16 Sep 2019 10:06:19 +0000 (UTC) (envelope-from me@mko.io) ARC-Seal: i=1; a=rsa-sha256; t=1568628366; cv=none; d=zoho.com; s=zohoarc; b=XiFajDzoReq1X7U0r19jHRJ+IIZy10/kYO4+1X414ptOq1gqgArCSeIEhXxTS2xZ2OAKaYZ1ttNyyWGSap5obbUo5FC+SX51Plzn4KPENq+/tuoMycF3AbIt83ZNeQFC+YnjGnzbEO5ZQU4gH6DWm5eoPCV3p/UoCP49BihVF8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568628366; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=hsgWZXr/4BjC8rIM57BLpngBPsBgoaemCGDbrpYlrQ0=; b=af9g7rJNouDbz1fcJhljua7NmBUMduRGUEGPddIL3QhfWcg/1uoTTIqEHdMp7sqnEW5/Msc+QIQqCvSCnKRXop7QgL4xxA6h0nI57hgsChkXYSE3br1uYQDp7zb5dmKE2Cjg2BCuEWsdP+MTs9ijV5KjAFCM+EQ5PZDNMYHTM9A= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=mko.io; spf=pass smtp.mailfrom=me@mko.io; dmarc=pass header.from= header.from= Received: from yorda.hub (121-75-101-197.dyn.vf.net.nz [121.75.101.197]) by mx.zohomail.com with SMTPS id 1568628364349588.0353187631833; Mon, 16 Sep 2019 03:06:04 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: RockPro64 booting w/ u-boot v2019-rc3 From: mko In-Reply-To: <20190916064640.GN96402@funkthat.com> Date: Mon, 16 Sep 2019 22:06:01 +1200 Cc: "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190916064640.GN96402@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.3445.104.11) X-ZohoMailClient: External X-Rspamd-Queue-Id: 46X22M62jPz4QQf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of me@mko.io has no SPF policy when checking 136.143.188.58) smtp.mailfrom=me@mko.io X-Spamd-Result: default: False [-4.27 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ARC_ALLOW(-1.00)[i=1]; RECEIVED_SPAMHAUS_PBL(0.00)[197.101.75.121.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[mko.io]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:2639, ipnet:136.143.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-1.67)[ipnet: 136.143.188.0/24(-4.86), asn: 2639(-3.46), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2019 10:06:20 -0000 Hi John, I=E2=80=99m also trying to make a RK3399 board work, in my case I=E2=80=99= m using the Rock Pi 4 which is raspberry pi form factor and much = cheaper.=20 For rockpro64, manu has already submit the uboot for it, it's = sysutils/u-boot-rockpro64, and I just make a trivial change to rock pi 4 = u-boot config, and it u-boot=E2=80=99s fine into multi-user mode, then = panic. Here=E2=80=99s the related bug report Bug 240541 - Generic kernel on Rock Pi 4 RK3399 board panic=20 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240541 Bug 240538 - Rock Pi 4 runtime time error panic: = clknode_init_parent_idx: Invalid parent index 5 for clock sclk_sdmmc https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240538 mko > On 16/09/2019, at 6:46 PM, John-Mark Gurney wrote: >=20 > I recently received my RockPro64, and w/ a bit of help from manu, I > built a new u-boot firmware and get it booting from SD card. The > u-boot port firmware will boot, but receives an Unhandled System Error > shortly after going to multiuser mode. >=20 > It doesn't yet set the PCIe slot. Is anyone working on this? If so, > can you point me to code? I'd like to get this working. >=20 > Building u-boot isn't hard, but finding the correct part to build took > some help. >=20 > Possibly imcomplete list of packages used: > aarch64-none-elf-binutils-2.32_1,1 GNU binutils for bare metal AArch64 = cross-development > aarch64-none-elf-gcc-6.4.0_6 Cross GNU Compiler Collection for = aarch64noneelf > atf-rk3399-v2.1 ARM TF-A for platform rk3399 > bison-3.4.1,1 Parser generator from FSF, (mostly) = compatible with Yacc > dtc-1.4.7 Device Tree Compiler > gmake-4.2.1_3 GNU version of 'make' utility > gsed-4.7 GNU stream editor > python3-3_3 The "meta-port" for version 3 of the = Python interpreter >=20 > The default sed fails at one point, so used this patch: > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index ef116e0e0a..e0dedf8943 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -302,7 +302,7 @@ cmd_dtc =3D mkdir -p $(dir ${dtc-tmp}) ; \ > -i $(dir $<) $(DTC_FLAGS) \ > -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \ > - sed -i "s:$(pre-tmp):$(<):" $(depfile) > + gsed -i "s:$(pre-tmp):$(<):" $(depfile) >=20 > $(obj)/%.dtb: $(src)/%.dts FORCE > $(call if_changed_dep,dtc) >=20 >=20 > There is also a failure on the config step, and needs this patch as > well: > diff --git a/scripts/config_whitelist.txt = b/scripts/config_whitelist.txt > index b18eab1707..3260c472b9 100644 > --- a/scripts/config_whitelist.txt > +++ b/scripts/config_whitelist.txt > @@ -3100,6 +3100,7 @@ CONFIG_SYS_MACB2_BASE > CONFIG_SYS_MACB3_BASE > CONFIG_SYS_MAIN_PWR_ON > CONFIG_SYS_MALLOC_BASE > +CONFIG_SYS_MALLOC_CLEAR_ON_INIT > CONFIG_SYS_MALLOC_SIMPLE > CONFIG_SYS_MAMR > CONFIG_SYS_MAPLE >=20 >=20 > And then built using the following commands: > export BL31=3D/usr/local/share/atf-rk3399/bl31.elf > gmake clean > gmake rockpro64-rk3399_defconfig > CROSS_COMPILE=3Daarch64-none-elf- gmake -j 4 >=20 > I may have forgotten to include some steps. After building, I > installed the parts via: > dd if=3Didbloader.img of=3D/dev/disk4 oseek=3D64 bs=3D512 > dd if=3Du-boot.itb of=3D/dev/disk4 oseek=3D16384 bs=3D512 >=20 > I used = FreeBSD-13.0-CURRENT-arm64-aarch64-20190906-r351901-memstick.img > as a base, but it has the UEFI boot partition in this area, so I used > mdconfig to extract the parts, and then expanded the image, created a > new freebsd-boot partition to cover the space for the above, and then > replaced the images... >=20 > =3D> 3 2111549 mmcsd0 GPT (30G) [CORRUPT] > 3 32765 2 freebsd-boot (16M) > 32768 67584 1 efi (33M) > 100352 2011200 3 freebsd (982M) >=20 > The corrupt tag is because I haven't expanded the gpt to cover the > full SD card yet. >=20 > --=20 > John-Mark Gurney Voice: +1 415 225 5579 >=20 > "All that I will do, has been done, All that I have, has not." > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"