the archives have 2 folders (BPI-BOOT,BPI-ROOT) which content must be copied to the partition with same name. BPI-BOOT contains the kernel-file (uImage), which should be backed up first (before overwriting)
every actual archive have also a md5 in same gdrive-folder to check if it is damaged (unpack-problems).
On top of wiki-page i started an overview. Please report me which features are working (mainly for 4.4,because i’m currently have only 4.14 running)
dear Frank In
in your wiki there is information about the kernel 4.9 with support for hw-nat and port separtion.
How can I build such a kernel? Maybe there is a ready precompiled Kernel ?
Following @frank-w (precompiled) Kernels for BPI-R2, i have create debian/ubuntu kernel image.
All kernel image include hardware crypto devices, eg: cryptodev module.
I also provide opensll with cryto engines to allow hardware crypto with SSL and SSH, eg: openvpn.
The deb package does not overwrite the kernel-file (uImage). It will create a separate one (uImage-).
You can check the package details and list of file with the command dpkg:
$ dpkg -I DEBIAN/bananapi-r2-image_4.9.44_armv7l.deb l
new debian package, version 2.0.
size 24282724 bytes: control archive=284 bytes.
199 bytes, 9 lines control
Package: bananapi-r2-image
Version: 4.9.44
Section: custom
Priority: optional
Architecture: armv7l
Multi-Arch: no
Essential: no
Maintainer: [email protected]
Description: BPI-R2 linux image 4.9.44-4.9_patched-00038-g802d746fa030
i tried lede-patches for 4.14, but at least 2nd gmac does not work correctly, btw. your link goes to 4.9-patches, discussion about the 4.14-lede-patches here: Adding second gmac to 4.14
4.16-branches in my repo are only a basic kernel, nothing changed for bpi-r2 yet…also internalwifi-driver is missing
4.4 is in separate repo (forked from official repo)
can you add infos how to compile openssl (for openvpn) and how-to create the deb so i can compile it myself?
cryptodev and openssl are dependent each other. From your kernel i always remove “CONFIG_LOCALVERSION” and select “CONFIG_LOCALVERSION_AUTO”
cryptodev
cross compile with openssl-1.1.0f
"cryptodev")
echo "cryptodev"
export CFLAGS=-I${KDIR}/openssl-1.1.0f/debian/tmp/usr/include/arm-linux-gnueabihf
export LDFLAGS+=' -L${KDIR}/openssl-1.1.0f/debian/tmp/usr/lib/arm-linux-gnueabihf'
cd cryptodev-linux-1.9
make KERNEL_DIR=${KDIR}
cd tests
make CC=arm-linux-gnueabihf-gcc ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
openssl
Fetch the debian source
Update changelog to add “+crypto”
Update debian/rules to compile with crypto engine
cross build package
"openssl")
echo openssl
# Update package list before, sudo apt-get update
apt-get source openssl
cd openssl-1.1.0f
head -1 debian/changelog | sed -i 's/)/+crypto)/' debian/changelog
sed -i 's/\tdh_shlibdeps/dh_shlibdeps -l\/usr\/arm-linux-gnueabihf\/lib:$(pwd)\/debian\/libssl1.1\/usr\/lib\/arm-linux-gnueabihf/' debian/rules
LANG=C ARCH=arm DEB_BUILD_OPTIONS=nocheck CROSS_COMPILE=arm-linux-gnueabihf- \
DEB_CFLAGS_APPEND='-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS' \
DEB_CPPFLAGS_APPEND="-I$(pwd)/../cryptodev-linux-1.9" \
dpkg-buildpackage -us -uc -aarmhf
debian package
"deb")
echo "deb package ${ver}"
# uImage_4.9.44-4.9_patched-00030-g328e50a6cb09
mkdir -p debian/bananapi-r2-image/boot/bananapi/bpi-r2/linux/
mkdir -p debian/bananapi-r2-image/lib/modules/
rm debian/bananapi-r2-image/boot/bananapi/bpi-r2/linux/*
rm -rf debian/bananapi-r2-image/lib/modules/*
if test -e ./uImage && test -d mod/lib/modules/${ver}; then
cp ./uImage debian/bananapi-r2-image/boot/bananapi/bpi-r2/linux/uImage_${ver}
cp -r mod/lib/modules/${ver} debian/bananapi-r2-image/lib/modules/
rm debian/bananapi-r2-image/lib/modules/${ver}/{build,source}
mkdir debian/bananapi-r2-image/lib/modules/${ver}/kernel/extras
cp cryptodev-linux-1.9/cryptodev.ko debian/bananapi-r2-image/lib/modules/${ver}/kernel/extras
cat > debian/bananapi-r2-image/DEBIAN/control << EOF
Package: bananapi-r2-image
Version: ${kernver}
Section: custom
Priority: optional
Architecture: armv7l
Multi-Arch: no
Essential: no
Maintainer: [email protected]
Description: BPI-R2 linux image ${ver}
EOF
cd debian
fakeroot dpkg-deb --build bananapi-r2-image ../debian
ls -lh *.deb
why this? i added these options to get rid of the commit-id and the dirty-flag
ok, i had not seen that you have added these options to build.sh in 4.9_patched…btw. please use 4.9-branch, because this is upgraded to a newer version…i have merged most of your commits also into it
your way needs compile on bpi-r2, right (at least for the apt-get source -command)…is it possible to do this on a independed host? i don’t want compile-tools on a router for security reasons
There are three proprietary drivers - Video WIFI BT, but the others are supported by the mainline kernel.
HW NAT is a special case as it wouldn’t suit the current framework. Fortunately, there are some patches still under review and has been for a month now:
https://patchwork.ozlabs.org/patch/865630/