package/environment-setup: add better kernel handling
Exporting ARCH and KERNELDIR makes easier to compile an external kernel or out of tree kernel modules. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
1e66d99610
commit
8a8a873455
@ -10,6 +10,7 @@ cat <<'EOF'
|
||||
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
|
||||
|
@ -11,6 +11,7 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_CMDS
|
||||
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) \
|
||||
@ -31,6 +32,10 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_CMDS
|
||||
$(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))
|
||||
|
Loading…
Reference in New Issue
Block a user