Some tips:
* PATH now contains the SDK utilities
* Standard autotools variables (CC, LD, CFLAGS) are exported
+* Kernel compilation variables (ARCH, CROSS_COMPILE, KERNELDIR) are exported
* To configure do "./configure $CONFIGURE_FLAGS" or use
the "configure" alias
* To build CMake-based projects, use the "cmake" alias
for var in $(TARGET_CONFIGURE_OPTS); do \
printf "export \"$$var\"\n" >> $(ENVIRONMENT_SETUP_FILE); \
done
+ printf "export \"ARCH=$(KERNEL_ARCH)\"\n" >> $(ENVIRONMENT_SETUP_FILE)
printf "export \"CROSS_COMPILE=$(TARGET_CROSS)\"\n" >> $(ENVIRONMENT_SETUP_FILE)
printf "export \"CONFIGURE_FLAGS=--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
$(ENVIRONMENT_SETUP_FILE)
printf "export \"PATH=\$$SDK_PATH/bin:\$$SDK_PATH/sbin:\$$PATH\"\n" \
>> $(ENVIRONMENT_SETUP_FILE)
+
+ $(if $(BR2_LINUX_KERNEL),\
+ printf "export \"KERNELDIR=$(LINUX_BUILDDIR)\"\n" \
+ >> $(ENVIRONMENT_SETUP_FILE),)
endef
$(eval $(host-generic-package))