[Armadillo:09242] Re: Armadillo-460 プログラムでのnetflashによるファームウェアバージョンアップについて

Yamamoto email@hidden
2013年 10月 3日 (木) 13:01:41 JST


Yamamotoです。

教えていただいた内容を確認すべくnetflash.cを試験用に変更して書き込むと、起動の終了してAppの起動前にで停止してしまいました。
また、元に戻しても停止したままです。
enterは受け付けてますが、何も反応なし。
USBの抜き差しするとデバイス認識のメッセージは表示されています。

行ったのは、端末モード(email@hidden:~/xxx/atmark-dist$)で
netflash.cを試験用に編集。
make(enter) 実行で

以下、起動状態
---------------------------------------------------------------------------------
Uncompressing  kernel.........................................................................................................done.
Uncompressing ramdisk...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done.
Doing console=ttymxc3
Linux version 2.6.26-at15 (2.6.26) (email@hidden) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #11 PREEMPT Fri Aug 16 11:21:57 JST 2013
CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
Machine: Armadillo-460
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttymxc3
MXC IRQ initialized
PID hash table entries: 512 (order: 9, 2048 bytes)
MXC GPT timer initialized, rate = 133000000
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 105352KB available (3072K code, 234K data, 128K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 480 bytes
NET: Registered protocol family 16
MXC WDOG1 Enabled
CPU is i.MX25 Revision 1.2
Clock input source is 24000000
MXC GPIO hardware
GPIO-56 autorequested
Initializing CPLD: v2
Using SDMA I.API
MXC DMA API initialized
SCSI subsystem initialized
CSPI: mxc_spi-2 probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
MXC I2C driver
MXC I2C driver
MXC I2C driver
MC34704 regulator successfully probed
mc34704 0-0054: Loaded
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 21068K
usb: Host 2 host (serial) registered
usb: DR host (utmi) registered
msgmni has been set to 247
io scheduler noop registered
io scheduler cfq registered (default)
mx2fb: Unable to set clock to 0
Console: switching to colour frame buffer device 60x17
mxc_sdc_fb mxc_sdc_fb.0: fb0: DISP0 BG fb device registered successfully.
mxc_sdc_fb mxc_sdc_fb.0: fb1: DISP0 FG fb device registered successfully.
Serial: MXC Internal UART driver
mxcintuart.1: ttymxc1 at MMIO 0x43f94000 (irq = 32) is a Freescale MXC
mxcintuart.2: ttymxc2 at MMIO 0x5000c000 (irq = 18) is a Freescale MXC
mxcintuart.3: ttymxc3 at MMIO 0x50008000 (irq = 5) is a Freescale MXC
console [ttymxc3] enabled
mxcintuart.4: ttymxc4 at MMIO 0x5002c000 (irq = 40) is a Freescale MXC
brd: module loaded
loop: module loaded
Freescale FlexCAN Driver
FEC Ethernet Driver
PPP generic driver version 2.4.2
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
Driver 'sd' needs updating - please use bus_type methods
armadillo-nor: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
armadillo-nor: use default partitions(4)
Creating 4 MTD partitions on "armadillo-nor":
0x00000000-0x00020000 : "nor.bootloader"
0x00020000-0x00220000 : "nor.kernel"
0x00220000-0x01fe0000 : "nor.userland"
0x01fe0000-0x02000000 : "nor.config"
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 35, io mem 0x53ff4400
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 37, io mem 0x53ff4000
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
usbserial: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
input: gpio-keys as /devices/platform/gpio-keys.0/input/input0
i2c /dev entries driver
rtc-s35390a 3-0030: rtc core: registered rtc-s35390a as rtc0
i2c-gpio i2c-gpio.3: using pins 128 (SDA) and 129 (SCL, no clock stretching)
mxsdhci: MXC Secure Digital Host Controller Interface driver
mxsdhci: MXC SDHCI Controller Driver.
mmc0: SDHCI detect irq 159 irq 9 INTERNAL DMA
Registered led device: red
Registered led device: green
Registered led device: yellow
usb 2-1: new high speed USB device using fsl-ehci and address 2
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD04G 3858432KiB
 mmcblk0: p1
usb 2-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
i.MX ADC at 0x50030000 irq 46
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
can: controller area network core (rev 20071116 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20071116)
can: broadcast manager protocol (rev 20080415)
Static Power Management for Freescale i.MX25
input: imx_adc_ts as /devices/virtual/input/input1
i.MX ADC input touchscreen loaded.
rtc-s35390a 3-0030: setting system clock to 2000-01-03 22:28:10 UTC (946938490)
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 21068KiB [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 128K
init started:  BusyBox v1.00 (2012.09.19-05:03+0000) multi-call binary
Starting fsck for root filesystem.
fsck 1.25 (20-Sep-2001)
ext2fs_check_if_mount: No such file or directory while determining whether /dev/ram0 is mounted.
/dev/ram0: clean, 975/1176 files, 19052/21068 blocks
Checking root filesystem:                                       done
Remounting root rw:                                             done
Mounting proc:                                                  done
Mounting usbfs:                                                 done
Mounting sysfs:                                                 done
Cleaning up system:                                             done
Running local start scripts.
Starting udevd: scsi 0:0:0:0: Direct-Access     ELECOM   MF-NU            PMAP PQ: 0 ANSI: 0 CCS
                                                                done
Loading /etc/config:                                            done
sd 0:0:0:0: [sda] 7819264 512-byte hardware sectors (4003 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 7819264 512-byte hardware sectors (4003 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
Changing file permissions:                                      done
Configure /home/ftp:                                            done
Starting syslogd:                                               done
Starting klogd:                                                 done
Starting basic firewall:                                        done
Setting hostname:                                               done
Configuring network interfaces: fec: PHY @ 0x0, ID 0x0007c0f1 -- LAN8720
eth0: link down
                                                                done
Starting inetd:                                                 done
Setting at-cgi:                                                 done
Starting lighttpd:                                              done
Creating avahi.services: eth0: link up, 100Mbps, full-duplex
                                                                done
Starting avahi.daemon:                                          done
Mounting ramfs /home/ftp/pub:                                   done

---------------------------------------------------------------------------------

On Wed, 2 Oct 2013 21:35:18 +0900
竹之下航洋 <email@hidden> wrote:

> 竹之下です。
> 
> >> >> 1. netflashを実行する際に -C オプションをつけると、正常に書き込めたか
> >> >>     べりファイしてくれます。
> >> >
> >> > この方法の場合、もし正常に書き込めていなかった場合どうなるのでしょうか?
> >> > 元のイメージで動作するのでしょうか?
> >> いいえ。
> >> 書き込んだ後にベリファイするだけですので、ベリファイに失敗したら、
> >> 再度書き直す必要があります。
> >
> > 確認しているのですがnetflashでベリファイに失敗した場合、何かメッセージが帰ってくるのでしょうか?
> > 失敗時の確認方法が解りません。
> ソースを呼んだ限りでは、
> 
> "check failed, pos=xx"という表示を行い、exitステータスが 34 になるのではないかと思います。
> 
> 2013年10月2日 21:24 Yamamoto <email@hidden>:
> > Yamamotoです。
> >
> > On Wed, 21 Aug 2013 20:26:51 +0900
> > Koyo Takenoshita <email@hidden> wrote:
> >
> >> 竹之下です。
> >>
> >> >> 1. netflashを実行する際に -C オプションをつけると、正常に書き込めたか
> >> >>     べりファイしてくれます。
> >> >
> >> > この方法の場合、もし正常に書き込めていなかった場合どうなるのでしょうか?
> >> > 元のイメージで動作するのでしょうか?
> >> いいえ。
> >> 書き込んだ後にベリファイするだけですので、ベリファイに失敗したら、
> >> 再度書き直す必要があります。
> >
> > 確認しているのですがnetflashでベリファイに失敗した場合、何かメッセージが帰ってくるのでしょうか?
> > 失敗時の確認方法が解りません。
> >
> > 実際はプログラム上でsystem関数でnetflashを実行しています。
> >
> >>
> >> (2013/08/21 16:42), Yamamoto wrote:
> >> > Yamamotoです。
> >> >
> >> > 有難う御座います。
> >> >
> >> > On Tue, 20 Aug 2013 18:20:16 +0900
> >> > Koyo Takenoshita <email@hidden> wrote:
> >> >
> >> >> 竹之下です。
> >> >>
> >> >>> せめて、何かromfs.img.gzに異常がないか確認する方法がないでしょうか?
> >> >> ftpでアップしたファイルをnetflashで書き込む前に、md5sumで確認してみては
> >> >> いかがでしょうか?
> >> >>
> >> >> ftpでromfs.img.gzをアップする前に、
> >> >> [PC ~]$ md5sum romfs.img.gz > romfs.img.gz.md5
> >> >> としてromfs.img.gzのmd5sum値を計算しておきます。
> >> >> そして、romfs.img.gzとromfs.img.gz.md5の両方をftpでアップします。
> >> >>
> >> >> Armadillo側では、
> >> >> [armadillo ~]# md5sum -c romfs.img.gz.md5
> >> >> と実行すれば、romfs.img.gzが壊れていないか確認できます。
> >> >>
> >> >> また、フラッシュメモリに正常に書き込めたかどうかを確認する方法には
> >> >> 2種類あります。
> >> >>
> >> >> 1. netflashを実行する際に -C オプションをつけると、正常に書き込めたか
> >> >>     べりファイしてくれます。
> >> >
> >> > この方法の場合、もし正常に書き込めていなかった場合どうなるのでしょうか?
> >> > 元のイメージで動作するのでしょうか?
> >> >
> >> >>
> >> >> 2. md5sum値で確認したい場合は、下記のようなコマンドで確認できます。
> >> >> [armadillo ~]# dd if=/dev/flashblk/userland bs=(romfs.img.gzのサイズ) count=1 | md5sum
> >> >>
> >> >> (2013/08/15 23:53), Yamamoto wrote:
> >> >>> Yamamotoです。
> >> >>>
> >> >>> 度々、お世話になります。
> >> >>>
> >> >>> Armadillo-460上で、プログラムによる遠隔でのファームウェアバージョンアップを行おうとしていますが、時
> >> >>> 々バージョンアップ後に異常(Compuless・・・だったかな?)でリセットしても起動しなくてHermitoで書き直さ
> >> >>> なくてはならない時があります。
> >> >>>
> >> >>> 実運用時は、本当に遠隔で見えないため書き換え失敗は痛手です。
> >> >>>
> >> >>> 手順としては、遠隔接続先からftpでromfs.img.gzでSDに転送して、転送完了でソケット通信で実行中のアプリ
> >> >>> にバージョンアップ指示を送ります。
> >> >>> アプリでバージョンアップ指示を受け取ると、基本的には他の処理はしないように停止状態にしてsystem関数で
> >> >>> "netflash -bknusr /dev/flash/userland SD内ファイル名"でファームウェアバージョンアップを実施し。
> >> >>> バージョンアップ完了でWDを停止してリセットをかけています。
> >> >>>
> >> >>> 不良SDによるものか、時々ファームウェアバージョンアップ後起動しなくなります。
> >> >>>
> >> >>> せめて、何かromfs.img.gzに異常がないか確認する方法がないでしょうか?
> >> >>>
> >> >>> 可能なら、失敗時に元の状態に自動的に戻して起動できれば言うことないですが・・・
> >> >>>
> >> >>> よろしくお願いします。
> >> >>>
> >> >>> _______________________________________________
> >> >>> 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
> >> >>
> >> >
> >> >
> >>
> >> --
> >> 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
> >
> 
> _______________________________________________
> armadillo mailing list
> email@hidden
> http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo





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