From nobody Tue Oct 25 18:00:45 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 4Mxfr200h0z4gVY6 for ; Tue, 25 Oct 2022 18:00:50 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.gq1.yahoo.com (sonic309-21.consmr.mail.gq1.yahoo.com [98.137.65.147]) (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 4Mxfr10Pcwz3GgS for ; Tue, 25 Oct 2022 18:00:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666720847; bh=E8rnek2ipiq2TQ3HmdN5SLT+Q30V341CVOzbzfkNFQw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=qpbG92PBL0Qy/mGLJ14BR7vffcLjqudwIgcDQKfaRzFlvZ50ke6gO8ArtpZ8TkGeTzsvdQhoHM5K1fvl0vQ7pAytmU55fnkq2KBFc4QH3T4/so0avMDt5qo4NaDB9LRpnxS1p3fXgJcR/PVIcSUaJTWTT6IK9sAjYdTmAFTKIX7a7j/IpCWY+VhrHJtKIFmlrJS6Kc9IvFvOTPZ2c3rEPelu93E0scg/fijWSpCwyl9H3ELDsMZTZcAZov/hG2l0gZNpVXkGiKrJYho8ocRiuNDYezzBP2uqFDtib3RdagwgVMWtwPDvfNfexcGXrjzJ6zu72f05TyUcYaNZA5Hj9A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666720847; bh=ftB9Nrt7EdU0qMUjKSftwReXt4PB0qaLkkxxVA0cy9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s 8koho47_8.UjH0CXWfLg3ivHN18_t5DiO0MplLmeNm1HT0GaurvZgtgBthNtDuoo5HMJb7qaYKei uccA9aq6j8Pu3Rl6WpuLZTmyNAU99bM_DVRui8JdhllZbRovCuS5gt9jgVV4xuDSO2H8YsSwKMJc M0Vko4XVGKpyrZdQ0EUpDuiy_hCPIY4os0nUvCxbHDsQuxGhH62kyCamIBLkf9HKm2FIXp1XVcX. NeHrqSW2cRCr4UkXsfA.L704mjIJbexuOwDMLLaFkPMX9SYHdnqDi4lLUdkko3tKcUEnjVZkMY8g akWDqF9RcC3IgADMBB02Z.ZqpXN3jA2pqBJ1v4gt5BISRYFgc38wK24h7hPzFdSllRo_PSDlD8bY xGwalufHyAMNj.MRkZeGMOHY2Kf7zkcgfAFIZGEYPDD2HTH_XW0QMTIE7mnaQR2YqKbg6Dqp4DpU 4UG50vaG16TrUIqrqwZBULYSRBE2V4HEkbePmN_KWQI6BEUJgMHdpf7JytCg8Bh5LX7AAUgpHnsM Tb3SWlkY9_tHTu_byHaV9VvaY.q.Kv9OuVCt9JMb06ZMvxs7Zx40tF9izKSVpmY.Tr8zMfplKu9a cKRU- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Tue, 25 Oct 2022 18:00:47 +0000 Received: by hermes--production-gq1-754cb59848-m8kdv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fa95336dd427ff86d98caa5960953b21; Tue, 25 Oct 2022 18:00:46 +0000 (UTC) Content-Type: text/plain; charset=utf-8 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 16.0 \(3696.120.41.1.1\)) Subject: Re: BeagleBone uboot: BeagleBone Green Gateway not defined in uboot? From: Mark Millard In-Reply-To: <1D4FD611-7420-4E52-9414-67F282DDA4C6@netsense.nl> Date: Tue, 25 Oct 2022 11:00:45 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <85E7A48D-89DB-49C5-B2A1-501CF7C125DE@yahoo.com> References: <0EDDBAEA-CA91-4A64-BB93-BCB5D067BE00@netsense.nl> <467642CD-DF11-448C-AACA-43F7FB4DB572@yahoo.com> <50347B94-0B6D-463C-9B87-499EBEA537D7@yahoo.com> <1D4FD611-7420-4E52-9414-67F282DDA4C6@netsense.nl> To: Johan Henselmans X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Mxfr10Pcwz3GgS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=qpbG92PB; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-2.47 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.974]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.147:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N On 2022-Oct-25, at 00:25, Johan Henselmans wrote: > I made some comments in between on both mails. >=20 >>>=20 >>> . . . >>>=20 >>> # more /usr/ports/sysutils/u-boot-beaglebone/pkg-descr >>> U-Boot loader for BeagleBone and BeagleBone Black. >>>=20 >>> To install this bootloader, copy the files MLO and bb-uboot.img to = the FAT >>> partition on an SD card or the eMMC. Normally this is partition 1, = but >>> different partitions can be set with U-Boot environment variables. >>>=20 >>> This version is patched so that: >>> * API features are enabled. >>> * A boot.scr (U-Boot scripts ) that loads ubldr.bin and execute it = is included >>>=20 >>> For information about running FreeBSD on BeagleBone or BeagleBone = Black, see >>> https://wiki.freebsd.org/FreeBSD/arm/BeagleBone Looks like that should be(?): = https://wiki.freebsd.org/arm/BeagleBoneBlack >>> You were not explicit. Did you do as described with MLO >>> and bb-uboot.img ? >>>=20 >=20 >=20 > Yes I did. Only thing I did not know how to do was where to put the = boot.scr that the READMe mentions. >=20 > That is why I reran the script on a Beaglebone, hoping that would = install the script. Mind you, I am not a > pkg specialist. I do not know how to find out how this script is = created and where it is supposed to put. > I looked in /usr/port/sysutils/u-boot-master and = /usr/port/sysutils/u-boot-beaglebone, but could not understand > where this boot.scr was supposed to go I'll note that FreeBSD 12 still has images for a beaglebone. For example: = http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/12.4/FreeBSD-12.4= -PRERELEASE-arm-armv7-BEAGLEBONE-20221014-r372617.img.xz =46rom that you can see some of what goes where in the msdosfs on the boot media, for example: # mdconfig -u md0 -f = ~/FreeBSD-12.4-PRERELEASE-arm-armv7-BEAGLEBONE-20221014-r372617.img # mount -onoatime -tmsdosfs /dev/md0s1 /mnt # ls -Tld /mnt/* drwxr-xr-x 1 root wheel 4096 Oct 13 23:56:24 2022 /mnt/EFI -rwxr-xr-x 1 root wheel 103876 Oct 13 20:17:38 2022 /mnt/MLO drwxr-xr-x 1 root wheel 8192 Oct 13 23:56:24 2022 /mnt/dtb -rwxr-xr-x 1 root wheel 1163404 Oct 13 20:17:38 2022 /mnt/u-boot.img -r-xr-xr-x 1 root wheel 386104 Oct 13 23:47:42 2022 /mnt/ubldr.bin This makes it look like bb-uboot.img is renamed during the copy into the msdosfs, if it is ever named bb-uboot.img anyway. (Again, I'm not familiar with any beaglebone specifics.) The lack of boot.scr is interesting. My expectation is that boot.src goes in same directory with u-boot.img and ubldr.bin : u-boot.img reads boot.scr and follows the instructions that are there in order to load ubldr.bin . Looking elsewhere for boot.scr would seem odd. (But, I'll note that I know nothing of MLO or its implications.) I'll note that there is: # find /mnt/ -print | grep am335x /mnt/dtb/am335x-bone.dtb /mnt/dtb/am335x-boneblack.dtb /mnt/dtb/am335x-boneblack-wireless.dtb /mnt/dtb/am335x-bonegreen.dtb /mnt/dtb/am335x-bonegreen-wireless.dtb /mnt/dtb/am335x-boneblue.dtb /mnt/dtb/am335x-pocketbeagle.dtb That suggests one place were the .dtb might need to go. I've no clue if that is the only place vs. needing a copy someplace in UFS/ZFS space for FreeBSD to directly access. >>>> That resulted in the message that there was no device tree: >>>> =3D=3D=3D=3D=3D >>>> Loading Environment from EXT4... >>>> ** Unable to use mmc 0:1 for loading the env ** >>>> Board: BeagleBone Black >>>> not set. Validating first E-fuse MAC >>>> BeagleBone Black: >>>> Model: SeeedStudio BeagleBone Green Gateway: >>>> BeagleBone: cape eeprom: i2c_probe: 0x54: >>>> BeagleBone: cape eeprom: i2c_probe: 0x55: >>>> BeagleBone: cape eeprom: i2c_probe: 0x56: >>>> BeagleBone: cape eeprom: i2c_probe: 0x57: >>>> Net: eth0: MII MODE >>>> cpsw, usb_ether >>>> Press SPACE to abort autoboot in 0 seconds >>>> board_name=3D[A335BNLT] ... >>>> board_rev=3D[GG1A] ... >>>> switch to partitions #0, OK >>>> mmc0 is current device >>>> SD/MMC found on device 0 >>>> switch to partitions #0, OK >>>> mmc0 is current device >>>> Scanning mmc 0:1... >>>> Found EFI removable media binary efi/boot/bootarm.efi >>>> libfdt fdt_check_header(): FDT_ERR_BADMAGIC >>>>=20 >>>> >>>> No valid device tree blob found! >>>> WARNING! Trying to fire up the kernel, but no device tree blob = found! >>>> =3D=3D=3D=3D=3D >>>>=20 >>>>=20 >>>> How can I add a device tree blob for the BeagleBone Green Gateway? >>>>=20 >>>=20 >>> Note: I've no experience with any BeagleBone variant. >>> My comments are rather generic. >>>=20 >>=20 >> Hmm, I do not see am335x-bonegreen-gateway.dts in any >> of the source code trees I've got for releng/13.0 , >> releng/13.1 , stable/13 , or main [so: 14] : >>=20 >> /usr/13_0R-src/sys/contrib/device-tree/src/arm/am335x-bone.dts >> = /usr/13_0R-src/sys/contrib/device-tree/src/arm/am335x-boneblack-wireless.d= ts >> /usr/13_0R-src/sys/contrib/device-tree/src/arm/am335x-boneblack.dts >> /usr/13_0R-src/sys/contrib/device-tree/src/arm/am335x-boneblue.dts >> = /usr/13_0R-src/sys/contrib/device-tree/src/arm/am335x-bonegreen-wireless.d= ts >> /usr/13_0R-src/sys/contrib/device-tree/src/arm/am335x-bonegreen.dts >>=20 >> /usr/13_1R-src/sys/contrib/device-tree/src/arm/am335x-bone.dts >> = /usr/13_1R-src/sys/contrib/device-tree/src/arm/am335x-boneblack-wireless.d= ts >> /usr/13_1R-src/sys/contrib/device-tree/src/arm/am335x-boneblack.dts >> /usr/13_1R-src/sys/contrib/device-tree/src/arm/am335x-boneblue.dts >> = /usr/13_1R-src/sys/contrib/device-tree/src/arm/am335x-bonegreen-wireless.d= ts >> /usr/13_1R-src/sys/contrib/device-tree/src/arm/am335x-bonegreen.dts >>=20 >> /usr/13S-src/sys/contrib/device-tree/src/arm/am335x-bone.dts >> = /usr/13S-src/sys/contrib/device-tree/src/arm/am335x-boneblack-wireless.dts= >> /usr/13S-src/sys/contrib/device-tree/src/arm/am335x-boneblack.dts >> /usr/13S-src/sys/contrib/device-tree/src/arm/am335x-boneblue.dts >> = /usr/13S-src/sys/contrib/device-tree/src/arm/am335x-bonegreen-wireless.dts= >> /usr/13S-src/sys/contrib/device-tree/src/arm/am335x-bonegreen.dts >>=20 >> /usr/main-src/sys/contrib/device-tree/src/arm/am335x-bone.dts >> = /usr/main-src/sys/contrib/device-tree/src/arm/am335x-boneblack-wireless.dt= s >> /usr/main-src/sys/contrib/device-tree/src/arm/am335x-boneblack.dts >> /usr/main-src/sys/contrib/device-tree/src/arm/am335x-boneblue.dts >> = /usr/main-src/sys/contrib/device-tree/src/arm/am335x-bonegreen-wireless.dt= s >> /usr/main-src/sys/contrib/device-tree/src/arm/am335x-bonegreen.dts >>=20 >> Looks like you would have to establish am335x-bonegreen-gateway.dtb >> another way as things are. >>=20 >> I also did not find am335x-bonegreen-gateway.dtb in: >>=20 >> https://github.com/torvalds/linux/tree/master/arch/arm/boot/dts/ >>=20 >> so it would likely be some time before it shows up there for FreeBSD >> to later import. >>=20 >> =3D=3D=3D >> Mark Millard >> marklmi at yahoo.com >>=20 >>=20 >=20 > It seems the Beaglebne stuf is located at = https://github.com/beagleboard/BeagleBoard-DeviceTrees/ >=20 > There is a am335x-bonegreen-gateway.dts available over there. I = don=E2=80=99t know why that stuff is not in torvalds tree. > I know that the debian version is created from = https://github.com/RobertCNelson/omap-image-builder >=20 > So my question would be then revolve around: how can I add that = version to FreeBSD arm? Is there some procedure > documented somehwere how I should do this? I've no clue if anyone supporting code for armv7 on FreeBSD would be willing to add and support .dts files that do not come from importing from the mainline linux tree (and any related files). They might require a port instead, sort of like how RPi* firmware is dealt with (including the .dtb files, that happen to be used directly, not via dts compiles). The .dts history visible via: = https://github.com/beagleboard/BeagleBoard-DeviceTrees/commits/v4.19.x-ti-= overlays/src/arm/am335x-bonegreen-gateway.dts and shows that the .dts was last updated on 2021-Dec-23. =3D=3D=3D Mark Millard marklmi at yahoo.com