Subject: Re: Internal flash (MTD block device) writing - msg#00099
List: handhelds.ipaq.hx4700.linux
On 11/28/06, sza2 <klt29-Y8qEzhMunLyT9ig0jae3mg@xxxxxxxxxxxxxxxx> wrote:
Hello All,
I tried to write /dev/mtdblockX (as root), but it was
unsuccessful (the system is on CF, sdg's bootloader and
kernel stored in the internal flash).
First I used dd if=somefile.bin of=/dev/mtdblock0. Result:
dd: /dev/mtdblock0: Operation not pemitted.
Than I installed mtd-utils.
flash_info /dev/mtdblock0 -> [no response]
flash_unlock /dev/mtdblock0 -> Could not get MTD device info
from /dev/mtdblock0
flash_erase /dev/mtdblock0 -> Erase Total 1 Units (but there
is no change in flash content)
flash_eraseall /dev/mtdblock0 -> flash_eraseall:
/dev/mtdblock 0: unable to get MTD device info
mtd_debug read /dev/mtdblock0 0 1000 test.bin -> [seems to
be OK]
mtd_debug erase /dev/mtdblock0 0 1000 -> MEMERASE:
Inappropriate ioctl for device
mtd_debug write /dev/mtdblock0 0 1000 test.bin ->
file_to_flash: write, size 0x3e8, n 0x3e8 write(): Operation
not permitted
Is there a way to write the flash somehow?
Why would you want to trash the bootloader?
mtdblock0 is write-protected (never unlocked), look
at drivers/mdt/maps/hx4700-flash.c
maps/hx4700-flash.c
regards
Philipp
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Where the HTC Bootloader sits?
On 11/28/06, sza2 <klt29-Y8qEzhMunLyT9ig0jae3mg@xxxxxxxxxxxxxxxx> wrote:
Hi,
Do anybody knows where the original bootloader (comes up
with iTask + contcts + reset) stored? For me it seems the
whole 128MB flash can be used by operating system. Is it
outside somewhere?
It is in the first 256k of the flash.
regards
Philipp
Next Message by Date:
click to view message preview
Re: Where the HTC Bootloader sits?
> > It is in the first 256k of the flash.
So if I erase the first 256k the device becomes unusable. Is
this means that the first 256k is not used by wm2003 or wm5
also? If this is the case, it may possible to write a
bootloader which can boot wm and linux and can select at start?
/sza2
sza2 <klt29-Y8qEzhMunLyT9ig0jae3mg@xxxxxxxxxxxxxxxx> írta:
> Hi,
>
> Do anybody knows where the original bootloader (comes up
> with iTask + contcts + reset) stored? For me it seems the
> whole 128MB flash can be used by operating system. Is it
> outside somewhere?
>
> If yes, does it mean that no possibility to make hx4700 a
> brick, even in case a total flash erase?
>
> Thx,
>
> /sza2
>
>
>
> _______________________________________________________
> Váltson egyszerűen, olcsóbb kötelezőre!
> http://www.biztositas.hu/origo/gfb - a kötelező megoldás.
>
>
>
_______________________________________________________
Váltson egyszerűen, olcsóbb kötelezőre!
http://www.biztositas.hu/origo/gfb - a kötelező megoldás.
Previous Message by Thread:
click to view message preview
Internal flash (MTD block device) writing
Hello All,
I tried to write /dev/mtdblockX (as root), but it was
unsuccessful (the system is on CF, sdg's bootloader and
kernel stored in the internal flash).
First I used dd if=somefile.bin of=/dev/mtdblock0. Result:
dd: /dev/mtdblock0: Operation not pemitted.
Than I installed mtd-utils.
flash_info /dev/mtdblock0 -> [no response]
flash_unlock /dev/mtdblock0 -> Could not get MTD device info
from /dev/mtdblock0
flash_erase /dev/mtdblock0 -> Erase Total 1 Units (but there
is no change in flash content)
flash_eraseall /dev/mtdblock0 -> flash_eraseall:
/dev/mtdblock 0: unable to get MTD device info
mtd_debug read /dev/mtdblock0 0 1000 test.bin -> [seems to
be OK]
mtd_debug erase /dev/mtdblock0 0 1000 -> MEMERASE:
Inappropriate ioctl for device
mtd_debug write /dev/mtdblock0 0 1000 test.bin ->
file_to_flash: write, size 0x3e8, n 0x3e8 write(): Operation
not permitted
Is there a way to write the flash somehow?
Thanks,
/sza2
_______________________________________________________
Váltson egyszerűen, olcsóbb kötelezőre!
http://www.biztositas.hu/origo/gfb - a kötelező megoldás.
Next Message by Thread:
click to view message preview
Re: Internal flash (MTD block device) writing
pHilipp Zabel <philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> írta:
> On 11/28/06, sza2 <klt29-Y8qEzhMunLyT9ig0jae3mg@xxxxxxxxxxxxxxxx> wrote:
> > Hello All,
> >
> > I tried to write /dev/mtdblockX (as root), but it was
> > unsuccessful (the system is on CF, sdg's bootloader and
> > kernel stored in the internal flash).
> >
> > First I used dd if=somefile.bin of=/dev/mtdblock0. Result:
> > dd: /dev/mtdblock0: Operation not pemitted.
> >
> > Than I installed mtd-utils.
> >
> > flash_info /dev/mtdblock0 -> [no response]
> >
> > flash_unlock /dev/mtdblock0 -> Could not get MTD device info
> > from /dev/mtdblock0
> >
> > flash_erase /dev/mtdblock0 -> Erase Total 1 Units (but there
> > is no change in flash content)
> >
> > flash_eraseall /dev/mtdblock0 -> flash_eraseall:
> > /dev/mtdblock 0: unable to get MTD device info
> >
> > mtd_debug read /dev/mtdblock0 0 1000 test.bin -> [seems to
> > be OK]
> >
> > mtd_debug erase /dev/mtdblock0 0 1000 -> MEMERASE:
> > Inappropriate ioctl for device
> >
> > mtd_debug write /dev/mtdblock0 0 1000 test.bin ->
> > file_to_flash: write, size 0x3e8, n 0x3e8 write(): Operation
> > not permitted
> >
> > Is there a way to write the flash somehow?
>
> Why would you want to trash the bootloader?
Of course not:-)
> mtdblock0 is write-protected (never unlocked), look
However you mentioned bootloader is fit in 256k. But
mtdblock0 is 1MB. Is the remaining 768k is writable?
Anyway I just ask these silly questions as Linux works
better if I boot it natively than run from WM.
First I planed to rewrite mtdblock0 with the WM image part
to check what happen after Linux reboots.
> at drivers/mdt/maps/hx4700-flash.c
> maps/hx4700-flash.c
>
> regards
> Philipp
>
_______________________________________________________
Váltson egyszerűen, olcsóbb kötelezőre!
http://www.biztositas.hu/origo/gfb - a kötelező megoldás.