Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
menu "Filesystem images"
source "fs/axfs/Config.in"
source "fs/cloop/Config.in"
source "fs/cpio/Config.in"
source "fs/cramfs/Config.in"
source "fs/ext2/Config.in"
source "fs/initramfs/Config.in"
source "fs/iso9660/Config.in"
source "fs/jffs2/Config.in"
source "fs/romfs/Config.in"
source "fs/squashfs/Config.in"
source "fs/tar/Config.in"
source "fs/ubifs/Config.in"
source "fs/yaffs2/Config.in"
endmenu

View File

@@ -0,0 +1,17 @@
config BR2_TARGET_ROOTFS_AXFS
bool "axfs root filesystem"
help
The Advanced XIP File System is a Linux kernel filesystem
driver that enables files to be executed directly from flash
or ROM memory rather than being copied into RAM. It has the
ability to store individual *pages* in a file
uncompressed/XIP or compressed/Demand Paged.
So far, the only supported mode is 'XIP all', so all the
files that have the execute attribute set will be XIP'ed.
At the moment, the FS is not supported in Linux mainline
(v4.3-rc5), so the kernel has to be built with the axfs
patches to be able to read it. Patches can be found at:
https://github.com/jaredeh/axfs

View File

@@ -0,0 +1,13 @@
################################################################################
#
# Build the axfs root filesystem image
#
################################################################################
ROOTFS_AXFS_DEPENDENCIES = host-axfsutils
define ROOTFS_AXFS_CMD
$(HOST_DIR)/usr/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
endef
$(eval $(call ROOTFS_TARGET,axfs))

View File

@@ -0,0 +1,10 @@
config BR2_TARGET_ROOTFS_CLOOP
bool "cloop root filesystem for the target device"
help
Build a cloop root filesystem
cloop is a Linux kernel module that enables compressed
loopback filesystem support. With it you can mount a
compressed filesystem like a block device and seamlessly
decompress its data while accessing it. The majority of the
software on an LNX-BBC is accessed in this fashion.

View File

@@ -0,0 +1,13 @@
################################################################################
#
# Build the compressed loop root filesystem image
#
################################################################################
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 > $@
endef
$(eval $(call ROOTFS_TARGET,cloop))

View File

@@ -0,0 +1,121 @@
#
# Macro that builds the needed Makefile target to create a root
# filesystem image.
#
# The following variable must be defined before calling this macro
#
# ROOTFS_$(FSTYPE)_CMD, the command that generates the root
# filesystem image. A single command is allowed. The filename of the
# filesystem image that it must generate is $$@.
#
# The following variables can optionaly be defined
#
# ROOTFS_$(FSTYPE)_DEPENDENCIES, the list of dependencies needed to
# build the root filesystem (usually host tools)
#
# ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before
# generating the filesystem image
#
# 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
# configura options BR2_TARGET_ROOTFS_$(FSTYPE)_GZIP,
# BR2_TARGET_ROOTFS_$(FSTYPE)_BZIP2 or
# 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
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
$(BR2_ROOTFS_STATIC_DEVICE_TABLE))
USERS_TABLE = $(BUILD_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
# extra deps
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
$$(if $$(PACKAGES_USERS)$$(ROOTFS_USERS_TABLES),host-mkpasswd)
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
ROOTFS_$(2)_COMPRESS_EXT = .gz
ROOTFS_$(2)_COMPRESS_CMD = gzip -9 -c
endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
ROOTFS_$(2)_COMPRESS_EXT = .bz2
ROOTFS_$(2)_COMPRESS_CMD = bzip2 -9 -c
endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
ROOTFS_$(2)_DEPENDENCIES += host-lzma
ROOTFS_$(2)_COMPRESS_EXT = .lzma
ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) -9 -c
endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y)
ROOTFS_$(2)_DEPENDENCIES += host-lzop
ROOTFS_$(2)_COMPRESS_EXT = .lzo
ROOTFS_$(2)_COMPRESS_CMD = $$(LZOP) -9 -c
endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y)
ROOTFS_$(2)_DEPENDENCIES += host-xz
ROOTFS_$(2)_COMPRESS_EXT = .xz
ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
endif
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
$$(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 "set -e" >> $$(FAKEROOT_SCRIPT)
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
ifneq ($$(ROOTFS_USERS_TABLES),)
cat $$(ROOTFS_USERS_TABLES) >> $$(USERS_TABLE)
endif
printf '$$(subst $$(sep),\n,$$(PACKAGES_USERS))' >> $$(USERS_TABLE)
PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT)
ifneq ($$(ROOTFS_DEVICE_TABLES),)
cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE)
ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
printf '$$(subst $$(sep),\n,$$(PACKAGES_DEVICES_TABLE))' >> $$(FULL_DEVICE_TABLE)
endif
printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE)
echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
endif
echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
chmod a+x $$(FAKEROOT_SCRIPT)
PATH=$$(BR_PATH) $$(HOST_DIR)/usr/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
$$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep))
rootfs-$(1)-show-depends:
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS)
.PHONY: rootfs-$(1) rootfs-$(1)-show-depends
ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y)
TARGETS_ROOTFS += rootfs-$(1)
PACKAGES += $$(filter-out rootfs-%,$$(ROOTFS_$(2)_DEPENDENCIES))
endif
endef
define ROOTFS_TARGET
$(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
endef
include $(sort $(wildcard fs/*/*.mk))

View File

@@ -0,0 +1,60 @@
config BR2_TARGET_ROOTFS_CPIO
bool "cpio the root filesystem (for use as an initial RAM filesystem)"
help
Build a cpio archive of the root filesystem. This is typically
used for an initial RAM filesystem that is passed to the kernel
by the bootloader.
if BR2_TARGET_ROOTFS_CPIO
choice
prompt "Compression method"
default BR2_TARGET_ROOTFS_CPIO_NONE
help
Select compressor for cpio filesystem of the root filesystem.
If you use the cpio archive as an initial RAM filesystem, make
sure the kernel contains the decompression algorithm selected
here.
config BR2_TARGET_ROOTFS_CPIO_NONE
bool "no compression"
help
Do not compress the cpio filesystem.
config BR2_TARGET_ROOTFS_CPIO_GZIP
bool "gzip"
help
Do compress the cpio filesystem with gzip.
config BR2_TARGET_ROOTFS_CPIO_BZIP2
bool "bzip2"
help
Do compress the cpio filesystem with bzip2.
config BR2_TARGET_ROOTFS_CPIO_LZMA
bool "lzma"
help
Do compress the cpio filesystem with lzma.
config BR2_TARGET_ROOTFS_CPIO_LZO
bool "lzo"
help
Do compress the cpio filesystem with lzop.
config BR2_TARGET_ROOTFS_CPIO_XZ
bool "xz"
help
Do compress the cpio filesystem with xz.
endchoice
config BR2_TARGET_ROOTFS_CPIO_UIMAGE
bool "Create U-Boot image of the root filesystem"
select BR2_PACKAGE_HOST_UBOOT_TOOLS
help
Add a U-Boot header to the cpio root filesystem. This allows
the initramfs to be loaded with the bootm command in U-Boot.
The U-Boot image will be called rootfs.cpio.uboot
endif # BR2_TARGET_ROOTFS_CPIO

View File

@@ -0,0 +1,42 @@
################################################################################
#
# cpio to archive target filesystem
#
################################################################################
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
define ROOTFS_CPIO_ADD_INIT
if [ ! -e $(TARGET_DIR)/init ]; then \
ln -sf sbin/init $(TARGET_DIR)/init; \
fi
endef
else
# devtmpfs does not get automounted when initramfs is used.
# Add a pre-init script to mount it before running init
define ROOTFS_CPIO_ADD_INIT
if [ ! -e $(TARGET_DIR)/init ]; then \
$(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \
fi
endef
PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep)
endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT
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
endif
$(eval $(call ROOTFS_TARGET,cpio))

View File

@@ -0,0 +1,7 @@
#!/bin/sh
# devtmpfs does not get automounted for initramfs
/bin/mount -t devtmpfs devtmpfs /dev
exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console
exec /sbin/init $*

View File

@@ -0,0 +1,6 @@
config BR2_TARGET_ROOTFS_CRAMFS
bool "cramfs root filesystem"
help
Build a cramfs root filesystem
http://sourceforge.net/projects/cramfs/

View File

@@ -0,0 +1,19 @@
################################################################################
#
# Build the cramfs root filesystem image
#
################################################################################
ifeq ($(BR2_ENDIAN),"BIG")
CRAMFS_OPTS = -b
else
CRAMFS_OPTS = -l
endif
define ROOTFS_CRAMFS_CMD
$(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@
endef
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
$(eval $(call ROOTFS_TARGET,cramfs))

View File

@@ -0,0 +1,113 @@
config BR2_TARGET_ROOTFS_EXT2
bool "ext2/3/4 root filesystem"
select BR2_PACKAGE_HOST_MKE2IMG
help
Build an ext2/3/4 root filesystem
if BR2_TARGET_ROOTFS_EXT2
config BR2_TARGET_ROOTFS_EXT2_2
bool
choice
bool "ext2/3/4 variant"
default BR2_TARGET_ROOTFS_EXT2_2r0
config BR2_TARGET_ROOTFS_EXT2_2r0
bool "ext2 (rev0)"
select BR2_TARGET_ROOTFS_EXT2_2
config BR2_TARGET_ROOTFS_EXT2_2r1
bool "ext2 (rev1)"
select BR2_TARGET_ROOTFS_EXT2_2
config BR2_TARGET_ROOTFS_EXT2_3
bool "ext3"
config BR2_TARGET_ROOTFS_EXT2_4
bool "ext4"
endchoice
config BR2_TARGET_ROOTFS_EXT2_GEN
int
default 2 if BR2_TARGET_ROOTFS_EXT2_2
default 3 if BR2_TARGET_ROOTFS_EXT2_3
default 4 if BR2_TARGET_ROOTFS_EXT2_4
# All ext generations are revision 1, except ext2r0, which is revision 0
config BR2_TARGET_ROOTFS_EXT2_REV
int
default 0 if BR2_TARGET_ROOTFS_EXT2_2r0
default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0
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_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
choice
prompt "Compression method"
default BR2_TARGET_ROOTFS_EXT2_NONE
help
Select compressor for ext2/3/4 filesystem of the root filesystem
config BR2_TARGET_ROOTFS_EXT2_NONE
bool "no compression"
help
Do not compress the ext2/3/4 filesystem.
config BR2_TARGET_ROOTFS_EXT2_GZIP
bool "gzip"
help
Do compress the ext2/3/4 filesystem with gzip.
config BR2_TARGET_ROOTFS_EXT2_BZIP2
bool "bzip2"
help
Do compress the ext2/3/4 filesystem with bzip2.
config BR2_TARGET_ROOTFS_EXT2_LZMA
bool "lzma"
help
Do compress the ext2/3/4 filesystem with lzma.
config BR2_TARGET_ROOTFS_EXT2_LZO
bool "lzo"
help
Do compress the ext2 filesystem with lzop.
config BR2_TARGET_ROOTFS_EXT2_XZ
bool "xz"
help
Do compress the ext2 filesystem with xz.
endchoice
endif # BR2_TARGET_ROOTFS_EXT2

View File

@@ -0,0 +1,46 @@
################################################################################
#
# Build the ext2 root filesystem image
#
################################################################################
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)
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
# Not qstrip-ing the variable, because it may contain spaces, but we must
# qstrip it when checking. Furthermore, we need to further quote it, so
# that the quotes do not get eaten by the echo statement when creating the
# fakeroot script
ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL)),)
EXT2_OPTS += -l '$(BR2_TARGET_ROOTFS_EXT2_LABEL)'
endif
ROOTFS_EXT2_DEPENDENCIES = host-mke2img
define ROOTFS_EXT2_CMD
PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@
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
endif
$(eval $(call ROOTFS_TARGET,ext2))

View File

@@ -0,0 +1,21 @@
config BR2_TARGET_ROOTFS_INITRAMFS
bool "initial RAM filesystem linked into linux kernel"
depends on BR2_LINUX_KERNEL
select BR2_TARGET_ROOTFS_CPIO
help
Integrate the root filesystem generated by Buildroot as an
initramfs inside the kernel image. This integration will
take place automatically.
A rootfs.cpio file will be generated in the images/ directory.
This is the archive that will be included in the kernel image.
The default rootfs compression set in the kernel configuration
is used, regardless of how buildroot's cpio archive is configured.
Note that enabling initramfs together with another filesystem
formats doesn't make sense: you would end up having two
identical root filesystems, one embedded inside the kernel
image, and one separately.
comment "initramfs needs a Linux kernel to be built"
depends on !BR2_LINUX_KERNEL

View File

@@ -0,0 +1,24 @@
################################################################################
#
# Build a kernel with an integrated initial ramdisk
# filesystem based on cpio.
#
################################################################################
ROOTFS_INITRAMFS_DEPENDENCIES += rootfs-cpio
ROOTFS_INITRAMFS_POST_TARGETS += linux-rebuild-with-initramfs
# The generic fs infrastructure isn't very useful here.
rootfs-initramfs: $(ROOTFS_INITRAMFS_DEPENDENCIES) $(ROOTFS_INITRAMFS_POST_TARGETS)
rootfs-initramfs-show-depends:
@echo $(ROOTFS_INITRAMFS_DEPENDENCIES)
.PHONY: rootfs-initramfs rootfs-initramfs-show-depends
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
TARGETS_ROOTFS += rootfs-initramfs
endif

View File

@@ -0,0 +1,88 @@
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 || \
BR2_TARGET_SYSLINUX_ISOLINUX
select BR2_LINUX_KERNEL_INSTALL_TARGET \
if (!BR2_TARGET_ROOTFS_ISO9660_INITRD && !BR2_TARGET_ROOTFS_INITRAMFS)
help
Build a bootable ISO9660 image. By default, the root
filesystem is directly packed as the ISO9660 filesystem,
which means the root filesystem will be read-only. It
requires ISO9660 filesystem support and CDROM support in the
kernel.
However, if BR2_TARGET_ROOTFS_INITRAMFS or
BR2_TARGET_ROOTFS_ISO9660_INITRD have been enabled, the
ISO9660 filesystem will only contain a kernel image and
optionally an external initrd image. In this case, the
filesystem being in RAM, it will be read/write. No ISO9660
or CDROM support is needed in the kernel.
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
help
Use Grub 2 as the bootloader for the ISO9660 image. Make
sure to enable the 'iso9660' module in
BR2_TARGET_GRUB2_BUILTIN_MODULES and to use 'cd' as the boot
partition in BR2_TARGET_GRUB2_BOOT_PARTITION=.
config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
bool "isolinux"
depends on BR2_TARGET_SYSLINUX_ISOLINUX
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).
Note that the strings __KERNEL_PATH__ and __INITRD_PATH__
will automatically be replaced by the path to the kernel and
initrd images respectively.
config BR2_TARGET_ROOTFS_ISO9660_INITRD
bool "Use initrd"
default y
select BR2_TARGET_ROOTFS_CPIO
help
Enable this option to have the root filesystem bundled as an
initrd/initramfs rather than directly as the ISO9660
filesystem. With this option enabled, the ISO9660 will only
contain a kernel image, an initrd image (unless an initramfs
linked into the kernel is used) and the bootloader.
config BR2_TARGET_ROOTFS_ISO9660_HYBRID
bool "Build hybrid image"
depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
help
Enable this option to build an hybrid image, i.e an image
which can either be booted from a CD-ROM or from a device
which BIOS considers a hard disk or ZIP disk, e.g. a USB key
or similar.
endif
comment "iso image needs a Linux kernel and one of grub, grub2 or isolinux to be built"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_LINUX_KERNEL || \
!(BR2_TARGET_GRUB || BR2_TARGET_GRUB2 || BR2_TARGET_SYSLINUX_ISOLINUX)

View File

@@ -0,0 +1,7 @@
set default="0"
set timeout="10"
menuentry "Buildroot" {
linux __KERNEL_PATH__ root=/dev/sr0
initrd __INITRD_PATH__
}

View File

@@ -0,0 +1,160 @@
################################################################################
#
# Build the iso96600 root filesystem image
#
################################################################################
#
# We need to handle three cases:
#
# 1. The ISO9660 filesystem will really be the real root filesystem
# itself. This is when BR2_TARGET_ROOTFS_ISO9660_INITRD is
# disabled.
#
# 2. The ISO9660 filesystem will be a filesystem with just a kernel
# image, initrd and grub. This is when
# BR2_TARGET_ROOTFS_ISO9660_INITRD is enabled, but
# BR2_TARGET_ROOTFS_INITRAMFS is disabled.
#
# 3. The ISO9660 filesystem will be a filesystem with just a kernel
# image and grub. This is like (2), except that the initrd is
# built into the kernel image. This is when
# BR2_TARGET_ROOTFS_INITRAMFS is enabled (regardless of the value
# of BR2_TARGET_ROOTFS_ISO9660_INITRD).
ROOTFS_ISO9660_BOOT_MENU = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
ROOTFS_ISO9660_DEPENDENCIES = host-cdrkit host-fakeroot linux
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
ROOTFS_ISO9660_USE_INITRD = YES
endif
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_INITRD),y)
ROOTFS_ISO9660_USE_INITRD = YES
endif
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
ROOTFS_ISO9660_TARGET_DIR = $(BUILD_DIR)/rootfs.iso9660.tmp
define ROOTFS_ISO9660_CREATE_TEMPDIR
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
mkdir -p $(ROOTFS_ISO9660_TARGET_DIR)
endef
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)
ROOTFS_ISO9660_DEPENDENCIES += grub2
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub.cfg
ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/grub-eltorito.img
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/grub-eltorito.img \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub-eltorito.img
endef
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y)
ROOTFS_ISO9660_DEPENDENCIES += syslinux
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/isolinux.cfg
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 \
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/ldlinux.c32
endef
endif
define ROOTFS_ISO9660_PREPARATION
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_BOOT_MENU) \
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
$(SED) "s%__KERNEL_PATH__%/boot/$(LINUX_IMAGE_NAME)%" \
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
$(ROOTFS_ISO9660_INSTALL_BOOTLOADER)
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
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_KERNEL
# If initramfs is used, disable loading the initrd as the rootfs is
# already inside the kernel image. Otherwise, make sure a cpio is
# generated and use it as the initrd.
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
else
ROOTFS_ISO9660_DEPENDENCIES += rootfs-cpio
define ROOTFS_ISO9660_COPY_INITRD
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \
$(ROOTFS_ISO9660_TARGET_DIR)/boot/initrd
$(SED) "s%__INITRD_PATH__%/boot/initrd%" \
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_INITRD
endif
else # ROOTFS_ISO9660_USE_INITRD
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
endif # ROOTFS_ISO9660_USE_INITRD
define ROOTFS_ISO9660_CMD
$(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-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 $@
endef
ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
endif
$(eval $(call ROOTFS_TARGET,iso9660))

View File

@@ -0,0 +1,5 @@
default 1
label 1
kernel __KERNEL_PATH__
initrd __INITRD_PATH__
append root=/dev/sr0

View File

@@ -0,0 +1,20 @@
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

@@ -0,0 +1,112 @@
config BR2_TARGET_ROOTFS_JFFS2
bool "jffs2 root filesystem"
help
Build a jffs2 root filesystem
if BR2_TARGET_ROOTFS_JFFS2
choice
prompt "Flash Type"
default BR2_TARGET_ROOTFS_JFFS2_FLASH_128
config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
bool "AT45 dataflash with 1056 byte pagesize"
select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
bool "AT45 dataflash with 528 byte pagesize"
select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K
bool "NAND flash with 16 kB erasesize"
select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K
bool "NAND flash with 128 kB erasesize"
select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
config BR2_TARGET_ROOTFS_JFFS2_FLASH_128
bool "Parallel flash with 128 kB erase size"
config BR2_TARGET_ROOTFS_JFFS2_FLASH_64
bool "Parallel flash with 64 kB erase size"
config BR2_TARGET_ROOTFS_JFFS2_CUSTOM
bool "Select custom erase size"
endchoice
config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE
hex "Erase block size"
depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
default 0x20000
help
Set to erase size of memory
config BR2_TARGET_ROOTFS_JFFS2_EBSIZE
hex
default 0x2100 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
default 0x1080 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
default 0x4000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K
default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K
default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128
default 0x10000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64
default BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE if BR2_TARGET_ROOTFS_JFFS2_CUSTOM
config BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
bool "Do not use Cleanmarker"
default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K
default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K
help
Do not use cleanmarkers if using NAND flash or Dataflash where
the pagesize is not a power of 2
config BR2_TARGET_ROOTFS_JFFS2_PAD
bool "Pad output"
config BR2_TARGET_ROOTFS_JFFS2_PADSIZE
hex "Pad output size (0x0 = to end of EB)"
depends on BR2_TARGET_ROOTFS_JFFS2_PAD
default 0x0
help
Set to 0x0 to pad to end of erase block.
choice
prompt "Endianess"
default BR2_TARGET_ROOTFS_JFFS2_BE if BR2_ENDIAN = "BIG"
config BR2_TARGET_ROOTFS_JFFS2_LE
bool "little-endian"
config BR2_TARGET_ROOTFS_JFFS2_BE
bool "big-endian"
endchoice
config BR2_TARGET_ROOTFS_JFFS2_SUMMARY
bool "Produce a summarized JFFS2 image"
help
A summarised image can be mounted faster if support is
enabled in the kernel (CONFIG_JFFS2_SUMMARY)
config BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE
bool "Select custom virtual memory page size"
help
Use a custom virtual memory page size. Note that this is not related to
the flash memory page size. Using this option is only needed if Linux is
configured to use a page size different than 4kB.
config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE
hex "Virtual memory page size"
depends on BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE
default 0x1000
help
Set to virtual memory page size of target system (in bytes). This value
should match the virtual page size in Linux (i.e. this should have the
same value as the value of the PAGE_SIZE macro in Linux). It is not
related to the flash memory page size.
endif

View File

@@ -0,0 +1,52 @@
################################################################################
#
# Build the jffs2 root filesystem image
#
################################################################################
JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
SUMTOOL_OPTS := $(JFFS2_OPTS)
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
else
JFFS2_OPTS += -p
endif
SUMTOOL_OPTS += -p
endif
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
JFFS2_OPTS += -l
SUMTOOL_OPTS += -l
endif
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
JFFS2_OPTS += -b
SUMTOOL_OPTS += -b
endif
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE),y)
JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE)
endif
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
JFFS2_OPTS += -n
SUMTOOL_OPTS += -n
endif
ROOTFS_JFFS2_DEPENDENCIES = host-mtd
ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
define ROOTFS_JFFS2_CMD
$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary && \
$(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@ && \
rm $@.nosummary
endef
else
define ROOTFS_JFFS2_CMD
$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@
endef
endif
$(eval $(call ROOTFS_TARGET,jffs2))

View File

@@ -0,0 +1,4 @@
config BR2_TARGET_ROOTFS_ROMFS
bool "romfs root filesystem"
help
Build a romfs image of the root filesystem.

View File

@@ -0,0 +1,13 @@
################################################################################
#
# Build the romfs root filesystem image
#
################################################################################
ROOTFS_ROMFS_DEPENDENCIES = host-genromfs
define ROOTFS_ROMFS_CMD
$(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@
endef
$(eval $(call ROOTFS_TARGET,romfs))

View File

@@ -0,0 +1,31 @@
config BR2_TARGET_ROOTFS_SQUASHFS
bool "squashfs root filesystem"
help
Build a squashfs root filesystem
if BR2_TARGET_ROOTFS_SQUASHFS
choice
prompt "Compression algorithm"
default BR2_TARGET_ROOTFS_SQUASHFS4_GZIP
help
Select the squashfs compression algorithm to use when
generating the filesystem.
config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP
bool "gzip"
config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4
bool "lz4"
config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA
bool "lzma"
config BR2_TARGET_ROOTFS_SQUASHFS4_LZO
bool "lzo"
config BR2_TARGET_ROOTFS_SQUASHFS4_XZ
bool "xz"
endchoice
endif

View File

@@ -0,0 +1,33 @@
################################################################################
#
# Build the squashfs root filesystem image
#
################################################################################
ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y)
ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc
else
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y)
ROOTFS_SQUASHFS_ARGS += -comp lzo
else
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y)
ROOTFS_SQUASHFS_ARGS += -comp lzma
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) && \
chmod 0644 $@
endef
$(eval $(call ROOTFS_TARGET,squashfs))

View File

@@ -0,0 +1,52 @@
config BR2_TARGET_ROOTFS_TAR
bool "tar the root filesystem"
default y
help
Build a tar archive of the root filesystem
choice
prompt "Compression method"
default BR2_TARGET_ROOTFS_TAR_NONE
depends on BR2_TARGET_ROOTFS_TAR
help
Select compressor for tar archive of the root filesystem
config BR2_TARGET_ROOTFS_TAR_NONE
bool "no compression"
help
Do not compress the tarball.
config BR2_TARGET_ROOTFS_TAR_GZIP
bool "gzip"
help
Do compress the tarball with gzip.
config BR2_TARGET_ROOTFS_TAR_BZIP2
bool "bzip2"
help
Do compress the tarball with bzip2.
config BR2_TARGET_ROOTFS_TAR_LZMA
bool "lzma"
help
Do compress the tarball with lzma.
config BR2_TARGET_ROOTFS_TAR_LZO
bool "lzo"
help
Do compress the tarball with lzop.
config BR2_TARGET_ROOTFS_TAR_XZ
bool "xz"
help
Do compress the tarball with xz.
endchoice
config BR2_TARGET_ROOTFS_TAR_OPTIONS
string "other random options to pass to tar"
depends on BR2_TARGET_ROOTFS_TAR
default ""
help
Any other flags you want to pass to tar
Refer to tar --help for details

View File

@@ -0,0 +1,13 @@
################################################################################
#
# tar to archive target filesystem
#
################################################################################
TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
define ROOTFS_TAR_CMD
tar -c$(TAR_OPTS)f $@ --numeric-owner -C $(TARGET_DIR) .
endef
$(eval $(call ROOTFS_TARGET,tar))

View File

@@ -0,0 +1,149 @@
config BR2_TARGET_ROOTFS_UBIFS
bool "ubifs root filesystem"
help
Build a ubifs root filesystem
if BR2_TARGET_ROOTFS_UBIFS
config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE
hex "logical eraseblock size"
default 0x1f800
help
Logical eraseblock (LEB) size. The value provided here is
passed to the -e/--leb-size option of mkfs.ubifs.
config BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE
hex "minimum I/O unit size"
default 0x800
help
Minimum I/O unit size. The value provided here is passed
to the -m/--min-io-size option of mkfs.ubifs/ubinize.
config BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT
int "maximum logical eraseblock count"
default 2048
help
Maximum logical eraseblock (LEB) count. The value provided
here is passed to the -c/--max-leb-cnt option of mkfs.ubifs.
choice
prompt "ubifs runtime compression"
default BR2_TARGET_ROOTFS_UBIFS_RT_LZO
help
Select which compression format to use at run-time within
the ubifs file system. The choice made here is passed to
the -x/--compr option of mkfs.ubifs
config BR2_TARGET_ROOTFS_UBIFS_RT_NONE
bool "no compression"
help
Don't use run-time compression.
config BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB
bool "gzip"
help
Use zlib compression at run-time.
config BR2_TARGET_ROOTFS_UBIFS_RT_LZO
bool "lzo"
help
Use lzo compression at run-time.
endchoice
choice
prompt "Compression method"
default BR2_TARGET_ROOTFS_UBIFS_NONE
help
Select which compression format to compress the final image
into.
config BR2_TARGET_ROOTFS_UBIFS_NONE
bool "no compression"
help
Do not compress the ubifs filesystem.
config BR2_TARGET_ROOTFS_UBIFS_GZIP
bool "gzip"
help
Do compress the ubifs filesystem with gzip.
config BR2_TARGET_ROOTFS_UBIFS_BZIP2
bool "bzip2"
help
Do compress the ubifs filesystem with bzip2.
config BR2_TARGET_ROOTFS_UBIFS_LZMA
bool "lzma"
help
Do compress the ubifs filesystem with lzma.
config BR2_TARGET_ROOTFS_UBIFS_LZO
bool "lzo"
help
Do compress the ubifs filesystem with lzop.
config BR2_TARGET_ROOTFS_UBIFS_XZ
bool "xz"
help
Do compress the ubifs filesystem with xz.
endchoice
config BR2_TARGET_ROOTFS_UBIFS_OPTS
string "Additional mkfs.ubifs options"
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

@@ -0,0 +1,30 @@
################################################################################
#
# Embed the ubifs image into an ubi image
#
################################################################################
UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE)
ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0)
UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE)
endif
UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS))
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
endif
define ROOTFS_UBI_CMD
$(INSTALL) -m 0644 $(UBINIZE_CONFIG_FILE_PATH) $(BUILD_DIR)/ubinize.cfg ;\
$(SED) 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' $(BUILD_DIR)/ubinize.cfg ;\
$(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg ;\
rm $(BUILD_DIR)/ubinize.cfg
endef
$(eval $(call ROOTFS_TARGET,ubi))

View File

@@ -0,0 +1,27 @@
################################################################################
#
# Build the ubifs root filesystem image
#
################################################################################
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
endif
ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_LZO),y)
UBIFS_OPTS += -x lzo
endif
ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y)
UBIFS_OPTS += -x none
endif
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 $@
endef
$(eval $(call ROOTFS_TARGET,ubifs))

View File

@@ -0,0 +1,8 @@
[ubifs]
mode=ubi
vol_id=0
vol_type=dynamic
vol_name=rootfs
vol_alignment=1
vol_flags=autoresize
image=BR2_ROOTFS_UBIFS_PATH

View File

@@ -0,0 +1,4 @@
config BR2_TARGET_ROOTFS_YAFFS2
bool "yaffs2 root filesystem"
help
Build a yaffs2 root filesystem

View File

@@ -0,0 +1,13 @@
################################################################################
#
# Build the yaffs2 root filesystem image
#
################################################################################
ROOTFS_YAFFS2_DEPENDENCIES = host-yaffs2utils
define ROOTFS_YAFFS2_CMD
$(HOST_DIR)/usr/bin/mkyaffs2 --all-root $(TARGET_DIR) $@
endef
$(eval $(call ROOTFS_TARGET,yaffs2))