From nobody Fri Jan 20 14:22:36 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 4Nz1t75Y9Qz2sgdh for ; Fri, 20 Jan 2023 14:22:39 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Received: from nmtao102.oxsus-vadesecure.net (mta-132a.oxsus-vadesecure.net [135.148.117.230]) (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 4Nz1t66MdWz3tBw for ; Fri, 20 Jan 2023 14:22:38 +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=H8o4C4dA; spf=pass (mx1.freebsd.org: domain of fred@thegalacticzoo.com designates 135.148.117.230 as permitted sender) smtp.mailfrom=fred@thegalacticzoo.com; dmarc=pass (policy=quarantine) header.from=thegalacticzoo.com DKIM-Signature: v=1; a=rsa-sha256; bh=DidGHnhc9KH4sqrtOhIYPaeFyMqeubY0InLs0L w6usU=; 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=1674224557; x=1674829357; b=H8o4C4dA+/NVdDWfxaNhcIPYzVAmCDclC850+96zU czeUu2WbQKgY/MoKYZUH3vHZbcrf4y/ptlSl+LNmH0PvDTg3mQCskqWgYj0pN4CP6O8FVGk vEuMTK7cGRlmmaECtEMHx+HX7mxLeqORUoU7sudj9b0I8DlFPDO32vcxShJw9hCEORJQeyO hzZaHyS6+K69zgu8pldCPflDHn1kAcdMQwIsLml+9AeloIJs+Mr8EryuACCefwoIiyHUNzs 0/6FZuuECoT8ra/hbmGnjVg09kCbDKVC6EWquwMliTPcchXzsvLKzaof+6IYrnxyweQMeI1 H7wv1XfcsVX8v0pUA== Received: from proxy-3.proxy.cloudus.ewr.xion.oxcs.net ([76.14.221.149]) by oxsus1nmtao02p.internal.vadesecure.com with ngmta id 26970e9e-173c0a5d4340f7ed; Fri, 20 Jan 2023 14:22:37 +0000 Message-ID: Date: Fri, 20 Jan 2023 06:22:36 -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 Content-Language: en-US To: freebsd-arm@freebsd.org From: Fred Finster Subject: Raspberry Pi 4B not booting single user mode on FreeBSD 14.0 aarch64. Does it work for you? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-2.99 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_LONG(-1.00)[-0.998]; NEURAL_HAM_SHORT(-1.00)[-0.995]; DMARC_POLICY_ALLOW(-0.50)[thegalacticzoo.com,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:135.148.117.230]; R_DKIM_ALLOW(-0.20)[webcom.xion.oxcs.net:s=mail1]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; ASN(0.00)[asn:16276, ipnet:135.148.0.0/17, country:FR]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[webcom.xion.oxcs.net:+]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[135.148.117.230:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[135.148.117.230:from] X-Rspamd-Queue-Id: 4Nz1t66MdWz3tBw X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N 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 2023 root@Fred_RasPi4B:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-VCHIQ arm64  With beastie_disable="NO"  I tried the set boot options  7 3 safe mode  :off 4 single user  :on 5 verbose       :on backspace   main menu enter  boot into single user mode Warning:  no time-of-day  clock registered,  system time will not be set accurately start_init:  trying /sbin/init                   gets to /sbin/init and hangs here Is there specific documentation relating to booting into Single User Mode for aarch64 ARM64? What should I read to understand how to trouble shoot booting the u-boot and initial FreeBSD code? If you are in U-Boot prompt,  will "boot -s"  boot you up to single user mode per the documentation? I assume others using other aarch64 ARM SBC boards have different tools for troubleshooting /sbin/init code. From FreeBSD forums: https://forums.freebsd.org/threads/freebsb-12-boot-halts-on-rpi-3.69000/ Here is the contents of  file /boot/loader.conf, I setup based on the above URL.  cat /boot/loader.conf # beastie_disable="NO" # loader_color="YES" # Disable the beastie menu and color beastie_disable="YES" loader_color="NO" vm.pageout_oom_seq="4096" vm.pfault_oom_attempts="1" kern.cam.boot_delay="5000" I have also tried the  nextboot -o "-s" -k kernel https://www.freebsd.org/cgi/man.cgi?nextboot(8) man nextboot FILES      /boot/nextboot.conf  The configuration file that the nextboot                           configuration is written into. EXAMPLES      To boot the GENERIC kernel with the nextboot command:            nextboot -k GENERIC      To enable into single user mode with the normal kernel:            nextboot -o "-s" -k kernel root@Fred_RasPi4B:~ # ls -ld /boot/k* drwxr-xr-x  2 root  wheel  15360 Jan 15 23:32 /boot/kernel drwxr-xr-x  2 root  wheel  15360 Dec 13 11:43 /boot/kernel.old drwxr-xr-x  2 root  wheel  15360 Aug  5 02:31 /boot/kernel.original.F14 root@Fred_RasPi4B:~ # kldstat Id Refs Address                Size Name  1   45 0xffff000000000000  1319fa0 kernel  2    1 0xffff0000ff800000    5d000 linux64.ko  3    1 0xffff0000ff85d000    36000 linux_common.ko  4    1 0xffff0000ff893000    3c000 netlink.ko  5    1 0xffff0000ff8cf000    35000 if_rtwn_usb.ko  6    2 0xffff0000ff904000    7b000 wlan.ko  7    1 0xffff0000ff97f000    3d000 rtwn.ko  8    1 0xffff0000ff9bc000    24000 uhid.ko  9    1 0xffff0000ffc00000    26000 ums.ko 10    1 0xffff0000ffc26000    25000 usbhid.ko 11    1 0xffff0000ffc4b000    25000 hidbus.ko 12    1 0xffff0000ffc70000    25000 wmt.ko 13    1 0xffff0000ffc95000    22000 mac_ntpd.ko root@Fred_RasPi4B:~ # ls -l /boot/ne* -rw-------  1 root  wheel  58 Jan 20 04:08 /boot/nextboot.conf root@Fred_RasPi4B:~ # cat /boot/nextboot.conf nextboot_enable="YES" kernel_options="-s" kernel="kernel" root@Fred_RasPi4B:~ # shutdown -r now Shutdown NOW! shutdown: [pid 2409] root@Fred_RasPi4B:~ # *** FINAL System shutdown message from root@Fred_RasPi4B *** System going down IMMEDIATELY System shutdown time has arrived Connection to 192.168.1.7 closed by remote host. Connection to 192.168.1.7 closed. Hangs at these two lines: Warning: no time-of-day clcok registered,  system time will not be set accurately. start_init: trying /sbin/init Ctrl-T  Ctrl-C, does nothing,  Ctrl-Alt-Delete  reboots the system I have not hooked up the debugger yet to see where and why the single user mode is hung up after /sbin/init starts Warning:  no time-of-day  clock registered start_init:  trying /sbin/init                   gets to /sbin/init and hangs here Debugger That I have available  Black Magic Probe V2.3 Debugger. https://black-magic.org/ Can purchase here: https://1bitsquared.com/products/black-magic-probe Black Magic Probe V2.3 url Links: https://black-magic.org/getting-started.html  Getting Started page, where to buy. Connect the Black Magic Probe to your computer’s USB port with mini USB cable. Video Tutorial https://youtu.be/ANM0fdAqDow https://black-magic.org/hardware.html Blog with Hardware Version Pictures and Notes Hackaday writeup:  https://hackaday.com/tag/black-magic-probe/ Get Started    https://black-magic.org/getting-started.html https://news.ycombinator.com/item?id=19441088 -- Fred Finster fred@thegalacticzoo.com +1 971-718-9144 https://GhostBSD-ARM64.blogspot.com https://ghostbsd.org