Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More infrastructure updates from upstream #71

Draft
wants to merge 12 commits into
base: opendingux-2014.08
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,714 changes: 2,714 additions & 0 deletions DEVELOPERS

Large diffs are not rendered by default.

108 changes: 43 additions & 65 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ unexport TERMINFO

GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)

TARGETS :=
PACKAGES :=

# silent mode requested?
QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
Expand Down Expand Up @@ -343,8 +343,6 @@ HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))
# Quotes are needed for spaces and all in the original PATH content.
BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"

TARGET_SKELETON = $(TOPDIR)/system/skeleton

# Location of a file giving a big fat warning that output/target
# should not be used as the root filesystem.
TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
Expand Down Expand Up @@ -381,17 +379,15 @@ ifneq ($(BR2_DEPRECATED),y)
include Makefile.legacy
endif

include system/system.mk
include package/Makefile.in
# arch/arch.mk must be after package/Makefile.in because it may need to
# complement variables defined therein, like BR_NO_CHECK_HASH_FOR.
include arch/arch.mk
include support/dependencies/dependencies.mk

# We also need the various per-package makefiles, which also add
# each selected package to TARGETS if that package was selected
# in the .config file.
include toolchain/*.mk
include toolchain/*/*.mk
include $(sort $(wildcard toolchain/*.mk))
include $(sort $(wildcard toolchain/*/*.mk))

# Include the package override file if one has been provided in the
# configuration.
Expand All @@ -404,22 +400,21 @@ include $(sort $(wildcard package/*/*.mk))

include boot/common.mk
include linux/linux.mk
include system/system.mk
include fs/common.mk

include $(BR2_EXTERNAL)/external.mk

TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))
PACKAGES_SOURCE := $(patsubst %,%-source,$(PACKAGES))
PACKAGES_DIRCLEAN := $(patsubst %,%-dirclean,$(PACKAGES))

# host-* dependencies have to be handled specially, as those aren't
# visible in Kconfig and hence not added to a variable like TARGETS.
# visible in Kconfig and hence not added to a variable like PACKAGES.
# instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
# variable for each enabled target.
# Notice: this only works for newstyle gentargets/autotargets packages
TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
$(addsuffix _DEPENDENCIES,\
$(call UPPERCASE,$(TARGETS) $(TARGETS_ROOTFS))),\
$(call UPPERCASE,$(PACKAGES) $(TARGETS_ROOTFS))),\
$($(dep)))))
# Host packages can in turn have their own dependencies. Likewise find
# all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
Expand All @@ -431,8 +426,8 @@ HOST_DEPS = $(sort $(foreach dep,\
$($(dep))))
HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))

TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
$(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))
PACKAGES_LEGAL_INFO := $(patsubst %,%-legal-info,\
$(PACKAGES) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))

dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BINARIES_DIR)
Expand All @@ -445,10 +440,9 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
world: target-post-image

.PHONY: all world toolchain dirs clean distclean source outputmakefile \
legal-info legal-info-prepare legal-info-clean printvars \
target-finalize target-post-image \
$(TARGETS) $(TARGETS_ROOTFS) \
$(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
$(PACKAGES) $(TARGETS_ROOTFS) \
$(PACKAGES_DIRCLEAN) $(PACKAGES_SOURCE) $(PACKAGES_LEGAL_INFO) \
$(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BINARIES_DIR)

Expand All @@ -469,37 +463,6 @@ else
LIB_SYMLINK = lib32
endif

$(STAGING_DIR):
@mkdir -p $(STAGING_DIR)/bin
@mkdir -p $(STAGING_DIR)/lib
@ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
@mkdir -p $(STAGING_DIR)/usr/lib
@ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
@mkdir -p $(STAGING_DIR)/usr/include
@mkdir -p $(STAGING_DIR)/usr/bin
@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging

ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
endif

RSYNC_VCS_EXCLUSIONS = \
--exclude .svn --exclude .git --exclude .hg --exclude .bzr \
--exclude CVS

$(BUILD_DIR)/.root:
mkdir -p $(TARGET_DIR)
rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
--chmod=Du+w --exclude .empty --exclude '*~' \
$(TARGET_SKELETON)/ $(TARGET_DIR)/
$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
@ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
@mkdir -p $(TARGET_DIR)/usr
@ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
touch $@

$(TARGET_DIR): $(BUILD_DIR)/.root

ifeq ($(BR2_PACKAGE_GDB),y)
BR2_STRIP_EXCLUDE_FILES += libpthread*.so*
endif
Expand Down Expand Up @@ -534,7 +497,7 @@ endif
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
ifneq ($(GENERATE_LOCALE),)
TARGETS += host-localedef
PACKAGES += host-localedef

define GENERATE_LOCALES
$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
Expand Down Expand Up @@ -578,7 +541,7 @@ endif

$(TARGETS_ROOTFS): target-finalize

target-finalize: $(TARGETS)
target-finalize: $(PACKAGES)
@$(call MESSAGE,"Finalizing target directory")
$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
Expand Down Expand Up @@ -648,36 +611,43 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize
$(call MESSAGE,"Executing post-image script $(s)"); \
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))

source: $(TARGETS_SOURCE) $(HOST_SOURCE)
source: $(PACKAGES_SOURCE) $(HOST_SOURCE)

external-deps:
@$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u

.PHONY: legal-info-clean
legal-info-clean:
@rm -fr $(LEGAL_INFO_DIR)

.PHONY: legal-info-prepare
legal-info-prepare: $(LEGAL_INFO_DIR)
@$(call MESSAGE,"Collecting legal info")
@$(call legal-license-file,buildroot,COPYING,COPYING,HOST)
@$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,TARGET)
@$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST)
@$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,not saved,HOST)
@$(call MESSAGE,"Buildroot $(BR2_VERSION_FULL) Collecting legal info")
@$(call legal-license-file,buildroot,buildroot,support/legal-info/buildroot.hash,COPYING,COPYING,HOST)
@$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES)
@$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES)
@$(call legal-manifest,HOST,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved)
@$(call legal-warning,the Buildroot source code has not been saved)
@$(call legal-warning,the toolchain has not been saved)
@cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config

legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
.PHONY: legal-info
legal-info: legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \
$(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
@cat support/legal-info/README.header >>$(LEGAL_REPORT)
@if [ -r $(LEGAL_WARNINGS) ]; then \
cat support/legal-info/README.warnings-header \
$(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \
cat $(LEGAL_WARNINGS); fi
@echo "Legal info produced in $(LEGAL_INFO_DIR)"
@rm -f $(LEGAL_WARNINGS)
@(cd $(LEGAL_INFO_DIR); \
find * -type f -exec sha256sum {} + | LC_ALL=C sort -k2 \
>.legal-info.sha256; \
mv .legal-info.sha256 legal-info.sha256)
@echo "Legal info produced in $(LEGAL_INFO_DIR)"

.PHONY: show-targets
show-targets:
@echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(TARGETS) $(TARGETS_ROOTFS)
@echo $(sort $(PACKAGES)) $(sort $(TARGETS_ROOTFS))

graph-build: $(O)/build/build-time.log
@install -d $(O)/graphs
Expand Down Expand Up @@ -841,13 +811,21 @@ ifeq ($(NEED_WRAPPER),y)
$(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
endif

# printvars prints all the variables currently defined in our Makefiles
# printvars prints all the variables currently defined in our
# Makefiles. Alternatively, if a non-empty VARS variable is passed,
# only the variables matching the make pattern passed in VARS are
# displayed.
.PHONY: printvars
printvars:
@$(foreach V, \
$(sort $(.VARIABLES)), \
@:
$(foreach V, \
$(sort $(filter $(VARS),$(.VARIABLES))), \
$(if $(filter-out environment% default automatic, \
$(origin $V)), \
$(info $V=$($V) ($(value $V)))))
$(if $(QUOTED_VARS),\
$(info $V='$(subst ','\'',$(if $(RAW_VARS),$(value $V),$($V)))'), \
$(info $V=$(if $(RAW_VARS),$(value $V),$($V))))))
# ' Syntax colouring...

clean:
rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
Expand Down
5 changes: 5 additions & 0 deletions board/opendingux/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ comment "System tools"
source "$BR2_EXTERNAL/package/dingux-commander/Config.in"
source "$BR2_EXTERNAL/package/od-network-config/Config.in"
source "$BR2_EXTERNAL/package/pwswd/Config.in"

comment "Hardware handling"
source "$BR2_EXTERNAL/package/lowpowd/Config.in"
source "$BR2_EXTERNAL/package/unlockvt/Config.in"

endmenu
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions board/opendingux/package/lowpowd/lowpowd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
LOWPOWD_SITE = $(BR2_EXTERNAL)/package/lowpowd
LOWPOWD_SITE_METHOD = local

define LOWPOWD_BUILD_CMDS
$(TARGET_CC) $(TARGET_CFLAGS) $(@D)/lowpowd.c -o $(@D)/lowpowd
endef

define LOWPOWD_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/lowpowd $(TARGET_DIR)/usr/sbin/lowpowd
$(INSTALL) -m 0755 -D $(@D)/S99lowpowd.sh $(TARGET_DIR)/etc/init.d/S99lowpowd.sh
endef

$(eval $(generic-package))
File renamed without changes.
12 changes: 12 additions & 0 deletions board/opendingux/package/unlockvt/unlockvt.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
UNLOCKVT_SITE = $(BR2_EXTERNAL)/package/unlockvt
UNLOCKVT_SITE_METHOD = local

define UNLOCKVT_BUILD_CMDS
$(TARGET_CC) $(TARGET_CFLAGS) $(@D)/unlockvt.c -o $(@D)/unlockvt
endef

define UNLOCKVT_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/unlockvt $(TARGET_DIR)/usr/sbin/unlockvt
endef

$(eval $(generic-package))
4 changes: 2 additions & 2 deletions docs/manual/adding-packages-autotools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ cases, typical packages will therefore only use a few of them.
+LIBFOO_AUTORECONF=YES+. These are passed in the environment of
the 'autoreconf' command. By default, empty.

* +LIBFOO_AUTORECONF_OPT+ to specify additional options
* +LIBFOO_AUTORECONF_OPTS+ to specify additional options
passed to the 'autoreconf' program if
+LIBFOO_AUTORECONF=YES+. By default, empty.

Expand All @@ -136,7 +136,7 @@ cases, typical packages will therefore only use a few of them.
'gettextize'.) Only valid when +LIBFOO_AUTORECONF=YES+. Valid
values are +YES+ and +NO+. The default is +NO+.

* +LIBFOO_GETTEXTIZE_OPT+, to specify additional options passed to
* +LIBFOO_GETTEXTIZE_OPTS+, to specify additional options passed to
the 'gettextize' program, if +LIBFOO_GETTEXTIZE=YES+. You may
use that if, for example, the +.po+ files are not located in the
standard place (i.e. in +po/+ at the root of the package.) By
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/adding-packages-kconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ be set to suit the needs of the package under consideration:
* +FOO_KCONFIG_EDITORS+: a space-separated list of kconfig editors to
support, for example 'menuconfig xconfig'. By default, 'menuconfig'.

* +FOO_KCONFIG_OPT+: extra options to pass when calling the kconfig
* +FOO_KCONFIG_OPTS+: extra options to pass when calling the kconfig
ediftors. This may need to include '$(FOO_MAKE_OPTS)', for example. By
default, empty.

Expand Down
6 changes: 3 additions & 3 deletions docs/manual/adding-packages-luarocks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ with an example :
07: LUAFOO_VERSION = 1.0.2-1
08: LUAFOO_DEPENDENCIES = foo
09:
10: LUAFOO_BUILD_OPT += FOO_INCDIR=$(STAGING_DIR)/usr/include
11: LUAFOO_BUILD_OPT += FOO_LIBDIR=$(STAGING_DIR)/usr/lib
10: LUAFOO_BUILD_OPTS += FOO_INCDIR=$(STAGING_DIR)/usr/include
11: LUAFOO_BUILD_OPTS += FOO_LIBDIR=$(STAGING_DIR)/usr/lib
12: LUAFOO_LICENSE = luaFoo license
13: LUAFOO_LICENSE_FILES = COPYING
14:
Expand Down Expand Up @@ -86,5 +86,5 @@ also defined. They can be overridden in specific cases.
* +LUAFOO_SUBDIR+, which defaults to
+luafoo-$(LUAFOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+

* +LUAFOO_BUILD_OPT+ contains additional build options for the
* +LUAFOO_BUILD_OPTS+ contains additional build options for the
+luarocks build+ call.
2 changes: 1 addition & 1 deletion docs/manual/adding-packages-perl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ cases, typical packages will therefore only use a few of them.
configure options to pass to the +perl Makefile.PL+ or +perl Build.PL+.
By default, empty.

* +PERL_FOO_BUILD_OPT+/+HOST_PERL_FOO_BUILD_OPT+, to specify additional
* +PERL_FOO_BUILD_OPTS+/+HOST_PERL_FOO_BUILD_OPTS+, to specify additional
options to pass to +make pure_all+ or +perl Build build+ in the build step.
By default, empty.

Expand Down
4 changes: 2 additions & 2 deletions docs/manual/adding-packages-python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ therefore only use a few of them, or none.
setuptools target packages) and +HOST_PKG_PYTHON_SETUPTOOLS_ENV+
(for setuptools host packages).

* +PYTHON_FOO_BUILD_OPT+, to specify additional options to pass to the
* +PYTHON_FOO_BUILD_OPTS+, to specify additional options to pass to the
Python +setup.py+ script during the build step. For target distutils
packages, the +PKG_PYTHON_DISTUTILS_BUILD_OPT+ options are already
packages, the +PKG_PYTHON_DISTUTILS_BUILD_OPTS+ options are already
passed automatically by the infrastructure.

* +PYTHON_FOO_INSTALL_TARGET_OPTS+, +PYTHON_FOO_INSTALL_STAGING_OPTS+,
Expand Down
9 changes: 7 additions & 2 deletions package/Config.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
menu "Target packages"

source "package/busybox/Config.in"
source "package/skeleton/Config.in"
source "package/skeleton-custom/Config.in"
source "package/skeleton-init-common/Config.in"
source "package/skeleton-init-none/Config.in"
source "package/skeleton-init-openrc/Config.in"
source "package/skeleton-init-systemd/Config.in"
source "package/skeleton-init-sysv/Config.in"

menu "Audio and video applications"
source "package/alsa-utils/Config.in"
Expand Down Expand Up @@ -225,7 +232,6 @@ endif
source "package/sdl2_net/Config.in"
source "package/sdl2_ttf/Config.in"
source "package/timidity-instruments/Config.in"
source "package/unlockvt/Config.in"

comment "Other GUIs"
source "package/efl/Config.in"
Expand Down Expand Up @@ -341,7 +347,6 @@ endif
source "package/lcdproc/Config.in"
source "package/linux-console-tools/Config.in"
source "package/lm-sensors/Config.in"
source "package/lowpowd/Config.in"
source "package/lshw/Config.in"
source "package/lsuio/Config.in"
source "package/lvm2/Config.in"
Expand Down
13 changes: 9 additions & 4 deletions package/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,15 @@ TARGET_CONFIGURE_ARGS = \

################################################################################

ifeq ($(BR2_ENABLE_LOCALE),y)
DISABLE_NLS :=
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
NLS_OPTS = --enable-nls
TARGET_NLS_DEPENDENCIES = host-gettext
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
TARGET_NLS_DEPENDENCIES += gettext
TARGET_NLS_LIBS += -lintl
endif
else
DISABLE_NLS :=--disable-nls
NLS_OPTS = --disable-nls
endif

ifneq ($(BR2_LARGEFILE),y)
Expand Down Expand Up @@ -397,4 +402,4 @@ include package/pkg-python.mk
include package/pkg-virtual.mk
include package/pkg-generic.mk
include package/pkg-kconfig.mk
include package/pkg-meson.mk
include package/pkg-meson.mk
2 changes: 1 addition & 1 deletion package/bar/bar.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#############################################################
BAR_VERSION = 1.4
BAR_SOURCE = bar-$(BAR_VERSION)-src.tar.bz2
BAR_SITE = http://www.theiling.de/downloads/
BAR_SITE = http://www.theiling.de/downloads

define BAR_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/bar $(TARGET_DIR)/usr/bin/bar
Expand Down
Loading