Host Requirements
Start | End | Item |
---|---|---|
0x00100000 | OS Image Loaded | |
0x00000000 | 0x1FFFFFFF | RAM |
0xC0000000 | 0xDFFFFFFF | PCIe1 Memory |
0xA0000000 | 0xBFFFFFFF | PCIe2 Memory |
0x80000000 | 0x9FFFFFFF | PCIe3 Memory |
0xE0000000 | 0xE7FFFFFF | Promjet |
0xEF000000 | 0xEFFFFFFF | Nor Flash (on eLBC) |
0xF0020000 | 0xF002FFFF | PCIe1 IO |
0xF0010000 | 0xF001FFFF | PCIe2 IO |
0xF0000000 | 0xF000FFFF | PCIe3 IO |
0xF0030000 | 0xF012FFFF | NAND Flash Bank 1 (eLBC Chip Select 1) |
You can build a BSP OS image from the source code or the binary components contained in a BSP package. For instructions about building a BSP OS image, please refer to the chapter Working with a BSP in the Building Embedded Systems manual.
Connect the serial cable to the serial port of the P1020RDB board to the first serial port of your host machine. There is 1 serial port on P1020RDB. Use the one which is near the boundary of the board. Usually you should see some Uboot output on the console when you connect cable to the correct port. If you have a Neutrino host with a serial mouse, you may have to move the mouse to the second serial port on your host, because some terminal programs require the first serial port.
The correct terminal settings of the program handling serial connection should be:
baudrate | 115200 |
data | 8 bit |
parity | none |
stop | 1bit |
flow control | none |
1. Power on your target. You should see the u-boot output on your console. 2. Conenct an ethernet cable to any of the 3 PHY port available on the back side of the board.
=> setenv ipaddr 10.90.74.214 => setenv serverip 10.90.74.42 => setenv bootfile ifs-p1020rdb.raw => setenv loadaddr 0x100000 => setenv bootcmd 'tftpboot $loadaddr $bootfile; go $loadaddr' => setenv bootdelay 2 => saveenv Saving Environment to Flash... Un-Protected 1 sectors Erasing Flash... flash erase done Erased 1 sectors Writing to Flash... done Protected 1 sectors => boot
[virtual=ppcbe-spe,raw] to this:
[virtual=ppcbe-spe,srec] Rebuild the image. On your target, type:
=>: setenv loads_echo 0 =>: saveenv =>: loads
On your host, copy the image to the serial port that's connected to the board. For example, on a Neutrino host: cp ifs-p1020rdb.srec /dev/ser1 On a Windows host, you can use Hyperterminal's transfer feature to copy the image as a text file.
## First Load Addr = 0x00100000 ## Last Load Addr = 0x0023955B ## Total Size = 0x0013955C = 1283420 Bytes ## Start Addr = 0x00101E38 =>:
Type go start_addr
At this point, you should see output similar to this when it finishes downloading:
## Starting application at 0x00100000 ... Welcome to QNX Neutrino 6.4.1 on the PowerPC P1020RDB board #
Congratulations! QNX 6.4.1 kernel is running on your system. You can test the OS simply by executing any shell builtin command or any command residing within the OS image (e.g. ls). Once the initial image is running, you can update the OS image using the network and flash drivers. For sample command lines, please see the " Driver Command Summary" section.
Follow the description mentioned below for NAND flash and NOR flash
Component | Buildfile Command | Required Binaries | Required Libraries | Source Location |
---|---|---|---|---|
Startup | startup-p10xxrdb -v -c0xFFE00000 -t66660000 -D0xffe04500 | startup-p10xxrdb | libstartup.a | src/hardware/startup/boards/p10xxrdb |
Serial | devc-ser8250 -e -c400000000 -b115200 0xffe04500,16 waitfor /dev/ser1 reopen /dev/ser1 | devc-ser8250 | none | src/hardware/devc |
USB | io-usb -d ehci-p2020 ioport=0xFFE22100,irq=5 -d ehci-p2020 ioport=0xFFE23100,irq=6 & waitfor /dev/io-usb/io-usb 10 devb-umass& | devu-ehci-p2020.so | libusbdi.so io-blk.so io-usb usb devb-umass libcam.so fs-dos.so fs-qnx4.so fs-ext2.so cam-disk.so | "prebuiltonly" |
I2C | i2c-mpc8572 -i17 -p0xffe03000 (for controller 1) i2c-mpc8572 -i17 -p0xffe03100 --u1 (for controller 2) | i2c-mpc8572 | none | src/hardware/i2c/mpc8572 |
SMP | PATH=:/proc/boot:/bin:/usr/bin LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll procnto-booke-smp -v | procnto-booke-smp | none | prebuilt |
Network | io-pkt-v4-hc -dmpcsec -p tcpip-v6 ipsec -dmpc85xx mac=00112233AABB,emu_phy=0 | io-pkt-v4-hc ifconfig | devnp-mpc85xx.so | /src/hardware/devnp |
NOR Flash | devf-generic -s 0xEF000000,16M,,,128k,2,1 -r | devf-generic flashctl | libmtd-flash.a | /src/hardware/flash |
NAND Flash | fs-etfs-p2020rdb512 -e fs-etfs-p2020rdb512 -m /fs/etfs | fs-etfs-p2020rdb512 etfsctl | . | /src/hardware/etfs |
RTC | rtc -v ds3232 /dev/i2c0 rtc -s -v ds3232 /dev/i2c0 | rtc date | libutil.a libutilS.a | /src/utils/r/rtc |
MMCSD | devb-mmcsd-p10xx mmcsd bs="ccbclock=400000000" | devb-mmcsd-p10xx | io-blk.so libcam.so fs-dos.so fs-qnx4.so fs-ext2.so cam-disk.so | /src/hardware/devb/mmcsd |
Watchdog | wdtkick -k2000 -t10000 | wdtkick | /src/hardware/support/p1020/wdtkick |
The second USB Controller pins are shared with eLBC module pins ( which is interfaced with NOR/NAND Flash ), so by default USB 2 is disabled for NOR/NAND Flash functionality.
To Start USB controller 2 add -u option in startup command as below:
startup-p10xxrdb -v -c0xFFE00000 -t66660000 -D0xffe04500 -u
To start network driver without encryption, run:
io-pkt-v4-hc -dmpcsec -p tcpip-v6 ipsec -dmpc85xx mac=00112233AABB,emu_phy=0
you should see following output when you run ifconfig
# ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192 inet 127.0.0.1 netmask 0xff000000 tsec0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 capabilities rx=7<IP4CSUM,TCP4CSUM,UDP4CSUM> capabilities tx=0 enabled=0 address: 00:11:22:33:aa:bb media: Ethernet none tsec1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 capabilities rx=7<IP4CSUM,TCP4CSUM,UDP4CSUM> capabilities tx=0 enabled=0 address: 00:11:22:33:aa:bc media: Ethernet none tsec2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 capabilities rx=7<IP4CSUM,TCP4CSUM,UDP4CSUM> capabilities tx=0 enabled=0 address: 00:11:22:33:aa:bd media: Ethernet none
To bring a network interface up, type following command
ifconfig tsec0 10.90.74.214/24 up
Here 10.90.74.214 is the IP address assign to your target and 24 is the netmask bits (i.e. 255.255.255.0) The LEDs of the RJ45 ports corresponding to an enabled interface shall glow periodically. This can be used to identify the correct port corresponding to each tsec.
If the i2c driver is not running, issue the following command
i2c-mpc8572 -i17 -p0xffe03000 --u0
To run the RTC utility, use the following command:
rtc -v ds3232 /dev/i2c0
This command updates the current time and date from the hardware clock in the board.
To set the hardware clock in the board with the current date and time, use the following command:
rtc -s -v ds3232 /dev/i2c0
Run
fs-etfs-p2020rdb512 -e
to erase the NAND device and to create an empty file system that is ready to use. The factory marked bad blocks are not erased. Blocks that become bad during normal use are also skipped during the erasing.
After the erase of the NAND device, run the following command
fs-etfs-p2020rdb512 -m /fs/etfs
This command sets the directory /fs/etfs as the mount point.
Run
devf-generic -s 0xEF000000,16M,,,128k,2,1 -r
to run the generic Flash filesystem driver on your board. After running this command, two partitions will get created. Normally the file names are as below: /dev/fs0 which is the default mountpoint for socket 0 and /dev/fs0p0 which has the raw access for socket 0, partition 0.
After these partitions get created, we should erase and format the flash using the flashctl utility.
The commands are as follows:
flashctl -p /dev/fs0 -o 0 -l 15M -ev
This command erases the nor flash starting from an offset of 0 to 15MB.
Though the nor flash is 16MB, we erase only 15MB as the last 1MB of flash contains the u-boot image.
After giving the above command, slay the driver using the slay devf-generic command and then restart it again.
The Nor flash is erased now and we can mount the given flash filesystem partition as the filesystem mountpoint /flash using the command below:
flashctl -p /dev/fs0p0 -o 0 -l 15M -f -n /flash
After this command is successfully run, slay the driver and restart it again. This formats the nor flash and mounts it over the filesystem mountpoint /flash.
We can create multiple filesystem partitions based on our requirement.
devb-mmcsd-p10xx mmcsd bs="ccbclock=400000000"
Command given above will start the mmcsd driver.
Driver can be started at any time, irrespective of when sdmmc card is plugged.
After plugging a sdmmc card, a /dev/hdX is created.
SDMMC card can be mounted by
mount -t <filesystem> /dev/hdXtX /mnt
wdtkick -k2000 -t10000
The above command starts the watchdog timer with a timeout value of 10000 milliseconds (option -t) and it also kicks (or resets) the timer every time after an interval of 2000 milliseconds (-k option).
These time-out and kick time periods used here is an example but any value can be chosen between 0 to ((2^64) - 1) depending on requirement.
Watchdog will reset the board if this utility is unable to kick before the watchdog times out.
Other options are:
-p : Define priority of the Watchdog Timer Module event. (default: 10)
-f : Input Clock Frequency in Hz to the Timebase (board specific, default: 400MHz)