[uClibc]buildtools 'ARCH' value for building linux

Robin Gilks robin.gilks at tait.co.nz
Wed Jun 18 02:44:39 UTC 2003


Greetings

The value of 'ARCH' for gcc related things (i.e. generating a cross 
compiler) seems fine set at 'powerpc' but the kernel compile expects ppc 
as the value and in any case the standard Linux Makefile seems to always 
take the host as 'ARCH' anyway derived from uname output!!

Is this something new in 2.4.21 (I don't have an older kernel to hand) 
or does 'ARCH' need to be patched in the same way as the cross_compile 
value in the Makefile is by the make/linux.mk file?

something like
@@ -65,6 +65,7 @@
  	fi;

  $(LINUX_DIR)/.configured $(BUILD_DIR)/linux/.configured: 
$(LINUX_DIR)/.unpacked  $(LINUX_KCONFIG)
+	perl -i -p -e "s,^ARCH.*,ARCH=$(ARCH),g;" $(LINUX_DIR)/Makefile
  	perl -i -p -e "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" 
$(LINUX_DIR)/Makefile
  	-cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
  	$(MAKE) -C $(LINUX_DIR) oldconfig include/linux/version.h

(assuming the value of ARCH is correct for the kernel!!)

The project plan doesn't have me doing this for another month so this is 
idle hacking :-)

-- 
Robin Gilks
Senior Design Engineer              Phone: (+64)(3) 357 1569
Tait Electronics                          Fax  :  (+64)(3) 359 4632
PO Box 1645 Christchurch        Email : robin.gilks at tait.co.nz
New Zealand



More information about the uClibc mailing list