Skip to contentSkip to conversation

partitions: Read Rio Karma partition table

PATCH New Bob Copeland 1 participant 1 message Jan 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 partitions: Read Rio Karma partition table

The Rio Karma portable MP3 player has its own proprietary partition table. The partition layout is similar to a DOS boot sector but it begins at a different offset and uses a different magic number (0xAB56 instead of 0xAA55). Add support for it to enable mounting the device.

---

This is a companion patch to a pending one to add USB storage support. Last posting on LKML received no comments. Andries, I'm copying you as a shot in the dark as the closest I can find in the MAINTAINERS. Several people over on linux-karma.sf.net are using the patch without problems.

 fs/partitions/Kconfig  |    7 ++++++
 fs/partitions/Makefile |    1 +
 fs/partitions/check.c  |    4 +++
 fs/partitions/karma.c  |   57 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/partitions/karma.h  |    8 +++++++
 5 files changed, 77 insertions(+), 0 deletions(-)
 create mode 100644 fs/partitions/karma.c
 create mode 100644 fs/partitions/karma.h

applies-to: d83fa1699e8113d83588d38a1c16e68cd3fcf462 40277840eeeea47e549466da9d92774885367959

fs/partitions/Kconfig +7 -0
index 656bc43..cb710fd 100644
@@ -225,4 +225,11 @@ config EFI_PARTITION
 	  were partitioned using EFI GPT.  Presently only useful on the
 	  IA-64 platform.
 
+config KARMA_PARTITION
+	bool "Karma Partition support"
+	depends on PARTITION_ADVANCED
+	help
+	  Say Y here if you would like to mount the Rio Karma MP3 player,
+          as it uses a proprietary partition table.
+
 #      define_bool CONFIG_ACORN_PARTITION_CUMANA y
fs/partitions/Makefile +1 -0
index 66d5cc2..42c7d38 100644
@@ -17,3 +17,4 @@ obj-$(CONFIG_SUN_PARTITION) += sun.o
 obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o
 obj-$(CONFIG_IBM_PARTITION) += ibm.o
 obj-$(CONFIG_EFI_PARTITION) += efi.o
+obj-$(CONFIG_KARMA_PARTITION) += karma.o
fs/partitions/check.c +4 -0
index 7881ce0..f924f45 100644
@@ -35,6 +35,7 @@
 #include "ibm.h"
 #include "ultrix.h"
 #include "efi.h"
+#include "karma.h"
 
 #ifdef CONFIG_BLK_DEV_MD
 extern void md_autodetect_dev(dev_t dev);
@@ -103,6 +104,9 @@ static int (*check_part[])(struct parsed
 #ifdef CONFIG_IBM_PARTITION
 	ibm_partition,
 #endif
+#ifdef CONFIG_KARMA_PARTITION
+	karma_partition,
+#endif
 	NULL
 };
  
fs/partitions/karma.c new file +57 -0

57 lines not on this page · raw message

fs/partitions/karma.h new file +8 -0
new file mode 100644
index 0000000..ecf7d3f
@@ -0,0 +1,8 @@
+/*
+ *  fs/partitions/karma.h
+ */
+
+#define KARMA_LABEL_MAGIC		0xAB56
+
+int karma_partition(struct parsed_partitions *state, struct block_device *bdev);
+

---
0.99.9i

Signature · 1 line
Bob Copeland %% www.bobcopeland.com