Re: [Yaffs] yaffs 2.6.29 patch

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Alexandros C. Couloumbis
日付:  
To: yaffs
題目: Re: [Yaffs] yaffs 2.6.29 patch
Salvador Abreu wrote:
> On Feb 3, 2009, at 18:55, Alexandros C. Couloumbis wrote:
>
>> the linker though produces the following error:
>>
>> fs/built-in.o: In function `yaffs_internal_read_super':
>> yaffs_fs.c:(.text.yaffs_internal_read_super+0x7c8): undefined reference
>> to `__udivdi3'
>> yaffs_fs.c:(.text.yaffs_internal_read_super+0x7c8): relocation truncated
>> to fit: R_MIPS_26 against `__udivdi3'
>> make[5]: *** [vmlinux] Error 1
>
> there's no 64bit division in the ARM kernel; try this patch to
> yaffs_fs.c. (line numbers may vary.)
>
>
> @@ -1875,7 +2062,13 @@
>
>      /* Set up the memory size parameters.... */

>
> +#ifdef __LINUX_ARM_ARCH__
> +    { uint64_t res = mtd->size;
> +      do_div (res, (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK));
> +      nBlocks = res; }
> +#else
>      nBlocks = mtd->size / (YAFFS_CHUNKS_PER_BLOCK *
> YAFFS_BYTES_PER_CHUNK);
> +#endif
>      dev->startBlock = 0;
>      dev->endBlock = nBlocks - 1;
>      dev->nChunksPerBlock = YAFFS_CHUNKS_PER_BLOCK;
> @@ -1901,7 +2094,13 @@
>          dev->totalBytesPerChunk = mtd->oobblock;
>          dev->nChunksPerBlock = mtd->erasesize / mtd->oobblock;
>  #endif
> +#ifdef __LINUX_ARM_ARCH__
> +        { uint64_t res = mtd->size;
> +          do_div (res, mtd->erasesize);
> +          nBlocks = res; }
> +#else
>          nBlocks = mtd->size / mtd->erasesize;
> +#endif

>
>          dev->startBlock = 0;
>          dev->endBlock = nBlocks - 1;

>
>
> Regards
> Salvador Abreu
>

this patch did the trick! a million thanks.

--
Alexandros C. Couloumbis
http://dev.ozo.com/