Move buildroot to bsp directory.
This commit is contained in:
71
bsp/buildroot/package/squashfs/0001-musl.patch
Normal file
71
bsp/buildroot/package/squashfs/0001-musl.patch
Normal file
@@ -0,0 +1,71 @@
|
||||
Fix musl build
|
||||
|
||||
Downloaded from
|
||||
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
|
||||
and adjusted paths.
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
Define FNM_EXTMATCH if not defined its glibc specific define
|
||||
include missing sys/stat.h for stat* function declarations
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Index: squashfs-tools/action.c
|
||||
===================================================================
|
||||
--- a/squashfs-tools.orig/action.c
|
||||
+++ b/squashfs-tools/action.c
|
||||
@@ -44,6 +44,10 @@
|
||||
#include "action.h"
|
||||
#include "error.h"
|
||||
|
||||
+#if !defined(FNM_EXTMATCH)
|
||||
+#define FNM_EXTMATCH 0
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* code to parse actions
|
||||
*/
|
||||
Index: squashfs-tools/mksquashfs.c
|
||||
===================================================================
|
||||
--- a/squashfs-tools.orig/mksquashfs.c
|
||||
+++ b/squashfs-tools/mksquashfs.c
|
||||
@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
|
||||
dir_size + 3, directory_block, directory_offset, NULL, NULL,
|
||||
dir, 0);
|
||||
|
||||
+#if !defined(FNM_EXTMATCH)
|
||||
+#define FNM_EXTMATCH 0
|
||||
+#endif
|
||||
+
|
||||
#ifdef SQUASHFS_TRACE
|
||||
{
|
||||
unsigned char *dirp;
|
||||
Index: squashfs-tools/pseudo.c
|
||||
===================================================================
|
||||
--- a/squashfs-tools.orig/pseudo.c
|
||||
+++ b/squashfs-tools/pseudo.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "pseudo.h"
|
||||
Index: squashfs-tools/unsquashfs.c
|
||||
===================================================================
|
||||
--- a/squashfs-tools.orig/unsquashfs.c
|
||||
+++ b/squashfs-tools/unsquashfs.c
|
||||
@@ -38,6 +38,10 @@
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
|
||||
+#ifndef FNM_EXTMATCH
|
||||
+#define FNM_EXTMATCH 0
|
||||
+#endif
|
||||
+
|
||||
struct cache *fragment_cache, *data_cache;
|
||||
struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
|
||||
pthread_t *thread, *inflator_thread;
|
||||
48
bsp/buildroot/package/squashfs/Config.in
Normal file
48
bsp/buildroot/package/squashfs/Config.in
Normal file
@@ -0,0 +1,48 @@
|
||||
config BR2_PACKAGE_SQUASHFS
|
||||
bool "squashfs"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_SQUASHFS_GZIP if !(BR2_PACKAGE_SQUASHFS_LZMA || BR2_PACKAGE_SQUASHFS_LZO)
|
||||
help
|
||||
Tools to generate SquashFS filesystems.
|
||||
|
||||
http://squashfs.sourceforge.net/
|
||||
|
||||
if BR2_PACKAGE_SQUASHFS
|
||||
|
||||
config BR2_PACKAGE_SQUASHFS_GZIP
|
||||
bool "gzip support"
|
||||
default y
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Support GZIP compression algorithm
|
||||
|
||||
config BR2_PACKAGE_SQUASHFS_LZ4
|
||||
bool "lz4 support"
|
||||
select BR2_PACKAGE_LZ4
|
||||
help
|
||||
Support LZ4 compression algorithm
|
||||
|
||||
config BR2_PACKAGE_SQUASHFS_LZMA
|
||||
bool "lzma support"
|
||||
select BR2_PACKAGE_XZ
|
||||
help
|
||||
Support LZMA compression algorithm
|
||||
|
||||
config BR2_PACKAGE_SQUASHFS_LZO
|
||||
bool "lzo support"
|
||||
select BR2_PACKAGE_LZO
|
||||
help
|
||||
Support LZO compression algorithm
|
||||
|
||||
config BR2_PACKAGE_SQUASHFS_XZ
|
||||
bool "xz support"
|
||||
select BR2_PACKAGE_XZ
|
||||
help
|
||||
Support XZ compression algorithm
|
||||
|
||||
endif
|
||||
|
||||
comment "squashfs needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU
|
||||
6
bsp/buildroot/package/squashfs/Config.in.host
Normal file
6
bsp/buildroot/package/squashfs/Config.in.host
Normal file
@@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_HOST_SQUASHFS
|
||||
bool "host squashfs"
|
||||
help
|
||||
Tools to generate SquashFS filesystems.
|
||||
|
||||
http://squashfs.sourceforge.net/
|
||||
2
bsp/buildroot/package/squashfs/squashfs.hash
Normal file
2
bsp/buildroot/package/squashfs/squashfs.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6 squashfs4.3.tar.gz
|
||||
88
bsp/buildroot/package/squashfs/squashfs.mk
Normal file
88
bsp/buildroot/package/squashfs/squashfs.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
################################################################################
|
||||
#
|
||||
# squashfs
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SQUASHFS_VERSION = 4.3
|
||||
SQUASHFS_SOURCE = squashfs$(SQUASHFS_VERSION).tar.gz
|
||||
SQUASHFS_SITE = http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs$(SQUASHFS_VERSION)
|
||||
SQUASHFS_LICENSE = GPLv2+
|
||||
SQUASHFS_LICENSE_FILES = COPYING
|
||||
SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
|
||||
SQUASHFS_DEPENDENCIES += lz4
|
||||
SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=1 COMP_DEFAULT=lz4
|
||||
else
|
||||
SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y)
|
||||
SQUASHFS_DEPENDENCIES += xz
|
||||
SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma
|
||||
else
|
||||
SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y)
|
||||
SQUASHFS_DEPENDENCIES += xz
|
||||
SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz
|
||||
else
|
||||
SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y)
|
||||
SQUASHFS_DEPENDENCIES += lzo
|
||||
SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1 COMP_DEFAULT=lzo
|
||||
else
|
||||
SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP),y)
|
||||
SQUASHFS_DEPENDENCIES += zlib
|
||||
SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1 COMP_DEFAULT=gzip
|
||||
else
|
||||
SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
|
||||
endif
|
||||
|
||||
HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz
|
||||
|
||||
HOST_SQUASHFS_MAKE_ARGS = \
|
||||
XATTR_SUPPORT=1 \
|
||||
XZ_SUPPORT=1 \
|
||||
GZIP_SUPPORT=1 \
|
||||
LZ4_SUPPORT=1 \
|
||||
LZO_SUPPORT=1 \
|
||||
LZMA_XZ_SUPPORT=1
|
||||
|
||||
define SQUASHFS_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) \
|
||||
CC="$(TARGET_CC)" \
|
||||
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
$(SQUASHFS_MAKE_ARGS) \
|
||||
-C $(@D)/squashfs-tools/
|
||||
endef
|
||||
|
||||
define SQUASHFS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) $(SQUASHFS_MAKE_ARGS) \
|
||||
-C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install
|
||||
endef
|
||||
|
||||
define HOST_SQUASHFS_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) \
|
||||
CC="$(HOSTCC)" \
|
||||
EXTRA_CFLAGS="$(HOST_CFLAGS)" \
|
||||
EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
$(HOST_SQUASHFS_MAKE_ARGS) \
|
||||
-C $(@D)/squashfs-tools/
|
||||
endef
|
||||
|
||||
define HOST_SQUASHFS_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) $(HOST_SQUASHFS_MAKE_ARGS) \
|
||||
-C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user