Skip to content

Commit

Permalink
Merge tag '2016.08.1'
Browse files Browse the repository at this point in the history
Release 2016.08.1
  • Loading branch information
rkunze committed Sep 23, 2016
2 parents 1865547 + b1001ac commit 588bf19
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
25 changes: 25 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
2016.08.1, Released September 21st, 2016

Fix potential entire root filesystem removal in the external
toolchain handling. This would trigger if (and only if) the
following conditions are met:

- The user has selected a "known toolchain profile", such as a
Linaro toolchain, a Sourcery CodeBench toolchain etc. People
using "custom toolchain profile" are not affected.

- The user has enabled BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED=y
to indicate that the toolchain is already locally available
(as opposed to having Buildroot download and extract the
toolchain)

- The user has left BR2_TOOLCHAIN_EXTERNAL_PATH empty, because
his toolchain is directly available through the PATH
environment variable. When BR2_TOOLCHAIN_EXTERNAL_PATH is
non-empty, Buildroot will do something silly (remove the
toolchain contents), but that are limited to the toolchain
itself.

When such conditions are met, Buildroot will run "rm -rf /*"
due to TOOLCHAIN_EXTERNAL_INSTALL_DIR being empty.

2016.08, Released Septermber 1st, 2016

Minor fixes.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ else # umask
all:

# Set and export the version string
export BR2_VERSION := 2016.08
export BR2_VERSION := 2016.08.1

# Save running make version since it's clobbered by the make package
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
Expand Down
22 changes: 16 additions & 6 deletions toolchain/toolchain-external/toolchain-external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))


TOOLCHAIN_EXTERNAL_PREFIX = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain

ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
else
TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
endif
Expand Down Expand Up @@ -454,21 +456,29 @@ TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
endif

# In fact, we don't need to download the toolchain, since it is already
# available on the system, so force the site and source to be empty so
# that nothing will be downloaded/extracted.
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
TOOLCHAIN_EXTERNAL_SITE =
TOOLCHAIN_EXTERNAL_SOURCE =
endif

TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO

TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES

# Normal handling of downloaded toolchain tarball extraction.
ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*

# As a regular package, the toolchain gets extracted in $(@D), but
# since it's actually a fairly special package, we need it to be moved
# into TOOLCHAIN_EXTERNAL_INSTALL_DIR.
# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
define TOOLCHAIN_EXTERNAL_MOVE
rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/*
mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/
rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
endef
TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
TOOLCHAIN_EXTERNAL_MOVE
Expand Down

0 comments on commit 588bf19

Please sign in to comment.