summaryrefslogtreecommitdiff
path: root/ubi-utils/scripts/mkdevs.pl
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-01-23 19:34:52 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-01-23 19:34:52 +0200
commit3ad29ab55ad71d706152781b70a43d9f6be407b9 (patch)
tree4e5a41b23e771faef0f633c6570210a42bd9c037 /ubi-utils/scripts/mkdevs.pl
parent22f5fe49d60ea43524a902408b3112a78f2c5aae (diff)
ubi-utils: remove all old tools
Remove all old tools because I cannot maintain them and the original authors do not seem to have time for this. Some of the tools do not work properly, some are just vague and undocumented and seem to be oriented to the environment of the IBM guys. Nevertheless, I'll return the tool as is in the next commit, becouse they are still useful. This commit also adds a ubinize utility to generate UBI images. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/scripts/mkdevs.pl')
-rwxr-xr-xubi-utils/scripts/mkdevs.pl44
1 files changed, 0 insertions, 44 deletions
diff --git a/ubi-utils/scripts/mkdevs.pl b/ubi-utils/scripts/mkdevs.pl
deleted file mode 100755
index 46d47c5..0000000
--- a/ubi-utils/scripts/mkdevs.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/perl -w
-
-#
-# Author: Artem B. Bityutskiy <dedekind@oktetlabs.ru>
-#
-# A small scrip which creates UBI device nodes in /dev. UBI allocates
-# major number dynamically, so the script looks at /proc/devices to find
-# out UBI's major number.
-#
-
-# Create the control device as well if this UBI version supports them (were
-# added sice Linux kernel 2.6.24)
-my $ctrl = "/sys/class/misc/ubi_ctrl/dev";
-
-if (-e "$ctrl") {
- open FILE, "<", $ctrl or die "Cannot open $ctrl file: $!\n";
- my $devnums = <FILE>;
- close FILE;
-
- $devnums =~ m/(\d+):(\d+)/;
- system("mknod /dev/ubi_ctrl c $1 $2");
-}
-
-my $proc = '/proc/devices';
-my $regexp = '(\d+) (ubi\d+)$';
-
-open FILE, "<", $proc or die "Cannot open $proc file: $!\n";
-my @file = <FILE>;
-close FILE;
-
-foreach (@file) {
- next if not m/$regexp/g;
- print "found $2\n";
-
- system("rm -rf /dev/$2");
- system("mknod /dev/$2 c $1 0");
-
- for (my $i = 0; $i < 128; $i += 1) {
- system("rm -rf /dev/$2_$i");
- my $j = $i + 1;
- system("mknod /dev/$2_$i c $1 $j");
- }
-}
-