BPI-R2 new image: OpenWrt 18.06.2 source code fork

  PYMOD   scripts/dtc/pylibfdt/_libfdt.so
scripts/dtc/pylibfdt/libfdt_wrap.c:149:11: fatal error: Python.h: No such file or directory
# include <Python.h>
       ^~~~~~~~~~
compilation terminated.

python 2.7 is installed

You need python-dev to get header-files

Hello, I’ve built the image and everything works fine but when I want to install the openvpn-openssl package it gives the following error:

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for openvpn-openssl:
 *      kernel (= 4.14.95-1-fa5607930cc040ff4e3fc4243125d7eb)
 * opkg_install_cmd: Cannot install package openvpn-openssl.

While the kernel version should be the same:

root@OpenWrt:~# uname -r
4.14.95

Can anyone help me?

edit: I solved the problem by adding the “openvpn-openssl” package in the menuconfig: “Network” -> “VPN” -> “openvpn-openssl”.

Hello, When the BPI boots with a cable connected in the WAN port the WAN interface is unable to get an IP and the following error is given in the logs:

daemon.notice netifd: wan (2398): udhcpc: received SIGTERM

While when I first boot the BPI and only afterwards plug a cable into the WAN port everything works fine. The WAN port is configured as a DCHP client.

The full log file: logs.txt (40.0 KB)
Config file used for building the image: config (181.8 KB) `

A sequence of zeroes is something that gets compressed to a single KB digits by gzip or bzip2. Images are mostly zeroes (few megabytes of real data on a hundreds of megabytes sized filesystem) thus they do compress well and you end up with tiny images.

openvpn is a package that links with a particular kernel used. As kernel in upstream openwrt binary repo differs from the kernel in your image (thus most probably difference is not that big and things might work OK… theng again might not - it’s a lottery) opkg prevents installing upstream package with kernel dependency into your image. Best way to handle situations like this is to build this package yourself together with image. Use make menuconfig and select openvpn-openssl. For some packages you might have to use ./scripts/feeds install <package name> to make them show up in menuconfig.

Right…i’m aware of it,but 6mb is really small…my kernelbinary is also compressed near same size and then additional the files for os which are not compressable like binaries.

Note: Boot and root partition sizes are defined under “Target Images —>” menu in menuconfig. Default sizes are 32Mb for boot and 256Mb for root. It is OK to resize any of these using partition management utilities after writing the image to the SD card.

Can somebody point me how to do it?

Also, is it possible to write this image to EMMC?

edit:
Forget it.

Files:

openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-ext4-sdcard.img.gz
openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-ext4-sysupgrade.tar.gz

not exist.
These files are not being created. Only file that I get is “root.ext4”
I give up and leave this fork. I don’t want to play with this anymore.

Regards

Any errors while compiling?

I guess you miss any depency

Compilation runs without any errors, just most important files are being not generated.
Only option what I changed is C library to glibc, because I need it for one program (https://github.com/loki-project/loki-network) that I want to run on Banana Pi.

Reason why I trying to use other build tools for Banana Pi is that lokinet needs glibc 2.29 to run, so I need to compile toolchain with that version of glibc.
I trying now to use external toolchain. Maybe this is topic to separated thread, but in crosstool-ng I experiencing erros (https://github.com/crosstool-ng/crosstool-ng/issues/963)

But, anyway, frank-w can you point me how to make ext4 rootfs partiion?

Regards.

I had only tried to compile the repo as it is…had not changed anything in menuconfig…and i got the ext4-image which contains a ext4-partition for rootfs

So try first without modifying anything and then change 1 by 1 till the images are not created/updated

1 Like

Unfortunately still the same.
I give up.

Can you give me some instructions how to make ext4 rootfs from this image: BPI-R2 LEDE source code for hardware NAT

and flash it to EMMC?

i don’t know openwrt/lede much…you don’t have the image also if using the repos code?

this answer has to be answered by @LeXa2

Unfortunately no. Still the same. No images generated.

Thank you anyway Frank.

@bialy39 Why don’t you want to use the compiled image?

1 Like

@Tohin Thanks. This image is working fine.
Can you tell me what tools i can use to resize root partition?
It’s possible to write image to EMMC?

It is a HUGE change - you’re changing the main C library used for the image. I hadn’t tested if this works at all and upstream (i.e. original OpenWRT) also does not provide glibc-base builds by default. Expect all kinds of problems. It might work, it might not - be prepared to dig a lot resolving various problems.

Well… with the attitude like this your best bet would be to use ubuntu-based or armbian-based image for this board and free yourself from all the complation-related hassle - after all building software is not a thing expected to be done by a generic standard person out there :-).

If you would change your mind and would like to check what’s going on and what’s the problem is and want people on this forum to be able to help you - please provide more details.

Important are:

  1. Output of git branch command when executed at the same dir you execute make at.
  2. Full build log output. To gather it execute build like this: make clean && make V=s | tee build.log; bzip2 build.log. Attach resulting build.log.bz2 file here.
  3. Contents of your .config. Again, create an archive with it like this: cat .config | bzip2 -9 - > .config.bz2 and attach .config.bz2 here.

Also of a great help would be to provide us with the exact details of the things you did to clone repo and prepare it for the build. Devil usually is in details, you know.

In general you cat put the image to the SD card and then use any partition manager tool you like to do the task. gparted is a best choice under linux, google for “Partition Master” or “Partition Manager” or “Partition Wizard” to find suitable utility for Windows.

There’s a catch though that makes gparted the best for this task: windows-based tools in general don’t know how to handle ext4 partitions. Then, when resizing be sure not to move first partition, you may break bootloader-related magic otherwise. It is OK to resize first partition and it is OK to resize/move other partitions or to add additional partitions. Beware squashfs-based images - they can’t be resized easily.

Fortunately images are being generated. I really can’t figure out what I missed before.
I’m on Arch Linux so I used gparted for resize rootfs partition and this also works fine.

Additionally I founded way to make this system starting from EMMC.
Solution brings me this post: Which preloader image to use?
You, @LeXa2, pointed me which preloader I must use and @frank-w pointed where I must flash.
I partitioned emmcblk0 for boot and rootfs partition, copied content and flash preloader to mmcblk0boot0. Now I can start system from EMMC. Looks like uEnv.txt is not needed because bootargs are hardcoded in preloader. I tried, just-for-fun, to boot Arch Linux ARM from /dev/sda1 (SSD) but bootargs in uEnv.txt have no effect, it’s always booting from mmcblk0 or mmcblk1.

Anyway thak you guys @LeXa2 @frank-w for help.
Now I have what I wanted.

Regards.