diff --git a/resources/BuildResources/config b/resources/BuildResources/config index 9d8a261..92d0f2f 100644 --- a/resources/BuildResources/config +++ b/resources/BuildResources/config @@ -1129,7 +1129,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # Firmware loader # CONFIG_FW_LOADER=y -CONFIG_EXTRA_FIRMWARE="" +CONFIG_EXTRA_FIRMWARE="htc_9271.fw htc_7010.fw" +CONFIG_EXTRA_FIRMWARE_DIR="../open-ath9k-htc-firmware/target_firmware" # CONFIG_FW_LOADER_USER_HELPER is not set CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y diff --git a/scripts/buildKernel.sh b/scripts/buildKernel.sh index 9500d22..0a5cd44 100755 --- a/scripts/buildKernel.sh +++ b/scripts/buildKernel.sh @@ -28,10 +28,15 @@ TEST_PATCHES=false ROOT_DIR=`pwd` RESOURCES=$ROOT_DIR/resources/BuildResources - - [ ! -d build ] && mkdir build cd build +# build AR9271 firmware +[ ! -d open-ath9k-htc-firmware ] && git clone --depth 1 https://github.com/qca/open-ath9k-htc-firmware.git +cd open-ath9k-htc-firmware +make toolchain +make -C target_firmware +cd .. + # build Linux-libre, with ath9k_htc [ ! -f linux-libre-$KVER-gnu.tar.lz ] && wget https://www.linux-libre.fsfla.org/pub/linux-libre/releases/$KVER-gnu/linux-libre-$KVER-gnu.tar.lz [ ! -d linux-$KVER ] && tar --lzip -xvf linux-libre-$KVER-gnu.tar.lz && FRESH=true @@ -59,12 +64,4 @@ vbutil_kernel --pack vmlinux.kpart \ --config $RESOURCES/cmdline \ --bootloader bootloader.bin cd .. - - -# build AR9271 firmware -[ ! -d open-ath9k-htc-firmware ] && git clone --depth 1 https://github.com/qca/open-ath9k-htc-firmware.git -cd open-ath9k-htc-firmware -make toolchain -make -C target_firmware -cd .. cd $ROOT_DIR diff --git a/scripts/injectKernelIntoFS.sh b/scripts/injectKernelIntoFS.sh index c6b39b8..3198c47 100755 --- a/scripts/injectKernelIntoFS.sh +++ b/scripts/injectKernelIntoFS.sh @@ -60,8 +60,9 @@ mount -o noatime ${outdev}p2 $outmnt dd if=$build_resources/blank_kernel of=${outdev}p1 conv=notrunc dd if=build/linux-$KVER/vmlinux.kpart of=${outdev}p1 conv=notrunc make -C build/linux-$KVER ARCH=arm INSTALL_MOD_PATH=$outmnt modules_install -install -D -m 644 build/open-ath9k-htc-firmware/target_firmware/htc_9271.fw $outmnt/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw -install -D -m 644 build/open-ath9k-htc-firmware/target_firmware/htc_7010.fw $outmnt/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw +#Dont put ath firmware in filesystem, it is now built into the kernel image +# install -D -m 644 build/open-ath9k-htc-firmware/target_firmware/htc_9271.fw $outmnt/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw +# install -D -m 644 build/open-ath9k-htc-firmware/target_firmware/htc_7010.fw $outmnt/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw umount -l $outmnt > /dev/null 2>&1 rmdir $outmnt > /dev/null 2>&1