天天看點

Embedded Linux S3C2440 Environment StartupSummaryPowering Up The BoardLogging In and ExploringReference

  • Summary
  • Powering Up The Board
  • Logging In and Exploring
  • Reference

Summary

Summarize the Embedded Linux S3C2440 board startup, for the environment setup, can refer to another blog entry.

Powering Up The Board

Embedded Linux S3C2440 Environment StartupSummaryPowering Up The BoardLogging In and ExploringReference

Use the Xshell to login the Fedora, connect the serial port, and use

minicom

command to start the minicom,

Result is as,

Welcome to minicom 

OPTIONS: I18n 
Compiled on Jan 14 2012, 12:40:43.
Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys
           

If it is using USB convert to serial port, it is showing

/dev/ttyUSB0

Put the power switch to “on” position to apply power, below menu of bootloader will display,

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi 
[k] Download linux kernel 
[y] Download root_yaffs image 
[a] Absolute User Application
[n] Download Nboot for WinCE 
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin 
[d] Download & Run 
[z] Download zImage into RAM 
[g] Boot linux from RAM 
[f] Format the nand flash 
[b] Boot the system 
[s] Set the boot parameters 
[u] Backup NAND Flash to HOST through USB(upload) 
[r] Restore NAND Flash from HOST through USB 
[q] Goto shell of vivi 
[i] Version: -K
Enter your selection: 
           

Key in ‘b’ to boot the S3C2440 board with pre-installed Linux Kernel, the Linux boot process is as below,

Enter your selection: b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00600000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd init=/init console=ttySAC0,115200"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.8.7-FriendlyARM ([email protected]) (gcc version 4.7.2 (Buildroot 2013.02) ) #10 Wed Jun 1 00:42:59 SGT 2016
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id )
S3C24XX Clocks, Copyright  Simtec Electronics
S3C244X: core  MHz, memory  MHz, peripheral  MHz
CLOCK: Slow mode ( MHz), fast, MPLL on, UPLL on
Built  zonelists in Zone order, mobility grouping on.  Total pages: 
Kernel command line: noinitrd init=/init console=ttySAC0,
PID hash table entries:  (order: -,  bytes)
Dentry cache hash table entries:  (order: ,  bytes)
Inode-cache hash table entries:  (order: ,  bytes)
__ex_table already sorted, skipping sort
Memory: MB = MB total
Memory: k/k available, k reserved, K highmem
Virtual kernel memory layout:
    vector  :  -    (    kB)
    fixmap  :  -    (  kB)
    vmalloc :  -    (  MB)
    lowmem  :  -    (   MB)
    modules :  -    (   MB)
      .text :  -    ( kB)
      .init :  -    ( kB)
      .data :  -    (  kB)
       .bss :  -    (  kB)
SLUB: Genslabs=, HWalign=, Order=-, MinObjects=, CPUs=, Nodes=
NR_IRQS:
irq: clearing subpending status 
irq: clearing subpending status 
sched_clock:  bits at  Hz, resolution ns, wraps every ms
Console: colour dummy device x30
Calibrating delay loop...  BogoMIPS (lpj=)
pid_max: default:  minimum: 
Mount-cache hash table entries: 
CPU: Testing write buffer coherency: ok
Setting up static identity map for  - 
NET: Registered protocol family 
DMA: preallocated  KiB pool for atomic coherent allocations
MINI2440: Option string mini2440=tb
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [:x320] :x480 :x768 :x240
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C244X: Clock Support, DVS off
bio: create slab <bio-> at 
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2
NET: Registered protocol family 
TCP established hash table entries:  (order: ,  bytes)
TCP bind hash table entries:  (order: -,  bytes)
TCP: Hash tables configured (established  bind )
TCP: reno registered
UDP hash table entries:  (order: ,  bytes)
UDP-Lite hash table entries:  (order: ,  bytes)
NET: Registered protocol family 
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4 backchannel transport module.
NetWinder Floating Point Emulator V0 (double precision)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version . (NAND) © - Red Hat, Inc.
msgmni has been set to 
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version  loaded (major )
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device x20
s3c2410-lcd s3c2410-lcd: fb0: s3c2410fb frame buffer device
s3c2440-uart: ttySAC0 at MMIO  (irq = ) is a S3C2440
console [ttySAC0] enabled
s3c2440-uart: ttySAC1 at MMIO  (irq = ) is a S3C2440
s3c2440-uart: ttySAC2 at MMIO  (irq = ) is a S3C2440
brd: module loaded
loop: module loaded
Loading iSCSI transport class v2-
s3c24xx-nand s3c2440-nand: Tacls=, ns Twrph0= ns, Twrph1= ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: , Chip ID:  (Samsung NAND MiB ,V -bit), MiB, page size: , OOB size: 
Creating  MTD partitions on "nand":
- : "u-boot"
- : "u-boot-env"
- : "kernel"
- : "root"
dm9000 Ethernet Driver, V1
dm9000_probe Set bwscon and bankcon4
dm9000 dm9000: read wrong id 
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
Now use the default MAC address: :::::
eth0: dm9000e at c48bc300,c48be304 IRQ  MAC: ::::: (chip)
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
ohci_hcd: USB  'Open' Host Controller (OHCI) Driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/ mouse device common for all mice
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
oprofile: no performance counters
oprofile: using timer interrupt.
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 
Key type dns_resolver registered
console [netcon0] enabled
netconsole: network logging started
s3c-rtc s3c2410-rtc: setting system clock to -- :: UTC ()
Freeing init memory: K
starting pid , tty '': '/etc/init.d/rcS'
* Mounting /proc...
* Mounting /dev...
* Mounting /sys...
* Mounting /dev/pts...
* Mounting /dev/shm...
* Starting system loggers...
* Creating devices...
* Configuring loopback interface...
* Setting hostname...
eth0 up
dm9000 dm9000 eth0: link down
starting pid , tty '': '/usr/sbin/telnetd -l /bin/login'
starting pid , tty '': '-/bin/login'
           

Logging In and Exploring

Login with user ‘root’ without password,

mini2440 login: root
-sh: can't access tty; job control turned off
[[email protected] /root]# 
           

Test some command, list the supported command,

[root@mini2440 /root]# ls /bin
ash            dnsdomainname  ln             mv             setserial
busybox        echo           login          netstat        sh
cat            egrep          ls             nice           sleep
chgrp          false          makemime       pidof          stty
chmod          fgrep          mkdir          ping           su
chown          fsync          mknod          ps             touch
conspy         grep           more           pwd            umount
cp             hostname       mount          reformime      uname
date           iostat         mountpoint     rm             vi
df             kill           mpstat         rmdir
[root@mini2440 /root]# 
           

Explore the /proc directory, it is the virtual directory that provides a window into the kernel,

/proc/cpuinfo returns detail about CPU.

[root@mini2440 /root]# cat /proc/cpuinfo 
processor       : 
model name      : ARM920T rev  (v4l)
BogoMIPS        : 
Features        : swp half 
CPU implementer : 
CPU architecture: T
CPU variant     : 
CPU part        : 
CPU revision    : 

Hardware        : MINI2440
Revision        : 
Serial          : 
[root@mini2440 /root]# 
           

/proc/interrupts returns interrupt statistics,

[root@mini2440 /root]# cat /proc/interrupts 
           CPU       
 :                 s3c  s3c241-rtc tick
 :            s3c  S3C241 Timer Tick
 :                 s3c  s3c241-lcd
 :                 s3c  s3c241-rtc alarm
 :             s3c-ext  eth
 :           s3c-uart  s3c244-uart
 :          s3c-uart  s3c244-uart
Err:          
[root@mini2440 /root]# 
           
[root@mini2440 /root]# cat /proc/version 
Linux version .-FriendlyARM ([email protected]) (gcc version . (Buildroot ) ) #10 Wed Jun 1 00:42:59 SGT 2016
[root@mini2440 /root]# 
           

Reference

1,Embedded Linux S3C2440 environment setup

繼續閱讀