diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl
index 0cdcc97a14789f6f3cf215ca4e0b8fd24bb4ed3b..70c07b70a8123ad1971ddd003016fbe9c7d45d35 100755
--- a/openwrt/scripts/gen_deps.pl
+++ b/openwrt/scripts/gen_deps.pl
@@ -62,6 +62,7 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
 		} elsif (defined($pkg{$dep}) && !$options{SDK}) {
 			$idx = $dep;
 		}
+		undef $idx if $idx =~ /^(kernel)|(base-files)$/;
 		if ($idx) {
 			next if $dep{$pkg{$name}->{src}."->".$idx};
 			$depline .= " $idx\-compile";