From nobody Wed Jul 06 15:29:23 2022 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 02B071D0024F for ; Wed, 6 Jul 2022 15:29:40 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-24.consmr.mail.gq1.yahoo.com (sonic304-24.consmr.mail.gq1.yahoo.com [98.137.68.205]) (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 4LdNkq0BdSz4lLh for ; Wed, 6 Jul 2022 15:29:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657121370; bh=+5keCzMC1b4A2GpBO4ltTwMJgLM1nczyQJouym8a7QI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=HPqBckC0H70rlRE5aHdO3yGo0jWQKAigR0/iLgKVg11TKG7woD3+pYCSXN4raKD6fO9ZfagHbY4OeLJfh6z7+udvAAOXa/dVdgXvElttYkN3ITjxnG7ifdBYZNMNTdNZQ7/eGQO30a0FX9fObkkycedZTFG568wDbz9AI6UB+9bg3B7QbWV7UONKUQpafvBb51Y4goxcNfWO5/4WVEPXbdPp/4g1q5Fx3z91dB7qUMs1vX72eyvsrbobOGfaFAXkUBY/mA1L4jGeN7OVdT312S77UtbAZH/l4E4VGYFHbiiliPxcIlEXC7vQcnHmt+9dvDiqilSI8M8VjA+6I2bnuw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657121370; bh=L0dLe2ePX9Q2MkIsuvCg0sTAPNuwdQoNHdD2nHiHR2m=; h=X-Sonic-MF:Subject:From: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MFqZIpx_RGNvxF5qT_W4d2_JXvZSVeR5_uZwhSU3xE7oNYJMgRW2 ZNNmSm3qZANlpcz1ASeBhYN5N5hzLSf75ToNlvKx7Z5oK8NhZZ4128hnB2RRQhmorBX3vtoda0hm s2xhX7_x48cWBwHiuVKElqhxK3ZsuLteEAPjFf6E.TpVVmS3URBuQgLSxyeC0_UOKylniD2QcLW0 BZ_Erapr3KFPR9J8dgNn4AIZzkkfbRSfNFCAw7jtbCmYN1hEiZ3b4pHoIFnofMkhaonhGrM_Mqqe avGqzHDe9dgn8eA._5RMiqjOq8pjct024hF6pRKsPiPb6AOo.28Mmtfx1aoQLfJN.LQxWVASUMf5 FYtE4ZzhuUttSXE7WWY_Of7q3vhw2FwMAeouOrEda43pkbwf2h91ivI42iQSPt8obniwT3IQnqEL pLpdZhrI_QlmFwvdiY8bIM_VST7OQ9xzP11zXNeau3kD9_fqZLBxrW0JulKvvkpMkAPp.CTL1lkt Br_wYOVZUe.Ud1Z6PRw7f.Clmh.Ax3nXvtx9Ftd5vK8nzmLBQIerL_U9JCRZY_WqS5MHYAoD19.j 2syzLYQ35BEusPwBRZ0Y- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Wed, 6 Jul 2022 15:29:30 +0000 Received: by hermes--production-bf1-58957fb66f-bs7vm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1815854a20a4d7aacb8fcbad76664ce1; Wed, 06 Jul 2022 15:29:26 +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 14.0 \(3654.120.0.1.13\)) Subject: Re: Failed to execute custom kernels which where build on a RPi 4 operated by 13.1-RELEASE From: Mark Millard In-Reply-To: Date: Wed, 6 Jul 2022 08:29:23 -0700 Cc: John Kennedy , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <71D4E84B-5D80-43A5-BE22-8E4F6486B7E4@cyclaero.com> To: "Dr. Rolf Jansen" X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4LdNkq0BdSz4lLh X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=HPqBckC0; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.205:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On 2022-Jul-5, at 22:01, Mark Millard wrote: > On 2022-Jul-5, at 08:09, Dr. Rolf Jansen = wrote: >=20 >>> . . . >>=20 >> That would be the second step. The first step would be that somebody = else confirms my finding that building and running a custom kernel on a = stock FreeBSD 13.1-RELEASE on RPi 4 does not work out. And actually that = was my initial question. >>=20 >> - In case somebody raises her/his hand telling, that this worked = flawlessly on their system, >> then I would have a more in deep look, what might have gone wrong = here. >>=20 >> - In case the issue would be confirmed, then I would submit a bug = report, and the discussion >> may continue in a more productive way on bugs.freebsd.org. >=20 > Summary of the later material: >=20 > It would appear that if building any kernels are > broken, it is specific to some custom kernel(s) > in question, not to building kernels in general. > 13.1-RELEASE's install is able to build, install, > and boot its own generic kernel on a 8GiByte > RPi4B Rev. 1.4. >=20 > How I got to that conclusion . . . > (Written earlier.) >=20 > I'm doing (written as I go along): >=20 > Establish a USB3 media from = FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img.xz > and releases/arm64/13.1-RELEASE/src.txz . Set up some basic = configuration. >=20 > (Note: growfs is broken for the large expansion. I used dump and = restore > for the ufs partition from a mounted non-grown dd of the .img file to > other media. I also copied over the msdosfs partition content. I set > up to have partition-based swap space as well. I used gpt = partitioning.) >=20 > Boot via that media on a 8 GiByte RPi4B Rev. 1.4 . > Do some live setup to finish things off. >=20 > Then: >=20 > root@13R-ufs:~ # cd /usr/src > root@13R-ufs:~ # time make -j4 kernel-toolchain # 630.15 real 2302.72 = user 94.36 sys > root@13R-ufs:~ # time make -j4 buildkernel # 1790.12 real 6488.26 = user 526.25 sys > root@13R-ufs:~ # time make -j4 installkernel # 8.17 real 14.94 = user 12.00 sys > root@13R-ufs:~ # diff -rq /boot/kernel/ /boot/kernel.old/ #??? = Reproducible builds ??? > Files /boot/kernel/kernel and /boot/kernel.old/kernel differ > Files /boot/kernel/kernel.bin and /boot/kernel.old/kernel.bin differ Turns out the differences are mostly git-context text vs. not (src.txz): FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC vs. just: GENERIC a couple of times in each pair of kernel* filed. (The shorter text has null characters to make the space used in the file pairs the same.) There is one block of other byte differences in each pair of kernel files: 11234201 323 346 11234202 233 <9B> 54 , 11234203 305 371 11234204 216 <8E> 144 d 11234205 30 ^X 147 g 11234206 230 <98> 176 ~ 11234207 75 =3D 6 ^F 11234208 335
302 11234209 144 d 5 ^E 11234210 73 ; 276 11234211 305 162 r 11234212 146 f 266 11234213 55 - 213 <8B> 11234214 61 1 212 <8A> 11234215 4 ^D 45 % 11234216 235 <9D> 145 e 11234217 20 ^P 133 [ 11234218 141 a 231 <99> 11234219 203 <83> 47 ' 11234220 211 <89> 216 <8E> That is it for the differences. > root@13R-ufs:~ # shutdown -r now > . . . > Performing sanity check on sshd configuration. > Starting sshd. > Starting cron. > Starting background file system checks in 60 seconds. >=20 > Wed Jul 6 04:22:01 UTC=20 > FreeBSD/arm64 (13R-ufs) (ttyu0) >=20 > login: root > Password: > Jul 6 04:23:28 13R-ufs login[1210]: ROOT LOGIN (root) ON ttyu0 > Last login: Wed Jul 6 03:18:32 on ttyu0 > FreeBSD 13.1-RELEASE GENERIC >=20 > Welcome to FreeBSD! >=20 > Release Notes, Errata: https://www.FreeBSD.org/releases/ > Security Advisories: https://www.FreeBSD.org/security/ > FreeBSD Handbook: https://www.FreeBSD.org/handbook/ > FreeBSD FAQ: https://www.FreeBSD.org/faq/ > Questions List: = https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ > FreeBSD Forums: https://forums.FreeBSD.org/ >=20 > Documents installed with the system are in the = /usr/local/share/doc/freebsd/ > directory, or can be installed later with: pkg install en-freebsd-doc > For other languages, replace "en" with a language code like de or fr. >=20 > Show the version of FreeBSD installed: freebsd-version ; uname -a > Please include that output and any error messages when posting = questions. > Introduction to manual pages: man man > FreeBSD directory layout: man hier >=20 > To change this login announcement, see motd(5). > root@13R-ufs:~ # uname -apKU > FreeBSD 13R-ufs 13.1-RELEASE FreeBSD 13.1-RELEASE GENERIC arm64 = aarch64 1301000 1301000 > root@13R-ufs:~ # freebsd-version -kru > 13.1-RELEASE > 13.1-RELEASE > 13.1-RELEASE > root@13R-ufs:~ # gpart show -pl > =3D> 40 468862048 da0 GPT (224G) > 40 32728 - free - (16M) > 32768 524288 da0p1 13Refi (256M) > 557056 29360128 da0p2 13Rswp14 (14G) > 29917184 4194304 - free - (2.0G) > 34111488 33554432 da0p3 13Rswp16 (16G) > 67665920 356515840 da0p4 13Rufs (170G) > 424181760 44680328 - free - (21G) >=20 > root@13R-ufs:~ # gpart show -p > =3D> 40 468862048 da0 GPT (224G) > 40 32728 - free - (16M) > 32768 524288 da0p1 efi (256M) > 557056 29360128 da0p2 freebsd-swap (14G) > 29917184 4194304 - free - (2.0G) > 34111488 33554432 da0p3 freebsd-swap (16G) > 67665920 356515840 da0p4 freebsd-ufs (170G) > 424181760 44680328 - free - (21G) > root@13R-ufs:~ # df -m > Filesystem 1M-blocks Used Avail Capacity Mounted on > /dev/gpt/13Rufs 168604 8159 146956 5% / > devfs 0 0 0 100% /dev > /dev/gpt/13Refi 255 25 230 10% /boot/efi > root@13R-ufs:~ # ls -Tld /usr/obj/usr/src/arm64.aarch64/sys/*/ > drwxr-xr-x 3 root wheel 91136 Jul 6 04:17:59 2022 = /usr/obj/usr/src/arm64.aarch64/sys/GENERIC/ > root@13R-ufs:~ #=20 >=20 > The build and install seems to have worked just fine, > allowing booting and operation. >=20 >=20 > Notes: >=20 > The builds were done via being logged in via ssh. The > serial console causes more time to be taken waiting > for the build output as it progresses, so I avoid > it for builds. >=20 > This media will be around for some time to possibly > do other experiments with if desired. Provide > explicit instructions if you want a build tried. The > starting context would be as above but the instructions > might say to "rm -fr" various things first, if > appropriate. >=20 Trying GENERIC-MMCCAM also worked just fine. (but the context is set up as USB3 media based, not microsd card based): root@13R-ufs:~ # time make -j4 buildkernel KERNCONF=3DGENERIC-MMCCAM # = 1794.69 real 6478.07 user 552.92 sys root@13R-ufs:~ # time make -j4 installkernel KERNCONF=3DGENERIC-MMCCAM # = 8.25 real 15.21 user 11.64 sys root@13R-ufs:~ # shutdown -r now . . . Wed Jul 6 15:17:49 UTC=20 FreeBSD/arm64 (13R-ufs) (ttyu0) login: root Password: Jul 6 15:18:35 13R-ufs login[1211]: ROOT LOGIN (root) ON ttyu0 Last login: Wed Jul 6 05:31:00 on ttyu0 FreeBSD 13.1-RELEASE GENERIC-MMCCAM . . . To change this login announcement, see motd(5). root@13R-ufs:~ # uname -apKU FreeBSD 13R-ufs 13.1-RELEASE FreeBSD 13.1-RELEASE GENERIC-MMCCAM arm64 = aarch64 1301000 1301000 root@13R-ufs:~ #=20 =3D=3D=3D Mark Millard marklmi at yahoo.com