SMART Embedded Computing COMX-P2020 BSP User Manual

Hide thumbs Also See for COMX-P2020 BSP:
Table of Contents

Advertisement

Quick Links

COMX-P2020 BSP
User Guide
P/N: 6806800L84C
December 2019

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COMX-P2020 BSP and is the answer not in the manual?

Questions and answers

Summary of Contents for SMART Embedded Computing COMX-P2020 BSP

  • Page 1 COMX-P2020 BSP User Guide P/N: 6806800L84C December 2019...
  • Page 2 Computing” and the SMART Embedded Computing logo are trademarks of SMART Modular Technologies, Inc. All other names and logos referred to are trade names, trademarks, or registered trademarks of their respective owners. These materials are provided by SMART Embedded Computing as a service to its customers and may be used for informational purposes only. Disclaimer* SMART Embedded Computing (SMART EC) assumes no responsibility for errors or omissions in these materials.
  • Page 3: Table Of Contents

    4.3.6 Build release package for COMX-P2020 ....... . . 37 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 4 Starting Linux from SD Card ..........83 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 5 MiniGUI Example ............98 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 6 Table of Contents COMX-P2020 BSP User Guide (6806800L84C)
  • Page 7 Output for MiniGUI Example ......... 98 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 8 List of Figures COMX-P2020 BSP User Guide (6806800L84C)
  • Page 9 Partitions on the SD card ..........83 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 10 List of Tables COMX-P2020 BSP User Guide (6806800L84C)
  • Page 11: About This Manual

    Repeated item for example node 1, node 2, ..., node 12 Omission of information from example/command that is not necessary at the time Ranges, for example: 0..4 means one of the integers 0,1,2,3, and 4 (used in registers) Logical OR COMX-P2020 BSP User Guide (6806800L84C)
  • Page 12 Indicates an electrical situation that could result in moderate injury or death Indicates that when working in an ESD environment care should be taken to use proper ESD practices No danger encountered, pay attention to important information COMX-P2020 BSP User Guide (6806800L84C)
  • Page 13 This manual has been revised and replaces all prior editions. Part Number Publication Date Description 6806800L84A December 2010 GA version 6806800L84B July 2014 Re-branded to Artesyn 6806800L84C December 2019 Rebrand to SMART Embedded Computing template COMX-P2020 BSP User Guide (6806800L84C)
  • Page 14 About this Manual About this Manual COMX-P2020 BSP User Guide (6806800L84C)
  • Page 15: Overview

    Although it can also be used to upgrade SPI Flash as u-boot-spi.bin, Not using it is suggested because it will cost much more time than u-boot-spi.bin.  COMX-P2020.src.tar.gz: The tar ball of the BSP source code, which can be used to compile all of the above BSP targets. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 16 Overview Overview COMX-P2020 BSP User Guide (6806800L84C)
  • Page 17: Host Setup

    = 11 = 100 2 flags = IPv4 [percy@localhost /]$ sudo service xinetd restart Stopping xinetd: [ Starting xinetd: [ 6. Create the directory for NFS service, assuming that /local/tftpboot/COMX- P2020/V100R00. mkdir -p /local/tftpboot/COMX-P2020/V100R00 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 18 Shutting down NFS quotas: [FAILED] Shutting down NFS services: [FAILED] Starting NFS services: [ OK Starting NFS quotas: [ OK ] Starting NFS daemon: [ OK ] Starting NFS mountd: [ OK ] [percy@localhost /]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 19: Get And Install The Toolkit And Bsp

    1. Please contact SMART EC for the tar ball of BSP source file: COMX-2020.src.tar.gz and copy it to the home directory of the user. 2. As a non-root user, uncompress the file COMX-P2020.src.tar.gz. [percy@localhost ~]$ tar zxvf COMX-P2020.src.tar.gz COMX-P2020 BSP User Guide (6806800L84C)
  • Page 20: Figure 3-1Bsp Source Code Directory Tree

    Linux Kernel.  ~/u-boot is the U-boot directory, which can be used to compile the U-boot for COMX-P2020. 4. Run "make" at the COMX-P2020 BSP directory to see the help information. [percy@localhost p2020]$ make ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Emerson BlackAdder - P2020 Build...
  • Page 21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ current output dir = /home/percy/p2020/. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 22 OUTPUTDIR For example: export OUTPUTDIR=/local/tftpboot/COMX- P2020/current 5. Set the output directory for the compiled BSP targets. If no output directory is set, then the working directory will be regarded as output directory. export OUTPUTDIR=/local/tftpboot/COMX-P2020/current COMX-P2020 BSP User Guide (6806800L84C)
  • Page 23: Bsp Build Environment

    (MPC5xx, MPC8xx, MPC82xx, MPC7xx, MPC74xx, 4xx, QorIQ) while P2020 is a base-on- supported-QorIQ processor, it is possible, as well as useful, to provide the U-boot firmware as the COMX-P2020 bootloader. COMX-P2020 only supports starting-up U-boot from SPI Flash and SD Card. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 24: Memory Map

    [ "" != "SPI" ] ; then \ make config-clean; \ make -C current -f Makefile blackadder_SPIFLASH_config; \ echo "SPI" > uboot.conf ; …… powerpc-none-linux-gnuspe-objcopy -O srec u-boot u-boot.srec powerpc-none-linux-gnuspe-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin make[2]: Leaving directory `/home/percy/p2020/u-boot/u-boot- 2009.11' COMX-P2020 BSP User Guide (6806800L84C)
  • Page 25: Compile U-Boot For Sd Card

    "SD" > uboot.conf ; \ make[2]: Entering directory `/home/percy/p2020/ … powerpc-none-linux-gnuspe-objcopy -O srec u-boot u-boot.srec powerpc-none-linux-gnuspe-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin make[2]: Leaving directory `/home/percy/p2020/u-boot/u-boot- 2009.11' cp ./current/u-boot.bin /local/tftpboot/COMX-P2020/current/u- boot-sd.bin make[1]: Leaving directory `/home/percy/p2020/u-boot' [percy@localhost p2020]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 26: Build Linux Kernel And Device Tree

    -f Makefile mrproper make[3]: Entering directory `/home/percy/p2020/linux/kernel/linux- 2.6.32' make[3]: Leaving directory `/home/percy/p2020/linux/kernel/linux- 2.6.32' rm -f /local/tftpboot/COMX-P2020/current/comx.dtb make -f Makefile 85xx/blackadder_defconfig make[3]: Entering directory `/home/percy/p2020/linux/kernel/linux- 2.6.32' HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc HOSTCC scripts/basic/hash HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o SHIPPED scripts/kconfig/zconf.tab.c COMX-P2020 BSP User Guide (6806800L84C)
  • Page 27: Configure The Linux Kernel

    Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: x [*] built-in [ ] excluded <M> module < > module capable COMX-P2020 BSP User Guide (6806800L84C)
  • Page 28 Security options ---> -*- Cryptographic API ---> [ ] Virtualization ---> Load an Alternate Configuration File Save an Alternate Configuration File mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq qqqj x tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq qqqqqqqu <Select> < Exit > < Help > mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq qqqqqqqj COMX-P2020 BSP User Guide (6806800L84C)
  • Page 29: Compile The Linux Kernel

    Created: Mon Dec 13 11:33:16 2010 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3416064 Bytes = 3336.00 kB = 3.26 MB Load Address: 0x00000000 Entry Point: 0x00000000 make[3]: Leaving directory `/home/percy/p2020/linux/kernel/linux- 2.6.32' COMX-P2020 BSP User Guide (6806800L84C)
  • Page 30: Compile Device Tree Bolb

    Entering directory `/home/percy/p2020/linux/kernel/linux- 2.6.32' rm -f /local/tftpboot/COMX-P2020/current/comx.dtb dtc -f -b 0 -I dts -O dtb -p 1024 -o /local/tftpboot/COMX- P2020/current/comx.dtb arch/powerpc/boot/dts/blackadder.dts DTC: dts->dtb on file "arch/powerpc/boot/dts/blackadder.dts" make[2]: Leaving directory `/home/percy/p2020/linux/kernel/linux- 2.6.32' make[1]: Leaving directory `/home/percy/p2020/linux/kernel' [percy@localhost p2020]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 31: Build Root File System

    Build rootfs-min-ext2.img 1. To build rootfs-min-ext2.img, run the command: "make rootfs-min-ext2" at P2020 BSP directory: [percy@localhost p2020]$ make rootfs-min-ext2 make -C linux/fs -f Makefile rootfs-min-ext2 make[1]: Entering directory `/home/percy/p2020/linux/fs' rm -f /tmp/percy/rootfs_ext2_min.img /local/tftpboot/COMX- P2020/current/rootfs-min.ext2.img ./scripts/gen_rootfs_ext2.sh min COMX-P2020 BSP User Guide (6806800L84C)
  • Page 32 Leaving directory `/home/percy/p2020/linux/fs' [percy@localhost p2020]$ 2. If successful, the rootfs-min-ext2.img can be found at the output directory: [percy@localhost p2020]$ ls -al /local/tftpboot/COMX- P2020/current/rootfs-min.ext2.img -rw-r--r-- 1 percy percy 3873983 Dec 13 11:39 /local/tftpboot/COMX- P2020/current/rootfs-min.ext2.img [percy@localhost p2020]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 33: Build Rootfs-Usr-Ext2.Img

    PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 42143653 Bytes = 41155.91 kB = 40.19 MB Load Address: 0x00000000 Entry Point: 0x00000000 + echo done. done. /tmp/percy/rootfs_ext2_usr.img /local/tftpboot/COMX- P2020/current/rootfs-usr.ext2.img make[1]: Leaving directory `/home/percy/p2020/linux/fs' [percy@localhost p2020]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 34: Build Rootfs-Dev-Ext2.Img

    -T ramdisk -C gzip -d rootfs_ext2_dev.gz rootfs_ext2_dev.img Image Name: Blackadder ext2 ramdisk rootfs Created: Mon Dec 13 11:45:47 2010 Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 110295687 Bytes = 107710.63 kB = 105.19 MB COMX-P2020 BSP User Guide (6806800L84C)
  • Page 35: Build Rootfs-Lrfs.tar.gz

    + USAGE='Usage: ./scripts/gen_rootfs_LRFS.sh <min/usr/dev>' + '[' 1 -ne 1 ']' …… + echo done. done. /tmp/percy/rootfs_ext2_dev_LRFS.tar.gz /local/tftpboot/COMX- P2020/current/rootfs-LRFS.tar.gz make[1]: Leaving directory `/home/percy/p2020/linux/fs' [percy@localhost p2020]$ 2. If successful, the rootfs-LRFS.tar.gz can be found at the output directory: COMX-P2020 BSP User Guide (6806800L84C)
  • Page 36: Build Rootfs-Nfs.tar.gz

    + echo -n 'Generating rootfs_dev.tar.gz in /tmp/percy ... ' Generating rootfs_dev.tar.gz in /tmp/percy ... + sudo mv rootfs_dev rootfs_nfs + sudo tar zcvf rootfs_nfs.tar.gz rootfs_nfs + echo done. done. /tmp/percy/rootfs_nfs.tar.gz /local/tftpboot/COMX- P2020/current/rootfs-nfs.tar.gz make[1]: Leaving directory `/home/percy/p2020/linux/fs' COMX-P2020 BSP User Guide (6806800L84C)
  • Page 37: Build Release Package For Comx-P2020

    525312 bytes (525 kB) copied, 0.0113922 seconds, 46.1 MB/s /local/tftpboot/COMX-P2020/current/u-boot.bin create OK. ./make_bsp_package.sh /local/tftpboot/COMX-P2020/current cp: cannot create regular file `/local/tftpboot/COMX- P2020/current/./make_sd.sh': Permission denied make_sd.sh u-boot-spi.bin u-boot-sd.bin comx.dtb uImage rootfs-LRFS.tar.gz rootfs-nfs.tar.gz rootfs-dev.ext2.img make: *** [release] Interrupt [percy@localhost p2020]$ make release COMX-P2020 BSP User Guide (6806800L84C)
  • Page 38 2. If successful, the COMX-P2020.bsp.tar.gz and u-boot.bin can be found at the output directory: [percy@localhost p2020]$ ls -al /local/tftpboot/COMX- P2020/current/* -rw-rw-r-- 1 percy percy 462424461 Dec 13 12:12 /local/tftpboot/COMX-P2020/current/COMX-P2020.bsp.tar.gz -rw-rw-r-- 1 percy percy 4194304 Dec 13 12:12 /local/tftpboot/COMX-P2020/current/u-boot.bin [percy@localhost p2020]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 39: U-Boot Deployment

    5. Power on the board and check the console prompt. 6. Extract the BSP targets from the compressed BSP tar ball as below: [percy@localhost current]$ pwd/local/tftpboot/COMX-P2020/current [percy@localhost current]$ tar zxvf COMX-P2020.bsp.tar.gz make_sd.sh u-boot-spi.bin u-boot-sd.bin comx.dtb uImage rootfs-LRFS.tar.gz rootfs-nfs.tar.gz rootfs-dev.ext2.img rootfs-usr.ext2.img rootfs-min.ext2.img [percy@localhost current]$ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 40: Start-Up U-Boot

    COMX-P2020. If the SD card is damaged, we can program it at the Linux host with a USB reader as below:  Create the /local/tftpboot/COMX-P2020/current directory at host, and copy the release file: COMX-P2020.bsp.tar.gz to the directory: /local/tftpboot/COMX- P2020/current COMX-P2020 BSP User Guide (6806800L84C)
  • Page 41 2 18:43 /dev/sdb [percy@localhost current]$ sudo fdisk -l /dev/sdb Disk /dev/sdb: 2002 MB, 2002780160 bytes 62 heads, 62 sectors/track, 1017 cylinders Units = cylinders of 3844 * 512 = 1968128 bytes Device Boot Start Blocks Id System COMX-P2020 BSP User Guide (6806800L84C)
  • Page 42: Start-Up U-Boot From Sd Card

    To understand the structure of SD card, please refer the chapter: LINK deploy filesystem to SD Card. 5.3.2 Start-up U-boot from SD Card Set the switch as: SW1[1] = OFF, SW1[2] = OFF, SW2[1] = OFF, SW2[2] = ON, and power on the board. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 43: Program Spi Flash With Sf100

    1. Install the driver and application of the SF100 at the Windows OS. 2. Connect the SF100 to the USB port and insert the SPI Flash into the socket of SF100. The COMX-P2020 support the SPI Flash: S25FL032A(P) COMX-P2020 BSP User Guide (6806800L84C)
  • Page 44 3. Run DediPro.exe: If the driver and application for SF100 installs successfully, the Dediprog can find the SPI Flash: S25FL032A(P) as above. 4. Load file by clicking the File and select the u-boot-spi.bin.Select "Raw Binary". COMX-P2020 BSP User Guide (6806800L84C)
  • Page 45: Set The Switch

    E500, Version: 5.0, (0x80211050) Clock Configuration: CPU0:1200 MHz, CPU1:1200 MHz, CCB:600 MHz, DDR:333.333 MHz (666.667 MT/s data rate) (Asynchronous), LBC:37.500 D-cache 32 kB enabled I-cache 32 kB enabled I2C: ready SPI: ready DRAM: 2 GB COMX-P2020 BSP User Guide (6806800L84C)
  • Page 46: U-Boot Command

    - print or set address offset bdinfo - print Board Info structure boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootelf - Boot from an ELF image in memory COMX-P2020 BSP User Guide (6806800L84C)
  • Page 47 - load S-Record file over serial line loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range - display and program the system ID and MAC addresses in EEPROM - memory display COMX-P2020 BSP User Guide (6806800L84C)
  • Page 48 TFTP protocol - USB sub-system usbboot - boot from USB device version - print monitor version - setting watchdog => Most of the displayed commands were inherited from U-boot. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 49: Uart

    Connected to the COM-E Carrier Board Multiplex as SDHC_CD: which is used to GPIO 8 check if the SD insert or not. Multiplex as SDHC_WP: which is used to GPIO 9 check the SD is write protect or not. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 50 GPIO2 = Input(00) GPIO3 = Input(00) GPIO4 = Output(10) GPIO5 = Output(10) GPIO6 = Output(10) GPIO7 = Output(10) GPIO8 = Input(00) GPIO9 = Input(00) GPIO10 = Output(10) GPIO11 = Input(00) GPIO12 = Output(10) GPIO13 = Input(00) COMX-P2020 BSP User Guide (6806800L84C)
  • Page 51: Id Eeprom (At24C02)

    Always the four ISO- 0x00-0x03 Tag ID 4 Byte NXID Static 8859 characters "NXID" with no null termination. "From 1 to 11 ISO- 8859 characters 0x04-0x0F Serial Number 12 Byte "12345678901\0 describing the Variable module family, null terminated. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 52: Table 5-3 Content For Id Eeprom

    0x54-0x71 Reserved 30 Byte Reserved Static 00h a0h 14h 10h 32 bit CRC of values 0x72-0x75 CRC32 4 Byte Means the CRC is: 0x00 through 0x71, Variable 0x00A01410 inclusive 0x76-0xFF Reserved 138 Byte Reserved Static COMX-P2020 BSP User Guide (6806800L84C)
  • Page 53 Save the seeting to the ID EEPROM: mac save Programming passed.  Show the setting of the ID EEPROM: ID: NXID v0 SN: 12345678901 Errata: 1234 Build date: 2010/04/30 16:50:00 Eth0: 00:05:9f:ff:a1:01 Eth1: 00:05:9f:ff:a1:02 Eth2: 00:05:9f:ff:a1:03 CRC: 5a314c3d COMX-P2020 BSP User Guide (6806800L84C)
  • Page 54: Board Eeprom (At24C02)

    16 Bytes "COME2\0" for Static Family module family, null P2020 derivitaves terminated "COME3\0" for P1022 derivatives "From 1 to 7 ISO-8859 Module characters describing the 0x40-0x47 8 Bytes "GA\0 Variable Version module version, null terminated COMX-P2020 BSP User Guide (6806800L84C)
  • Page 55 Valid chip addresses: 38 50 54 70 Excluded chip addresses: 29 => The following command can be used to program the Board EEPROM:  Set Tag value: brd id  Set the process family: brd pf P2020 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 56 ID: COMX Processor Family: P2020 Processor Version: B Processor Errata: 00 Module Family: COME2 Module Version: GA Module Errata: 00 Memory Size(MB): 2048 Module Description: ComExpress module on P2020(1.2GHz) Manufacturer: Emerson Network Power CRC: b5d7e834 => COMX-P2020 BSP User Guide (6806800L84C)
  • Page 57: I2C Switch (Pca9545)

    Show the channel connected to the I2C Bus: The command: "i2cswitch show" can be used to show all the channels that connected to the I2C bus. i2cswitch connect 0 i2cswitch connect 1 i2cswitch show Connected I2C Bus: 0 1 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 58: Temperature Sensor (Lm75Cim-3)

    The DDR3 SPD address is A6h(8-bit), and it can be accessed at I2C#2. Chip Probe: The DDR3 SPD address is A6h(8-bit), and it can be accessed at I2C#2. 2. Read SPD The SPD information can be read out with the following commands: COMX-P2020 BSP User Guide (6806800L84C)
  • Page 59: M41St85Wmx6Tr

    1. Chip Probe: The M41ST85W address is D0h(8-bit), and it can be accessed at I2C#2. => i2c dev 1 Setting bus to 1 => i2c probe Valid chip addresses: 1B 33 48 53 68 Excluded chip addresses: COMX-P2020 BSP User Guide (6806800L84C)
  • Page 60 => wdg enable 20 => wdg reset => wdg reset 5. Disable Watchdog We can disable the watchdog by the command: "wdg disable": => wdg enable 20 => wdg disable COMX-P2020 BSP User Guide (6806800L84C)
  • Page 61: Spi Flash

    - read `len' bytes starting at `offset' to memory at `addr' sf write addr offset len - write `len' bytes from memory at `addr' to flash at `offset' sf erase offset len - erase `len' bytes from `offset' COMX-P2020 BSP User Guide (6806800L84C)
  • Page 62: Sd Card

    There are three PCI Express controllers at COMX-P2020: the PCI Express 1 is connected to GPU Z11M, the other two are connected to the carrier board. The U-boot will scan and show the PCI devices when booting as follows: COMX-P2020 BSP User Guide (6806800L84C)
  • Page 63 .w, .l] b.d.f address - modify, read and keep CFG address pci modify[.b, .w, .l] b.d.f address modify, auto increment CFG address pci write[.b, .w, .l] b.d.f address value - write to CFG address COMX-P2020 BSP User Guide (6806800L84C)
  • Page 64: Etsec & Bcm5482

    5.5.1 Default U-boot environment When the COMX-P2020 U-boot comes up, it creates the following environment by default: => printenv ramboot=setenv bootargs root=/dev/ram rw DVO_OUTPUT=$DVO_OUTPUT console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $tftppath/$ramdiskfile;tftp $loadaddr $tftppath/$bootfile;tftp $fdtaddr $tftppath/$fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr COMX-P2020 BSP User Guide (6806800L84C)
  • Page 65 $loadaddr $bootfile; fatload usb 0:2 $fdtaddr $fdtfile; fatload usb 0:2 $ramdiskaddr $ramdiskfile; bootm $loadaddr $ramdiskaddr $fdtaddr usbext2boot=setenv bootargs root=/dev/ram rw DVO_OUTPUT=$DVO_OUTPUT console=$consoledev,$baudrate $othbootargs; usb start; ext2load usb 0:4 $loadaddr $bootfile; ext2load usb 0:4 $fdtaddr $fdtfile; ext2load usb 0:4 $ramdiskaddr $ramdiskfile; bootm $loadaddr $ramdiskaddr $fdtaddr COMX-P2020 BSP User Guide (6806800L84C)
  • Page 66: Configure U-Boot For Tftp

    The following environment settings are required to configure the u-boot for tftp: => setenv ethaddr <MAC Address 1> => setenv eth1addr <MAC Address 2> => setenv eth2addr <MAC Address 3> =>setenv ethact eTSEC1 =>setenv ipaddr <board_ipaddress> =>setenv serverip <tftp_serverip> =>setenv gatewayip <your_gatewayip> =>setenv netmask <net_mask> COMX-P2020 BSP User Guide (6806800L84C)
  • Page 67: Configuring U-Boot For Ramdisk Deployment Using Tftp

    The following environment settings are required to configure the u-boot for ramdisk deployment using tftp. At U-boot prompt, set u-boot environment like: =>setenv ipaddr <board_ipaddress> =>setenv serverip <tftp_serverip> =>setenv gatewayip <your_gatewayip> =>setenv netmask <net_mask> =>setenv ramdiskfile <root_image> =>setenv tftppath COMX-P2020/current =>saveenv COMX-P2020 BSP User Guide (6806800L84C)
  • Page 68: Upgrade U-Boot For Spi Flash Using Tftp

    Speed: 100, full duplex Using eTSEC1 device host 192.168.0.197 is alive => tftp COMX-P2020/current/u-boot-spi.bin Enet starting in 100BT/FD Speed: 100, full duplex Using eTSEC1 device TFTP from server 192.168.0.197; our IP address is 192.168.0.250 Filename 'COMX-P2020/current/u-boot-spi.bin'. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 69 Using eTSEC1 device TFTP from server 192.168.0.197; our IP address is 192.168.0.250 Filename 'u-boot-spi.bin'. Load address: 0x1000000 Loading: #################################### done Bytes transferred = 525312 (80400 hex) 4. Reset the board to boot up from new U-boot image. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 70 U-boot Deployment U-boot Deployment COMX-P2020 BSP User Guide (6806800L84C)
  • Page 71: Start Linux

    ################################################################# ################################################################# ########################################## done Bytes transferred = 3473422 (35000e hex) Enet starting in 100BT/FD Speed: 100, full duplex Using eTSEC1 device TFTP from server 192.168.0.197; our IP address is 192.168.0.250 Filename 'COMX-P2020/COMX.uImage'. Load address: 0x1000000 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 72 !!!!! WARNING !!!!!!! The default password for the root account is: root please change this password using the 'passwd' command and then edit this message (/etc/issue) to remove this message COMX-P2020 login: root Password: [root@COMX-P2020 /root]# COMX-P2020 BSP User Guide (6806800L84C)
  • Page 73: Nfs Deployment

    ################################################################# ################################################################# ###################################### done Bytes transferred = 3416476 (34219c hex) Enet starting in 100BT/FD Speed: 100, full duplex Using eTSEC1 device TFTP from server 192.168.0.197; our IP address is 192.168.0.250 Filename 'COMX-P2020/current/comx.dtb'. Load address: 0xc00000 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 74 !!!!! WARNING !!!!!!! The default password for the root account is: root please change this password using the 'passwd' command and then edit this message (/etc/issue) to remove this message COMX-P2020 login: root Password: [root@COMX-P2020 root]# COMX-P2020 BSP User Guide (6806800L84C)
  • Page 75: Starting Linux From Usb Disk

    FAT16 /dev/sda3 1052257+ 82 Linux swap / Solaris /dev/sda4 979965 Linux 3. Format the partition with the following command: [root@COMX-P2020 root]# umount /dev/sda1 [root@COMX-P2020 root]# umount /dev/sda2 [root@COMX-P2020 root]# umount /dev/sda3 [root@COMX-P2020 root]# umount /dev/sda4 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 76 -rwxr-xr-x 1 root root 3473422 Sep 28 14:37 rootfs-min.ext2.img -rwxr-xr-x 1 root root 195107868 Sep 28 14:38 rootfs-nfs.tar.gz -rwxr-xr-x 1 root root 31955486 Sep 28 14:38 rootfs-usr.ext2.img -rwxr-xr-x 1 root root 524288 Sep 28 14:33 u-boot-sd.bin COMX-P2020 BSP User Guide (6806800L84C)
  • Page 77 11 user user 4096 Sep 28 14:53 etc drwxr-xr-x 3 user user 4096 Sep 28 14:48 home drwxr-xr-x 10 user user 4096 Sep 28 14:48 include drwxr-xr-x 5 user user 4096 Sep 28 14:48 lib COMX-P2020 BSP User Guide (6806800L84C)
  • Page 78: Starting Kernel With Inflated Ext2Fs

    To starting kernel with inflated ext2FS, please run the command: run usbboot at U-boot prompt: => run usbboot (Re)start USB... USB: Register 10011 NbrPorts 1 USB EHCI 1.00 scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found COMX-P2020 BSP User Guide (6806800L84C)
  • Page 79 CPU maps initialized for 1 thread per core bootconsole [udbg0] enabled setup_arch: bootmem mpc85xx_rdb_setup_arch() …… Welcome to the LTIB Embedded Linux Environment !!!!! WARNING !!!!!!! The default password for the root account is: root please change this password using the 'passwd' command COMX-P2020 BSP User Guide (6806800L84C)
  • Page 80: Starting Kernel With Ramdisk Using Fat16 Partition

    ................... 3473422 bytes read WARNING: adjusting available memory to 30000000 ## Booting kernel from Legacy Image at 01000000 ... Image Name: Linux-2.6.32 Created: 2010-09-28 2:19:17 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) COMX-P2020 BSP User Guide (6806800L84C)
  • Page 81: Starting The Kernel With Ramdisk Using Ext2 Partition

    Starting the Kernel with Ramdisk using ext2 Partition By default the USB stick will contain ext2 partition on partition 4, as shown in the above table. To boot from the partition 4, execute the following command: COMX-P2020 BSP User Guide (6806800L84C)
  • Page 82 The default password for the root account is: root please change this password using the 'passwd' command and then edit this message (/etc/issue) to remove this message COMX-P2020 login: PHY: mdio@ffe24520:00 - Link is Up - 100/Full ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready COMX-P2020 BSP User Guide (6806800L84C)
  • Page 83: Starting Linux From Sd Card

    The following method can deploy filesystem to an empty 2GB SD Card: 1. Start COMX-P2020 to Linux with NFS file system. 2. Insert a 2GB SD to COMX-P2020 and fdisk the SD as the above partition table: [root@COMX-P2020 root]# umount /dev/mmcblk0p1 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 84 [root@COMX-P2020 /root]#mkdir /mnt/sd1 [root@COMX-P2020 /root]#mkdir /mnt/sd2 [root@COMX-P2020 /root]#mount /dev/mmcblk0p1 /mnt/sd1 [root@COMX-P2020 /root]#mount /dev/mmcblk0p2 /mnt/sd2 5. Copy the release image to partition1 of SD. [root@COMX-P2020 /root]#scp <user>@<tftp_serverip>:/local/tftpboot/COMX-P2020/current/u-boot- *.bin /mnt/sd1 [root@COMX-P2020 /root]#scp <user>@<tftp_serverip>:/local/tftpboot/COMX- P2020/current/comx.dtb /mnt/sd1 COMX-P2020 BSP User Guide (6806800L84C)
  • Page 85 2 user user 4096 Sep 28 16:42 boot drwxr-xr-x 2 user user 4096 Sep 28 16:41 boot_format drwxr-xr-x 2 user user 4096 Sep 28 16:41 dev drwxrwxr-x 11 user user 4096 Sep 28 16:40 etc COMX-P2020 BSP User Guide (6806800L84C)
  • Page 86 The first partition of SD must be FAT16, and its size must less than 2GB.  Please run following command: [root@COMX-P2020 root]# umount /dev/mmcblk0p1 [root@COMX-P2020 root]# umount /dev/mmcblk0p2 [root@COMX-P2020 root]# cd /boot_format/ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 87: Starting Kernel With Inflated Ext2Fs

    WARNING: adjusting available memory to 30000000 ## Booting kernel from Legacy Image at 01000000 ... Image Name: Linux-2.6.32 Created: 2010-12-09 6:51:04 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3416442 Bytes = 3.3 MB COMX-P2020 BSP User Guide (6806800L84C)
  • Page 88 Found FSL PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0- >255 PCI host bridge /pcie@ffe0a000 ranges: MEM 0x00000000c0000000..0x00000000dfffffff -> 0x00000000c0000000 IO 0x00000000ffc30000..0x00000000ffc3ffff -> 0x0000000000000000 /pcie@ffe0a000: PCICSRBAR @ 0xfff00000 MPC85xx RDB board from Freescale Semiconducto …… COMX-P2020 BSP User Guide (6806800L84C)
  • Page 89: Starting Kernel With Ramdisk Using Fat16 Partition

    Manufacturer ID: 1b OEM: 534d Name: 00000 Tran Speed: 25000000 Rd Block Len: 512 SD version 2.0 High Capacity: No Capacity: 2002780160 Bus Width: 4-bit reading uImage 3416506 bytes read reading comx.dtb 9824 bytes read reading rootfs-dev.ext2.img COMX-P2020 BSP User Guide (6806800L84C)
  • Page 90 Linux version 2.6.32 (ec7987@cncdebaobs04.emrsn.org) (gcc version 4.3.2 (GCC) ) #1 SMP Thu Dec 9 14:51:54 CST 2010 Found initrd at 0xe96ac000:0xeffffb04 CPU maps initialized for 1 thread per core bootconsole [udbg0] enabled setup_arch: bootmem mpc85xx_rdb_setup_arch() ......COMX-P2020 BSP User Guide (6806800L84C)
  • Page 91 !!!!! WARNING !!!!!!! The default password for the root account is: root please change this password using the 'passwd' command and then edit this message (/etc/issue) to remove this message COMX-P2020 login: root Password: [root@COMX-P2020 root]# COMX-P2020 BSP User Guide (6806800L84C)
  • Page 92 Start Linux Start Linux COMX-P2020 BSP User Guide (6806800L84C)
  • Page 93: Linux Deployment

    WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-1. I will probe address range 0x03-0x77. Continue? [Y/n] y 6 7 8 9 a b c d e f COMX-P2020 BSP User Guide (6806800L84C)
  • Page 94: Dump I2C Device

    [root@COMX-P2020 /]# i2cdump 0 0x50 b WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x50, mode byte Continue? [Y/n] y COMX-P2020 BSP User Guide (6806800L84C)
  • Page 95 ....f0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ COMX-P2020 BSP User Guide (6806800L84C)
  • Page 96: Get Registers Of I2C Device

    WARNING! This program can confuse your I2C bus, cause data loss and worse! I will read from device file /dev/i2c-1, chip address 0x48, data address 0x00, using read byte data. Continue? [Y/n] y 0x2d [root@P2020RDB lib]# The 0x2d means that current temperature is 45 degree Celsius. COMX-P2020 BSP User Guide (6806800L84C)
  • Page 97: Frame Buffer Of Xgi

    = 2048 Then we can check the output of VGA that the pixel will be changed to another color one by one. The process will take 50 seconds. Figure 7-1 Output for Framebuffer Test Program COMX-P2020 BSP User Guide (6806800L84C)
  • Page 98: Minigui Example

    2. Run the Minigui sample and check the output of VGA to verify that all devices can work well at the board. [root@COMX-P2020 root]# cd /usr/private/mg-samples-1.6.10/src [root@COMX-P2020 src]# ./mywins Figure 7-2 Output for MiniGUI Example COMX-P2020 BSP User Guide (6806800L84C)
  • Page 100 © 2019 SMART Embedded Computing™, Inc. All Rights Reserved. The stylized “S” and “SMART” is a registered trademark of SMART Modular Technologies, Inc. and “SMART Embedded Computing” and the SMART Embedded Computing logo are trademarks of SMART Modular Technologies, Inc. All other names and logos...

Table of Contents