freebsd / crochet

Build FreeBSD images for RaspberryPi, BeagleBone, PandaBoard, and others.
BSD 2-Clause "Simplified" License
612 stars 189 forks source link

Missing files for Allwinner kernel build #163

Closed felix closed 8 years ago

felix commented 8 years ago

Building for Banana Pi currently fails while building kernel with the following:

>>> stage 3.1: building everything
--------------------------------------------------------------
...
cd: /usr/home/felix/src/crochet/work/obj/arm.armv6/usr/home/felix/src/crochet/src/sys/ALLWINNER: No such file or directory
*** [buildkernel] Error code 2

World seems to build fine. My FreeBSD source is on stable/11 branch at 2b54e88 and crochet is at current HEAD of 7feec7a. My config.sh is:

board_setup BananaPi
option ImageSize 1950mb # for 2 Gigabyte card
option Growfs
option CompressImage xz
option User felix
option Ntpd
FREEBSD_SRC=${TOPDIR}/src
kientzle commented 8 years ago

The kernel build process first "configures" a kernel by building a directory full of compile information, then changes into that directory where the actual kernel build is performed.

I believe the error you list is saying that it can't find the directory that should have been created by the configure process. What are the contents of

/usr/home/felix/src/crochet/work/obj/arm.armv6/usr/home/felix/src/crochet/src/sys

Were there any earlier errors reported when it tried to configure the kernel?

felix commented 8 years ago

No previous errors.

$ pwd
/home/felix/src/crochet/work/obj/arm.armv6/usr/home/felix/src/crochet/src/sys
$ tree -d
.
└── boot
    ├── arm
    │   └── uboot
    ├── common
    ├── efi
    │   ├── boot1
    │   │   └── machine -> /usr/home/felix/src/crochet/src/sys/boot/efi/boot1/../../../arm/include
    │   ├── fdt
    │   │   └── machine -> /usr/home/felix/src/crochet/src/sys/boot/efi/fdt/../../../arm/include
    │   ├── libefi
    │   └── loader
    │       └── machine -> /usr/home/felix/src/crochet/src/sys/boot/efi/loader/../../../arm/include
    ├── fdt
    ├── ficl
    ├── forth
    └── uboot
        ├── fdt
        │   └── machine -> /usr/home/felix/src/crochet/src/sys/boot/uboot/fdt/../../../arm/include
        └── lib
            └── machine -> /usr/home/felix/src/crochet/src/sys/boot/uboot/lib/../../../arm/include
frankharvey commented 8 years ago

I just ran into this problem. It appears to me that the DT source bananapi.dts is broke. When I run DTC I get this: dtc -I dts -O dtb bananapi.dts > /root/bananapi.dtb Error:bananapi.dts:29.1-2 syntax error FATAL ERROR: Unable to parse input tree

I get no such failures with BBB and RPi2 and the DTC I found this by trying to add RTC module DS3231 to RPi2 and BPi. RPi2 sucess, BPi failure.

frankharvey commented 8 years ago

The bananapi.dts references on line 29

include "sun7i-a20-bananapi.dts

This file does not exsist in the FreeBSD FDT/DTS source folder but does reside in the GNU/DTS source folder. Simply copying it over does not help. It needs fixup for FreeBSD I guess.

evadot commented 8 years ago

dts files have to be pre-processed by cpp, see sys/tools/fdt/make_dtb.sh

frankharvey commented 8 years ago

You are correct and I did build crochet.sh -b BananaPi without any trouble.

felix commented 8 years ago

This is not an issue with stable/11, which I failed to mention.