project/ubox.git
10 years agoblock: support extroot and overlay mounts by device
Jo-Philipp Wich [Wed, 6 Nov 2013 12:54:16 +0000 (12:54 +0000)]
block: support extroot and overlay mounts by device

10 years agoblock: fix find_block_info() by label
Jo-Philipp Wich [Wed, 6 Nov 2013 12:48:01 +0000 (12:48 +0000)]
block: fix find_block_info() by label

10 years agosupport specifying swap priority from the command line
Nathan Hintz [Sat, 2 Nov 2013 17:31:41 +0000 (17:31 +0000)]
support specifying swap priority from the command line

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
10 years agoclose file pointer before exiting function
Luka Perkov [Tue, 9 Jul 2013 23:50:48 +0000 (01:50 +0200)]
close file pointer before exiting function

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agofix typo
Luka Perkov [Thu, 24 Oct 2013 00:28:20 +0000 (02:28 +0200)]
fix typo

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agoadd support for patched rootfs
John Crispin [Mon, 7 Oct 2013 15:46:45 +0000 (17:46 +0200)]
add support for patched rootfs

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agokmodloader: respect global directory prefix in scan_module_folder()
Jo-Philipp Wich [Mon, 14 Oct 2013 14:13:40 +0000 (14:13 +0000)]
kmodloader: respect global directory prefix in scan_module_folder()

10 years agokmodloader: use the name of the found module struct for modinfo
Jo-Philipp Wich [Sat, 28 Sep 2013 16:32:29 +0000 (16:32 +0000)]
kmodloader: use the name of the found module struct for modinfo

The module .ko file might be called differently than the name used
by the kernel internally, e.g. "nls_iso8859-1.ko" is called
"nls_iso8859_1" in lsmmod. The print_modinfo() procedure expects the
filename spelling in order to successfully resolve the full module path.

After this change, "modinfo" supports printing module info even if the
user gives the kernel internal spelling instead of the file name one,
so that e.g. "modinfo "nls_iso8859_1" and "modinfo nls_iso8859-1.ko" will
both succeed.

10 years agokmodloader: use the name of the module struct when unloading modules
Jo-Philipp Wich [Sat, 28 Sep 2013 16:25:47 +0000 (16:25 +0000)]
kmodloader: use the name of the module struct when unloading modules

The module .ko file might be called differently than the name used
by the kernel internally, e.g. "nls_iso8859-1.ko" is called
"nls_iso8859_1" in lsmmod. The module removal syscall expects the
latter as well.

After this change, "rmmod" supports unloading the module even if the
user gives the file name spelling instead of the kernel internal one,
so that e.g. "rmmod nls_iso8859-1.ko" and "rmmod nls_iso8859_1" will
both succeed.

10 years agokmodloader: properly handle modules with both underscores and dashes in their name
Jo-Philipp Wich [Sat, 28 Sep 2013 14:41:50 +0000 (14:41 +0000)]
kmodloader: properly handle modules with both underscores and dashes in their name

10 years agofix hyphen substitution in path
John Crispin [Thu, 19 Sep 2013 13:15:09 +0000 (15:15 +0200)]
fix hyphen substitution in path

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agocosmetic cleanup of - vs _ patch
John Crispin [Tue, 17 Sep 2013 21:27:58 +0000 (23:27 +0200)]
cosmetic cleanup of - vs _ patch

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agofix _ vs - bug
John Crispin [Fri, 13 Sep 2013 18:15:15 +0000 (20:15 +0200)]
fix _ vs - bug

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agokmodloader: don't free memory allocated with alloca()
Jo-Philipp Wich [Thu, 5 Sep 2013 15:21:09 +0000 (17:21 +0200)]
kmodloader: don't free memory allocated with alloca()

10 years agoblock: properly handle vlist_add() for label, uuid and device cases
Jo-Philipp Wich [Thu, 5 Sep 2013 15:19:41 +0000 (17:19 +0200)]
block: properly handle vlist_add() for label, uuid and device cases

10 years agoadd proper modprobe support
John Crispin [Mon, 19 Aug 2013 19:41:48 +0000 (21:41 +0200)]
add proper modprobe support

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoblock: do a final round of swapfile mounting in main_mount()
Jo-Philipp Wich [Fri, 16 Aug 2013 13:04:59 +0000 (15:04 +0200)]
block: do a final round of swapfile mounting in main_mount()

This allows reenabling swap after "swapoff -a" when all other partitions are mounted already.

10 years agoblock: support mounting swap by label
Jo-Philipp Wich [Fri, 16 Aug 2013 13:04:34 +0000 (15:04 +0200)]
block: support mounting swap by label

10 years agoblock: remove debug prints
Jo-Philipp Wich [Fri, 16 Aug 2013 12:56:20 +0000 (14:56 +0200)]
block: remove debug prints

10 years agoblock: add support for mounting swap files
Jo-Philipp Wich [Fri, 16 Aug 2013 12:28:54 +0000 (14:28 +0200)]
block: add support for mounting swap files

10 years agolibblkid-tiny: allow probing files
Jo-Philipp Wich [Fri, 16 Aug 2013 11:52:51 +0000 (13:52 +0200)]
libblkid-tiny: allow probing files

10 years agoblock: add support for generic mount options
Jo-Philipp Wich [Fri, 16 Aug 2013 10:22:34 +0000 (12:22 +0200)]
block: add support for generic mount options

Not all mount options are to be passed directly to the filesystem driver,
some of them are generic VFS flags that must be passed as bitfield to the
mount() syscall.

Add a new option parsing implementation that properly divides the user
sepcified mount options into flags and fs specific arguments.

10 years agoblock: enlarge uuid buffer when writing extroot tag file, some uuids exceed 32 byte...
Jo-Philipp Wich [Wed, 31 Jul 2013 10:42:42 +0000 (12:42 +0200)]
block: enlarge uuid buffer when writing extroot tag file, some uuids exceed 32 byte in size

10 years agoblock: suggest a default delay_root value of 5 seconds, since it is almost always...
Jo-Philipp Wich [Fri, 26 Jul 2013 09:05:37 +0000 (11:05 +0200)]
block: suggest a default delay_root value of 5 seconds, since it is almost always needed when running block from jffs2

10 years agomount_root: umount /tmp/overlay in external root case as well
Jo-Philipp Wich [Fri, 26 Jul 2013 09:03:26 +0000 (11:03 +0200)]
mount_root: umount /tmp/overlay in external root case as well

10 years agomount_root: support extroot from block-mount on jffs2
Jo-Philipp Wich [Fri, 26 Jul 2013 08:58:14 +0000 (10:58 +0200)]
mount_root: support extroot from block-mount on jffs2

- retry extroot after mounting jffs2
- look for /sbin/block in jffs2
- load all kmods from jffs2
- cleanup temporary directories after extroot

10 years agoblock: stage extroot mounts in /tmp/extroot since /tmp/overlay might be in use by...
Jo-Philipp Wich [Fri, 26 Jul 2013 08:57:30 +0000 (10:57 +0200)]
block: stage extroot mounts in /tmp/extroot since /tmp/overlay might be in use by jffs2 already

10 years agokmodloader: support loading modules from a different prefix
Jo-Philipp Wich [Fri, 26 Jul 2013 08:57:01 +0000 (10:57 +0200)]
kmodloader: support loading modules from a different prefix

10 years agoblock: restore support for using swap files
Jo-Philipp Wich [Thu, 25 Jul 2013 14:17:52 +0000 (16:17 +0200)]
block: restore support for using swap files

10 years agoblock: discard vfat labels with only spaces
Jo-Philipp Wich [Thu, 25 Jul 2013 12:23:07 +0000 (14:23 +0200)]
block: discard vfat labels with only spaces

10 years agoblock: strip trailing spaces from vfat labels
Jo-Philipp Wich [Wed, 24 Jul 2013 18:11:19 +0000 (20:11 +0200)]
block: strip trailing spaces from vfat labels

Strip trailing spaces from vfat labels to mimic the behaviour of "blkid"

10 years agoblock: use dynamically sized probe buffer in libblkid-tiny
Jo-Philipp Wich [Wed, 24 Jul 2013 18:10:09 +0000 (20:10 +0200)]
block: use dynamically sized probe buffer in libblkid-tiny

This fixes label extraction on vfat partitions with large cluster sizes,
the previous statically sized buffer of 4096 bytes was too small.

10 years agoblock: remove uneeded le32_to_cpu() calls in vfat probe function - the call is not...
Jo-Philipp Wich [Wed, 24 Jul 2013 10:03:45 +0000 (12:03 +0200)]
block: remove uneeded le32_to_cpu() calls in vfat probe function - the call is not required due to direct memcmp() and actually breaks the filesystem signature

10 years agoallow mtd devices to be mounted by block tool
John Crispin [Tue, 23 Jul 2013 11:43:10 +0000 (13:43 +0200)]
allow mtd devices to be mounted by block tool

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agofix swapoff help text
John Crispin [Tue, 23 Jul 2013 11:23:52 +0000 (13:23 +0200)]
fix swapoff help text

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd a -s option to swapon
John Crispin [Tue, 23 Jul 2013 09:27:43 +0000 (11:27 +0200)]
add a -s option to swapon

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agofix m5sum / uuid of squshfs devices
John Crispin [Mon, 22 Jul 2013 06:17:58 +0000 (08:17 +0200)]
fix m5sum / uuid of squshfs devices

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoblock: fix possible NULL pointer dereference in mount_device()
Jo-Philipp Wich [Fri, 19 Jul 2013 14:43:35 +0000 (16:43 +0200)]
block: fix possible NULL pointer dereference in mount_device()

10 years agoblock: also handle /dev/mdX (softraid) and /dev/mapper/* (LVM2) devices
Jo-Philipp Wich [Fri, 19 Jul 2013 13:44:46 +0000 (15:44 +0200)]
block: also handle /dev/mdX (softraid) and /dev/mapper/* (LVM2) devices

10 years agoblock: ignore probe entries without id
Jo-Philipp Wich [Fri, 19 Jul 2013 13:43:37 +0000 (15:43 +0200)]
block: ignore probe entries without id

10 years agokmodloader: fix path printf handling
Felix Fietkau [Mon, 15 Jul 2013 08:17:43 +0000 (10:17 +0200)]
kmodloader: fix path printf handling

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agokmodloader: eliminate some hardcoded buffer sizes
Felix Fietkau [Fri, 12 Jul 2013 15:54:29 +0000 (17:54 +0200)]
kmodloader: eliminate some hardcoded buffer sizes

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agokmodloader: reduce indentation depth
Felix Fietkau [Fri, 12 Jul 2013 15:10:41 +0000 (17:10 +0200)]
kmodloader: reduce indentation depth

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agokmodloader: use avl tree and calloc_a
Felix Fietkau [Fri, 12 Jul 2013 15:01:56 +0000 (17:01 +0200)]
kmodloader: use avl tree and calloc_a

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoadd block to .gitignore
Felix Fietkau [Fri, 12 Jul 2013 14:25:56 +0000 (16:25 +0200)]
add block to .gitignore

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agomake block handle the same block device types as luci
John Crispin [Thu, 11 Jul 2013 16:31:40 +0000 (18:31 +0200)]
make block handle the same block device types as luci

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoubox fix extroot delay
Peter Wagner [Thu, 11 Jul 2013 10:02:06 +0000 (10:02 +0000)]
ubox fix extroot delay

This patches fixes the extroot delay. It creates the devicefiles again
when no device was found and updates the device list afterwards.

Signed-off-by: Peter Wagner <tripolar@gmx.at>
10 years agoimprove e2fsck handling
John Crispin [Tue, 9 Jul 2013 12:30:39 +0000 (14:30 +0200)]
improve e2fsck handling

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agorun basename() on user provided device names
John Crispin [Tue, 9 Jul 2013 12:29:40 +0000 (14:29 +0200)]
run basename() on user provided device names

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd option to check ext* partitions before mounting V3
Peter Wagner [Mon, 1 Jul 2013 20:22:21 +0000 (20:22 +0000)]
add option to check ext* partitions before mounting V3

UpdatesV2: Check for e2fsck before calling it.
 fix whitespace
Updates V3: fix another whitespace

This patch adds a new option called check_fs to /etc/config/fstab, if set to '1' every partition with ext* fs
will be checked before it gets mounted.

Signed-off-by: Peter Wagner <tripolar@gmx.at>
with minor changes to http://patchwork.openwrt.org/patch/3791/
Signed-off-by: John Crispin <blogic@openwrt.org>
10 years ago add delay for root partition when extroot is used
Peter Wagner [Sat, 29 Jun 2013 15:42:11 +0000 (15:42 +0000)]
 add delay for root partition when extroot is used

This patch adds a new option called delay_root to /etc/config/fstab. This option defines
how long mount_root should wait (in seconds) for an external storage to show up.

Signed-off-by: Peter Wagner <tripolar@gmx.at>
10 years agofix endianess bug inside libbklid-tiny
John Crispin [Fri, 28 Jun 2013 13:38:18 +0000 (15:38 +0200)]
fix endianess bug inside libbklid-tiny

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd mount/umount support to the block tool
John Crispin [Thu, 27 Jun 2013 13:30:48 +0000 (15:30 +0200)]
add mount/umount support to the block tool

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoinsmod should not insert of already inserted
John Crispin [Thu, 27 Jun 2013 14:48:44 +0000 (16:48 +0200)]
insmod should not insert of already inserted

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd jffs2reset and jffs2mark
John Crispin [Thu, 27 Jun 2013 13:14:14 +0000 (15:14 +0200)]
add jffs2reset and jffs2mark

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd pivot support, anon swap, device name support, hotplug
John Crispin [Mon, 24 Jun 2013 16:35:56 +0000 (18:35 +0200)]
add pivot support, anon swap, device name support, hotplug

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd support for mmc cards
John Crispin [Thu, 20 Jun 2013 20:00:52 +0000 (22:00 +0200)]
add support for mmc cards

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd /etc/.extroot-uuid support
John Crispin [Thu, 20 Jun 2013 14:54:17 +0000 (16:54 +0200)]
add /etc/.extroot-uuid support

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agofix invalid path in extroot exit path
John Crispin [Thu, 20 Jun 2013 14:04:26 +0000 (16:04 +0200)]
fix invalid path in extroot exit path

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoaddextroot support to mount_root
John Crispin [Wed, 19 Jun 2013 19:16:27 +0000 (21:16 +0200)]
addextroot support to mount_root

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoAdd CmakeList support for the block tool
John Crispin [Wed, 19 Jun 2013 19:15:42 +0000 (21:15 +0200)]
Add CmakeList support for the block tool

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd a block-mount replacement
John Crispin [Wed, 19 Jun 2013 19:14:57 +0000 (21:14 +0200)]
add a block-mount replacement

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd a tiny version of libblkid
John Crispin [Wed, 19 Jun 2013 19:14:23 +0000 (21:14 +0200)]
add a tiny version of libblkid

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoremove Makefile
John Crispin [Tue, 11 Jun 2013 19:45:34 +0000 (21:45 +0200)]
remove Makefile

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd support for module handling
John Crispin [Mon, 13 May 2013 11:54:06 +0000 (13:54 +0200)]
add support for module handling

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoinitial import of uboox utilities
John Crispin [Tue, 23 Apr 2013 18:52:03 +0000 (20:52 +0200)]
initial import of uboox utilities

Signed-off-by: John Crispin <blogic@openwrt.org>