xref: /openbmc/u-boot/board/freescale/mx35pdk/README (revision 55c7a765)
1Overview
2--------------
3
4mx35pdk (known als as mx35_3stack) is a development board by Freescale.
5It consists of three pluggable board:
6	- CPU module, with CPU, RAM, flash
7	- Personality board, with most interfaces (USB, Network,..)
8	- Debug board with JTAG header.
9
10The board is usually delivered with redboot. This howto explains how to boot
11a linux kernel and how to replace the original bootloader with U-Boot.
12
13The board is delivered with Redboot on the NAND flash. It is possible to
14switch the boot device with the switches SW1-SW2 on the Personality board,
15and with SW5-SW10 on the Debug board.
16
17Delivered Redboot script to start the kernel
18---------------------------------------------------
19
20In redboot the following script is stored:
21
22fis load kernel
23exec -c "noinitrd console=ttymxc0,115200 root=/dev/mtdblock8 rw rootfstype=jffs2 ip=dhcp fec_mac=00:04:9F:00:E7:76"
24
25Kernel is taken from flash. The image is in zImage format.
26
27Booting from NET, rootfs on NFS:
28-----------------------------------
29
30To change the script in redboot:
31
32load -r -b 0x100000 <path_to_zImage>
33exec -c "noinitrd console=ttymxc0,115200 root=/dev/nfsroot rootfstype=nfsroot nfsroot=192.168.1.1:/opt/eldk-4.2-arm/armVFP rw ip=dhcp"
34
35If the ip address is not set, you can set it with :
36
37ip_address -l <board_ip/netmask> -h <server_ip>
38
39Linux partitions:
40---------------------------
41
42As default, the board is shipped with these partition tables for NAND
43and for NOR:
44
45Creating 5 MTD partitions on "NAND 2GiB 3,3V 8-bit":
460x00000000-0x00100000 : "nand.bootloader"
470x00100000-0x00600000 : "nand.kernel"
480x00600000-0x06600000 : "nand.rootfs"
490x06600000-0x06e00000 : "nand.configure"
500x06e00000-0x80000000 : "nand.userfs"
51
52Creating 6 MTD partitions on "mxc_nor_flash.0":
530x00000000-0x00080000 : "Bootloader"
540x00080000-0x00480000 : "nor.Kernel"
550x00480000-0x02280000 : "nor.userfs"
560x02280000-0x03e80000 : "nor.rootfs"
570x01fe0000-0x01fe3000 : "FIS directory"
580x01fff000-0x04000000 : "Redboot config"
59
60NAND partitions can be recognized enabling in kernel CONFIG_MTD_REDBOOT_PARTS.
61For this board, CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK should be set to 2.
62
63However, the setup in redboot is not correct and does not use the whole flash.
64
65Better solution is to use the kernel parameter mtdparts.
66Here the resulting script to be defined in RedBoot with fconfig:
67
68load -r -b 0x100000 sbabic/mx35pdk/zImage.2.6.37
69exec -c "noinitrd console=ttymxc0,115200 root=/dev/nfsroot rootfstype=nfsroot nfsroot=192.168.1.1:/opt/eldk-4.2-arm/arm rw ip=dhcp mtdparts=mxc_nand:1m(boot),5m(linux),96m(root),8m(cfg),1938m(user);physmap-flash.0:512k(b),4m(k),30m(u),28m(r)"
70
71Flashing U-Boot
72--------------------------------
73
74U-boot should be stored on the NOR flash.
75
76The boot storage can be select using the switches on the personality board
77(SW1-SW2) and on the DEBUG board (SW4-SW10).
78
79If something goes wrong flashing the bootloader, it is always possible to
80recover the board booting from the other device.
81
82Saving U-Boot in the NOR flash
83---------------------------------
84
85Check the partition for boot in the NOR flash. Setting the mtdparts as reported,
86the boot partition should be /dev/mtd0.
87
88Creating 6 MTD partitions on "mxc_nor_flash.0":
890x00000000-0x00080000 : "Bootloader"
900x00080000-0x00480000 : "nor.Kernel"
910x00480000-0x02280000 : "nor.userfs"
920x02280000-0x03e80000 : "nor.rootfs"
930x01fe0000-0x01fe3000 : "FIS directory"
940x01fff000-0x04000000 : "Redboot config"
95
96To erase the whole partition:
97$ flash_eraseall /dev/mtd0
98
99Writing u-boot:
100dd if=u-boot.bin of=/dev/mtd0
101
102To boot from NOR, you have to select the switches as follows:
103
104Personality board
105	SW2	all off
106	SW1	all off
107
108Debug Board:
109	SW5	0
110	SW6	0
111	SW7	0
112	SW8	1
113	SW9	1
114	SW10	0
115