[Armadillo:07880] Re: Armadillo-440 netflashでのbootloader書き込み

Takenoshita Koyo email@hidden
2012年 2月 1日 (水) 11:25:51 JST


竹之下です。

> しかしながら、引用メールに記載した手順1の内、default MTDPARTSを以下のように変更しましたが、
> bootloaderイメージによる読み取り専用属性を外すことはできませんでした。
申し訳ありません。
この方法だと、読み取り属性を外すことはできませんでした。
(パーティション構成の変更に使うことを想定しています。)

> なお、「bootloaderイメージによる読み取り専用属性を外す」もしくは、「setenvにて読み取り専用属性を外す」手法以外に
> 以下を変更したLinuxカーネルイメージによって、bootloader領域の読み取り専用属性を外すことが可能と考えています。
> 手法として、問題ないでしょうか?
> 
> linux-2.6.26-at15/arch/arm/mach-mx25/armadillo400.c
>   static struct mtd_partition armadillo400_mtd_nor_partitions_32MB[] = {
>           MTD_PART("nor.bootloader",   4* 32*1024, 0,
> -                  MTD_WRITEABLE /* force read-only */ ),
> +                 0),
>           MTD_PART("nor.kernel",      16*128*1024, MTDPART_OFS_APPEND, 0),
>           MTD_PART("nor.userland",   238*128*1024, MTDPART_OFS_APPEND, 0),
>           MTD_PART("nor.config",       1*128*1024, MTDPART_OFS_APPEND, 0),
> };
はい。問題ありません。

> また、上記Linuxカーネルを変更する場合、加えて「bootloaderイメージによる読み取り専用属性を外す」も必要でしょうか?
いいえ。必要ありません。

(2012年01月30日 21:43), HSC T.Tomita wrote:
> 冨田と申します。
> いつもお世話になっております。
> 
> ご返答ありがとうございます。
> 
> setenvにて以下の設定を行ったところ、bootloaderの書き込みができました。
> 『setenv console=ttymxc1 mtdparts=armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)』
> 
> しかしながら、引用メールに記載した手順1の内、default MTDPARTSを以下のように変更しましたが、
> bootloaderイメージによる読み取り専用属性を外すことはできませんでした。
> (『netflash: open(/dev/flash/bootloader) failed: Permission denied』と出力されます)
> 
>>>            (armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)) default MTDPARTS を設定。
>>>>            (mtdparts=armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)) default MTDPARTS を設定。
> 
> ※以下の返答はmake menuconfig も同様に「mtdparts=」が必要と解釈しました。
>    誤った認識であれば、ご指摘のほどお願いいたします。
>> make menuconfigの場合も同様だと思います。
> 
> 
> 
> なお、「bootloaderイメージによる読み取り専用属性を外す」もしくは、「setenvにて読み取り専用属性を外す」手法以外に
> 以下を変更したLinuxカーネルイメージによって、bootloader領域の読み取り専用属性を外すことが可能と考えています。
> 手法として、問題ないでしょうか?
> 
> linux-2.6.26-at15/arch/arm/mach-mx25/armadillo400.c
>   static struct mtd_partition armadillo400_mtd_nor_partitions_32MB[] = {
>           MTD_PART("nor.bootloader",   4* 32*1024, 0,
> -                  MTD_WRITEABLE /* force read-only */ ),
> +                 0),
>           MTD_PART("nor.kernel",      16*128*1024, MTDPART_OFS_APPEND, 0),
>           MTD_PART("nor.userland",   238*128*1024, MTDPART_OFS_APPEND, 0),
>           MTD_PART("nor.config",       1*128*1024, MTDPART_OFS_APPEND, 0),
> };
> 
> また、上記Linuxカーネルを変更する場合、加えて「bootloaderイメージによる読み取り専用属性を外す」も必要でしょうか?
> 
> 以上、よろしくお願いいたします。
> 
> On Fri, 27 Jan 2012 19:07:28 +0900
> Takenoshita Koyo<email@hidden>  wrote:
> 
>> 竹之下です。
>>
>>> B.その他に実現できる手法をご存知でしたら、ご教示願います。
>>>       なお、以下の方法は試しましたが、同様に書き込みできませんでした。
>>>       ・hermitにて設定。
>>>         hermit>   setenv console=ttymxc1 armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)
>>
>> setenv console=ttymxc1 mtdparts=armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)
>> ですね。
>> 「mtdparts=」が必要です。
>>
>> 設定変更が正しく反映されている場合、カーネルの起動ログに下記のように表示されるはずです。
>>
>> armadillo-nor: use cmdline partitions(4)
>> Creating 4 MTD partitions on "armadillo-nor":
>> 0x00000000-0x00020000 : "bootloader"
>> 0x00020000-0x00220000 : "kernel"
>> 0x00220000-0x01fe0000 : "userland"
>> 0x01fe0000-0x02000000 : "config"
>>
>> 「use cmdline partitions(4)」というのが、setenvで指定した値が反映されている、
>> という意味になります。
>>
>> make menuconfigの場合も同様だと思います。
>> ご確認下さい。
>>
>> (2012年01月27日 11:04), HSC T.Tomita wrote:
>>> 冨田と申します。
>>> いつもお世話になっております。
>>>
>>> Armadillo-440にてnetflashを使用して、bootloaderの書き込みをしたいと考えています。
>>>
>>> Armadillo-400シリーズ ソフトウェアマニュアル(v1.7.0)には以下の記載がありますが、
>>> bootloader領域の読み取り専用属性を外すことで書き込みできるものと考えています。
>>>     「bootloader リージョンは標準状態ではリードオンリー属性となっている
>>>       ため、netflash で書き換えることはできません。」
>>>
>>> そこで、以下の情報を元に読み取り専用属性を外し、netflashを実行したところ、
>>> エラーメッセージが表示され、書き込みできませんでした。
>>>
>>>     http://lists.atmark-techno.com/pipermail/armadillo/2011-May/007197.html
>>>     http://lists.atmark-techno.com/pipermail/armadillo/2008-October/003537.html
>>>     http://lists.atmark-techno.com/pipermail/armadillo/2005-December/000769.html
>>>
>>> 手順等は以下の通りに実施しました。
>>>     1.bootloader領域の読み取り専用属性を外した、bootloaderイメージの作成。
>>>         [PC ~]$ tar zxvf hermit-at-[version]-source.tar.gz
>>>         [PC ~]$ ln -s hermit-at-[version] hermit-at
>>>         [PC ~]$ cd hermit-at
>>>         [PC ~/hermit-at]$ make armadillo4x0_defconfig
>>>         [PC ~/hermit-at]$ make menuconfig
>>>            Target Configurations  --->   Core settings  --->   "mtdparts" assign method (fixed)  --->   (X)fixed に変更。
>>>            (armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)) default MTDPARTS を設定。
>>>         [PC ~/hermit-at]$ make
>>>
>>>     2.bootloaderイメージをtftpdl もしくは、hermit-at-winにて書き込み。
>>>         tftpdl [Client-IPaddr] [Server-IPaddr] --bootloader=loader-armadillo4x0-[version].bin
>>>         もしくは、
>>>         hermit-at-win を使用して、bootloader regionにForceLockedをONにして書き込み。
>>>
>>>     3.Armadillo再起動
>>>
>>>     4.起動後にnetflash実行。
>>>         netflash -k -n -u -s -r /dev/flash/bootloader http://[Server-IPaddr]/loader-armadillo4x0-[version].bin
>>>
>>>         ⇒ ★以下のメッセージが出力される。
>>>            ★netflash: open(/dev/flash/bootloader) failed: Permission denied
>>>
>>> A.手順に誤り等ありましたら、ご指摘、ご教示願います。
>>>
>>> B.その他に実現できる手法をご存知でしたら、ご教示願います。
>>>       なお、以下の方法は試しましたが、同様に書き込みできませんでした。
>>>       ・hermitにて設定。
>>>         hermit>   setenv console=ttymxc1 armadillo-nor:0x20000(bootloader),0x200000(kernel),0x1DC0000(userland),0x20000(config)
>>>
>>> C.読み取り専用属性を外しても、netflashによる書き込みができないなど、
>>>       制限がありましたら、ご教示願います。
>>>
>>> [使用環境]
>>>     ・ユーザーランド:atmark-dist-20111220
>>>     ・Linuxカーネル:linux-2.6.26-at15
>>>     ・ブートローダー:hermit-at-2.1.3-1
>>>
>>> 以上、よろしくお願いいたします。
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> armadillo mailing list
>>> email@hidden
>>> http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo
>>>
>>
>>
>> -- 
>> Koyo Takenoshita
>>
>> _______________________________________________
>> armadillo mailing list
>> email@hidden
>> http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo
>>
> 
> 
> 
> _______________________________________________
> armadillo mailing list
> email@hidden
> http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo
> 


-- 
Koyo Takenoshita




armadillo メーリングリストの案内