Re: Missing in action during arm64/aarch64 builds: no pine64_plus.dtb to be found from buildkernel, installkernel, or u-boot-pine64

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Missing in action during arm64/aarch64 builds: no pine64_plus.dtb to be found from buildkernel, installkernel, or u-boot-pine64

Tim Kientzle-2

> On Sep 9, 2017, at 4:35 PM, Mark Millard <[hidden email]> wrote:
>
> crochet goes to the trouble to have logic to
> build and install pine64_plus.dtb (based on
> arm64/pine64_plus.dts ).
>

I'm not sure about Pine64 in particular, but generally
only the DTS file is actually required.

Crochet tries to provide a dtb file (converting the dts if necessary)
partly for documentation and partly to make it easier to edit the
device tree file.

This is especially convenient in cases where the
original DTB file depends heavily on other include files;
converting DTS to DTB gives you a fully standalone DTB
file that can be edited (for example, to enable additional
serial ports) and recompiled without having the full source
tree available.

This is probably less important now that overlay DTBs are
more commonly supported.

Tim




_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Missing in action during arm64/aarch64 builds: no pine64_plus.dtb to be found from buildkernel, installkernel, or u-boot-pine64

Mark Millard-2
On 2017-Sep-10, at 10:26 AM, Tim Kientzle <tim at kientzle.com> wrote:

>> On Sep 9, 2017, at 4:35 PM, Mark Millard <markmi at dsl-only.net> wrote:
>>
>> crochet goes to the trouble to have logic to
>> build and install pine64_plus.dtb (based on
>> arm64/pine64_plus.dts ).
>>
>
> I'm not sure about Pine64 in particular, but generally
> only the DTS file is actually required.

[Note:
I used crochet source code to figure out a set of manual
steps sufficient to produce a pine64_plus.dtb to copy to
the boot msdosfs file system.]

Some of the #include structure that the existing
pine64_plus.dts.dts depends on:

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts
/usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts:#include "sun50i-a64-pine64-plus.dts"
/usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts:#include "a64.dtsi"
/usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts:#include <dt-bindings/gpio/gpio.h>

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts
/usr/src/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts:#include "sun50i-a64-pine64-common.dtsi"

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts
/usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts:#include "sun50i-a64-pine64-plus.dts"
/usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts:#include "a64.dtsi"
/usr/src/sys/boot/fdt/dts/arm64/pine64_plus.dts:#include <dt-bindings/gpio/gpio.h>

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts
/usr/src/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts:#include "sun50i-a64-pine64-common.dtsi"

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-common.dtsi
/usr/src/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-common.dtsi:#include "sun50i-a64.dtsi"

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi
/usr/src/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi:#include <dt-bindings/interrupt-controller/arm-gic.h>
/usr/src/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi:#include <dt-bindings/pinctrl/sun4i-a10.h>

# grep "#include" /usr/src/sys /usr/src/sys/boot/fdt/dts/arm64/a64.dtsi

(Yep: nothing for that last one.)

I would not guess that the full structure is a appropriate as a
substitute for the dtb/pine64_plus.dtb part of the msdosfs
partition for booting the Pine64+ 2GB :

# find /mnt -print
/mnt
/mnt/startup.nsh
/mnt/EFI
/mnt/EFI/BOOT
/mnt/EFI/BOOT/bootaa64.efi
/mnt/dtb
/mnt/dtb/pine64_plus.dtb
/mnt/System Volume Information
/mnt/System Volume Information/WPSettings.dat

# ls -lt /usr/local/share/u-boot/u-boot-pine64/u-boot-sunxi-with-spl.bin
-rw-r--r--  1 root  wheel  505940 Sep  6 00:49 /usr/local/share/u-boot/u-boot-pine64/u-boot-sunxi-with-spl.bin

(*.bin dd'd appropriately.)

So there still seems to be a lack of appropriate .dt* material for
direct use/placement on the boot media. Instead manual extra steps
are required relative to *.dt* files.

> Crochet tries to provide a dtb file (converting the dts if necessary)
> partly for documentation and partly to make it easier to edit the
> device tree file.
>
> This is especially convenient in cases where the
> original DTB file depends heavily on other include files;
> converting DTS to DTB gives you a fully standalone DTB
> file that can be edited (for example, to enable additional
> serial ports) and recompiled without having the full source
> tree available.

The above is the kind of context that the Pine64+'s
have.

It does not appear to me that the existing pine64_plus.dts
is set up for more direct use (even with other supporting
files).

> This is probably less important now that overlay DTBs are
> more commonly supported.

Whatever this is, it seems to not be in use for much (any?)
of the Pine64+ structuring of such things in head -r323246 .


===
Mark Millard
markmi at dsl-only.net




_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Missing in action during arm64/aarch64 builds: no pine64_plus.dtb to be found from buildkernel, installkernel, or u-boot-pine64

Mark Millard-2
In reply to this post by Tim Kientzle-2
On 2017-Sep-11, at 12:56 AM, Emmanuel Vadot <manu at bidouilliste.com> wrote:

> On Sat, 9 Sep 2017 16:35:11 -0700
> Mark Millard <markmi at dsl-only.net> wrote:
>
>> The context here is head -r323246 amd64 -> arm64/aarch64
>> cross build activity.
>>
>> From installkernel :
>>
>> # find /usr/obj/DESTDIRs/clang-cortexA53-installkernel/ -name "*.dtb" -print
>> #
>>
>> From buildkernel :
>>
>> # find /usr/obj/cortexA53_clang/arm64.aarch64/ -name "*.dtb" -print
>> #
>>
>> From installing u-boot-pine64 :
>>
>> # ls -lTd /usr/local/share/u-boot/u-boot-pine64/*
>> -rw-r--r--  1 root  wheel     125 Sep  6 00:49:44 2017 /usr/local/share/u-boot/u-boot-pine64/README
>> -rw-r--r--  1 root  wheel  505940 Sep  6 00:49:43 2017 /usr/local/share/u-boot/u-boot-pine64/u-boot-sunxi-with-spl.bin
>>
>>
>> As stands the file must be manually produced.
>
> Since the latest update of u-boot-pine64 the dtb is included in u-boot.
> U-Boot loads it and pass it to boot1.efi.

Cool . . .

Trying:

# mv /boot/efi/dtb/pine64_plus.dtb /boot/efi/dtb/no_pine64_plus.dtb
# shutdown -r now

does reboot just fine. As does:

# rm -fr /boot/efi/dtb
# shutdown -r now

A cold  boot also boots into the kernel.

So no .dts or .dtb is needed for the Pine64+ 2GB .

For reference after this:

# mount
/dev/label/PINE642GAroot on / (ufs, NFS exported, local, noatime, soft-updates, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
/dev/label/PINE642GAboot on /boot/efi (msdosfs, local, noatime)

# find /boot/efi
/boot/efi
/boot/efi/startup.nsh
/boot/efi/EFI
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/bootaa64.efi
/boot/efi/System Volume Information
/boot/efi/System Volume Information/WPSettings.dat


I have no clue if this hidden dtb contributes to the
USB problem(s) or not:

. . .
cryptosoft0: <software crypto>
NULL mp in getnewvnode(9), tag crossmp
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
ugen0.1: <Generic OHCI root HUB> at usbus0
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus0: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
mmcsd0: 32GB <SDHC SE32G 8.0 SN 09781303 MFG 07/2017 by 3 SD> at mmc0 50.0MHz/4bit/65535-block
. . .

My old -r308??? context not only could use
usb devices but had the root file system on
a USB SSD. But modernizing made plugged in
USB devices not show up.


>> crochet goes to the trouble to have logic to
>> build and install pine64_plus.dtb (based on
>> arm64/pine64_plus.dts ).

Looks like crochet does not need to produce the
.dtb .

It is not even clear that if a dtb/pine64_plus.dtb
exists that it is used for anything.

>> Is pine64_plus.dtb required for the likes of
>> Pine64+ 2GB's?

Now answered as: no.

>> If yes: should it be automatically
>> built and installed someplace for arm64/aarch64
>> builds (even if more manual steps are required to
>> have the final placement on the Pine64 media)?


===
Mark Millard
markmi at  dsl-only.net

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"