* amlogic mmc_partitions support
@ 2019-01-14 9:54 Andreas Fenkart
2019-01-14 10:00 ` Neil Armstrong
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Fenkart @ 2019-01-14 9:54 UTC (permalink / raw)
To: linux-amlogic; +Cc: krzysztof.michonski
Hi,
What is a feasible way to port the vendor supplied
drivers/amlogic/mmc/emmc_partitions.c into something that could be
mainlined? My thought is to create a custom block/partition/amlogic.c
driver. Would that have a chance to be included in mainline?
Anybody else that tries to support the existing amlogic partition
format, not the implementation, as is. I want to upgrade the kernel
via fw upgrade on existing installations, but not touch the u-boot nor
the formatting.
/Andi
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: amlogic mmc_partitions support
2019-01-14 9:54 amlogic mmc_partitions support Andreas Fenkart
@ 2019-01-14 10:00 ` Neil Armstrong
2019-01-14 14:35 ` Peter Korsgaard
2019-01-14 14:42 ` Andreas Fenkart
0 siblings, 2 replies; 5+ messages in thread
From: Neil Armstrong @ 2019-01-14 10:00 UTC (permalink / raw)
To: Andreas Fenkart, linux-amlogic; +Cc: krzysztof.michonski
Hi Andreas,
On 14/01/2019 10:54, Andreas Fenkart wrote:
> Hi,
>
> What is a feasible way to port the vendor supplied
> drivers/amlogic/mmc/emmc_partitions.c into something that could be
> mainlined? My thought is to create a custom block/partition/amlogic.c
> driver. Would that have a chance to be included in mainline?
Basically, Amlogic uses the eMMC main partition as a MTD devices and uses a
custom DT partition scheme to export named MTD partitions to user-space.
They don't use any "standard" partitions schemes on the eMMC main HW partition.
Mainline will never support DT-defined MMC partitions, and will never support
a MTD indirection to a MMC HW partition either.
You can try to implement something similar using FUSE, but it won't be simple.
>
> Anybody else that tries to support the existing amlogic partition
> format, not the implementation, as is. I want to upgrade the kernel
> via fw upgrade on existing installations, but not touch the u-boot nor
> the formatting.
Some people forward ported it, and is available on some git repos around the
Khadas VIM support.
Neil
>
> /Andi
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: amlogic mmc_partitions support
2019-01-14 10:00 ` Neil Armstrong
@ 2019-01-14 14:35 ` Peter Korsgaard
2019-01-14 14:46 ` Neil Armstrong
2019-01-14 14:42 ` Andreas Fenkart
1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2019-01-14 14:35 UTC (permalink / raw)
To: Neil Armstrong; +Cc: linux-amlogic, Andreas Fenkart, krzysztof.michonski
>>>>> "Neil" == Neil Armstrong <narmstrong@baylibre.com> writes:
> Hi Andreas,
> On 14/01/2019 10:54, Andreas Fenkart wrote:
>> Hi,
>>
>> What is a feasible way to port the vendor supplied
>> drivers/amlogic/mmc/emmc_partitions.c into something that could be
>> mainlined? My thought is to create a custom block/partition/amlogic.c
>> driver. Would that have a chance to be included in mainline?
> Basically, Amlogic uses the eMMC main partition as a MTD devices and uses a
> custom DT partition scheme to export named MTD partitions to user-space.
> They don't use any "standard" partitions schemes on the eMMC main HW partition.
> Mainline will never support DT-defined MMC partitions, and will never support
> a MTD indirection to a MMC HW partition either.
> You can try to implement something similar using FUSE, but it won't be simple.
Not knowing anything about the vendor driver, if this is just about
splitting up a single eMMC partition in sub blocks and not about MTD,
then this can be easily done with the dm-linear target of device mapper,
E.G. something like:
dmsetup create FOO --table "0 <size> linear /dev/mmcblk0 <offset>"
--
Bye, Peter Korsgaard
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: amlogic mmc_partitions support
2019-01-14 10:00 ` Neil Armstrong
2019-01-14 14:35 ` Peter Korsgaard
@ 2019-01-14 14:42 ` Andreas Fenkart
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Fenkart @ 2019-01-14 14:42 UTC (permalink / raw)
To: Neil Armstrong; +Cc: linux-amlogic, krzysztof.michonski
Hi Neil,
Am Mo., 14. Jan. 2019 um 11:00 Uhr schrieb Neil Armstrong
<narmstrong@baylibre.com>:
>
>
> Basically, Amlogic uses the eMMC main partition as a MTD devices and uses a
> custom DT partition scheme to export named MTD partitions to user-space.
I've seen the dt section about partitions, but the partition table is
also stored on the emmc.
It's at an offset (36 MB) and uses a custom c struct.
#define MAX_MMC_PART_NUM 32
struct partitions {
/* identifier string */
char name[MAX_PART_NAME_LEN];
/* partition size, byte unit */
uint64_t size;
/* offset within the master space, byte unit */
uint64_t offset;
/* master flags to mask out for this partition */
unsigned mask_flags;
};
struct mmc_partitions_fmt {
char magic[4];
unsigned char version[12];
int part_num;
int checksum;
struct partitions partitions[MAX_MMC_PART_NUM];
};
I'm trying to create a prototype. Is this something that could be
mainlined then?
> > Anybody else that tries to support the existing amlogic partition
> > format, not the implementation, as is. I want to upgrade the kernel
> > via fw upgrade on existing installations, but not touch the u-boot nor
> > the formatting.
>
> Some people forward ported it, and is available on some git repos around the
> Khadas VIM support.
thanks,
/Andi
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: amlogic mmc_partitions support
2019-01-14 14:35 ` Peter Korsgaard
@ 2019-01-14 14:46 ` Neil Armstrong
0 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2019-01-14 14:46 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: linux-amlogic, Andreas Fenkart, krzysztof.michonski
Hi Peter,
On 14/01/2019 15:35, Peter Korsgaard wrote:
>>>>>> "Neil" == Neil Armstrong <narmstrong@baylibre.com> writes:
>
> > Hi Andreas,
> > On 14/01/2019 10:54, Andreas Fenkart wrote:
> >> Hi,
> >>
> >> What is a feasible way to port the vendor supplied
> >> drivers/amlogic/mmc/emmc_partitions.c into something that could be
> >> mainlined? My thought is to create a custom block/partition/amlogic.c
> >> driver. Would that have a chance to be included in mainline?
>
> > Basically, Amlogic uses the eMMC main partition as a MTD devices and uses a
> > custom DT partition scheme to export named MTD partitions to user-space.
>
> > They don't use any "standard" partitions schemes on the eMMC main HW partition.
>
> > Mainline will never support DT-defined MMC partitions, and will never support
> > a MTD indirection to a MMC HW partition either.
>
> > You can try to implement something similar using FUSE, but it won't be simple.
>
> Not knowing anything about the vendor driver, if this is just about
> splitting up a single eMMC partition in sub blocks and not about MTD,
> then this can be easily done with the dm-linear target of device mapper,
> E.G. something like:
>
> dmsetup create FOO --table "0 <size> linear /dev/mmcblk0 <offset>"
>
Indeed, it would help, thanks for the pointer.
Andreas, this should be done from user-space in an initramfs code right before
switching root to the legacy userspace, for example, nothing in the kernel will
be accepted to do that.
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-14 14:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 9:54 amlogic mmc_partitions support Andreas Fenkart
2019-01-14 10:00 ` Neil Armstrong
2019-01-14 14:35 ` Peter Korsgaard
2019-01-14 14:46 ` Neil Armstrong
2019-01-14 14:42 ` Andreas Fenkart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).