All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] parted: add ontrack DM6 aux3 support
@ 2018-05-04 17:43 Otavio Salvador
  2018-05-04 17:43 ` [PATCH v2 2/2] wic: " Otavio Salvador
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2018-05-04 17:43 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

Add ontrack DM6 aux3 partition support to enable creating
partitions required to boot i.MX MXS based platforms.

This patch has been sent long time ago by Alexandre Belloni to
meta-freescale however this must be incuded on OE-Core as this is a
common component across different BSP.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2:
- Add missing patch header
- Fix indenting inside .bb

 .../parted/files/Add_ontrackdm6aux3.patch     | 118 ++++++++++++++++++
 meta/recipes-extended/parted/parted_3.2.bb    |   1 +
 2 files changed, 119 insertions(+)
 create mode 100644 meta/recipes-extended/parted/files/Add_ontrackdm6aux3.patch

diff --git a/meta/recipes-extended/parted/files/Add_ontrackdm6aux3.patch b/meta/recipes-extended/parted/files/Add_ontrackdm6aux3.patch
new file mode 100644
index 0000000000..c383849366
--- /dev/null
+++ b/meta/recipes-extended/parted/files/Add_ontrackdm6aux3.patch
@@ -0,0 +1,118 @@
+parted: add ontrack DM6 aux3 support
+
+Add ontrack DM6 aux3 partition support to enable creating
+partitions required to boot i.MX MXS based platforms.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff -Nburp parted-3.2.orig/libparted/fs/Makefile.am parted-3.2/libparted/fs/Makefile.am
+--- parted-3.2.orig/libparted/fs/Makefile.am	2014-07-28 04:29:16.000000000 +0200
++++ parted-3.2/libparted/fs/Makefile.am	2015-03-25 19:51:38.912544030 +0100
+@@ -42,6 +42,7 @@ libfs_la_SOURCES =		\
+   linux_swap/linux_swap.c	\
+   nilfs2/nilfs2.c		\
+   ntfs/ntfs.c			\
++  ontrack/ontrack.c		\
+   reiserfs/reiserfs.c		\
+   reiserfs/reiserfs.h		\
+   ufs/ufs.c			\
+diff -Nburp parted-3.2.orig/libparted/fs/ontrack/ontrack.c parted-3.2/libparted/fs/ontrack/ontrack.c
+--- parted-3.2.orig/libparted/fs/ontrack/ontrack.c	1970-01-01 01:00:00.000000000 +0100
++++ parted-3.2/libparted/fs/ontrack/ontrack.c	2015-03-25 19:55:01.342048099 +0100
+@@ -0,0 +1,39 @@
++#include <config.h>
++
++#include <parted/parted.h>
++#include <parted/crc32.h>
++#include <parted/endian.h>
++
++PedGeometry*
++ontrackdm6aux3_probe (PedGeometry* geom)
++{
++	PedSector length = geom->length;
++
++	/* ignore if sector size is not 512bytes for now  */
++	if (geom->dev->sector_size != PED_SECTOR_SIZE_DEFAULT)
++		return NULL;
++
++	return ped_geometry_new(geom->dev, geom->start, length);
++}
++
++static PedFileSystemOps ontrackdm6aux3_ops = {
++	probe:			ontrackdm6aux3_probe,
++};
++
++static PedFileSystemType ontrackdm6aux3_type = {
++	next:   NULL,
++	ops:    &ontrackdm6aux3_ops,
++	name:   "ontrackdm6aux3",
++};
++
++void
++ped_file_system_ontrack_init ()
++{
++	ped_file_system_type_register (&ontrackdm6aux3_type);
++}
++
++void
++ped_file_system_ontrack_done ()
++{
++	ped_file_system_type_unregister (&ontrackdm6aux3_type);
++}
+diff -Nburp parted-3.2.orig/libparted/labels/dos.c parted-3.2/libparted/labels/dos.c
+--- parted-3.2.orig/libparted/labels/dos.c	2014-06-15 20:17:43.000000000 +0200
++++ parted-3.2/libparted/labels/dos.c	2015-03-25 19:51:38.916543965 +0100
+@@ -83,6 +83,7 @@ static const char MBR_BOOT_CODE[] = {
+ #define PARTITION_COMPAQ_DIAG	0x12
+ #define PARTITION_MSFT_RECOVERY	0x27
+ #define PARTITION_LDM		0x42
++#define PARTITION_ONTRACK_DM6_AUX3	0x53
+ #define PARTITION_LINUX_SWAP	0x82
+ #define PARTITION_LINUX		0x83
+ #define PARTITION_IRST		0x84
+@@ -1500,6 +1501,8 @@ msdos_partition_set_system (PedPartition
+ 		dos_data->system = PARTITION_HFS;
+ 	else if (!strcmp (fs_type->name, "sun-ufs"))
+ 		dos_data->system = PARTITION_SUN_UFS;
++	else if (!strcmp (fs_type->name, "ontrackdm6aux3"))
++		dos_data->system = PARTITION_ONTRACK_DM6_AUX3;
+ 	else if (is_linux_swap (fs_type->name))
+ 		dos_data->system = PARTITION_LINUX_SWAP;
+ 	else
+diff -Nburp parted-3.2.orig/libparted/libparted.c parted-3.2/libparted/libparted.c
+--- parted-3.2.orig/libparted/libparted.c	2014-06-15 20:17:43.000000000 +0200
++++ parted-3.2/libparted/libparted.c	2015-03-25 19:51:38.912544030 +0100
+@@ -110,6 +110,7 @@ extern void ped_file_system_fat_init (vo
+ extern void ped_file_system_ext2_init (void);
+ extern void ped_file_system_nilfs2_init (void);
+ extern void ped_file_system_btrfs_init (void);
++extern void ped_file_system_ontrack_init (void);
+ 
+ static void
+ init_file_system_types ()
+@@ -126,6 +127,7 @@ init_file_system_types ()
+ 	ped_file_system_ext2_init ();
+ 	ped_file_system_nilfs2_init ();
+ 	ped_file_system_btrfs_init ();
++	ped_file_system_ontrack_init ();
+ }
+ 
+ extern void ped_disk_aix_done ();
+@@ -177,6 +179,7 @@ _init()
+ #endif
+ }
+ 
++extern void ped_file_system_ontrack_done (void);
+ extern void ped_file_system_nilfs2_done (void);
+ extern void ped_file_system_ext2_done (void);
+ extern void ped_file_system_fat_done (void);
+@@ -193,6 +196,7 @@ extern void ped_file_system_btrfs_done (
+ static void
+ done_file_system_types ()
+ {
++	ped_file_system_ontrack_done ();
+ 	ped_file_system_nilfs2_done ();
+ 	ped_file_system_ext2_done ();
+ 	ped_file_system_fat_done ();
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb
index ab30108bf2..887328fdac 100644
--- a/meta/recipes-extended/parted/parted_3.2.bb
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
            file://syscalls.patch \
            file://fix-doc-mandir.patch \
            file://fix-compile-failure-while-dis.patch \
+           file://Add_ontrackdm6aux3.patch \
            file://0001-Include-fcntl.h-in-platform_defs.h.patch \
            file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
            file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] wic: add ontrack DM6 aux3 support
  2018-05-04 17:43 [PATCH v2 1/2] parted: add ontrack DM6 aux3 support Otavio Salvador
@ 2018-05-04 17:43 ` Otavio Salvador
  2018-05-11 15:41   ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2018-05-04 17:43 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

Add ontrack DM6 aux3 partition support to enable creating
partitions required to boot i.MX MXS based platforms.

This has been removed by OE-Core:21af89a6 (wic: allow only supported
fstypes). It was unnoticed as most users were still using the
meta-freecale image generation class instead of wic but we are now
in process of dropping the class and this is the remaining use-case.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 scripts/lib/wic/ksparser.py              | 3 ++-
 scripts/lib/wic/plugins/imager/direct.py | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index e590b2fe3c..02b267380f 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -138,7 +138,8 @@ class KickStart():
         part.add_argument('--fsoptions', dest='fsopts')
         part.add_argument('--fstype', default='vfat',
                           choices=('ext2', 'ext3', 'ext4', 'btrfs',
-                                   'squashfs', 'vfat', 'msdos', 'swap'))
+                                   'squashfs', 'vfat', 'msdos', 'swap',
+                                   'ontrackdm6aux3'))
         part.add_argument('--mkfs-extraopts', default='')
         part.add_argument('--label')
         part.add_argument('--no-table', action='store_true')
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 1fa6b917e6..594481e6a9 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -528,6 +528,8 @@ class PartitionedImage():
                 parted_fs_type = "fat16"
                 if not part.system_id:
                     part.system_id = '0x6' # FAT16
+            elif part.fstype == "ontrackdm6aux3":
+                parted_fs_type = "ontrackdm6aux3"
             else:
                 # Type for ext2/ext3/ext4/btrfs
                 parted_fs_type = "ext2"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] wic: add ontrack DM6 aux3 support
  2018-05-04 17:43 ` [PATCH v2 2/2] wic: " Otavio Salvador
@ 2018-05-11 15:41   ` Burton, Ross
  2018-05-11 19:33     ` Otavio Salvador
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2018-05-11 15:41 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: OpenEmbedded Core Mailing List

Somehow, these patches are causing selftest to fail:

ERROR: Not supported fstype:

https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/1051/steps/Running%20oe-selftest/logs/stdio

Ross

On 4 May 2018 at 18:43, Otavio Salvador <otavio@ossystems.com.br> wrote:
> Add ontrack DM6 aux3 partition support to enable creating
> partitions required to boot i.MX MXS based platforms.
>
> This has been removed by OE-Core:21af89a6 (wic: allow only supported
> fstypes). It was unnoticed as most users were still using the
> meta-freecale image generation class instead of wic but we are now
> in process of dropping the class and this is the remaining use-case.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>
> Changes in v2: None
>
>  scripts/lib/wic/ksparser.py              | 3 ++-
>  scripts/lib/wic/plugins/imager/direct.py | 2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
> index e590b2fe3c..02b267380f 100644
> --- a/scripts/lib/wic/ksparser.py
> +++ b/scripts/lib/wic/ksparser.py
> @@ -138,7 +138,8 @@ class KickStart():
>          part.add_argument('--fsoptions', dest='fsopts')
>          part.add_argument('--fstype', default='vfat',
>                            choices=('ext2', 'ext3', 'ext4', 'btrfs',
> -                                   'squashfs', 'vfat', 'msdos', 'swap'))
> +                                   'squashfs', 'vfat', 'msdos', 'swap',
> +                                   'ontrackdm6aux3'))
>          part.add_argument('--mkfs-extraopts', default='')
>          part.add_argument('--label')
>          part.add_argument('--no-table', action='store_true')
> diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
> index 1fa6b917e6..594481e6a9 100644
> --- a/scripts/lib/wic/plugins/imager/direct.py
> +++ b/scripts/lib/wic/plugins/imager/direct.py
> @@ -528,6 +528,8 @@ class PartitionedImage():
>                  parted_fs_type = "fat16"
>                  if not part.system_id:
>                      part.system_id = '0x6' # FAT16
> +            elif part.fstype == "ontrackdm6aux3":
> +                parted_fs_type = "ontrackdm6aux3"
>              else:
>                  # Type for ext2/ext3/ext4/btrfs
>                  parted_fs_type = "ext2"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] wic: add ontrack DM6 aux3 support
  2018-05-11 15:41   ` Burton, Ross
@ 2018-05-11 19:33     ` Otavio Salvador
  2018-05-11 22:07       ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2018-05-11 19:33 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Otavio Salvador, OpenEmbedded Core Mailing List

On Fri, May 11, 2018 at 12:41 PM, Burton, Ross <ross.burton@intel.com> wrote:
> Somehow, these patches are causing selftest to fail:
>
> ERROR: Not supported fstype:
>
> https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/1051/steps/Running%20oe-selftest/logs/stdio

You forgot the parted patch.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] wic: add ontrack DM6 aux3 support
  2018-05-11 19:33     ` Otavio Salvador
@ 2018-05-11 22:07       ` Burton, Ross
  2018-05-14 22:09         ` Otavio Salvador
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2018-05-11 22:07 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Otavio Salvador, OpenEmbedded Core Mailing List

This one?  http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=ross/mut&id=2e9012e6b44b83b3952598b08cd9d5dadd633b69

Ross

On 11 May 2018 at 20:33, Otavio Salvador
<otavio.salvador@ossystems.com.br> wrote:
> On Fri, May 11, 2018 at 12:41 PM, Burton, Ross <ross.burton@intel.com> wrote:
>> Somehow, these patches are causing selftest to fail:
>>
>> ERROR: Not supported fstype:
>>
>> https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/1051/steps/Running%20oe-selftest/logs/stdio
>
> You forgot the parted patch.
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] wic: add ontrack DM6 aux3 support
  2018-05-11 22:07       ` Burton, Ross
@ 2018-05-14 22:09         ` Otavio Salvador
  0 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2018-05-14 22:09 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Otavio Salvador, OpenEmbedded Core Mailing List

On Fri, May 11, 2018 at 7:07 PM, Burton, Ross <ross.burton@intel.com> wrote:
> This one?  http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=ross/mut&id=2e9012e6b44b83b3952598b08cd9d5dadd633b69

Yes, this one ...

I reproduced the error here and will look at fixing it.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] wic: add ontrack DM6 aux3 support
  2018-04-30 16:30 [PATCH v2 1/2] parted: " Otavio Salvador
@ 2018-04-30 16:30 ` Otavio Salvador
  0 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2018-04-30 16:30 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

Add ontrack DM6 aux3 partition support to enable creating
partitions required to boot i.MX MXS based platforms.

This has been removed by OE-Core:21af89a6 (wic: allow only supported
fstypes). It was unnoticed as most users were still using the
meta-freecale image generation class instead of wic but we are now
in process of dropping the class and this is the remaining use-case.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 scripts/lib/wic/ksparser.py              | 3 ++-
 scripts/lib/wic/plugins/imager/direct.py | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index e590b2fe3c0..02b267380f6 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -138,7 +138,8 @@ class KickStart():
         part.add_argument('--fsoptions', dest='fsopts')
         part.add_argument('--fstype', default='vfat',
                           choices=('ext2', 'ext3', 'ext4', 'btrfs',
-                                   'squashfs', 'vfat', 'msdos', 'swap'))
+                                   'squashfs', 'vfat', 'msdos', 'swap',
+                                   'ontrackdm6aux3'))
         part.add_argument('--mkfs-extraopts', default='')
         part.add_argument('--label')
         part.add_argument('--no-table', action='store_true')
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 1fa6b917e66..594481e6a94 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -528,6 +528,8 @@ class PartitionedImage():
                 parted_fs_type = "fat16"
                 if not part.system_id:
                     part.system_id = '0x6' # FAT16
+            elif part.fstype == "ontrackdm6aux3":
+                parted_fs_type = "ontrackdm6aux3"
             else:
                 # Type for ext2/ext3/ext4/btrfs
                 parted_fs_type = "ext2"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-14 22:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 17:43 [PATCH v2 1/2] parted: add ontrack DM6 aux3 support Otavio Salvador
2018-05-04 17:43 ` [PATCH v2 2/2] wic: " Otavio Salvador
2018-05-11 15:41   ` Burton, Ross
2018-05-11 19:33     ` Otavio Salvador
2018-05-11 22:07       ` Burton, Ross
2018-05-14 22:09         ` Otavio Salvador
  -- strict thread matches above, loose matches on Subject: below --
2018-04-30 16:30 [PATCH v2 1/2] parted: " Otavio Salvador
2018-04-30 16:30 ` [PATCH v2 2/2] wic: " Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.