From nobody Mon Jan 23 14:53:52 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 4P0tQv0Y5Hz2tykj for ; Mon, 23 Jan 2023 14:53:59 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Received: from nmtao202.oxsus-vadesecure.net (mta-232a.oxsus-vadesecure.net [15.204.3.6]) (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 4P0tQs51djz3nZ1 for ; Mon, 23 Jan 2023 14:53:57 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=webcom.xion.oxcs.net header.s=mail1 header.b=jm1XEB+0; spf=pass (mx1.freebsd.org: domain of fred@thegalacticzoo.com designates 15.204.3.6 as permitted sender) smtp.mailfrom=fred@thegalacticzoo.com; dmarc=pass (policy=quarantine) header.from=thegalacticzoo.com DKIM-Signature: v=1; a=rsa-sha256; bh=SAQ34uzdSclpmzwt5BsxPagOyxGAQ5aCjnuV3g LxTfo=; c=relaxed/relaxed; d=webcom.xion.oxcs.net; h=from:reply-to: subject:date:to:cc:resent-date:resent-from:resent-to:resent-cc: in-reply-to:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; q=dns/txt; s=mail1; t=1674485635; x=1675090435; b=jm1XEB+0zsjbI7msLhPBbsUOOyiIDAfvsXhyszegh 0d28+JnMmSfmiIFZah/QTA1Dk8wu6NnJ0AUlLzORBaMrTAeZ/wN3WeKli33vSci0nbxAh+p XT5LfCdEUm/8h1twptAohjLELqasVTrxRGNaXLiUKP5t+ctfQINB4iHAE83iZkbmw73GHwf lV3uOp+WaMYINNZkG10mXIvwjeNhhXEsemnIxhejqw5FyY61ILWuJxAXX0dqCaEWH2wWQ0T APBFYj4Ur9dAgAJM/NrJMegMnzAyiHK2qqL1+B3Lq3NjmjoUXvpUZC2QnS06L16m3o9sZSe e5mwoVTpACJX9M3Zw== Received: from proxy-8.proxy.cloudus.ewr.xion.oxcs.net ([76.14.221.149]) by oxsus2nmtao02p.internal.vadesecure.com with ngmta id 931861c1-173cf7cfec492aeb; Mon, 23 Jan 2023 14:53:55 +0000 Message-ID: <68e61133-cb1c-60ae-59bf-5569a0f18d40@thegalacticzoo.com> Date: Mon, 23 Jan 2023 06:53:52 -0800 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 From: Fred Finster Subject: Re: Raspberry Pi 4B is now booting single user mode on FreeBSD 14.0 aarch64. Does it work for you? To: Mark Millard Cc: freebsd-arm@freebsd.org References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[thegalacticzoo.com,quarantine]; R_DKIM_ALLOW(-0.20)[webcom.xion.oxcs.net:s=mail1]; R_SPF_ALLOW(-0.20)[+ip4:15.204.3.6]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; FREEMAIL_TO(0.00)[yahoo.com]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:16276, ipnet:15.204.0.0/17, country:FR]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[15.204.3.6:from]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[webcom.xion.oxcs.net:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[15.204.3.6:from] X-Rspamd-Queue-Id: 4P0tQs51djz3nZ1 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 1/21/23 17:12, Mark Millard wrote: > On Jan 20, 2023, at 06:22, Fred Finster wrote: > >> was just trying to boot into single user mode from this documentation below: >> https://people.freebsd.org/~rodrigc/doc/handbook/makeworld.html >> Once in single-user mode, run these commands if the system is formatted with UFS: >> >> |#| *|mount -u /|* >> |#| *|mount -a -t ufs|* >> |#| *|swapon -a|* >> >> example I created this blog post:https://ghostbsd-arm64.blogspot.com/2023/01/time-make-j4-buildworld.html >> I could boot into multi-user mode but not into Single User Mode on this Raspberry Pi 4B. >> What do you suggest and how to trouble shoot? I turned on verbose mode and saw that it hung after starting /sbin/init >> but do not know why this aarch64 ARM64 BCM2711 cpu hangs on FreeBSD 14.0 going into "single user mode". >> >> This Version: >> >> root@Fred_RasPi4B:~ # uname -Kmnopr >> FreeBSD Fred_RasPi4B 14.0-CURRENT arm64 aarch64 1400077 >> root@Fred_RasPi4B:~ # uname -a >> FreeBSD Fred_RasPi4B 14.0-CURRENT FreeBSD 14.0-CURRENT #6 main-n259952-7e2600ea7be2-dirty: Sun Jan 15 18:14:05 PST 2023root@Fred_RasPi4B:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-VCHIQ arm64 > . . . > > I've never tried GENERIC-VCHIQ. > > Have you tried testing a standard build on some > media, such as trying a dd of an uncompressed: > > http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/14.0/FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20230120-43703bc489ec-260163.img.xz > > and seeing if the problem replicates for that in > your context? If it replicates, then at least you > know it is not something more specific to your > context and other folks would be able to test > similarly with a sufficiently analogous context. > > But, if it does not replicate when you try such a > test, then folks likely would have to try to > reproduce your context to have a sufficiently > analogous context to test. > > === > Mark Millard > marklmi at yahoo.com > Mark thank you for answering my email question directly! I realize you, Mark, are busy, with some many details. Your suggestion of using a Snapshot image is good for debugging. http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/14.0/FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20230120-43703bc489ec-260163.img.xz Is there a shell script file to build this image, just like FreeBSD.org does? I would like to natively build an image with the VCHIQ patch included from my /usr/src hosted on the Raspberry Pi 4B /8G dram with a 500GB SSD drive with 92GB FreeBSD partition. Uart0 Serial Console pin 14 TXD, Pin 15 RXD works in Single User Mode on the Raspberry Pi 4B with 8G dram executing FreeBSD 14.0 GENERIC-VCHIQ. The serial console and video console both issue messages, upto this point, The Video Console stops just after a verbose debug message '/sbin/init' , yet the serial console continues working and receives commands and issues results. root@:/usr/src # uname -a FreeBSD 14.0-CURRENT FreeBSD 14.0-CURRENT #6 main-n259952-7e2600ea7be2-dirty: Sun Jan 15 18:14:05 PST 2023root@Fred_RasPi4B:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-VCHIQ arm64 root@:/usr/src # uname -Kmnopr FreeBSD 14.0-CURRENT arm64 aarch64 1400077 I have the Black Magic Probehttp://black-magic.org set up and using the 3.3V TTL serial port device at /dev/ttyU1. You have to load kernel modules kldload ucom, umodem, usb_template, and set hw.usb.template to 3. sysctl hw.usb.template=3 . *#kldload ucom umodem usb_template* #*sudo sysctl hw.usb.template=3* hw.usb.template: -1 -> 3 *sudo vi /boot/loader.conf* #add 4 lines for next boot to include modules umodem_load="YES" usb_template_load="YES" ucom_load="YES" hw.usb.template=3 Use cu Connect Unix command to open the USB serial port to the Raspberry Pi 4B Uart0 # *cu -s 115200 -l /dev/ttyU1* Connected OPEN URL for more details:https://ghostbsd-arm64.blogspot.com/2023/01/hookup-gdb-to-black-magic-probe-v23.html URLS to My Efforts with FreeBSD 14.0 Current on the Raspberry Pi 4B and documentation: https://ghostbsd-arm64.blogspot.com/ https://ghostbsd-arm64.blogspot.com/2023/01/hookup-gdb-to-black-magic-probe-v23.html Hooking up USB Serial port to Black Magic Probe https://ghostbsd-arm64.blogspot.com/2023/01/time-make-j4-buildworld.html FreeBSD 14.0 make -j4 buildworld https://ghostbsd-arm64.blogspot.com/2022/09/freebsd-140-compiling-kernel-for.html FreeBSD 14.0 snapshot install, use bsdinstall to a SSD drive, compiling make -j4 buildkernel -KERNCONF=GENERIC-VCHIQ https://ghostbsd-arm64.blogspot.com/2021/05/audit-your-boot-files-with-md5deep.html Audit your boot files with md5deep tool to verify basic system boot files https://ghostbsd-arm64.blogspot.com/2021/02/download-freebsd-140-current-version.html FreeBSD 14.0 snapshot install method Conclusion: 1. Uart0 Serial Console is working and I can see boot messages via USB serial port on Black Magic Probe 2. I can enter boot into and use single user mode of FreeBSD 3. Shared my work with others via my Google Blogpost website https://ghostbsd-arm64.blogspot.com/ 4. Working to get a JTAG debugger working with Black Magic Probe hardware debugger to use GDB software. Not Finished 5. What do others suggest for a JTAG hardware debugging environment on the ARM64 aarch64?  Anything specific for Raspberry Pi 4B? Maybe is the RasPi4B hardware system is complete enough to just debug via GDB. 6. I realize in my efforts to be complete, I write a book instead of a short note.  Sorry, always feel I am forgetting some data or a piece of good information Mark, thanks again for your suggestion to use a current SNAPShot image.  I appreciate a direct short answer. To the other person testing uart serial ports look at Raspberry Pi documentation.  Set some GPIO pins to Alt-X in the config.txt file in the boot directory.  Look at the pictures and URL Links I share on "Hookup GDB to black magic probe." uart_enable=1  3.3V  3milliamp drive. https://pinout.xyz/pinout/uart https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#disable-other-gpio-peripherals https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#gpio-and-the-40-pin-header -- Fred Finster fred@thegalacticzoo.com +1 971-718-9144 https://GhostBSD-ARM64.blogspot.com https://ghostbsd.org