User Tools

Site Tools


Translations of this page:

en:programming:openwrt

OpenWRT

quilt

apt install quilt

linux

make target/linux clean
make target/linux/prepare QUILT=1 V=s
make target/linux/compile QUILT=1 -j1 #for patches to be applied in build_dir
ls -l build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-*/arch/arm64/boot/dts/mediatek/
cd build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.12.*/
quilt applied
quilt new platform/049-arm64-dts-mediatek-mt7988a-bpi-r4-pro-update-makefile.patch
quilt add arch/arm64/boot/dts/mediatek/Makefile 
# now make changes!
quilt refresh
quilt diff
#copy patchfile to patch-dir under git control and add it
#cp patches/platform/049-arm64-dts-mediatek-mt7988a-bpi-r4-pro-update-makefile.patch $OLDPWD/target/linux/mediatek/patches-6.12/
quilt push -a
cd -
make target/linux/update QUILT=1 #copy patch from quilt cache to right folder
git add target/linux/mediatek/patches-6.12/049-arm64-dts-mediatek-mt7988a-bpi-r4-pro-update-makefile.patch 
git commit -s
git push

if something is wrong, remove patches and .pc dir and make clean from beginning

patch error

if a patch cannot be applied it can be forced to apply all matching chunks and then patch manually to update patch file.

make target/linux/prepare QUILT=1
cd build_dir/target-*/linux-*/linux-6*
quilt push -a

quilt push -f # applies all possible hunks and create .rej/.orig files to continue
quilt add arch/arm64/boot/dts/mediatek/Makefile
# update changed file(s)
quilt refresh
quilt push -a
cd -
make target/linux/update QUILT=1 #copy patch from quilt cache to right folder

u-boot

make package/boot/uboot-mediatek/clean
make package/boot/uboot-mediatek/prepare QUILT=1 V=s
make package/boot/uboot-mediatek/compile QUILT=1 -j1 # to apply existing patches
cd build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7988_bananapi_bpi-r4-pro-8x-sdmmc/u-boot-2025.10/
quilt applied
quilt new 999-boot-fit-show-config-name.patch
quilt add boot/image-fit.c
# make changes
quilt refresh #should say that patch was updated
quilt diff # should show changes made
# copy patch and ad git control
cp patches/999-boot-fit-show-config-name.patch $OLDPWD/package/boot/uboot-mediatek/patches/
cd -
ls package/boot/uboot-mediatek/patches/
git add package/boot/uboot-mediatek/patches/999-boot-fit-show-config-name.patch
git commit -s

before doing a patch refresh (after modify patchfile directly) a clean must be made!

packages

for i2cdetect and lspci/lsusb feeds must be updated and installed

scripts/feeds update -a
scripts/feeds install -a

and enabled in “make menuconfig” Utilities ⇒ i2c-tools / pciutils / usbutils

manual kernel load (uboot)

using bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-*-initramfs-recovery.itb

BPI-R4> usb start
BPI-R4> ls usb 0:1 r4
            ./
            ../
  7929856   openwrt-mediatek-filogic-bananapi_bpi-r4-initramfs-recovery.itb

1 file(s), 2 dir(s)

BPI-R4> fatload usb 0:1 0x50000000 r4/openwrt-mediatek-filogic-bananapi_bpi-r4-initramfs-recovery.itb
7929856 bytes read in 672 ms (11.3 MiB/s)
BPI-R4> bootm 0x50000000#config-mt7988a-bananapi-bpi-r4#mt7988a-bananapi-bpi-r4-sd

MT7988> setenv file openwrt-mediatek-filogic-bananapi_bpi-r4-pro-8x-initramfs-recovery.itb
MT7988> fatload usb 0:1 0x50000000 $file
16187392 bytes read in 1362 ms (11.3 MiB/s)
MT7988> bootm 0x50000000#config-mt7988a-bananapi-bpi-r4-pro-8x#mt7988a-bananapi-bpi-r4-pro-8x-sd
en/programming/openwrt.txt · Last modified: by frank