BPI-R2 OpenWrt(LEDE) Souce code : 2018-04-11

Hi cement, it’s not in image,

it’s in your source code project, you need compile by yourself.

see Gary’s infos at the beginning of this thread.

1 Like

@Jackzeng, i have the same Problems as cement… I use Ubuntu 18.04 so i’d had first to download source package and an old lede image to compile first an image ? than activate Wifi and after that, install Luci from repo…

I have errors during compiling. Used the .config from here… Guys any solutions ? Thanks

Me too… :roll_eyes::disappointed_relieved:

My Workstation: Ubuntu 18.04 LTS kernel 4.15 have installed gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers. copied the .config from here to the root Directory of the cloned image. ./scripts/feeds update -a and ./scripts/feeds install -a worked fine. Start make menuconfig but use make clear , and copy the .config from here. After all use command make -j1 V=s but ends with config error.

@cement Please provide the log of error.

1 Like

Hi… here is compile report:

cemen@ubuntu-7600k:~/LEDE/bpi-r2_lede$ make -j1 V=s
make[1]: Entering directory '/home/cemen/LEDE/bpi-r2_lede'
make[2]: Entering directory '/home/cemen/LEDE/bpi-r2_lede'
mkdir -p /home/cemen/LEDE/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp
touch /home/cemen/LEDE/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/.prepared
mkdir -p /home/cemen/LEDE/bpi-r2_lede/build_dir/host/stamp /home/cemen/LEDE/bpi-r2_lede/staging_dir/host/include/sys
install -m0644 /home/cemen/LEDE/bpi-r2_lede/tools/include/*.h /home/cemen/LEDE/bpi-r2_lede/staging_dir/host/include/
install -m0644 /home/cemen/LEDE/bpi-r2_lede/tools/include/sys/*.h /home/cemen/LEDE/bpi-r2_lede/staging_dir/host/include/sys/
ln -sf lib /home/cemen/LEDE/bpi-r2_lede/staging_dir/host/lib64
tools/Makefile:128: recipe for target '/home/cemen/LEDE/bpi-r2_lede/staging_dir/host/.prepared' failed
make[2]: Leaving directory '/home/cemen/LEDE/bpi-r2_lede'
tools/Makefile:146: recipe for target '/home/cemen/LEDE/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
make[1]: Leaving directory '/home/cemen/LEDE/bpi-r2_lede'
/home/cemen/LEDE/bpi-r2_lede/include/toplevel.mk:207: recipe error for target «world»

my OS:

cemen@ubuntu-7600k:~/LEDE/bpi-r2_lede$ cat /proc/version
Linux version 4.13.0-39-generic (buildd@lgw01-amd64-038) (gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)) #44-Ubuntu SMP Thu Apr 5 14:25:01 UTC 2018
Makefile:1689: recipe for target 'stage1scan.c' failed
make[6]: *** [stage1scan.c] Segmentation fault (core dumped)
make[6]: Leaving directory '/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/src'
Makefile:539: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/src'
Makefile:525: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4'
Makefile:28: recipe for target '/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/.built' failed
make[3]: *** [/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/.built] Error 2
make[3]: Leaving directory '/home/****/bpi-r2_lede/tools/flex'
tools/Makefile:148: recipe for target 'tools/flex/compile' failed
make[2]: *** [tools/flex/compile] Error 2
make[2]: Leaving directory '/home/****/bpi-r2_lede'
tools/Makefile:146: recipe for target '/home/****/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
make[1]: *** [/home/****/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
make[1]: Leaving directory '/home/****/bpi-r2_lede'
/home/****/bpi-r2_lede/include/toplevel.mk:207: recipe for target 'world' failed
make: *** [world] Error 2

You can get the workaround from below link: https://bugs.openwrt.org/index.php?do=details&task_id=1003

1 Like
./../misc/create_inode.c: At top level:
./../misc/create_inode.c:399:18: error: conflicting types for 'copy_file_range'
 static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
                  ^~~~~~~~~~~~~~~
In file included from ./../misc/create_inode.c:19:0:
/usr/include/unistd.h:1110:9: note: previous declaration of 'copy_file_range' was here
 ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
         ^~~~~~~~~~~~~~~
Makefile:422: recipe for target 'create_inode.o' failed
make[6]: *** [create_inode.o] Error 1
make[6]: Leaving directory '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5/debugfs'
Makefile:404: recipe for target 'all-progs-recursive' failed
make[5]: *** [all-progs-recursive] Error 1
make[5]: Leaving directory '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5'
Makefile:339: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5'
Makefile:49: recipe for target '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5/.built' failed
make[3]: *** [/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5/.built] Error 2
make[3]: Leaving directory '/home/***/bpi-r2_lede/tools/e2fsprogs'
tools/Makefile:148: recipe for target 'tools/e2fsprogs/compile' failed
make[2]: *** [tools/e2fsprogs/compile] Error 2
make[2]: Leaving directory '/home/***/bpi-r2_lede'
tools/Makefile:146: recipe for target '/home/***/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
make[1]: *** [/home/***/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
make[1]: Leaving directory '/home/***/bpi-r2_lede'
/home/***/bpi-r2_lede/include/toplevel.mk:207: recipe for target 'world' failed
make: *** [world] Error 2

make distclean did the job, but new error:

/usr/include/unistd.h:1110:9: note: previous declaration of 'copy_file_range' was here
 ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
             ^~~~~~~~~~~~~~~
    Makefile:422: recipe for target 'create_inode.o' failed
    make[6]: *** [create_inode.o] Error 1
    make[6]: Leaving directory '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5/debugfs'
    Makefile:404: recipe for target 'all-progs-recursive' failed
    make[5]: *** [all-progs-recursive] Error 1
    make[5]: Leaving directory '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5'
    Makefile:339: recipe for target 'all' failed
    make[4]: *** [all] Error 2
    make[4]: Leaving directory '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5'
    Makefile:49: recipe for target '/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5/.built' failed
    make[3]: *** [/home/***/bpi-r2_lede/build_dir/host/e2fsprogs-1.43.5/.built] Error 2
    make[3]: Leaving directory '/home/***/bpi-r2_lede/tools/e2fsprogs'
    tools/Makefile:148: recipe for target 'tools/e2fsprogs/compile' failed
    make[2]: *** [tools/e2fsprogs/compile] Error 2
    make[2]: Leaving directory '/home/***/bpi-r2_lede'
    tools/Makefile:146: recipe for target '/home/***/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
    make[1]: *** [/home/***/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
    make[1]: Leaving directory '/home/***/bpi-r2_lede'
    /home/***/bpi-r2_lede/include/toplevel.mk:207: recipe for target 'world' failed
    make: *** [world] Error 2w error:

BUG description Found it, how many Patches, Bugs are still waiting for me :roll_eyes:

I dont understand, how to insert the Patch ??? Found a syntax-error, correted in Patch and start compiling again. After 15min still compiling …

Howto for Ubuntu 18.04 with Linux version 4.15.0-20-generic and gcc version 7.3.0 “glibc>=2.27” glibc is part of package glibc-source.

  1. sudo apt install gcc binutils bzip2 flex python perl make find grep diff unzip gawk getopt subversion libz-dev glibc-source libc6-dev

  2. Download/clone Source-package from github
  3. Chance in to Directory from Source-package.
  4. ./scripts/feeds update -a

  5. ./scripts/feeds install -a

  6. Download Connfig to root of Source-package
  7. Download Patch for Flex into source-package/tools/flex/patches
  8. Download 006-misc-rename-copy_file_range-to-copy_file_chunk.patch (2,0 KB) to source-package/tools/e2fsprogs/patches
  9. make -j1 V=s^C

and be patient for maybe more than an hour.

@garywang maybe you can add this howto to the first post, cheers.

Guys, I used the config File from here, and wifi are not working. Should I use “make menuconfig” instead of using this File ?, to compile and can I only upgrade the runtime instead of compile again and rewrite emmc? @garywang I can not run Luci with source/packages you posted, any idea ? Without ssl, no uhttpd is reachable, with ssl, error :

/etc/rc.common: eval: line 1: /usr/sbin/px5g: not found mv: can’t rename ‘/etc/uhttpd.key.new’: No such file or directory mv: can’t rename ‘/etc/uhttpd.crt.new’: No such file or directory

Hi Malavin

Both WIFI and luci isn’t installed, please rebuild the openwrt project with WIFI package. Also you can use sysupgrade with lede-mediatek-32-bananapi,bpi-r2-sysupgrade.tar to upgrade online.

Also please note that we found the luci package isn’t working fine, not sure what problem happens so far, still debug it.

1 Like

Hi, I built it and I applied the patch to my openwrt in the aim to get the wifi working. after that I applied the following commands:

 wmt_loader
 stp_uart_launcher -p /etc/firmware &
 echo 1 >/dev/wmtWifi

you can see the outputs,

Screenshot_2018-05-08_22-28-05

Screenshot_2018-05-08_22-28-52

Screenshot_2018-05-08_22-29-17

when I summon ifconfig I don’t see any wifi device. I made a screen shot of the result: Screenshot_2018-05-08_22-33-47

what did I miss ?

Please use ifconfig -a to check if wlan0 interface is available.

yep it’s right here thx!

A new release(BPI-R2 new image: BPI-R2 OpenWrt(LEDE) Souce code : 2018-05-09) is available, the fellowing packages are integrated by default:

  • WIFI support package(wmt)
  • MMC tool
  • LUCI(based on branch lede-17.01)
  • Strongwan

Please note that:

  • Please don’t use the latest code of feeds, looks like they are unstable, I found luci isn’t working fine if I use latest code, so go back to branch lede-17.01
  • Please don’t install ipk package from online repository, I found a few clue about this problem, but don’t find out the root cause so far.
1 Like

Good News,

can we just use the sysupdate.tar to avoid the Setup via Debug-UART ? Or is it neccecery, in order to install new source code to use the normal way ?