Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -11,6 +11,7 @@ source "fs/jffs2/Config.in"
source "fs/romfs/Config.in"
source "fs/squashfs/Config.in"
source "fs/tar/Config.in"
source "fs/ubi/Config.in"
source "fs/ubifs/Config.in"
source "fs/yaffs2/Config.in"

View File

@@ -7,7 +7,7 @@
ROOTFS_AXFS_DEPENDENCIES = host-axfsutils
define ROOTFS_AXFS_CMD
$(HOST_DIR)/usr/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
$(HOST_DIR)/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
endef
$(eval $(call ROOTFS_TARGET,axfs))
$(eval $(rootfs))

View File

@@ -7,8 +7,8 @@
ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit
define ROOTFS_CLOOP_CMD
$(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | \
$(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $@
$(HOST_DIR)/bin/genisoimage -r $(TARGET_DIR) | \
$(HOST_DIR)/bin/create_compressed_fs - 65536 > $@
endef
$(eval $(call ROOTFS_TARGET,cloop))
$(eval $(rootfs))

View File

@@ -19,10 +19,6 @@
# ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after
# generating the filesystem image
#
# ROOTFS_$(FSTYPE)_POST_TARGETS, the list of targets that should be
# run after running the main filesystem target. This is useful for
# initramfs, to rebuild the kernel once the initramfs is generated.
#
# In terms of configuration option, this macro assumes that the
# BR2_TARGET_ROOTFS_$(FSTYPE) config option allows to enable/disable
# the generation of a filesystem image of a particular type. If
@@ -31,16 +27,17 @@
# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the
# macro will automatically generate a compressed filesystem image.
FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt
FS_DIR = $(BUILD_DIR)/buildroot-fs
FAKEROOT_SCRIPT = $(FS_DIR)/fakeroot.fs
FULL_DEVICE_TABLE = $(FS_DIR)/device_table.txt
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
$(BR2_ROOTFS_STATIC_DEVICE_TABLE))
USERS_TABLE = $(BUILD_DIR)/_users_table.txt
USERS_TABLE = $(FS_DIR)/users_table.txt
ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
# Since this function will be called from within an $(eval ...)
# all variable references except the arguments must be $$-quoted.
define ROOTFS_TARGET_INTERNAL
define inner-rootfs
# extra deps
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
@@ -59,6 +56,11 @@ ROOTFS_$(2)_DEPENDENCIES += host-lzma
ROOTFS_$(2)_COMPRESS_EXT = .lzma
ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) -9 -c
endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZ4),y)
ROOTFS_$(2)_DEPENDENCIES += host-lz4
ROOTFS_$(2)_COMPRESS_EXT = .lz4
ROOTFS_$(2)_COMPRESS_CMD = lz4 -l -9 -c
endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y)
ROOTFS_$(2)_DEPENDENCIES += host-lzop
ROOTFS_$(2)_COMPRESS_EXT = .lzo
@@ -72,10 +74,9 @@ endif
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
rm -rf $(FS_DIR)
mkdir -p $(FS_DIR)
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
rm -f $$(FAKEROOT_SCRIPT)
rm -f $$(TARGET_DIR_WARNING_FILE)
rm -f $$(USERS_TABLE)
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
echo "set -e" >> $$(FAKEROOT_SCRIPT)
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
@@ -91,18 +92,22 @@ ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
endif
endif
$$(call PRINTF,$$(PACKAGES_PERMISSIONS_TABLE)) >> $$(FULL_DEVICE_TABLE)
echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
echo "$$(HOST_DIR)/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
$$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
echo "echo '$$(TERM_BOLD)>>> Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
echo $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
$$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
ifeq ($$(BR2_REPRODUCIBLE),y)
echo "find $$(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$$(SOURCE_DATE_EPOCH)" >> $$(FAKEROOT_SCRIPT)
endif
$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
$$(foreach hook,$$(ROOTFS_POST_CMD_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
chmod a+x $$(FAKEROOT_SCRIPT)
PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
rm -f $$(TARGET_DIR_WARNING_FILE)
PATH=$$(BR_PATH) $$(HOST_DIR)/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
$$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
-@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE)
ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
endif
@@ -111,7 +116,7 @@ endif
rootfs-$(1)-show-depends:
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS)
rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1)
.PHONY: rootfs-$(1) rootfs-$(1)-show-depends
@@ -119,10 +124,16 @@ ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y)
TARGETS_ROOTFS += rootfs-$(1)
PACKAGES += $$(filter-out rootfs-%,$$(ROOTFS_$(2)_DEPENDENCIES))
endif
# Check for legacy POST_TARGETS rules
ifneq ($$(ROOTFS_$(2)_POST_TARGETS),)
$$(error Filesystem $(1) uses post-target rules, which are no longer supported.\
Update $(1) to use post-gen hooks instead)
endif
endef
define ROOTFS_TARGET
$(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
endef
# $(pkgname) also works well to return the filesystem name
rootfs = $(call inner-rootfs,$(pkgname),$(call UPPERCASE,$(pkgname)))
include $(sort $(wildcard fs/*/*.mk))

View File

@@ -31,6 +31,11 @@ config BR2_TARGET_ROOTFS_CPIO_BZIP2
help
Do compress the cpio filesystem with bzip2.
config BR2_TARGET_ROOTFS_CPIO_LZ4
bool "lz4"
help
Do compress the cpio filesystem with lz4.
config BR2_TARGET_ROOTFS_CPIO_LZMA
bool "lzma"
help

View File

@@ -31,12 +31,13 @@ define ROOTFS_CPIO_CMD
cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@
endef
$(BINARIES_DIR)/rootfs.cpio.uboot: $(BINARIES_DIR)/rootfs.cpio host-uboot-tools
$(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk \
-C none -d $<$(ROOTFS_CPIO_COMPRESS_EXT) $@
ifeq ($(BR2_TARGET_ROOTFS_CPIO_UIMAGE),y)
ROOTFS_CPIO_POST_TARGETS += $(BINARIES_DIR)/rootfs.cpio.uboot
ROOTFS_CPIO_DEPENDENCIES += host-uboot-tools
define ROOTFS_CPIO_UBOOT_MKIMAGE
$(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk \
-C none -d $@$(ROOTFS_CPIO_COMPRESS_EXT) $@.uboot
endef
ROOTFS_CPIO_POST_GEN_HOOKS += ROOTFS_CPIO_UBOOT_MKIMAGE
endif
$(eval $(call ROOTFS_TARGET,cpio))
$(eval $(rootfs))

View File

@@ -4,4 +4,4 @@
exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console
exec /sbin/init $*
exec /sbin/init "$@"

View File

@@ -11,9 +11,9 @@ CRAMFS_OPTS = -l
endif
define ROOTFS_CRAMFS_CMD
$(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@
$(HOST_DIR)/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@
endef
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
$(eval $(call ROOTFS_TARGET,cramfs))
$(eval $(rootfs))

View File

@@ -1,6 +1,6 @@
config BR2_TARGET_ROOTFS_EXT2
bool "ext2/3/4 root filesystem"
select BR2_PACKAGE_HOST_MKE2IMG
select BR2_PACKAGE_HOST_E2FSPROGS
help
Build an ext2/3/4 root filesystem
@@ -44,33 +44,48 @@ config BR2_TARGET_ROOTFS_EXT2_REV
config BR2_TARGET_ROOTFS_EXT2_LABEL
string "filesystem label"
config BR2_TARGET_ROOTFS_EXT2_BLOCKS
int "exact size in blocks (leave at 0 for auto calculation)"
default 0
config BR2_TARGET_ROOTFS_EXT2_SIZE
string "exact size"
default BR2_TARGET_ROOTFS_EXT2_BLOCKS if BR2_TARGET_ROOTFS_EXT2_BLOCKS_WRAP # legacy 2017.08
default "60M"
help
The size of the filesystem image. If it does not have a suffix,
it is interpreted as power-of-two kilobytes. If it is suffixed
by 'k', 'm', 'g', 't' (either upper-case or lower-case), then
it is interpreted in power-of-two kilobytes, megabytes,
gigabytes, terabytes, etc.
config BR2_TARGET_ROOTFS_EXT2_INODES
int "exact number of inodes (leave at 0 for auto calculation)"
default 0
config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS
int "extra size in blocks" if BR2_TARGET_ROOTFS_EXT2_BLOCKS = 0
default 0
help
Enter here the number of extra blocks of free space you
want on your filesystem. By default, Buildroot will not
leave much space free.
config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
int "extra inodes" if BR2_TARGET_ROOTFS_EXT2_INODES = 0
default 0
help
Enter here the number of extra free inodes you want on
your filesystem. By default, Buildroot will not leave
many free inodes.
config BR2_TARGET_ROOTFS_EXT2_RESBLKS
int "reserved blocks percentage"
default 0
default 5
help
The number of blocks on the filesystem (as a percentage of the
total number of blocks), that are reserved for use by root.
Traditionally, this has been 5%, and all ext-related tools still
default to reserving 5% when creating a new ext filesystem.
config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS
string "additional mke2fs options"
default "-O ^64bit"
help
Specify a space-separated list of mke2fs options, including any
ext2/3/4 filesystem features.
For more information about the mke2fs options, see the manual
page mke2fs(8).
For more information about the ext2/3/4 features which can be
set, see the manual page ext4(5).
The default is "-O ^64bit", i.e. disable 64-bit filesystem
support. This default value has been chosen because U-Boot
versions before 2017.02 don't support this filesystem
option: using it may make the filesystem unreadable by
U-Boot.
choice
prompt "Compression method"
@@ -93,6 +108,11 @@ config BR2_TARGET_ROOTFS_EXT2_BZIP2
help
Do compress the ext2/3/4 filesystem with bzip2.
config BR2_TARGET_ROOTFS_EXT2_LZ4
bool "lz4"
help
Do compress the ext2 filesystem with lz4.
config BR2_TARGET_ROOTFS_EXT2_LZMA
bool "lzma"
help

View File

@@ -4,42 +4,43 @@
#
################################################################################
EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV)
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
EXT2_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_SIZE))
ifeq ($(BR2_TARGET_ROOTFS_EXT2)-$(EXT2_SIZE),y-)
$(error BR2_TARGET_ROOTFS_EXT2_SIZE cannot be empty)
endif
EXT2_OPTS += -B $(BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS)
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
endif
EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES)
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
endif
EXT2_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS))
# qstrip results in stripping consecutive spaces into a single one. So the
# variable is not qstrip-ed to preserve the integrity of the string value.
EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
ifneq ($(EXT2_LABEL),)
EXT2_OPTS += -l "$(EXT2_LABEL)"
endif
#" Syntax highlighting... :-/ )
ROOTFS_EXT2_DEPENDENCIES = host-mke2img
EXT2_OPTS = \
-d $(TARGET_DIR) \
-r $(BR2_TARGET_ROOTFS_EXT2_REV) \
-N $(BR2_TARGET_ROOTFS_EXT2_INODES) \
-m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \
-L "$(EXT2_LABEL)" \
$(EXT2_MKFS_OPTS)
ROOTFS_EXT2_DEPENDENCIES = host-e2fsprogs
define ROOTFS_EXT2_CMD
PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@
rm -f $@
$(HOST_DIR)/sbin/mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(EXT2_OPTS) $@ \
"$(EXT2_SIZE)" \
|| { ret=$$?; \
echo "*** Maybe you need to increase the filesystem size (BR2_TARGET_ROOTFS_EXT2_SIZE)" 1>&2; \
exit $$ret; \
}
endef
rootfs-ext2-symlink:
ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT)
.PHONY: rootfs-ext2-symlink
ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2)
ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink
define ROOTFS_EXT2_SYMLINK
ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT)
endef
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK
endif
$(eval $(call ROOTFS_TARGET,ext2))
$(eval $(rootfs))

View File

@@ -5,17 +5,25 @@
#
################################################################################
ROOTFS_INITRAMFS_DEPENDENCIES += rootfs-cpio
ROOTFS_INITRAMFS_POST_TARGETS += linux-rebuild-with-initramfs
# The generic fs infrastructure isn't very useful here.
#
# The initramfs image does not actually build an image; its only purpose is:
# 1- to ensure rootfs.cpio is generated,
# 2- to then rebuild the kernel with rootfs.cpio as initramfs
#
# Note: ordering of the dependencies is not guaranteed here, but in
# linux/linux.mk, via the linux-rebuild-with-initramfs rule, which depends
# on the rootfs-cpio filesystem rule.
#
# Note: the trick here is that we directly depend on rebuilding the Linux
# kernel image (which itself depends on the rootfs-cpio rule), while we
# advertise that our dependency is on the rootfs-cpio rule, which is
# cleaner in the dependency graph.
rootfs-initramfs: $(ROOTFS_INITRAMFS_DEPENDENCIES) $(ROOTFS_INITRAMFS_POST_TARGETS)
rootfs-initramfs: linux-rebuild-with-initramfs
rootfs-initramfs-show-depends:
@echo $(ROOTFS_INITRAMFS_DEPENDENCIES)
@echo rootfs-cpio
.PHONY: rootfs-initramfs rootfs-initramfs-show-depends

View File

@@ -2,8 +2,7 @@ config BR2_TARGET_ROOTFS_ISO9660
bool "iso image"
depends on (BR2_i386 || BR2_x86_64)
depends on BR2_LINUX_KERNEL
depends on BR2_TARGET_GRUB || \
BR2_TARGET_GRUB2_I386_PC || \
depends on BR2_TARGET_GRUB2_I386_PC || \
BR2_TARGET_SYSLINUX_ISOLINUX
select BR2_LINUX_KERNEL_INSTALL_TARGET \
if (!BR2_TARGET_ROOTFS_ISO9660_INITRD && !BR2_TARGET_ROOTFS_INITRAMFS)
@@ -26,11 +25,6 @@ if BR2_TARGET_ROOTFS_ISO9660
choice
prompt "Bootloader"
config BR2_TARGET_ROOTFS_ISO9660_GRUB
bool "grub"
depends on BR2_TARGET_GRUB
select BR2_TARGET_GRUB_FS_ISO9660
config BR2_TARGET_ROOTFS_ISO9660_GRUB2
bool "grub2"
depends on BR2_TARGET_GRUB2_I386_PC
@@ -48,13 +42,11 @@ endchoice
config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU
string "Boot menu config file"
default "fs/iso9660/menu.lst" if BR2_TARGET_ROOTFS_ISO9660_GRUB
default "fs/iso9660/grub.cfg" if BR2_TARGET_ROOTFS_ISO9660_GRUB2
default "fs/iso9660/isolinux.cfg" if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
help
Use this option to provide a custom bootloader configuration
file (menu.lst for Grub, grub.cfg for Grub 2, isolinux.cfg for
isolinux).
file (grub.cfg for Grub 2, isolinux.cfg for isolinux).
Note that the strings __KERNEL_PATH__ and __INITRD_PATH__
will automatically be replaced by the path to the kernel and
@@ -71,6 +63,15 @@ config BR2_TARGET_ROOTFS_ISO9660_INITRD
contain a kernel image, an initrd image (unless an initramfs
linked into the kernel is used) and the bootloader.
config BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION
bool "transparent compression"
depends on !BR2_TARGET_ROOTFS_ISO9660_INITRD
depends on !BR2_TARGET_ROOTFS_INITRAMFS
help
Say 'y' to enable use of transparent (de)compression. Files
are stored compressed and will be decompressed on-the-fly
upon access at runtime.
config BR2_TARGET_ROOTFS_ISO9660_HYBRID
bool "Build hybrid image"
depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
@@ -82,7 +83,7 @@ config BR2_TARGET_ROOTFS_ISO9660_HYBRID
endif
comment "iso image needs a Linux kernel and one of grub, grub2 i386-pc or isolinux to be built"
comment "iso image needs a Linux kernel and either grub2 i386-pc or isolinux to be built"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_LINUX_KERNEL || \
!(BR2_TARGET_GRUB || BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_SYSLINUX_ISOLINUX)
!(BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_SYSLINUX_ISOLINUX)

View File

@@ -35,26 +35,29 @@ ROOTFS_ISO9660_USE_INITRD = YES
endif
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
ROOTFS_ISO9660_TARGET_DIR = $(BUILD_DIR)/rootfs.iso9660.tmp
ROOTFS_ISO9660_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
define ROOTFS_ISO9660_CREATE_TEMPDIR
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
mkdir -p $(ROOTFS_ISO9660_TARGET_DIR)
endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_CREATE_TEMPDIR
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION),y)
ROOTFS_ISO9660_DEPENDENCIES += host-zisofs-tools
ROOTFS_ISO9660_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
# This must be early, before we copy the bootloader files.
define ROOTFS_ISO9660_MKZFTREE
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
$(HOST_DIR)/bin/mkzftree -X -z 9 -p $(PARALLEL_JOBS) \
$(TARGET_DIR) \
$(ROOTFS_ISO9660_TARGET_DIR)
endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_MKZFTREE
ROOTFS_ISO9660_GENISOIMAGE_OPTS += -z
else
ROOTFS_ISO9660_TARGET_DIR = $(TARGET_DIR)
endif
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y)
ROOTFS_ISO9660_DEPENDENCIES += grub
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst
ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/stage2_eltorito
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
$(INSTALL) -D -m 0644 $(GRUB_DIR)/stage2/stage2_eltorito \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/stage2_eltorito
endef
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB2),y)
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB2),y)
ROOTFS_ISO9660_DEPENDENCIES += grub2
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub.cfg
@@ -71,7 +74,7 @@ ROOTFS_ISO9660_BOOT_IMAGE = isolinux/isolinux.bin
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/syslinux/* \
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/
$(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/syslinux/ldlinux.c32 \
$(INSTALL) -D -m 0644 $(HOST_DIR)/share/syslinux/ldlinux.c32 \
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/ldlinux.c32
endef
endif
@@ -86,39 +89,17 @@ endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_PREPARATION
# Grub splash screen disabling
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y)
ifeq ($(BR2_TARGET_GRUB_SPLASH),)
define ROOTFS_ISO9660_DISABLE_SPLASHSCREEN
$(SED) '/^splashimage/d' $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_SPLASHSCREEN
endif
endif
define ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
$(SED) '/__INITRD_PATH__/d' $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
endef
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
# Copy Grub splashscreen to temporary filesystem
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y)
ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
define ROOTFS_ISO9660_INSTALL_SPLASHSCREEN
$(INSTALL) -D -m 0644 $(TARGET_DIR)/boot/grub/splash.xpm.gz \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/splash.xpm.gz
endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_INSTALL_SPLASHSCREEN
endif
endif
# Copy the kernel to temporary filesystem
define ROOTFS_ISO9660_COPY_KERNEL
$(INSTALL) -D -m 0644 $(LINUX_IMAGE_PATH) \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
endef
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_KERNEL
# If initramfs is used, disable loading the initrd as the rootfs is
@@ -138,6 +119,10 @@ ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_INITRD
endif
else # ROOTFS_ISO9660_USE_INITRD
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION),y)
# We must use the uncompressed kernel image
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_KERNEL
endif
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
@@ -145,17 +130,18 @@ endif # ROOTFS_ISO9660_USE_INITRD
define ROOTFS_ISO9660_CMD
$(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
$(HOST_DIR)/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
-no-emul-boot -boot-load-size 4 -boot-info-table \
$(ROOTFS_ISO9660_GENISOIMAGE_OPTS) \
-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
endef
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y)
define ROOTFS_ISO9660_GEN_HYBRID
$(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@
$(HOST_DIR)/bin/isohybrid -t 0x96 $@
endef
ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
endif
$(eval $(call ROOTFS_TARGET,iso9660))
$(eval $(rootfs))

View File

@@ -1,20 +0,0 @@
default 0
timeout 10
# Used when no splashimage is used
color cyan/blue white/blue
# Gets enabled/disabled depending on Grub support for splashimage
splashimage /boot/grub/splash.xpm.gz
# Used when a splashimage is enabled
foreground 000000
background cccccc
title Buildroot ISO9660 image
kernel __KERNEL_PATH__ root=/dev/sr0
initrd __INITRD_PATH__
title Hard Drive (first partition)
rootnoverify (hd0)
chainloader +1

View File

@@ -49,4 +49,4 @@ define ROOTFS_JFFS2_CMD
endef
endif
$(eval $(call ROOTFS_TARGET,jffs2))
$(eval $(rootfs))

View File

@@ -7,7 +7,7 @@
ROOTFS_ROMFS_DEPENDENCIES = host-genromfs
define ROOTFS_ROMFS_CMD
$(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@
$(HOST_DIR)/bin/genromfs -d $(TARGET_DIR) -f $@
endef
$(eval $(call ROOTFS_TARGET,romfs))
$(eval $(rootfs))

View File

@@ -6,27 +6,22 @@
ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
ROOTFS_SQUASHFS_ARGS = -noappend -processors $(PARALLEL_JOBS)
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y)
ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc
else
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y)
else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y)
ROOTFS_SQUASHFS_ARGS += -comp lzo
else
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y)
else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y)
ROOTFS_SQUASHFS_ARGS += -comp lzma
else
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y)
else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y)
ROOTFS_SQUASHFS_ARGS += -comp xz
else
ROOTFS_SQUASHFS_ARGS += -comp gzip
endif
endif
endif
endif
define ROOTFS_SQUASHFS_CMD
$(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \
$(ROOTFS_SQUASHFS_ARGS)
$(HOST_DIR)/bin/mksquashfs $(TARGET_DIR) $@ $(ROOTFS_SQUASHFS_ARGS)
endef
$(eval $(call ROOTFS_TARGET,squashfs))
$(eval $(rootfs))

View File

@@ -26,6 +26,11 @@ config BR2_TARGET_ROOTFS_TAR_BZIP2
help
Do compress the tarball with bzip2.
config BR2_TARGET_ROOTFS_TAR_LZ4
bool "lz4"
help
Do compress the tarball with lz4.
config BR2_TARGET_ROOTFS_TAR_LZMA
bool "lzma"
help

View File

@@ -11,4 +11,4 @@ define ROOTFS_TAR_CMD
tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner)
endef
$(eval $(call ROOTFS_TARGET,tar))
$(eval $(rootfs))

View File

@@ -0,0 +1,51 @@
config BR2_TARGET_ROOTFS_UBI
bool "ubi image containing an ubifs root filesystem"
select BR2_TARGET_ROOTFS_UBIFS
help
Build an ubi image from the ubifs one (with ubinize).
if BR2_TARGET_ROOTFS_UBI
config BR2_TARGET_ROOTFS_UBI_PEBSIZE
hex "physical eraseblock size"
default 0x20000
help
Tells ubinize the physical eraseblock (PEB) size of the
flash chip the ubi image is created for. The value provided
here is passed to the -p/--peb-size option of ubinize.
config BR2_TARGET_ROOTFS_UBI_SUBSIZE
int "sub-page size"
default 512
help
Tells ubinize that the flash supports sub-pages and the sub-page
size. Use 0 if sub-pages are not supported on flash chip.
The value provided here is passed to the -s/--sub-page-size
option of ubinize.
config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
bool "Use custom config file"
help
Select this option to use a custom ubinize configuration file,
rather than the default configuration used by Buildroot (which
defines a single dynamic volume marked as auto-resize). Passing
a custom ubinize configuration file allows you to create several
volumes, specify volume types, etc.
As a convenience, buildroot replaces the string
"BR2_ROOTFS_UBIFS_PATH" with the path to the built ubifs file.
So the volume defined for the root filesystem can specify the
image path as: image=BR2_ROOTFS_UBIFS_PATH
config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE
string "Configuration file path"
depends on BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
help
Path to the ubinize configuration file.
config BR2_TARGET_ROOTFS_UBI_OPTS
string "Additional ubinize options"
help
Any additional ubinize options you may want to include.
endif # BR2_TARGET_ROOTFS_UBI

View File

@@ -17,7 +17,7 @@ ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y)
UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE))
else
UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg
UBINIZE_CONFIG_FILE_PATH = fs/ubi/ubinize.cfg
endif
# don't use sed -i as it misbehaves on systems with SELinux enabled when this is
@@ -25,8 +25,8 @@ endif
define ROOTFS_UBI_CMD
sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
$(UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
$(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
$(HOST_DIR)/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
rm $(BUILD_DIR)/ubinize.cfg
endef
$(eval $(call ROOTFS_TARGET,ubi))
$(eval $(rootfs))

View File

@@ -95,55 +95,4 @@ config BR2_TARGET_ROOTFS_UBIFS_OPTS
help
Any additional mkfs.ubifs options you may want to include.
config BR2_TARGET_ROOTFS_UBI
bool "Embed into an UBI image"
help
Build an ubi image from the ubifs one (with ubinize).
if BR2_TARGET_ROOTFS_UBI
config BR2_TARGET_ROOTFS_UBI_PEBSIZE
hex "physical eraseblock size"
default 0x20000
help
Tells ubinize the physical eraseblock (PEB) size of the
flash chip the ubi image is created for. The value provided
here is passed to the -p/--peb-size option of ubinize.
config BR2_TARGET_ROOTFS_UBI_SUBSIZE
int "sub-page size"
default 512
help
Tells ubinize that the flash supports sub-pages and the sub-page
size. Use 0 if sub-pages are not supported on flash chip.
The value provided here is passed to the -s/--sub-page-size
option of ubinize.
config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
bool "Use custom config file"
help
Select this option to use a custom ubinize configuration file,
rather than the default configuration used by Buildroot (which
defines a single dynamic volume marked as auto-resize). Passing
a custom ubinize configuration file allows you to create several
volumes, specify volume types, etc.
As a convenience, buildroot replaces the string
"BR2_ROOTFS_UBIFS_PATH" with the path to the built ubifs file.
So the volume defined for the root filesystem can specify the
image path as: image=BR2_ROOTFS_UBIFS_PATH
config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE
string "Configuration file path"
depends on BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
help
Path to the ubinize configuration file.
config BR2_TARGET_ROOTFS_UBI_OPTS
string "Additional ubinize options"
help
Any additional ubinize options you may want to include.
endif # BR2_TARGET_ROOTFS_UBI
endif # BR2_TARGET_ROOTFS_UBIFS

View File

@@ -4,7 +4,10 @@
#
################################################################################
UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
UBIFS_OPTS = \
-e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) \
-c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) \
-m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y)
UBIFS_OPTS += -x zlib
@@ -21,7 +24,7 @@ UBIFS_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OPTS))
ROOTFS_UBIFS_DEPENDENCIES = host-mtd
define ROOTFS_UBIFS_CMD
$(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
$(HOST_DIR)/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
endef
$(eval $(call ROOTFS_TARGET,ubifs))
$(eval $(rootfs))

View File

@@ -7,7 +7,7 @@
ROOTFS_YAFFS2_DEPENDENCIES = host-yaffs2utils
define ROOTFS_YAFFS2_CMD
$(HOST_DIR)/usr/bin/mkyaffs2 --all-root $(TARGET_DIR) $@
$(HOST_DIR)/bin/mkyaffs2 --all-root $(TARGET_DIR) $@
endef
$(eval $(call ROOTFS_TARGET,yaffs2))
$(eval $(rootfs))