From nobody Sun Aug 27 23:18:24 2023 X-Original-To: freebsd-arm@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 4RYqPb4kw4z4rlZD for ; Sun, 27 Aug 2023 23:18:43 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-25.consmr.mail.gq1.yahoo.com (sonic304-25.consmr.mail.gq1.yahoo.com [98.137.68.206]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYqPZ1gqbz3S46 for ; Sun, 27 Aug 2023 23:18:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=G9YOlhUI; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693178320; bh=gIoQZ10zzNr7zPZ/heVJB7c761/xnV1RNyARz2lf0V8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=G9YOlhUIQXwyOaWyF39euK4n8WPuxZ/l6AyZlqSlpWKe+kxELCk9Z3b75AgpQlS7Fbrd/Q0+hzayoFgVfHygz0j+JwXnVxVF/ZG7mqX4BPVZ6QHAYXIPwgPNwZKMPt6Zd85I2UakU3B3FwSgStRxQKDzVb3317dgblSTdVk2oOAd4EnMOqUDPbLhqFWslq1mJIGWfa6ZGC4nucD8ZfhcbqeMazJ3uFy2zm3uvphVWSifVdU3Ln8ZWeGwZ+fua5HQ4DtcJDr3cBpZ74osfD5+iCgK1TxlM1MfBBFDsI9xVLAB+pkdTXL6K2gdZJrCe7QChv3Xbo6mEOtihzAcODVpPw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693178320; bh=lOWDLPYR0rnd4xYtZ9Yk8gvnAIUayovLFQdMW/G+F5j=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=FYiXEHpNy+8UVPA44FkQi74OuLs+6nDVl8RI0REhfxR/ofzDb12H6Fm64vxMYA/2pP2EGCNo9fykRNQvLmD7xQuKW+HCjM/aPkbLrNYlpwxHAVTkLiK9uz69WTZuPRG3P/gReNXQDkdVuj42wokiEk0UcHZlgAc0NPUSUof+Ws31n8T29s/s13g4paIo+lJKOvG8iFDNzBo2u6FiasCEsHFdSO8iMPm0I+cNqNusjG46Ik0I5eIN32TWCT3IuzLm0D57F/2VSBkXq240Mcdri46BzaaKU6Fbxpm6drfYdRzA5tmJ62keNqDCFqWe31EeF5nxa3l4NJApXAYMWD+h2Q== X-YMail-OSG: lyp9DmQVM1kU8G8K4N9AIqDom1rrx7L.HiriyUryZX52UpHB56Jz06DyI9t42VV aWso2afMhsJTQhZaUKt4.gyyzNDpsrGDb3RerTFLvxwwErkHMG6aTZkbHplgFCdqvhSEnDmsag0e 8WICQhfG5g2pCKdtedCeNn.hiCGR9FFcPgSfEmkz1E1.rBVsTW3ZwdQnzHzSv6wAtI1SxDO3T7g. X4ROZGY0N72JQg0QMTVBIYjuGUip1DihsT.CbVaCy2f9_S7DJAU_8MbvPS3AwS_mAaWvMZ2TM0BQ 8MsCbBMqxwy24ov7z58mvHunaC31bcdHzn_jyEYLxRFvflWd1GgyQNygJgl4Mj_geGM3QO5E6YdZ UTUChKZUl__CeRGFEn8MyAkd9FDKpJk6K5huvELzCOsY_S_hyT7Kz_ZyoY64q1S.KHi6J9R.95fU 0t7bPYU91fQbeKbWH6y3Bkvvn7IyGEn.yve11na6Z6JA9uMlbpEwwujFVZbynDF9ATTbv5HrNGfL 23yjlE_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T0I8lCb9wAIsRtpZ9wkNlUA_UiQdfsRZCZOX29b5k1kxtXDuaUH2h wEDDswBXrDXSrf2zlVwS7G6HMnErDWmj_1nmO5A1m2nqFCcFVinQLIaAQOwJU5IX39pwP6ABxbr6 ab5uAE7elNtpiK61uchdBCGpmy3Ub6q5PMCoaorurLtxoZSc.QTFRiu2WvFJwdP0exQ2fCUCxONC _eiHQBw1MdV_e9e5tO1IxgODgd_4AaNXuKC3SUGW.jnyB.SH9NZdICi9XFQ9A5bmPvEr.VbqJLoP X.DuZ_gnZCw6cP1wfJdv7MRofxR.Ja0R4um94t57iOHcvREcRcG4UH8d6xIEalhV6EfpW6GA3oSI XBkLpJtiOIY_RfiaBijDSHgaHh9gMztF13EtcvDFUxxNzlr8H6xBYtgorXoS69NXszhy73GghZNp WhWvAAcj9QxKqOGXfiU.rVKJacjoIQn1x3fdgy2d8.LekXUBt_WSaO6EgELa07h4YwaLmwLJv3rh 2Zj6EesUru5K.nRwy19tsGp8l.5w8Sqd0gyE33p87ffdj2gzg2xEC6JjDzIUnfWAsHlk3k8Qp0mG uFegMhx4iE9qppS7Qz79YPYqhe5V6ZGKCadOLZ1tZmzJt7AyrgXHp3w6k9qZyqUXW4pCSwq2iw3Y NyuW4NnUM5zVMJJ83EUH6R0eHg8tXbg2k.OujJfdF_Y4eKRB.lT23ycLFXmRtrcP2DhHkU7gpXA- - X-Sonic-MF: X-Sonic-ID: 30511f64-ac62-4ada-91e0-d6853c04b1fb Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sun, 27 Aug 2023 23:18:40 +0000 Received: by hermes--production-bf1-865889d799-sjjww (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0e9a66f684e482ddf86935c70586cc20; Sun, 27 Aug 2023 23:18:37 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Rock64 vs. USB3 for 14.0-ALPHA2 's Rock64 snapshot vs. device tree update(?) From: Mark Millard In-Reply-To: <0482D0E1-01F8-4C9B-B7C8-87EE6A7E0035@yahoo.com> Date: Sun, 27 Aug 2023 16:18:24 -0700 Cc: Guy Yur , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <81184025-2B2E-4093-87F4-3990D7571FFA@yahoo.com> References: <20230821163318.20c8e582db7000d3b6a8412d@bidouilliste.com> <0482D0E1-01F8-4C9B-B7C8-87EE6A7E0035@yahoo.com> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Result: default: False [-3.10 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.60)[-0.599]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.206:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.206:from]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; ARC_NA(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4RYqPZ1gqbz3S46 [It works.] On Aug 27, 2023, at 15:07, Mark Millard wrote: > On Aug 21, 2023, at 07:33, Emmanuel Vadot = wrote: >=20 >> On Mon, 21 Aug 2023 13:37:58 +0300 >> Guy Yur wrote: >>=20 >>> Hi, >>>=20 >>> On Sun, Aug 20, 2023 at 10:08?PM Mark Millard = wrote: >>>=20 >>>> On Aug 20, 2023, at 11:08, Guy Yur wrote: >>>>=20 >>>> ... (snip) >>>>>=20 >>>>> I boot from sdcard with msdosfs partition with = EFI/BOOT/bootaa64.efi and >>>> the dtb in rockchip/ dir in the partition. >>>>> I tested renaming the rockchip dir so the dtb won't be found and = there >>>> was still a device tree provided. >>>>> seen in devinfo and ofwdump. >>>>=20 >>>> Back when I established my structure (long ago) this provided >>>> U-Boot's translation of its *.dtb --which did not work for >>>> FreeBSD purposes at the time. FreeBSD's Rock64 related updates >>>> have been based on tracking upstream linux at some point. >>>> Doing what I did got the FreeBSD *.dtb that FreeBSD expected >>>> (at the time. anyway). >>>>=20 >>>>=20 >>> Updating with more correct information for future reference since >>> from my previous post it sounds like u-boot behavior changed when >>> it has not in regards to placing the fdt file in the EFI partition. >>>=20 >>> The real issue is a bug in u-boot 2023.07.02 failing to read the fdt = from >>> the EFI partition >>> and the u-boot provided fdt bindings for Rock64 containing wrong = xhci >>> definition. >>>=20 >>> Reading fdt file was fixed in: >>> = https://source.denx.de/u-boot/u-boot/-/commit/2984d21a28f812c9c1fd2243cc72= 796f69a61585 >>>=20 >>> I believe all issues should be resolved in the next u-boot release. >>=20 >> Thanks for finding that, my rock64 is in a sad state (keep freezing >> even in u-boot after a few minutes, looks like power just die) so = it's >> hard for me to test stuff on it. Can you confirm that adding this = patch >> to u-boot-rock64 fixes everything ? >=20 > I finally got back to the Rock64 and based on (whitespace possibly > not preserved): >=20 > # more = /usr/ports/sysutils/u-boot-master/files/patch-boot__bootmeth_efi.c=20 > --- boot/bootmeth_efi.c > +++ boot/bootmeth_efi.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include >=20 > #define EFI_DIRNAME "efi/boot/" >=20 > @@ -281,9 +282,12 @@ static int distro_efi_try_bootflow_files(struct = udevice *dev, > ret =3D distro_efi_get_fdt_name(fname, sizeof(fname), = seq); > if (ret =3D=3D -EALREADY) > bflow->flags =3D BOOTFLOWF_USE_PRIOR_FDT; > - if (!ret) > + if (!ret) { > + /* Limit FDT files to 4MB */ > + size =3D SZ_4M; > ret =3D bootmeth_common_read_file(dev, bflow, = fname, > fdt_addr, = &size); > + } > } >=20 > if (*fname) { >=20 > That lead to the kernel recognizing the USB3 boot > media: >=20 > . . . > Trying to mount root from ufs:/dev/gpt/rootfs []... > Unresolved linked clock found: hdmi_phy > Unresolved linked clock found: usb480m_phy > mmcsd0: Error indicated: 4 Failed > uhub0: 1 port with 1 removable, self powered > uhub3: 2 ports with 2 removable, self powered > uhub2: 1 port with 1 removable, self powered > uhub1: 1 port with 1 removable, self powered > ugen4.2: at usbus4 > umass0 on uhub3 > umass0: on usbus4 > umass0: SCSI over Bulk-Only; quirks =3D 0x0000 > umass0:0:0: Attached to scbus0 > random: unblocking device. > da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 > da0: Fixed Direct Access SPC-4 SCSI device > da0: Serial Number *REDACTED* > da0: 400.000MB/s transfers > da0: 953869MB (1953525168 512 byte sectors) > da0: quirks=3D0x2 >=20 > However, that quirks line was the last message from the > boot attempt. >=20 > I'll try to update the Rock64 media in booting for how I've > historically done it to where I've synchronized to main [so: > 15] to see what the status is there. I had made some sort of snafu previously. Re-updating the materials on the e.MMC lead to booting continuing after the quirks line as well. =46rom after login: # uname -apKU FreeBSD R64-RPi-4-3-2v1p2 15.0-CURRENT FreeBSD 15.0-CURRENT aarch64 = 1500000 #87 main-n265027-2f06449d6429-dirty: Fri Aug 25 09:20:28 PDT = 2023 = root@CA72-16Gp-ZFS:/usr/obj/BUILDs/main-CA53-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA53 arm64 aarch64 1500000 1500000 So, overall, also using /usr/ports/sysutils/u-boot-master/files/patch-boot__bootmeth_efi.c lead to the Rock64 USB3 being operational again via the FreeBSD kernel, including for post-kernel booting. (Sequencing complicated by also updating to 15 in the mix.) =3D=3D=3D Mark Millard marklmi at yahoo.com