sufianabrar
New Around Here
Hi,
I am building firmware for RT-AC86U from source code asuswrt-merlin.382 in my linux viertual machine Ubuntu 16.04.1 but there are few errors.
root@ubuntu:~/asuswrt-merlin.382/release/src-rt-5.02hnd# make rt-ac86u
CONFIGURED MODEL: RT-AC86U
SPECIFIED MODEL: RT-AC86U
----------------------------------------------------------------------------
Clean old model configuration
Update model configuration
make bin
make[1]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
BRCM_BOARD_ID=94906REF
# prepare config_base
# prepare prebuilt kernel binary
do nothing
hnd_router platform work
make[2]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Using profile, build config.
CURRENT_ARCH=aarch64 TOOLCHAIN_TOP= make prek
make[3]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; echo -e "\n# Automatically generated file -- do not modify manually\n\n" > Kconfig.autogen.tmp
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; echo -e "\n# Automatically generated file -- do not modify manually\n\n" > Makefile.autogen.tmp
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; echo -e "\n\$(info READING AG MAKEFILE)\n\n" >> Makefile.autogen.tmp
alldrivers=""; \
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; \
for autodetect in $(find * -type f -name autodetect); do \
dir=${autodetect%/*}; \
driver=$(grep -i "^DRIVER\|FEATURE:" $autodetect | awk -F ': *' '{ print $2 }'); \
[ $driver ] || driver=${dir##*/}; \
[ $(echo $driver | wc -w) -ne 1 ] && echo "Error parsing $autodetect" >2 && exit 1; \
echo "Processing $driver ($dir)"; \
DRIVER=$(echo "${driver}" | tr '[:lower:]' '[:upper:]'); \
echo "\$(eval \$(call LN_RULE_AG, CONFIG_BCM_${DRIVER}, $dir, \$(LN_NAME)))" >> Makefile.autogen.tmp; \
if [ -e $dir/Kconfig.autodetect ]; then \
echo "menu \"${DRIVER}\"" >> Kconfig.autogen.tmp;\
echo "source \"../../bcmdrivers/$dir/Kconfig.autodetect\"" >> Kconfig.autogen.tmp; \
echo "endmenu " >> Kconfig.autogen.tmp; \
echo "" >> Kconfig.autogen.tmp;\
fi; \
true; \
done; \
duplicates=$(echo $alldrivers | tr " " "\n" | sort | uniq -d | tr "\n" " "); echo $duplicates; \
[ ] && echo "alldrivers: $alldrivers" && echo "duplicates: $duplicates" || true; \
if [ $duplicates ]; then \
echo "ERROR: duplicate drivers found in autodetect -- $duplicates" >&2; \
exit 1; \
fi
Processing SPU (opensource/char/spudd)
Processing MCAST (opensource/char/mcast)
Processing PDC (opensource/char/pdc)
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; [ -e Makefile.autogen ] && cmp -s Makefile.autogen Makefile.autogen.tmp || mv Makefile.autogen.tmp Makefile.autogen
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers;[ -e Kconfig.autogen ] && cmp -s Kconfig.autogen Kconfig.autogen.tmp || mv Kconfig.autogen.tmp Kconfig.autogen
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; rm -f Makefile.autogen.tmp Kconfig.autogen.tmp
ln -s -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/include/uapi /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/bcm_local_kernel_include;
ln -s -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/arch/mips/include/uapi /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/bcm_local_kernel_mips_include;
ln -s -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/arch/arm/include/uapi /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/bcm_local_kernel_arm_include;
echo
echo -------------------------------------------
-------------------------------------------
echo ... starting kernel build at /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1
... starting kernel build at /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1
echo ARCH=arm64
ARCH=arm64
echo KERNEL_ARCH=aarch64
KERNEL_ARCH=aarch64
echo BCM_SWVERSION_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/include/linux/bcm_swversion.h
BCM_SWVERSION_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/include/linux/bcm_swversion.h
echo BCM_KF_KCONFIG_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/Kconfig.bcm_kf
BCM_KF_KCONFIG_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/Kconfig.bcm_kf
echo PROFILE_KERNEL_VER is LINUX_4_1_0
PROFILE_KERNEL_VER is LINUX_4_1_0
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel; \
if [ ! -e /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/.untar_complete ]; then \
echo "Untarring original Linux kernel source: src-linux-4.1.tar.bz2"; \
(tar xkfpj src-linux-4.1.tar.bz2 2> /dev/null || true); \
touch /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/.untar_complete; \
fi
#/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/hostTools/scripts/gendefconfig /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/targets/94908HND/94908HND w
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1; \
#cp -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/arch/arm64/defconfig /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/.config;
#
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1; \
make oldnoconfig;
make[4]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1'
make[5]: '../../.config' is up to date.
scripts/kconfig/conf --olddefconfig Kconfig
../../bcmdrivers/Kconfig.autogen:2: syntax error
Kconfig.bcm:1336: missing end statement for this entry
Kconfig:15: missing end statement for this entry
../../bcmdrivers/Kconfig.autogen:1: invalid statement
Kconfig.bcm:1338: unexpected end statement
Kconfig:20: unexpected end statement
scripts/kconfig/Makefile:84: recipe for target 'olddefconfig' failed
make[5]: *** [olddefconfig] Error 1
Makefile:565: recipe for target 'oldnoconfig' failed
make[4]: *** [oldnoconfig] Error 2
make[4]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1'
make.hndrt:332: recipe for target 'prek' failed
make[3]: *** [prek] Error 2
make[3]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Makefile:4039: recipe for target 'setprofile' failed
make[2]: *** [setprofile] Error 2
make[2]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Makefile:3873: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Makefile:4022: recipe for target 'rt-ac86u' failed
make: *** [rt-ac86u] Error 2
root@ubuntu:~/asuswrt-merlin.382/release/src-rt-5.02hnd#
I followed all your mentioned prerequisites steps but it does not work. Please help me in this case.
I am building firmware for RT-AC86U from source code asuswrt-merlin.382 in my linux viertual machine Ubuntu 16.04.1 but there are few errors.
root@ubuntu:~/asuswrt-merlin.382/release/src-rt-5.02hnd# make rt-ac86u
CONFIGURED MODEL: RT-AC86U
SPECIFIED MODEL: RT-AC86U
----------------------------------------------------------------------------
Clean old model configuration
Update model configuration
make bin
make[1]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
BRCM_BOARD_ID=94906REF
# prepare config_base
# prepare prebuilt kernel binary
do nothing
hnd_router platform work
make[2]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Using profile, build config.
CURRENT_ARCH=aarch64 TOOLCHAIN_TOP= make prek
make[3]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; echo -e "\n# Automatically generated file -- do not modify manually\n\n" > Kconfig.autogen.tmp
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; echo -e "\n# Automatically generated file -- do not modify manually\n\n" > Makefile.autogen.tmp
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; echo -e "\n\$(info READING AG MAKEFILE)\n\n" >> Makefile.autogen.tmp
alldrivers=""; \
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; \
for autodetect in $(find * -type f -name autodetect); do \
dir=${autodetect%/*}; \
driver=$(grep -i "^DRIVER\|FEATURE:" $autodetect | awk -F ': *' '{ print $2 }'); \
[ $driver ] || driver=${dir##*/}; \
[ $(echo $driver | wc -w) -ne 1 ] && echo "Error parsing $autodetect" >2 && exit 1; \
echo "Processing $driver ($dir)"; \
DRIVER=$(echo "${driver}" | tr '[:lower:]' '[:upper:]'); \
echo "\$(eval \$(call LN_RULE_AG, CONFIG_BCM_${DRIVER}, $dir, \$(LN_NAME)))" >> Makefile.autogen.tmp; \
if [ -e $dir/Kconfig.autodetect ]; then \
echo "menu \"${DRIVER}\"" >> Kconfig.autogen.tmp;\
echo "source \"../../bcmdrivers/$dir/Kconfig.autodetect\"" >> Kconfig.autogen.tmp; \
echo "endmenu " >> Kconfig.autogen.tmp; \
echo "" >> Kconfig.autogen.tmp;\
fi; \
true; \
done; \
duplicates=$(echo $alldrivers | tr " " "\n" | sort | uniq -d | tr "\n" " "); echo $duplicates; \
[ ] && echo "alldrivers: $alldrivers" && echo "duplicates: $duplicates" || true; \
if [ $duplicates ]; then \
echo "ERROR: duplicate drivers found in autodetect -- $duplicates" >&2; \
exit 1; \
fi
Processing SPU (opensource/char/spudd)
Processing MCAST (opensource/char/mcast)
Processing PDC (opensource/char/pdc)
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; [ -e Makefile.autogen ] && cmp -s Makefile.autogen Makefile.autogen.tmp || mv Makefile.autogen.tmp Makefile.autogen
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers;[ -e Kconfig.autogen ] && cmp -s Kconfig.autogen Kconfig.autogen.tmp || mv Kconfig.autogen.tmp Kconfig.autogen
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/bcmdrivers; rm -f Makefile.autogen.tmp Kconfig.autogen.tmp
ln -s -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/include/uapi /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/bcm_local_kernel_include;
ln -s -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/arch/mips/include/uapi /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/bcm_local_kernel_mips_include;
ln -s -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/arch/arm/include/uapi /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/bcm_local_kernel_arm_include;
echo
echo -------------------------------------------
-------------------------------------------
echo ... starting kernel build at /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1
... starting kernel build at /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1
echo ARCH=arm64
ARCH=arm64
echo KERNEL_ARCH=aarch64
KERNEL_ARCH=aarch64
echo BCM_SWVERSION_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/include/linux/bcm_swversion.h
BCM_SWVERSION_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/include/linux/bcm_swversion.h
echo BCM_KF_KCONFIG_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/Kconfig.bcm_kf
BCM_KF_KCONFIG_FILE=/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/Kconfig.bcm_kf
echo PROFILE_KERNEL_VER is LINUX_4_1_0
PROFILE_KERNEL_VER is LINUX_4_1_0
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel; \
if [ ! -e /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/.untar_complete ]; then \
echo "Untarring original Linux kernel source: src-linux-4.1.tar.bz2"; \
(tar xkfpj src-linux-4.1.tar.bz2 2> /dev/null || true); \
touch /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/.untar_complete; \
fi
#/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/hostTools/scripts/gendefconfig /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/targets/94908HND/94908HND w
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1; \
#cp -f /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/arch/arm64/defconfig /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1/.config;
#
cd /home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1; \
make oldnoconfig;
make[4]: Entering directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1'
make[5]: '../../.config' is up to date.
scripts/kconfig/conf --olddefconfig Kconfig
../../bcmdrivers/Kconfig.autogen:2: syntax error
Kconfig.bcm:1336: missing end statement for this entry
Kconfig:15: missing end statement for this entry
../../bcmdrivers/Kconfig.autogen:1: invalid statement
Kconfig.bcm:1338: unexpected end statement
Kconfig:20: unexpected end statement
scripts/kconfig/Makefile:84: recipe for target 'olddefconfig' failed
make[5]: *** [olddefconfig] Error 1
Makefile:565: recipe for target 'oldnoconfig' failed
make[4]: *** [oldnoconfig] Error 2
make[4]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd/kernel/linux-4.1'
make.hndrt:332: recipe for target 'prek' failed
make[3]: *** [prek] Error 2
make[3]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Makefile:4039: recipe for target 'setprofile' failed
make[2]: *** [setprofile] Error 2
make[2]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Makefile:3873: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/sufian/asuswrt-merlin.382/release/src-rt-5.02hnd'
Makefile:4022: recipe for target 'rt-ac86u' failed
make: *** [rt-ac86u] Error 2
root@ubuntu:~/asuswrt-merlin.382/release/src-rt-5.02hnd#
I followed all your mentioned prerequisites steps but it does not work. Please help me in this case.