From a48b869d5c241a0d630b2e19f2014ea1f357d4f6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 23 Sep 2009 21:04:13 +0200 Subject: add google g1 device support - toolchain only - add tar.gz package backend - verified to work on device with a static linked mksh and eglibc --- mk/package.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mk') diff --git a/mk/package.mk b/mk/package.mk index 6538eb004..9a4ade8eb 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -136,6 +136,7 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE} @echo "Package: $(2)" > $(WRKDIR)/.$(2).control @echo "Section: $(6)" >> $(WRKDIR)/.$(2).control @echo "Description: $(5)" >> $(WRKDIR)/.$(2).control +ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) ${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh $${IDIR_$(1)} $${ICONTROL_$(1)} $(3) ${CPU_ARCH} @adeps='$$(strip $${IDEPEND_$(1)})'; if [[ -n $$$$adeps ]]; then \ comma=; \ @@ -155,6 +156,7 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE} @for file in conffiles preinst postinst prerm postrm; do \ [ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \ done +endif $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $${_FAKE_COOKIE} ifeq ($(ADK_DEBUG),) @@ -212,7 +214,12 @@ ifeq (,$(filter noscripts,$(7))) >>'$${STAGING_PARENT}/pkg/$(1)'; \ done endif +ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) $${IPKG_BUILD} $${IDIR_$(1)} $${PACKAGE_DIR} $(MAKE_TRACE) +endif +ifeq ($(ADK_TARGET_PACKAGE_TGZ),y) + (cd $${IDIR_$(1)} && tar czf $(PACKAGE_DIR)/$(2)_$(3)_${CPU_ARCH}.tar.gz .); +endif clean-targets: clean-dev-$(1) -- cgit v1.2.3 From 2196fce0b2ee7d8188c1d34fc1d6bb6555538870 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 23 Sep 2009 21:18:02 +0200 Subject: add static application build barely tested, but working for mksh package and google g1 target --- Config.in | 13 +++++++++++++ mk/package.mk | 8 +++++++- target/Config.in | 7 ------- 3 files changed, 20 insertions(+), 8 deletions(-) (limited to 'mk') diff --git a/Config.in b/Config.in index eeda10eaf..4fd011c48 100644 --- a/Config.in +++ b/Config.in @@ -53,6 +53,19 @@ config ADK_DEVELSYSTEM If you choose this option, all necessary software needed for native building will be selected. +config ADK_DEBUG + bool "Enable debug support" + default n + help + All packages and libc will be compiled and packaged with debug information. + Mostly useful for NFS root or big USB/CF disk setups. + +config ADK_STATIC + bool "Link applications statically by default" + default n + help + Useful for toolchain only target devices. + config ADK_MAKE_JOBS int default 1 if ! ADK_MAKE_PARALLEL diff --git a/mk/package.mk b/mk/package.mk index 9a4ade8eb..c28f22a7c 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -3,9 +3,15 @@ all: build-all-ipkgs +ifeq ($(ADK_STATIC),y) +TCFLAGS:= ${TARGET_CFLAGS} -static +TCXXFLAGS:= ${TARGET_CFLAGS} -static +TCPPFLAGS:= ${TARGET_CPPFLAGS} -static +else TCFLAGS:= ${TARGET_CFLAGS} TCXXFLAGS:= ${TARGET_CFLAGS} TCPPFLAGS:= ${TARGET_CPPFLAGS} +endif ifeq ($(ADK_DEBUG),) TCPPFLAGS+= -DNDEBUG endif @@ -176,7 +182,7 @@ endif @mkdir -p $${PACKAGE_DIR} '$${STAGING_PARENT}/pkg' \ '$${STAGING_DIR}/scripts' ifeq (,$(filter noremove,$(7))) - if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ + @if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ cd '$${STAGING_DIR}'; \ while read fn; do \ rm -f "$$$$fn"; \ diff --git a/target/Config.in b/target/Config.in index 769e1de55..0f993e0be 100644 --- a/target/Config.in +++ b/target/Config.in @@ -655,13 +655,6 @@ config ADK_CXX help Enable C++ Compiler and Libraries -config ADK_DEBUG - bool "Enable debug support" - default n - help - All packages and libc will be compiled and packaged with debug information. - Mostly useful for NFS root or big USB/CF disk setups. - config ADK_IPV6 bool "Enable IPv6 support" default n -- cgit v1.2.3