Last few months I’ve been working on getting BPi R2 upstream OpenWrt support into a better state. Finally the project is in good enough shape to be shared with wider public.
Welcome aboard:
To build use the standard OpenWrt build procedure:
$ git clone https://github.com/lexa2/openwrt.git
$ cd openwrt
$ git checkout v18.06.2-bpir2-rc1
$ { echo CONFIG_TARGET_mediatek=y; echo CONFIG_TARGET_mediatek_mt7623=y; echo CONFIG_TARGET_mediatek_mt7623_DEVICE_7623n-bananapi-bpi-r2=y; } > .config
$ { echo CONFIG_DEVEL=y; echo CONFIG_CCACHE=y; } >> .config
$ make defconfig
$ make menuconfig
$ make -j16
Important: make sure to disable generation of initramfs and squashfs images in menuconfig. It is located under “Target Images —>” menu. Only ext4-based images are supported at current state. I’m working on getting squashfs support into a better shape.
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.
Warning: Moving the start of the boot partition is forbidden and might lead to an unbootable image. Space from the start of SD card and up to the start of the boot partition is reserved for board boot purposes and should not be touched.
In case compilation fails with some error rerun make like this: make -j1 V=s
. Details will be revealed showing what’s going on and what went wrong.
Upon successful compilation resulting image will be available in bin/targets/mediatek/mt7623
:
$ ls -1 bin/targets/mediatek/mt7623
config.seed
openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-ext4-sdcard.img.gz
openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-ext4-sysupgrade.tar.gz
openwrt-mediatek-mt7623-device-7623n-bananapi-bpi-r2.manifest
packages
sha256sums
Write the image to the SD card like this (assuming /dev/mmdblk1
is your SD card):
$ zcat openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-ext4-sdcard.img.gz | dd of=/dev/mmcblk1 bs=1M
$ sync
With luck your SD card should be ready to boot R2 into the OpenWrt 18.06.2.
P.S. Please do not report usage-related issues/quiestions to my github page - it is only for reporting code-related build system issues. Direct usage questions into this thread or better luck would be to post to OpenWrt users forum.