diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index ad19ab2b53..873e1b44e0 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -13,19 +13,19 @@ include $(INCLUDE_DIR)/feeds.mk
 override MAKEFLAGS=
 
 IB_NAME:=$(VERSION_DIST_SANITIZED)-imagebuilder-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)).$(HOST_OS)-$(HOST_ARCH)
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
-IB_KDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(KERNEL_BUILD_DIR))
-IB_LDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))
-IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))/arch/$(LINUX_KARCH)/boot/dts/
-IB_IDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(STAGING_DIR_IMAGE))
+IB_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
+IB_KDIR:=$(patsubst $(TOPDIR)/%,$(IB_BUILD_DIR)/%,$(KERNEL_BUILD_DIR))
+IB_LDIR:=$(patsubst $(TOPDIR)/%,$(IB_BUILD_DIR)/%,$(LINUX_DIR))
+IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(IB_BUILD_DIR)/%,$(LINUX_DIR))/arch/$(LINUX_KARCH)/boot/dts/
+IB_IDIR:=$(patsubst $(TOPDIR)/%,$(IB_BUILD_DIR)/%,$(STAGING_DIR_IMAGE))
 
 all: compile
 
 $(BIN_DIR)/$(IB_NAME).tar.xz: clean
-	rm -rf $(PKG_BUILD_DIR)
-	mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
-		$(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
-	-cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
+	rm -rf $(IB_BUILD_DIR)
+	mkdir -p $(IB_KDIR) $(IB_LDIR) $(IB_BUILD_DIR)/staging_dir/host/lib \
+		$(IB_BUILD_DIR)/target $(IB_BUILD_DIR)/scripts $(IB_DTSDIR)
+	-cp $(TOPDIR)/.config $(IB_BUILD_DIR)/.config
 	$(CP) -L \
 		$(INCLUDE_DIR) $(SCRIPT_DIR) \
 		$(TOPDIR)/rules.mk \
@@ -33,38 +33,38 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
 		./files/repositories.conf \
 		$(TMP_DIR)/.targetinfo \
 		$(TMP_DIR)/.packageinfo \
-		$(PKG_BUILD_DIR)/
+		$(IB_BUILD_DIR)/
 
 ifeq ($(CONFIG_IB_STANDALONE),)
-	echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
-	$(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf)
+	echo '## Remote package repositories' >> $(IB_BUILD_DIR)/repositories.conf
+	$(call FeedSourcesAppend,$(IB_BUILD_DIR)/repositories.conf)
 endif
 
-	echo ''                                                        >> $(PKG_BUILD_DIR)/repositories.conf
-	echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf
-	echo 'src imagebuilder file:packages'                          >> $(PKG_BUILD_DIR)/repositories.conf
+	echo ''                                                        >> $(IB_BUILD_DIR)/repositories.conf
+	echo '## This is the local package repository, do not remove!' >> $(IB_BUILD_DIR)/repositories.conf
+	echo 'src imagebuilder file:packages'                          >> $(IB_BUILD_DIR)/repositories.conf
 
-	$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf
+	$(VERSION_SED_SCRIPT) $(IB_BUILD_DIR)/repositories.conf
 
 ifeq ($(CONFIG_IB_STANDALONE),)
 	(cd $(call FeedPackageDir,libc); $(FIND) -type f -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk') | \
 		while read path; do \
-			mkdir -p "$(PKG_BUILD_DIR)/packages/$${path%/*}"; \
-			cp "$(call FeedPackageDir,libc)/$$path" "$(PKG_BUILD_DIR)/packages/$$path"; \
+			mkdir -p "$(IB_BUILD_DIR)/packages/$${path%/*}"; \
+			cp "$(call FeedPackageDir,libc)/$$path" "$(IB_BUILD_DIR)/packages/$$path"; \
 		done
 else
-	$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages
-	find $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' -exec $(CP) {} $(PKG_BUILD_DIR)/packages/ \;
+	$(INSTALL_DIR) $(IB_BUILD_DIR)/packages
+	find $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' -exec $(CP) {} $(IB_BUILD_DIR)/packages/ \;
 endif
 
-	$(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
+	$(CP) $(TOPDIR)/target/linux $(IB_BUILD_DIR)/target/
 	if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
-		$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
+		$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(IB_BUILD_DIR)/staging_dir/host/lib; \
 	fi
 	rm -rf \
-		$(PKG_BUILD_DIR)/target/linux/*/files{,-*} \
-		$(PKG_BUILD_DIR)/target/linux/*/patches{,-*} \
-		$(PKG_BUILD_DIR)/target/linux/generic/{pending,backport,hack}{,-*}
+		$(IB_BUILD_DIR)/target/linux/*/files{,-*} \
+		$(IB_BUILD_DIR)/target/linux/*/patches{,-*} \
+		$(IB_BUILD_DIR)/target/linux/generic/{pending,backport,hack}{,-*}
 	-cp $(KERNEL_BUILD_DIR)/* $(IB_KDIR)/ # don't copy subdirectories here
 	-cp $(LINUX_DIR)/.config $(IB_LDIR)/
 	rm -f $(IB_KDIR)/root.*
@@ -76,16 +76,16 @@ endif
 	if [ -d $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts ]; then \
 		$(CP) -L $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/* $(IB_DTSDIR); \
 	fi
-	$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk
-	find $(PKG_BUILD_DIR) -name CVS -o -name .git -o -name .svn \
+	$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(IB_BUILD_DIR)/include/version.mk
+	find $(IB_BUILD_DIR) -name CVS -o -name .git -o -name .svn \
 	  | $(XARGS) rm -rf
 	$(INSTALL_DIR) $(IB_IDIR)
 	-$(CP) $(STAGING_DIR_IMAGE)/* $(IB_IDIR)/
-	$(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/host/bin
-	$(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/
-	(cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
-		$(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host)
-	STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/
+	$(INSTALL_DIR) $(IB_BUILD_DIR)/staging_dir/host/bin
+	$(CP) $(STAGING_DIR_HOST)/bin/* $(IB_BUILD_DIR)/staging_dir/host/bin/
+	(cd $(IB_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
+		$(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(IB_BUILD_DIR)/staging_dir/host)
+	STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(IB_BUILD_DIR)/staging_dir/host/bin/
 	(cd $(BUILD_DIR); \
 		tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(IB_NAME) \
 		--mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \
@@ -97,4 +97,4 @@ compile: $(BIN_DIR)/$(IB_NAME).tar.xz
 install: compile
 
 clean: FORCE
-	rm -rf $(PKG_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.xz
+	rm -rf $(IB_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.xz
