Uploaded by testm9884

HTD e copy xcore with kernel2.6.9

advertisement
solari
udine
1|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
___________________________________
C16T01 procedure how to copy the xcore
with a kernel 2.6.9
Jumper is the one in photo.
Check the notes on the pcb board and choose BOOT for a booting
From a Xcore with a standard prg. loaded only.( how to do is an other procedure via serial line).
Connect the serial line maintenance mode and Ethernet:
At the boot the standard kernel shows as the following:
U-Boot 1.1.3 (Sep 2 2009 - 18:25:34)-xcore3.0
U-Boot code: A0FC0000 -> A0FDF220 BSS: -> A0FE3F50
solari
udine
2|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
RAM Configuration:
Bank #0: a0000000 64 MB
FLASH_28F128P30B
Flash: 32 MB
Using default environment
In: serial
Out: serial
Err: serial
## Baudrate 0 bps not supported
Target serial eeprom values: Serial_console_line=0x2f; Baud_rate=0x8.
Env settings: conserial=ttyS2; conbaud=115200.
boardtype=46212248
etherchip=smsc91111
.## Booting image at 00040000 ...
.. Image Name:
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 981369 Bytes = 958.4 kB
Load Address: a0008000
Entry Point: a0008000
Verifying Checksum ... OK
... Uncompressing Kernel Image ... OK
Starting kernel ...
Linux version 2.6.9-intc1-xc2.1.0 (root@maufra) (gcc version 3.4.3) #3 Thu Sep 10 11:38:29 CEST 2009
At the new boot kernel shows as the following:
U-Boot 1.1.3 (Sep 2 2009 - 18:25:34)-xcore3.0
U-Boot code: A0FC0000 -> A0FDF220 BSS: -> A0FE3F50
solari
udine
3|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
RAM Configuration:
Bank #0: a0000000 64 MB
FLASH_28F128P30B
Flash: 32 MB
Using default environment
In: serial
Out: serial
Err: serial
## Baudrate 0 bps not supported
Target serial eeprom values: Serial_console_line=0x2f; Baud_rate=0x8.
Env settings: conserial=ttyS2; conbaud=115200.
boardtype=46212248
etherchip=smsc91111
**** BOOT-SWITCH=ON ****
.## Booting image at 00040000 ...
.. Image Name:
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 989863 Bytes = 966.7 kB
Load Address: a0008000
Entry Point: a0008000
Verifying Checksum ... OK
... Uncompressing Kernel Image ... OK
Starting kernel ...
Linux version 2.6.9-intc1-xc2.1.0 (fmau@localhost.localdomain) (gcc version 3.4.3) #64 Wed Feb 24 13:48:11
CET 2016
CPU: XScale-PXA270 [69054118] revision 8 (ARMv5TE)
solari
udine
4|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
At the login : ( xcore vergin)
solari-xcore login: root
Password: rootme
root@solari-xcore:~#
root@solari-xcore:~# ifconfig
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@solari-xcore:~# ifconfig eth0 172.26.0.26
eth0: link down
root@solari-xcore:~# eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
root@solari-xcore:~#
connect with a scp program ( winscp) and download in the directory var the kernel
uImage_IpTabPark
directory :
C16T01_KUWAIT_bck\C16T01 KUWAIT\CXXYXX_Device_SW\IMAGES_XCORE\rootfs_jffs2.gz_20171124
May be will be change the dates in the latest directory in case any update will take place :
rootfs_jffs2.gz_YEAR_MONTH_DAY 2017-11-24
solari
udine
5|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
Once is copied in the target machine
Return on the videoteminal serial line and copy the kernel on the device:
root@solari-xcore:~# cd /var
root@solari-xcore:/var# ls -l
drwxr-xr-x 2 root
root
0 Jan 27 20:34 backups
drwxr-xr-x 2 root
root
0 Jan 27 20:34 cache
drwxr-xr-x 4 root
root
0 Jan 27 20:34 lib
solari
udine
6|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
drwxrwsr-x 2 root
root
drwxrwxrwt 3 root
0 Jan 27 20:34 local
root
0 Jan 27 20:34 lock
drwxr-xr-x 2 root
root
0 Jan 27 20:34 log
drwxr-xr-x 2 root
root
0 Jan 27 20:34 run
drwxr-xr-x 2 root
root
0 Jan 27 20:34 spool
drwxrwxrwt 2 root
-rw-r--r-- 1 root
root
0 Jan 27 20:34 tmp
root
989927 Nov 8 2017 uImage_IpTabPark
File should be present
root@solari-xcore:/var# cat
uImage_IpTabPark > /dev/mtdblock1
root@solari-xcore:/var#
remove the file of the kernel on the directory /var
root@solari-xcore:/var# rm
uImage_IpTabPark
check if is really removed
root@solari-xcore:/var# ls
-l
drwxr-xr-x 2 root
root
0 Jan 27 20:34 backups
drwxr-xr-x 2 root
root
0 Jan 27 20:34 cache
drwxr-xr-x 4 root
root
0 Jan 27 20:34 lib
drwxrwsr-x 2 root
root
drwxrwxrwt 3 root
drwxr-xr-x 2 root
-rw-r--r-- 1 root
0 Jan 27 20:34 local
root
root
root
0 Jan 27 20:34 lock
0 Jan 27 20:34 log
19393458 Jan 27 17:01 rootfs.jffs2.gz
drwxr-xr-x 2 root
root
0 Jan 27 20:34 run
drwxr-xr-x 2 root
root
0 Jan 27 20:34 spool
drwxrwxrwt 2 root
root
0 Jan 27 20:34 tmp
Now check the tasks present on the machine
root@solari-xcore:/var# ps
solari
udine
7|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
PID Uid
1 root
VmSize Stat Command
548 S init [5]
2 root
SWN [ksoftirqd/0]
3 root
SW< [events/0]
4 root
SW< [khelper]
14 root
SW< [kblockd/0]
25 root
SW [pdflush]
26 root
SW [pdflush]
28 root
SW< [aio/0]
27 root
SW [kswapd0]
104 root
SW [mtdblockd]
177 root
230 root
SWN [jffs2_gcd_mtd2]
SW [pccardd]
376 root
692 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
379 root
652 S /sbin/syslogd -n -C 64 -m 20
381 root
624 S /sbin/klogd -n
383 root
696 S /bin/sh /etc/xcconfig/xcconf access
402 root
948 S -sh
406 root
1224 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
407 root
700 S -sh
424 root
788 R ps
A primary task should be killed named jffs2_gcd_mtd2
Killing it using the pid associate
root@solari-xcore:/var# kill
-9 177
recheck I that this task is not present anymore
root@solari-xcore:/var# ps
PID Uid
VmSize Stat Command
solari
udine
8|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
1 root
548 S init [5]
2 root
SWN [ksoftirqd/0]
3 root
SW< [events/0]
4 root
SW< [khelper]
14 root
SW< [kblockd/0]
25 root
SW [pdflush]
26 root
SW [pdflush]
28 root
SW< [aio/0]
27 root
SW [kswapd0]
104 root
SW [mtdblockd]
230 root
SW [pccardd]
376 root
692 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
379 root
652 S /sbin/syslogd -n -C 64 -m 20
381 root
624 S /sbin/klogd -n
383 root
696 S /bin/sh /etc/xcconfig/xcconf access
402 root
948 S -sh
406 root
1224 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
407 root
700 S -sh
425 root
788 R ps
Download now the image file of the rootfilesystem (rootfs) on the cpu using the scp transfer program (winscp)
solari
udine
9|P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
Verify that the file is transferred and present on the machine
root@solari-xcore:/var# ls
backups lib
lock
run
cache local log
tmp
spool
root@solari-xcore:/var# ls -l
drwxr-xr-x 2 root
root
0 Jan 27 20:34 backups
drwxr-xr-x 2 root
root
0 Jan 27 20:34 cache
drwxr-xr-x 4 root
root
0 Jan 27 20:34 lib
drwxrwsr-x 2 root
root
drwxrwxrwt 3 root
drwxr-xr-x 2 root
-rw-r--r-- 1 root
0 Jan 27 20:34 local
root
root
root
0 Jan 27 20:34 lock
0 Jan 27 20:34 log
19393458 Jan 27 17:01 rootfs.jffs2.gz
drwxr-xr-x 2 root
root
0 Jan 27 20:34 run
drwxr-xr-x 2 root
root
0 Jan 27 20:34 spool
drwxrwxrwt 2 root
root
0 Jan 27 20:34 tmp
solari
udine
10 | P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
Now with the utility loadRFSz copy the mtdblock 2 (the operating system on the cpu)
root@solari-xcore:/var# loadRFSz
rootfs.jffs2.gz
loadRFSz.sh - Ver 0.0 Load a <full-partition-image> .gz file.
/usr/sbin/loadRFSz: kill: 19: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
copying rootfs.jffs2.gz to /dev/mtdblock2....wait(about 2 minutes)....
...done...make HW-RESET (DON'T sw reboot)
root@solari-xcore:/var#
at this point make a hardware reboot
additional commands to do not do in the normal procedure.
for save the image of the machine ( mtdblock2) following the procedure below:
root@cunit:/var#
root@cunit:/var# saveRFSz
saveRFSz.sh - Ver 0.0 Save the /dev/mtdblock2 into /var/rootfs.jffs2.gz file.
copying /dev/mtdblock2 to /var/rootfs.jffs2.gz....wait....
....done
root@cunit:/var#
a file named rootfs.jffs2.gz will be present on the directory var.
copy with a winscp to a laptop.
For check how many memory is free inside the machine:
root@cunit:/var#
root@cunit:/var#
meminfo
MemTotal:
MemFree:
cat /pr
cat /proc/
62848 kB
26816 kB
solari
udine
11 | P a g e 1 1
of
File HTD_e copy xcore with kernel2.6.9.docx
Procedures
Buffers:
0 kB
Cached:
25728 kB
SwapCached:
0 kB
Active:
8324 kB
Inactive:
22016 kB
HighTotal:
0 kB
HighFree:
0 kB
LowTotal:
62848 kB
LowFree:
26816 kB
SwapTotal:
0 kB
SwapFree:
0 kB
Dirty:
0 kB
Writeback:
0 kB
Mapped:
7212 kB
Slab:
3560 kB
Committed_AS:
14268 kB
PageTables:
368 kB
VmallocTotal:
581632 kB
VmallocUsed:
132064 kB
VmallocChunk: 4104192 kB
Download