[<<][am335x][>>][..]
Wed May 2 17:22:09 EDT 2018

using buildroot

Seems some things are not compatible.


tom@buildroot:~/BeagleLogic$ ./hatd_build.sh 
[ ! -z "$CROSS_COMPILE" ]
make -C /home/tom/gw_buildroot/target/bbb/build/linux-adde2ca9f86797071f6e7b2b9e779fa5e4a8f3cd M=/home/tom/BeagleLogic/kernel ARCH=arm modules
make[1]: Entering directory '/home/tom/gw_buildroot/target/bbb/build/linux-adde2ca9f86797071f6e7b2b9e779fa5e4a8f3cd'
  CC [M]  /home/tom/BeagleLogic/kernel/beaglelogic.o
/home/tom/BeagleLogic/kernel/beaglelogic.c: In function 'beaglelogic_probe':
/home/tom/BeagleLogic/kernel/beaglelogic.c:1203:17: error: too many arguments to function 'pruss_get'
  bldev->pruss = pruss_get(dev, NULL);
                 ^~~~~~~~~
In file included from /home/tom/BeagleLogic/kernel/beaglelogic.c:24:0:
include/linux/pruss.h:101:29: note: declared here
 static inline struct pruss *pruss_get(struct device *dev)
                             ^~~~~~~~~
/home/tom/BeagleLogic/kernel/beaglelogic.c:1263:8: error: implicit declaration of function 'rproc_set_firmware' [-Werror=implicit-function-declaration]
  ret = rproc_set_firmware(bldev->pru0, bldev->fw_data->fw_names[0]);
        ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target '/home/tom/BeagleLogic/kernel/beaglelogic.o' failed
make[2]: *** [/home/tom/BeagleLogic/kernel/beaglelogic.o] Error 1
Makefile:1401: recipe for target '_module_/home/tom/BeagleLogic/kernel' failed
make[1]: *** [_module_/home/tom/BeagleLogic/kernel] Error 2
make[1]: Leaving directory '/home/tom/gw_buildroot/target/bbb/build/linux-adde2ca9f86797071f6e7b2b9e779fa5e4a8f3cd'
Makefile:11: recipe for target 'all' failed
make: *** [all] Error 2
tom@buildroot:~/BeagleLogic$ 


Maybe first figure out what version of kernel to use, then to adjust buildroot?
What is buildroot using?

BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="adde2ca9f86797071f6e7b2b9e779fa5e4a8f3cd"
BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-evmsk"

Buildroot bump patch was introduced 2017-01-18:
http://buildroot-busybox.2317881.n4.nabble.com/PATCH-configs-beaglebone-bump-kernel-version-to-4-4-32-td154604.html


This is mentioned in the readme: v4.9.31-ti-r41
So not clear what to do here..  Pick out that particular version?
Let's clone the repo and see what patches are there.


Current buildroot head has:
a75d8e93056181d512f6c818e8627bd4554aaf92
http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_Kernel_Release_Notes
based on 4.9.59



That should work
Just change it?

Let's diff it first
https://raw.githubusercontent.com/buildroot/buildroot/master/configs/beaglebone_defconfig

tom@buildroot:~$ diff -Naur gw_buildroot/buildroot/configs/beaglebone_defconfig /tmp/beaglebone_defconfig 
--- gw_buildroot/buildroot/configs/beaglebone_defconfig	2018-03-14 20:22:35.356150976 +0000
+++ /tmp/beaglebone_defconfig	2018-05-02 21:41:49.322782612 +0000
@@ -1,13 +1,13 @@
 BR2_arm=y
 BR2_cortex_a8=y
 BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="f9f6f0db2d5e4f9d2ff46eb31a5a05276a92ed7d"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a75d8e93056181d512f6c818e8627bd4554aaf92"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk"
@@ -16,13 +16,11 @@
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
 BR2_TARGET_UBOOT_FORMAT_IMG=y
-BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
-BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin"
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y

Maybe just use the file as-is.  Or upgrade the entire thing?  I'm not
sure about this: variable name changed:

-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y



I don't want to mess with this.. What if the default changed?
Maybe just use current master buildroot?

Ok, my current buildroot is actually a patched version with a
downgraded erlang.

EDIT: I had the wrong version... compiling again...
EDIT: Erlang broken.. disabling for now

Ok, boots and kernel module builds:

tom@buildroot:~/BeagleLogic$ ./hatd_build.sh 
[ ! -z "$CROSS_COMPILE" ]
make -C /home/tom/gw_buildroot/target/bbb/build/linux-a75d8e93056181d512f6c818e8627bd4554aaf92 M=/home/tom/BeagleLogic/kernel ARCH=arm modules
make[1]: Entering directory '/home/tom/gw_buildroot/target/bbb/build/linux-a75d8e93056181d512f6c818e8627bd4554aaf92'
  CC [M]  /home/tom/BeagleLogic/kernel/beaglelogic.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "rproc_shutdown" [/home/tom/BeagleLogic/kernel/beaglelogic.ko] undefined!
  CC      /home/tom/BeagleLogic/kernel/beaglelogic.mod.o
  LD [M]  /home/tom/BeagleLogic/kernel/beaglelogic.ko
make[1]: Leaving directory '/home/tom/gw_buildroot/target/bbb/build/linux-a75d8e93056181d512f6c818e8627bd4554aaf92'


But pru_cfg.h is still missing.

Is this somehow generated from something else?



[Reply][About]
[<<][am335x][>>][..]