Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: loongson2f: evbmips or new port ?



On Aug 11, 2011, at 11:21 AM, Manuel Bouyer wrote:

> On Thu, Aug 11, 2011 at 01:29:44PM -0400, Michael wrote:
>>> compiled with -DUSE_MBR but evbmips is not there.
>>> Note that USE_MBR only changes the default value of a flag, so
>>> it may be possible to set it contidionally on a sysctl value.
>> 
>> Needs to be added I guess - I formatted an SD card on an amd64 box for use 
>> with the gdium.
>> So far I only worried about the kernel reading the disklabel which works 
>> just fine.
> 
> I just tried, with switching my loongson to kern/subr_disk_mbr.c.
> It mostly works, but it seeems that the disklabel and mbr
> data structure overwrite each others: when I write a new disklabel
> I loose the first 2 mbr partitions, and when I write a mbr with
> fdisk, disklabel complains about invalid partition 'p' which I never
> entered.
> This is probably because of:
> #define LABELSECTOR     0                       /* sector containing label */
> #define LABELOFFSET     64                      /* offset of label in sector 
> */
> 
> in evbmips's disklabel.h. LABELSECTOR may be OK but LABELOFFSET may needs to
> be changed. Or maybe something has to be changed in disklabel(8),
> I didn't look further yet.

I'd just change them to match i386.

I wish there was an option to specify the endianness of the disk label.


Home | Main Index | Thread Index | Old Index