From nobody Fri Apr 08 12:52:25 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 C34231A83DEF for ; Fri, 8 Apr 2022 12:52:37 +0000 (UTC) (envelope-from al@datazap.net) Received: from mail-ot1-x362.google.com (mail-ot1-x362.google.com [IPv6:2607:f8b0:4864:20::362]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZdSh57LHz3hJc for ; Fri, 8 Apr 2022 12:52:36 +0000 (UTC) (envelope-from al@datazap.net) Received: by mail-ot1-x362.google.com with SMTP id n19-20020a9d7113000000b005cd9cff76c3so6043610otj.1 for ; Fri, 08 Apr 2022 05:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datazap-net.20210112.gappssmtp.com; s=20210112; h=subject:to:references:from:message-id:disposition-notification-to :date:user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=uNbjB2SjTcQPEoN5y0BWEj4FTVRTBsVgdFAM123H57E=; b=GBK2j7+Mv4+43LLgy2eHWxr5WA9rCm0B6qm8hN7bZJcgM8PqZmrSFhj4SNAFnNL6Ff x0IQ696IFIALuNpFGr5aJR28UKLCiKh59mR5OuF4q99IboUpgHP0ag0P1vf0bU8bRSqO S75dVy6Tmj/dlUeb/10qdLp+Soe9TYP30UbtBMTNuK0HaOY1FXj8o5Q6d1U76jQJbbvn uOMSkHq/uUmnk9wQwwQNE1kH8pMVlXkrTBzjKB2v86HBQr5G5s0ILkmNm+XthSy3vQrX O//1E10Q7VySqyjH2MlYc/pHnQL/YL0xjrozMgV6InZaGERlLpi6bHAn7MEF7iXWhOPX 5XRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=uNbjB2SjTcQPEoN5y0BWEj4FTVRTBsVgdFAM123H57E=; b=gVtXqz+GDC3uVODjzITC5QBgrfH656zUV5AYRzJOqm778PCLEfHafI1u0PbVHWaxEP 2FPeG6J4PAWaQExwR4+gUwVLYYKJzJpWNbl0iqVRxKMrCtQ4+curm+xIYLMJ4YYe8jgf D+TMPUOzKeHRGuQfFekL00YqSS/4hTj4Hy4HL7EhCBnSJ9KnJV9q6gS/z+kNF0UWEUfq fKGH0SqVTDiBLiPkhvtz10L2hNGvA0G3hDLCmL+0Js4+sROdgxM2V2DNLQF5BeWyC7dU wDjHwvIuYkk/MzdtOUQpRqyzzTGb3f0x0mRe2nTm/aR+LpYR5dmwRLZwgyd8GV1E9c9f vX6A== X-Gm-Message-State: AOAM533cFcfIK2dm+Rm1PstG5UHhHjDe4DXRpkImeQSfxSsyjCMFHU+w ZUiGPRjHK6qh5km+C9ZH0MyB424epJxo9Go8gWay6M+HW7wcZA== X-Google-Smtp-Source: ABdhPJyh2DPyqW89ZMzDhwwstemAOYFDVLyMipj7kqwF2zW9Bfrx6/xRyyKs3NYVu08oVK8Kl1oE+9V8fEhp X-Received: by 2002:a9d:3aa:0:b0:5e6:b286:5df with SMTP id f39-20020a9d03aa000000b005e6b28605dfmr2656137otf.140.1649422349884; Fri, 08 Apr 2022 05:52:29 -0700 (PDT) Received: from agnus.datazap.net (agnus.datazap.net. [209.160.40.35]) by smtp-relay.gmail.com with ESMTP id m6-20020a056870a10600b000e28aca4358sm87730oae.13.2022.04.08.05.52.29; Fri, 08 Apr 2022 05:52:29 -0700 (PDT) X-Relaying-Domain: datazap.net Received: from [127.0.0.1] (localhost [127.0.0.1]) by agnus.datazap.net (Postfix) with ESMTP id 6253EB794B; Fri, 8 Apr 2022 08:52:25 -0400 (EDT) Subject: Re: Booting FreeBSD 13-RELEASE on AmigaOne X5000 (Cyrus P5020) To: widelec-bb , "freebsd-ppc@FreeBSD.org" References: From: Al Message-ID: <82dd03be-dfd3-8d7b-0502-8c192e81e13e@datazap.net> Disposition-Notification-To: Al Date: Fri, 8 Apr 2022 08:52:25 -0400 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 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 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4KZdSh57LHz3hJc X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=datazap-net.20210112.gappssmtp.com header.s=20210112 header.b=GBK2j7+M; dmarc=none; spf=none (mx1.freebsd.org: domain of al@datazap.net has no SPF policy when checking 2607:f8b0:4864:20::362) smtp.mailfrom=al@datazap.net X-Spamd-Result: default: False [-3.30 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[datazap-net.20210112.gappssmtp.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; DMARC_NA(0.00)[datazap.net]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[datazap-net.20210112.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::362:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-ppc]; FREEMAIL_TO(0.00)[protonmail.com,FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, On 07/04/22 14:29, widelec-bb wrote: > Hello. > > I'm trying to boot FreeBSD 13-RELEASE on AmigaOne x5000. I can load ubldr > from u-boot, but I can't get it to load the kernel. How can I do that? > > This is the boot sequence I have (from u-boot console): > > X5000> run bootfreebsd > reading ubldr > 315292 bytes read in 238 ms (1.3 MiB/s) > reading bsd_cyrus_p5020.dtb > 65536 bytes read in 254 ms (252 KiB/s) > ## 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 not set, will probe all devices. > Found U-Boot device: disk > Probing all devices... > Checking unit=0 slice= partition=... > Checking unit=1 slice= partition=... > Checking unit=2 slice= partition=... good. > Booting from disk2s4a: > / > can't load 'kernel' > > Type '?' for a list of commands, 'help' for more detailed help. > > The bootfreebsd variable is defined as shown at > https://wiki.freebsd.org/powerpc/UBoot-Install that is: > fatload sata 1:1 $loadaddr ubldr; > fatload sata 1:1 $fdtaddr bsd_cyrus_p5020.dtb; > fdt addr $fdtaddr; > fdt boardsetup; > bootelf $loadaddr; > > The addr variables are defined as: > loadaddr=1000000 > fdtaddr=c00000 > > File bsd_cyrus_p5020.dtb is downloaded from > https://people.freebsd.org/~jhibbits/cyrus_p5020.dtb > > ubdlr lsdev: > loader> lsdev > disk devices: > disk0 (MMC) > disk1 (SATA) > disk1p1: EFI > disk1p2: APFS > disk2 (SATA) > disk2s1: DOS/Windows > disk2s2: Linux > disk2s3: Linux > disk2s4: FreeBSD > disk2s4a: FreeBSD UFS > disk2s4b: FreeBSD swap > net devices: > net0: > > FreeBSD partitions have been created under VM (VirtualBox/amd64) using > gpart, following EXAMPLES/MBR section from manual. > Output of "gpart show" on VM: > => 63 4000797296 da0 MBR (1.9T) > 63 1985 - free - (993K) > 2048 4194304 1 fat32 (2.0G) > 4196352 104857600 2 linux-data (50G) > 109053952 1074120704 3 linux-data (512G) > 1183174656 268435456 4 freebsd (128G) > 1451610112 2549187247 - free - (1.2T) > > => 0 268435456 da0s4 BSD (128G) > 0 104857600 1 freebsd-ufs (50G) > 104857600 33554432 2 freebsd-swap (16G) > 138412032 130023424 - free - (62G) > > It is "da0" because disk was connected via sata->usb adapter. > On disk (da0s4a) I extracted kernel.txz and base.txz downloaded from > https://download.freebsd.org/releases/powerpc/powerpc64/13.0-RELEASE/ > > I'm probably missing some simple, but required step, so any help will be > appreciated. > > I think those are not relevant, but I tried also: > 1. switching disk to become only disk in system and primary device (the > first partition become sata 0:1 in uboot) > 2. writing installation ISO to the usb stick > 3. building system from sources and extracting generated kernel.txz > and base.txz > 4. writing installation ISO generated during build from source to USB stick > 5. creating FreeBSD partitions on USB stick and extracting kernel.txz > and base.txz on it (to exclude interference of the Linux partitions > present on sata disk) > 6. moving /boot/kernel/kernel to the root directory (partition da0s4a using > names from "gpart show" output shown above) > > In all those cases I end up with same error in ubldr (can't load 'kernel') > with FreeBSD partition properly discovered, variables loaderdev and currdev > in ubldr were assigned to correct device name. > > When building system from sources I used following commands: > make -s -j3 buildworld buildkernel TARGET_ARCH=powerpc64 KERNCONF=QORIQ64 > make -C release cdrom ARCH=powerpc > The second one have "ARCH" variable set which is not shown on wiki, > but seems to be required to run correctly. > > - widelec-BB > You need to add: setenv loaderdev disk0s2a Also, maybe: setenv bootargs vfs.root.mountfrom=ufs:/dev/ada1s2a Of course, you will need to change the device to match yours. Also, you may need a newer .dtb. I can email you one if you need it. Please let me know if you have any other questions. Kind Regards, Al