busybox 1.19.3 cp bug w.r.t device files?

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Dec 21 14:24:36 UTC 2011


Baruch Siach <baruch at tkos.co.il> wrote on 2011/12/21 13:07:13:
>
> Hi Joakim,
>
> On Wed, Dec 21, 2011 at 12:31:23PM +0100, Joakim Tjernlund wrote:
> > Recently installed bb 1.19.3 (gentoo) on our ppc target. Today I discovered
> > that cp vmlinux /dev/mtdblock5 dosn't work. The device file is removed and
> > a new plain file is created instead.
> > Feels like a bb bug, comments?
>
> This is normal behaviour of cp as far as I know. You can do 'cat vmlinux >
> /dev/mtdblock5' instead.
>
> Note two other things however:
>
> 1. Unless your bootloader can parse ELF, having vmlinux on /dev/mtdblock5
>    won't do what you expect

Filename was mispelled, it is an uboot image

>
> 2. If /dev/mtdblock5 is on a NAND device, you should use nandwrite for writing
>    into your raw MTD device (/dev/mtd5), because nandwrite is bad block aware,
>    while 'cat' is not

Luckily it is a NOR device and that won't change for some time. Eventually it
will be NAND but then we will have a complete new design too.

 Thanks,
         Jocke



More information about the busybox mailing list