Jump to content


Photo

cross compile GitHub "c" project for mipsl arch


  • Please log in to reply
4 replies to this topic

#1 MuhlC00l

  • New Member
  • 4 posts

0
Neutral

Posted 25 July 2018 - 06:46

hi all,

 

I hope you can help me and point me into the right direction because I don't get the point how to compile e.g.  GitHub Porjects for my vusolo SE V2.

I create an ubuntu VM ware, install the develompent envirnmental, try to create an minimal image, play with bitbake but no luck.

 

The project what I currently try to run on my machine is the RTL driver for some cheap 5Ghu WLAN dongles with the chipset  rtl8811CU or rtl8821CU (0bda:c811 realtek semiconductor corp)

 

With the help of whitebatman2's GitHub there is a possibily to compile a running driver for ubuntu and raspberry, this is no problem because the make file is already configured

 

You can find the GitHub here: https://github.com/w...tman2/rtl8821CU

 

So please can someone help and explain how to compile these driver for OpenEmbedded / openpli-oe-core ?

 

 

I found an intressting code project articel by Alex J Lennon here: https://www.codeproj...-OpenEmbedded-L

 

but also my skils stops when it comes to Bitbake :(

 

 

Any help I would really appreciate many thanks and cheers

 



Re: cross compile GitHub "c" project for mipsl arch #2 babsy98

  • Senior Member
  • 130 posts

+7
Neutral

Posted 25 July 2018 - 08:22

i am look for a device you have ?

 

https://wikidevi.com/wiki/Realtek



Re: cross compile GitHub "c" project for mipsl arch #3 MuhlC00l

  • New Member
  • 4 posts

0
Neutral

Posted 26 July 2018 - 11:16

as I wrote: chipset  rtl8811CU or rtl8821CU (0bda:c811 realtek semiconductor corp)



Re: cross compile GitHub "c" project for mipsl arch #4 MuhlC00l

  • New Member
  • 4 posts

0
Neutral

Posted 8 August 2018 - 09:21

Hi all,

 

I hope I get some help here.

 

I create the openpli image for my vusolo SE V2 mean when I read the terminal message correct I have a complete image build and I have all relevant dependencies - right?

ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core$ MACHINE=vusolo make image 
Building image for vusolo
Loading cache: 100% |############################################################################################################| Time: 0:00:08
Loaded 3232 entries from dependency cache.
Parsing recipes: 100% |##########################################################################################################| Time: 0:01:41
Parsing of 2712 .bb files complete (2448 cached, 264 parsed). 3496 targets, 572 skipped, 0 masked, 0 errors.
NOTE: There are 1 recipes to be removed from sysroot allarch, removing...
NOTE: There are 3 recipes to be removed from sysroot vusolo, removing...
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-14.04"
TARGET_SYS        = "mipsel-oe-linux"
MACHINE           = "vusolo"
DISTRO            = "openpli"
DISTRO_VERSION    = "homebuild"
TUNE_FEATURES     = "o32 fpu-hard mips32"
TARGET_FPU        = ""
meta-oe           
meta-filesystems  
meta-multimedia   
meta-networking   
meta-python       
meta-webserver    = "HEAD:dfbdd28d206a74bf264c2f7ee0f7b3e5af587796"
meta              = "HEAD:93dd2f9f3edf0584f9e806c629611d645dd72dbf"
meta-openpli      
meta-dream        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-vuplus       = "HEAD:d6f0477dc48bad742290f588efd4d9da604cfb29"
meta-xsarius.pli5 = "HEAD:49bbf05349b16ca4cdeab9350d27b3ee8aebefd8"
meta-qviart       = "HEAD:a11381a3d9ca53abee80e069fb8e96a7e9c9dc16"
meta-xp           = "HEAD:2f818d2ee1efbf0a4536d8384d716a0767cf7039"
meta-xtrend       = "HEAD:ac054abbe235f33f6a69e7a8ff0fa9a7efa84f59"
meta-formuler     = "HEAD:e1d33c48edb119dcc3163855b0b1af510912ef52"
meta-gfutures     = "HEAD:4015ce2bb7c46cd10574eff3100f67fb74c38bda"
meta-xpeedc       = "HEAD:f12908a5573de8a6a06ad9f75081846a590511c4"
meta-zgemma       = "HEAD:9c0ae72060437fb6951f82e64f1e0e882cf00f95"
meta-edision      = "HEAD:7af176f81a7aca30200d6958229d56c973cee393"
meta-miraclebox   = "HEAD:d44871d4d1f357d5b38488ed505b48fa8c8feff3"
meta-spycat       = "HEAD:a19f11bbcdcad969e9f6f8d2c30df0653427d4cb"
meta-gi           = "HEAD:01fd1e8256f53d40371e65514e13a53ef53e400d"
meta-sab          = "HEAD:92262feb14e4005c8096150daac7313e9cb3d85a"
meta-gigablue     = "HEAD:7e437da8e19274143229f2c52e62917cb33d9d1c"
meta-amiko        = "HEAD:eb5c966a3ba38388abdcda61ed07fb056e4d488b"
meta-axasuhd      = "HEAD:dfc1465665f504fdc4d6fc9a401e630b04123211"
meta-local        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-qt5          = "HEAD:c6aa602d0640040b470ee81de39726276ddc0ea3"

Initialising tasks: 100% |#######################################################################################################| Time: 0:00:31
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 5698 tasks of which 5619 didn't need to be rerun and all succeeded.
ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core$

So what I did next was to create a .bb file for whitebatman2s github project.

What I have so far is the following code.

DESCRIPTION = "Drivers for rtl8811CU and rtl8821CU Wi-Fi chipsets"
HOMEPAGE = "http://www.realtek.com/"
SECTION = "kernel/modules"
LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"


SRCREV = "0c0f5552169f65edabd1d03c0582d67ecc1d622b"
SRC_URI = "git://github.com/whitebatman2/rtl8821CU.git"

S = "${WORKDIR}/git"

inherit autotools-brokensep module siteinfo

do_install() {
	install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
	install -m 0644 ${S}/8821cu.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
}

Now I switchto the build directory

ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core$ cd build
ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build

and run: source env.source to inherit bitbake

ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$ source env.source

Now I want to work with a single recipe and try to fetch, unpack, patch and configure first to see if I can catch the source

ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$ MACHINE=vusolo bitbake -b /home/ubuntu/Downloads/openpli40/openpli-oe-core/meta-openpli/recipes-connectivity/realtek/rtl8821cu.bb -c configure
WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.
Loading cache: 100% |############################################################################################################| Time: 0:00:01
Loaded 3232 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-14.04"
TARGET_SYS        = "mipsel-oe-linux"
MACHINE           = "vusolo"
DISTRO            = "openpli"
DISTRO_VERSION    = "homebuild"
TUNE_FEATURES     = "o32 fpu-hard mips32"
TARGET_FPU        = ""
meta-oe           
meta-filesystems  
meta-multimedia   
meta-networking   
meta-python       
meta-webserver    = "HEAD:dfbdd28d206a74bf264c2f7ee0f7b3e5af587796"
meta              = "HEAD:93dd2f9f3edf0584f9e806c629611d645dd72dbf"
meta-openpli      
meta-dream        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-vuplus       = "HEAD:d6f0477dc48bad742290f588efd4d9da604cfb29"
meta-xsarius.pli5 = "HEAD:49bbf05349b16ca4cdeab9350d27b3ee8aebefd8"
meta-qviart       = "HEAD:a11381a3d9ca53abee80e069fb8e96a7e9c9dc16"
meta-xp           = "HEAD:2f818d2ee1efbf0a4536d8384d716a0767cf7039"
meta-xtrend       = "HEAD:ac054abbe235f33f6a69e7a8ff0fa9a7efa84f59"
meta-formuler     = "HEAD:e1d33c48edb119dcc3163855b0b1af510912ef52"
meta-gfutures     = "HEAD:4015ce2bb7c46cd10574eff3100f67fb74c38bda"
meta-xpeedc       = "HEAD:f12908a5573de8a6a06ad9f75081846a590511c4"
meta-zgemma       = "HEAD:9c0ae72060437fb6951f82e64f1e0e882cf00f95"
meta-edision      = "HEAD:7af176f81a7aca30200d6958229d56c973cee393"
meta-miraclebox   = "HEAD:d44871d4d1f357d5b38488ed505b48fa8c8feff3"
meta-spycat       = "HEAD:a19f11bbcdcad969e9f6f8d2c30df0653427d4cb"
meta-gi           = "HEAD:01fd1e8256f53d40371e65514e13a53ef53e400d"
meta-sab          = "HEAD:92262feb14e4005c8096150daac7313e9cb3d85a"
meta-gigablue     = "HEAD:7e437da8e19274143229f2c52e62917cb33d9d1c"
meta-amiko        = "HEAD:eb5c966a3ba38388abdcda61ed07fb056e4d488b"
meta-axasuhd      = "HEAD:dfc1465665f504fdc4d6fc9a401e630b04123211"
meta-local        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-qt5          = "HEAD:c6aa602d0640040b470ee81de39726276ddc0ea3"

Initialising tasks: 100% |#######################################################################################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 5 tasks of which 5 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$

Seems ok for me and the git procject is downloaded - correct?

 

now i try to compile and here I have so many errors and failures where I need your help.

ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$ MACHINE=vusolo bitbake -b /home/ubuntu/Downloads/openpli40/openpli-oe-core/meta-openpli/recipes-connectivity/realtek/rtl8821cu.bb -c compile
WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.
Loading cache: 100% |############################################################################################################| Time: 0:00:01
Loaded 3232 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-14.04"
TARGET_SYS        = "mipsel-oe-linux"
MACHINE           = "vusolo"
DISTRO            = "openpli"
DISTRO_VERSION    = "homebuild"
TUNE_FEATURES     = "o32 fpu-hard mips32"
TARGET_FPU        = ""
meta-oe           
meta-filesystems  
meta-multimedia   
meta-networking   
meta-python       
meta-webserver    = "HEAD:dfbdd28d206a74bf264c2f7ee0f7b3e5af587796"
meta              = "HEAD:93dd2f9f3edf0584f9e806c629611d645dd72dbf"
meta-openpli      
meta-dream        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-vuplus       = "HEAD:d6f0477dc48bad742290f588efd4d9da604cfb29"
meta-xsarius.pli5 = "HEAD:49bbf05349b16ca4cdeab9350d27b3ee8aebefd8"
meta-qviart       = "HEAD:a11381a3d9ca53abee80e069fb8e96a7e9c9dc16"
meta-xp           = "HEAD:2f818d2ee1efbf0a4536d8384d716a0767cf7039"
meta-xtrend       = "HEAD:ac054abbe235f33f6a69e7a8ff0fa9a7efa84f59"
meta-formuler     = "HEAD:e1d33c48edb119dcc3163855b0b1af510912ef52"
meta-gfutures     = "HEAD:4015ce2bb7c46cd10574eff3100f67fb74c38bda"
meta-xpeedc       = "HEAD:f12908a5573de8a6a06ad9f75081846a590511c4"
meta-zgemma       = "HEAD:9c0ae72060437fb6951f82e64f1e0e882cf00f95"
meta-edision      = "HEAD:7af176f81a7aca30200d6958229d56c973cee393"
meta-miraclebox   = "HEAD:d44871d4d1f357d5b38488ed505b48fa8c8feff3"
meta-spycat       = "HEAD:a19f11bbcdcad969e9f6f8d2c30df0653427d4cb"
meta-gi           = "HEAD:01fd1e8256f53d40371e65514e13a53ef53e400d"
meta-sab          = "HEAD:92262feb14e4005c8096150daac7313e9cb3d85a"
meta-gigablue     = "HEAD:7e437da8e19274143229f2c52e62917cb33d9d1c"
meta-amiko        = "HEAD:eb5c966a3ba38388abdcda61ed07fb056e4d488b"
meta-axasuhd      = "HEAD:dfc1465665f504fdc4d6fc9a401e630b04123211"
meta-local        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-qt5          = "HEAD:c6aa602d0640040b470ee81de39726276ddc0ea3"

Initialising tasks: 100% |#######################################################################################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
ERROR: rtl8821cu-1.0-r0 do_make_scripts: Function failed: do_make_scripts (log file is located at /home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work/vusolo-oe-linux/rtl8821cu/1.0-r0/temp/log.do_make_scripts.28361)
ERROR: Logfile of failure stored in: /home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work/vusolo-oe-linux/rtl8821cu/1.0-r0/temp/log.do_make_scripts.28361
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'mips-common', 'common-linux', 'common-glibc', 'mipsel-linux', 'common']
| DEBUG: Executing shell function do_make_scripts
| make: Entering directory `/home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work-shared/vusolo/kernel-source'
| /bin/sh: mipsel-oe-linux-gcc: command not found
| expr: syntax error
| /bin/sh: mipsel-oe-linux-gcc: command not found
| /bin/sh: mipsel-oe-linux-gcc: command not found
| /bin/sh: mipsel-oe-linux-gcc: command not found
| /bin/sh: mipsel-oe-linux-gcc: command not found
| make[1]: mipsel-oe-linux-gcc: Command not found
|   CC      scripts/mod/empty.o
| /bin/sh: mipsel-oe-linux-gcc: command not found
| make[3]: *** [scripts/mod/empty.o] Error 127
| make[2]: *** [scripts/mod] Error 2
| make[1]: *** [scripts] Error 2
| make: *** [sub-make] Error 2
| make: Leaving directory `/home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work-shared/vusolo/kernel-source'
| WARNING: /home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work/vusolo-oe-linux/rtl8821cu/1.0-r0/temp/run.do_make_scripts.28361:1 exit 2 from 'make CC="mipsel-oe-linux-gcc  -fuse-ld=bfd" LD="mipsel-oe-linux-ld.bfd " AR="mipsel-oe-linux-ar " -C /home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work-shared/vusolo/kernel-source O=/home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work-shared/vusolo/kernel-build-artifacts scripts'
| ERROR: Function failed: do_make_scripts (log file is located at /home/ubuntu/Downloads/openpli40/openpli-oe-core/build/tmp/work/vusolo-oe-linux/rtl8821cu/1.0-r0/temp/log.do_make_scripts.28361)
ERROR: Task (/home/ubuntu/Downloads/openpli40/openpli-oe-core/meta-openpli/recipes-connectivity/realtek/rtl8821cu.bb:do_make_scripts) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6 tasks of which 5 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/ubuntu/Downloads/openpli40/openpli-oe-core/meta-openpli/recipes-connectivity/realtek/rtl8821cu.bb:do_make_scripts
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$

any ideas are more than welcome!!

 

Thanks !!



Re: cross compile GitHub "c" project for mipsl arch #5 MuhlC00l

  • New Member
  • 4 posts

0
Neutral

Posted 8 August 2018 - 09:31

Ok ... strange thins I though when I have a running openpli and bitbake environmental I can cross compile ?!?!

 

I modified the .bb receipt and deleted "module siteinfo" and add "FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

DESCRIPTION = "Drivers for rtl8811CU and rtl8821CU Wi-Fi chipsets"
HOMEPAGE = "http://www.realtek.com/"
SECTION = "kernel/modules"
LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

SRCREV = "0c0f5552169f65edabd1d03c0582d67ecc1d622b"
SRC_URI = "git://github.com/whitebatman2/rtl8821CU.git"

S = "${WORKDIR}/git"

inherit autotools-brokensep

do_install() {
	install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
	install -m 0644 ${S}/8821cu.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
}

so i re run the compile task and no errors

ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$ MACHINE=vusolo bitbake -b /home/ubuntu/Downloads/openpli40/openpli-oe-core/meta-openpli/recipes-connectivity/realtek/rtl8821cu.bb -c compile
WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.
Loading cache: 100% |############################################################################################################| Time: 0:00:01
Loaded 3232 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-14.04"
TARGET_SYS        = "mipsel-oe-linux"
MACHINE           = "vusolo"
DISTRO            = "openpli"
DISTRO_VERSION    = "homebuild"
TUNE_FEATURES     = "o32 fpu-hard mips32"
TARGET_FPU        = ""
meta-oe           
meta-filesystems  
meta-multimedia   
meta-networking   
meta-python       
meta-webserver    = "HEAD:dfbdd28d206a74bf264c2f7ee0f7b3e5af587796"
meta              = "HEAD:93dd2f9f3edf0584f9e806c629611d645dd72dbf"
meta-openpli      
meta-dream        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-vuplus       = "HEAD:d6f0477dc48bad742290f588efd4d9da604cfb29"
meta-xsarius.pli5 = "HEAD:49bbf05349b16ca4cdeab9350d27b3ee8aebefd8"
meta-qviart       = "HEAD:a11381a3d9ca53abee80e069fb8e96a7e9c9dc16"
meta-xp           = "HEAD:2f818d2ee1efbf0a4536d8384d716a0767cf7039"
meta-xtrend       = "HEAD:ac054abbe235f33f6a69e7a8ff0fa9a7efa84f59"
meta-formuler     = "HEAD:e1d33c48edb119dcc3163855b0b1af510912ef52"
meta-gfutures     = "HEAD:4015ce2bb7c46cd10574eff3100f67fb74c38bda"
meta-xpeedc       = "HEAD:f12908a5573de8a6a06ad9f75081846a590511c4"
meta-zgemma       = "HEAD:9c0ae72060437fb6951f82e64f1e0e882cf00f95"
meta-edision      = "HEAD:7af176f81a7aca30200d6958229d56c973cee393"
meta-miraclebox   = "HEAD:d44871d4d1f357d5b38488ed505b48fa8c8feff3"
meta-spycat       = "HEAD:a19f11bbcdcad969e9f6f8d2c30df0653427d4cb"
meta-gi           = "HEAD:01fd1e8256f53d40371e65514e13a53ef53e400d"
meta-sab          = "HEAD:92262feb14e4005c8096150daac7313e9cb3d85a"
meta-gigablue     = "HEAD:7e437da8e19274143229f2c52e62917cb33d9d1c"
meta-amiko        = "HEAD:eb5c966a3ba38388abdcda61ed07fb056e4d488b"
meta-axasuhd      = "HEAD:dfc1465665f504fdc4d6fc9a401e630b04123211"
meta-local        = "develop:34ab34d995a3447283cd6b65c180118717f55563"
meta-qt5          = "HEAD:c6aa602d0640040b470ee81de39726276ddc0ea3"

Initialising tasks: 100% |#######################################################################################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 6 tasks of which 0 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
ubuntu@ubuntu:~/Downloads/openpli40/openpli-oe-core/build$

I searched for the compiled 8821cu.ko file but its sill for a x86-64 architecure :(:(

ubuntu@ubuntu:~/Downloads$ file 8821cu.ko 
8821cu.ko: ELF 64-bit LSB  relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=c38e180d914ec4fa665db68feb392c75800f11c8, not stripped
ubuntu@ubuntu:~/Downloads$ 

Whats wrong here ?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users