This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/BEAGLEBK: Unable to compile dts files for BeagleBone Black (PRU Training: Hands-on Labs, Lab 4)

Part Number: BEAGLEBK

Tool/software: Linux

Hi,

I am unable to reproduce the step 4.e of the PRU Training: Hands-on Labs, lab 4 (http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs). This step is to create the .dtb file from the modified am335x-boneblack.dts to include am335x-boneblack-prucape.dtsi.

I am unable to Compile the DTS file with the provided command:     make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb. I get the following error message:

*** No rule to make target ‘am335x-boneblack.dtb’.  Stop.

I tried to compile just the original am335x-boneblack.dts, without any modification, but I get the same error.

The steps I followed:

On the page http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_Training:_Introduction_to_Device_Driver_Development I have found that path to the tools needs to be provided.

So from /home/adam/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/arch/arm/boot/dts

I executed

export PATH=$PATH:/home/adam/ti-processor-sdk-linux-am335x-evm-03.02.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/

As the error persisted, I opened another terminal window and checked what happened if the path were not set. As expected the tools were not enountered:

adam@ubuntu:~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/arch/arm/boot/dts$ arm-linux-gnueabihf-gcc

The program 'arm-linux-gnueabihf-gcc' is currently not installed. You can install it by typing: sudo apt install gcc-arm-linux-gnueabihf

I add the path:

adam@ubuntu:~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/arch/arm/boot/dts$ export PATH=$PATH:/home/adam/ti-processor-sdk-linux-am335x-evm-03.02.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/

and now the tools are visible:

adam@ubuntu:~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/arch/arm/boot/dts$ arm-linux-gnueabihf-gcc

arm-linux-gnueabihf-gcc: fatal error: no input files

compilation terminated.

but the make file gives the same error:

adam@ubuntu:~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/arch/arm/boot/dts$ make ARCH=arm CROSS_

COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb

make: *** No rule to make target 'am335x-boneblack.dtb'. Stop.

I use Ubuntu 16.04.1 LTS virtual machine hosted on Windows 10 using VMware® Workstation 12 Player 12.5.2 build-4638234. From within Ubuntu I downloaded the SDK (ti-processor-sdk-linux-am335x-evm-03.02.00.05-Linux-x86-Install.bin), ran it, and ran the ./setup.sh script. The setup.sh script did not work out of the box:

Package uboot-mkimage is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

However the following packages replace it:

  u-boot-tools:i386 u-boot-tools

 

E: Package 'uboot-mkimage' has no installation candidate

Failed setup, aborting..

Failed setup, aborting..

 So I installed the recommended package:

adam@ubuntu:~/ti-processor-sdk-linux-am335x-evm-03.02.00.05$ sudo apt install u-boot-tools

And rerun the setup.sh script. It blocked again on the targetNFS creation, so I stopped it and rerun the setup.sh script again, this time with no problem, and was able to connect from the minicom to the beaglebone black at the end of the setup.

Best regards

Adam

  • Hi Adam,

    you try to compile the .dtb in <kernel_src>/arch/arm/boot/dts directory. You should be in the main kernel src directory when run make command.
    (In your case ~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8/).

    Regards,
    Yordan
  • Hi Yordan,

    Thank you very much for your help.

    I did as you suggested and some more file generation problems arose. I was able to solve them, but the PRUs do not work, so please have a look if this was the correct way to go.

    Generate the am335x-boneblack.dtb file:

    adam@ubuntu:~/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/linux-4.4.32+gitAUTOINC+adde2ca9f8-gadde2ca9f8$ make ARCH=arm CROSS_COMPILE=arm-linux-
    gnueabihf- am335x-boneblack.dtb
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/kconfig/conf.o
    SHIPPED scripts/kconfig/zconf.tab.c
    SHIPPED scripts/kconfig/zconf.lex.c
    SHIPPED scripts/kconfig/zconf.hash.c
    HOSTCC scripts/kconfig/zconf.tab.o
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf --silentoldconfig Kconfig
    ***
    *** Configuration file ".config" not found!
    ***
    *** Please run some configurator (e.g. "make oldconfig" or
    *** "make menuconfig" or "make xconfig").
    ***
    scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
    make[2]: *** [silentoldconfig] Error 1
    Makefile:541: recipe for target 'silentoldconfig' failed
    make[1]: *** [silentoldconfig] Error 2
    make: *** No rule to make target 'include/config/auto.conf', needed by 'scripts'. Stop.

    Ran the distclean (no problems).

    Generated the .config file. The example is: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig, so I searched for a similar file for BBB and found am335x_boneblack_defconfig in /home/adam/ti-processor-sdk-linux-am335x-evm-03.02.00.05/board-support/u-boot-2016.05+gitAUTOINC+6c5519b6fc-g6c5519b6fc/configs

    I copied the am335x_boneblack_defconfig to arch/arm/configs/ and rerun the script. Config was created and everything else (including the .dtsi, etc.) went smoothly as far as file generation is concerned.

    The BBB boots correctly, I am able to connect to it through the SSH (over USB).

    Regards,

    Adam
  • Hi Adam,

    the "am335x_boneblack_defconfig" that you found is config for U-boot. To build the linux kernel for the Begalebone black the "tisdk_am335x-evm_defconfig" must be used.

    Regards,
    Yordan
  • Hi Youdan,

    Thank you very much for your help.

    Best regards,

    Adam