diff --git a/eclass/sablink-kernel.eclass b/eclass/sablink-kernel.eclass index bb4055b..35532df 100644 --- a/eclass/sablink-kernel.eclass +++ b/eclass/sablink-kernel.eclass @@ -761,14 +761,9 @@ _kernel_src_compile() { unset ARCH unset LDFLAGS - if [ "${K_SABKERNEL_DTB}" != "none" ]; then - cp "${WORKDIR}/config" .config - emake ${K_SABKERNEL_DTB} - cp "${S}"/arch/arm/boot/${K_SABKERNEL_DTB} "${S}" - emake mrproper - fi - - emake 3rdparty + pushd "${S}"/3rdparty + perl ./mkbuild.pl + popd DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel "${GKARGS[@]}" ${K_GENKERNEL_ARGS} \ --kerneldir="${S}" \ @@ -788,6 +783,11 @@ _kernel_src_compile() { ARCH=${OLDARCH} + if [ "${K_SABKERNEL_DTB}" != "none" ]; then + emake ${K_SABKERNEL_DTB} + cp "${S}"/arch/arm/boot/${K_SABKERNEL_DTB} "${S}" + fi + # Buffalo Boxes have a special naming and start address if [ "${K_SABKERNEL_TYPE}" = "buffalo" ]; then if [ "${K_SABKERNEL_DTB}" = "none" ]; then