From nobody Sat Apr 09 12:03:32 2022 X-Original-To: freebsd-ppc@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 B198F1A8905B for ; Sat, 9 Apr 2022 12:03:49 +0000 (UTC) (envelope-from widelecbb@protonmail.com) Received: from mail-4325.protonmail.ch (mail-4325.protonmail.ch [185.70.43.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KbDKw3T8Sz3sdc for ; Sat, 9 Apr 2022 12:03:48 +0000 (UTC) (envelope-from widelecbb@protonmail.com) Date: Sat, 09 Apr 2022 12:03:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1649505820; bh=S1doB2L2joaQ777xEwRMaDvu7f5eFdPtWkJm+GxGdUo=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=2Y1BwJtqzBuUE3IFfyi+sy4oQvm1uzyxrELGYrDpfyulgb/F1ANg6X12aAX/z+4Tf NUIXkEOcAMiFbeJb90/8iZSJB+rCf94z8E0wpOZRpOKwpPsrhhn9odWtDHPm+AO57q WlhVpk8sGjOLfw8n8gO8xezyL9PstnvDBu8REXiPEMmaZ8PVVa/2wMgIPfEGKCtqeB tH9J6AeAgCpOR79tpTWAU+/588IWiv8U997eqg989Y0fg1QnjcHeF2VMEVgUtEkPoS Cc4S/4LPo4XxmGCrlGhGvJIQ8w1oj90qoW8WN6wXdAs7pCjWnU1dAMwy00CELQXbhQ 2SYO5AjIPHSxA== To: widelec-bb From: widelec-bb Cc: Al , "freebsd-ppc@freebsd.org" Reply-To: widelec-bb Subject: Re: Booting FreeBSD 13-RELEASE on AmigaOne X5000 (Cyrus P5020) Message-ID: In-Reply-To: References: <82dd03be-dfd3-8d7b-0502-8c192e81e13e@datazap.net> <303a2905-e50a-1978-55d0-6e098a72f9c5@datazap.net> <6855f6b6-cf37-56e8-b48b-f9189e26e09c@datazap.net> List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KbDKw3T8Sz3sdc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=protonmail.com header.s=protonmail header.b=2Y1BwJtq; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (mx1.freebsd.org: domain of widelecbb@protonmail.com designates 185.70.43.25 as permitted sender) smtp.mailfrom=widelecbb@protonmail.com X-Spamd-Result: default: False [-1.79 / 15.00]; HAS_REPLYTO(0.00)[widelecbb@protonmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[protonmail.com]; R_SPF_ALLOW(-0.20)[+ip4:185.70.43.0/24]; RWL_MAILSPIKE_EXCELLENT(0.00)[185.70.43.25:from]; DKIM_TRACE(0.00)[protonmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; FREEMAIL_TO(0.00)[protonmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.79)[-0.793]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.99)[0.992]; NEURAL_HAM_LONG(-0.99)[-0.989]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ppc] X-ThisMailContainsUnwantedMimeParts: N > > You will need to compile the kernel and userland. > > You may want to put FreeBSD on it's own disk until you get it working. > > I already tried to use usb stick with only BSD partitions, but I guess > there is no harm in checking this with internal disk also. I tried once again from the beginning. Here is step by step log what did I = do. First, I created a VM on PC and installed FreeBSD from iso image. FreeBSD-13.0-RELEASE-amd64-disc1.iso, sha256: f78d4e5f53605592863852b39fa31a12f15893dc48cacecd875f2da72fa67ae5 After booting VM and login to FreeBSD: root@freebsd:~ # cd /usr/src/ root@freebsd:/usr/src # make -s -j3 buildworld buildkernel TARGET_ARCH=3Dpo= werpc64 KERNCONF=3DQORIQ64 -------------------------------------------------------------- >>> World build completed on Sat Apr 9 12:50:02 CEST 2022 >>> World built in 3697 seconds, ncpu: 4, make -j3 -------------------------------------------------------------- -------------------------------------------------------------- >>> Kernel build for QORIQ64 completed on Sat Apr 9 12:54:16 CEST 2022 -------------------------------------------------------------- >>> Kernel(s) QORIQ64 built in 254 seconds, ncpu: 4, make -j3 -------------------------------------------------------------- root@freebsd:/usr/src # make -C release cdrom TARGET_ARCH=3Dpowerpc64 TARGE= T=3Dpowerpc KERNCONF=3DQORIQ64 [long output without errors] Then I connected X5000 drive to VM using SATA->USB converter, and then: root@freebsd:/ # gpart destroy -F da0 da0 destroyed root@freebsd:/ # gpart create -s MBR da0 da0 created root@freebsd:/ # gpart add -t fat16 -s 512M da0 da0s1 added root@freebsd:/ # gpart add -t freebsd da0 da0s2 added root@freebsd:/ # gpart create -s BSD -n 20 da0s2 da0s2 created root@freebsd:/ # gpart add -t freebsd-ufs -s 512G da0s2 da0s2a added root@freebsd:/ # gpart add -t freebsd-swap -s 16G da0s2 da0s2b added root@freebsd:/ # gpart show =3D> 63 4000797296 da0 MBR (1.9T) 63 1 - free - (512B) 64 1048576 1 fat16 (512M) 1048640 3999748712 2 freebsd (1.9T) 4000797352 7 - free - (3.5K) =3D> 0 3999748712 da0s2 BSD (1.9T) 0 1073741824 1 freebsd-ufs (512G) 1073741824 33554432 2 freebsd-swap (16G) 1107296256 2892452456 - free - (1.3T) root@freebsd:~ # newfs_msdos -F16 /dev/da0s1 /dev/da0s1: 1048256 sectors in 32758 FAT16 clusters (16384 bytes/cluster) BytesPerSec=3D512 SecPerClust=3D32 ResSectors=3D1 FATs=3D2 RootDirEnts=3D51= 2 Media=3D0xf0 FATsecs=3D128 SecPerTrack=3D63 Heads=3D255 HiddenSecs=3D0 Hu= geSectors=3D1048576 root@freebsd:/ # newfs /dev/da0s2a /dev/da0s2a: 524288.0MB (1073741824 sectors) block size 32768, fragment siz= e 4096 =09using 839 cylinder groups of 625.22MB, 20007 blks, 80128 inodes. super-block backups (for fsck_ffs -b #) at: 192, 1280640, 2561088, 3841536, 5121984, 6402432... root@freebsd:/ # mkdir /mnt/fat root@freebsd:/ # mkdir /mnt/bsd root@freebsd:/ # mount -t msdos /dev/da0s1 /mnt/fat root@freebsd:/ # mount /dev/da0s2a /mnt/bsd root@freebsd:/ # cp /usr/obj/usr/src/powerpc.powerpc64/stand/powerpc/uboot/= ubldr /mnt/fat/ root@freebsd:/ # wget https://people.freebsd.org/~jhibbits/cyrus_p5020.dtb = -O /mnt/fat/bsd_cyrus_p5020.dtb root@freebsd:/mnt/bsd # openssl sha256 /mnt/fat/bsd_cyrus_p5020.dtb SHA256(/mnt/fat/bsd_cyrus_p5020.dtb)=3D 0fbbc5937e9fe9d34e19fe2f39b3c754cbb= fee7a89e4ae59b31ab9a37206e339 root@freebsd:/ # cd /mnt/bsd/ root@freebsd:/mnt/bsd # tar xf /usr/obj/usr/src/powerpc.powerpc64/release/b= ase.txz root@freebsd:/mnt/bsd # tar xf /usr/obj/usr/src/powerpc.powerpc64/release/k= ernel.txz root@freebsd:/mnt/bsd # cd root@freebsd:~ # umount /mnt/fat root@freebsd:~ # umount /mnt/bsd After that I turned off VM, disconnected drive and connected it to the X500= 0 as solo drive (no more SATA devices, first SATA port). In U-Boot I did: X5000> fatload sata 0:1 $loadaddr ubldr reading ubldr 965376 bytes read in 26 ms (35.4 MiB/s) X5000> fatload sata 0:1 $fdtaddr bsd_cyrus_p5020.dtb reading bsd_cyrus_p5020.dtb 65536 bytes read in 41 ms (1.5 MiB/s) X5000> fdt addr $fdtaddr X5000> fdt boardsetup X5000> setenv loaderdev disk1s2a X5000> setenv bootargs vfs.root.mountfrom=3Dufs:/dev/ada0s2a X5000> bootelf $loadaddr ## Starting application at 0x00010160 ... Consoles: U-Boot console Compatible U-Boot API signature found @0x7fe2efd8 FreeBSD/powerpc64 U-Boot loader, Revision 1.1 Number of U-Boot devices: 4 U-Boot env: loaderdev=3D'disk1s2a' Found U-Boot device: disk Checking unit=3D1 slice=3D2 partition=3D0... good. Booting from disk1s2a: / can't load 'kernel' Type '?' for a list of commands, 'help' for more detailed help. loader> show LINES=3D24 console=3Duboot currdev=3Ddisk1s2a: interpret=3DOK loaddev=3Ddisk1s2a: prompt=3Dloader> script.lang=3Dforth twiddle_divisor=3D1 usefdt=3D1 loader> lsdev disk devices: disk0 (MMC) disk1 (SATA) disk1s1: DOS/Windows disk1s2: FreeBSD disk1s2a: FreeBSD UFS disk1s2b: FreeBSD swap disk2 (SATA) Non-NCQ command time out Non-NCQ command time out Non-NCQ command time out net devices: net0: Unfortunatelly result was the same as before. The reason for error "Non-NCQ command time out" is no device connected to the second SATA port. Is there any step I missed during this procedure? - widelec-BB