xref: /openbmc/u-boot/board/freescale/mx35pdk/README (revision a187559e)
1702e6014SWolfgang DenkOverview
2702e6014SWolfgang Denk--------------
3702e6014SWolfgang Denk
4702e6014SWolfgang Denkmx35pdk (known als as mx35_3stack) is a development board by Freescale.
5702e6014SWolfgang DenkIt consists of three pluggable board:
6702e6014SWolfgang Denk	- CPU module, with CPU, RAM, flash
7702e6014SWolfgang Denk	- Personality board, with most interfaces (USB, Network,..)
8702e6014SWolfgang Denk	- Debug board with JTAG header.
9702e6014SWolfgang Denk
10702e6014SWolfgang DenkThe board is usually delivered with redboot. This howto explains how to boot
11702e6014SWolfgang Denka linux kernel and how to replace the original bootloader with U-Boot.
12702e6014SWolfgang Denk
13702e6014SWolfgang DenkThe board is delivered with Redboot on the NAND flash. It is possible to
14702e6014SWolfgang Denkswitch the boot device with the switches SW1-SW2 on the Personality board,
15702e6014SWolfgang Denkand with SW5-SW10 on the Debug board.
16702e6014SWolfgang Denk
17702e6014SWolfgang DenkDelivered Redboot script to start the kernel
18702e6014SWolfgang Denk---------------------------------------------------
19702e6014SWolfgang Denk
20702e6014SWolfgang DenkIn redboot the following script is stored:
21702e6014SWolfgang Denk
22702e6014SWolfgang Denkfis load kernel
23702e6014SWolfgang Denkexec -c "noinitrd console=ttymxc0,115200 root=/dev/mtdblock8 rw rootfstype=jffs2 ip=dhcp fec_mac=00:04:9F:00:E7:76"
24702e6014SWolfgang Denk
25702e6014SWolfgang DenkKernel is taken from flash. The image is in zImage format.
26702e6014SWolfgang Denk
27702e6014SWolfgang DenkBooting from NET, rootfs on NFS:
28702e6014SWolfgang Denk-----------------------------------
29702e6014SWolfgang Denk
30702e6014SWolfgang DenkTo change the script in redboot:
31702e6014SWolfgang Denk
32702e6014SWolfgang Denkload -r -b 0x100000 <path_to_zImage>
33702e6014SWolfgang Denkexec -c "noinitrd console=ttymxc0,115200 root=/dev/nfsroot rootfstype=nfsroot nfsroot=192.168.1.1:/opt/eldk-4.2-arm/armVFP rw ip=dhcp"
34702e6014SWolfgang Denk
35702e6014SWolfgang DenkIf the ip address is not set, you can set it with :
36702e6014SWolfgang Denk
37702e6014SWolfgang Denkip_address -l <board_ip/netmask> -h <server_ip>
38702e6014SWolfgang Denk
39702e6014SWolfgang DenkLinux partitions:
40702e6014SWolfgang Denk---------------------------
41702e6014SWolfgang Denk
42702e6014SWolfgang DenkAs default, the board is shipped with these partition tables for NAND
43702e6014SWolfgang Denkand for NOR:
44702e6014SWolfgang Denk
45702e6014SWolfgang DenkCreating 5 MTD partitions on "NAND 2GiB 3,3V 8-bit":
46702e6014SWolfgang Denk0x00000000-0x00100000 : "nand.bootloader"
47702e6014SWolfgang Denk0x00100000-0x00600000 : "nand.kernel"
48702e6014SWolfgang Denk0x00600000-0x06600000 : "nand.rootfs"
49702e6014SWolfgang Denk0x06600000-0x06e00000 : "nand.configure"
50702e6014SWolfgang Denk0x06e00000-0x80000000 : "nand.userfs"
51702e6014SWolfgang Denk
52702e6014SWolfgang DenkCreating 6 MTD partitions on "mxc_nor_flash.0":
53702e6014SWolfgang Denk0x00000000-0x00080000 : "Bootloader"
54702e6014SWolfgang Denk0x00080000-0x00480000 : "nor.Kernel"
55702e6014SWolfgang Denk0x00480000-0x02280000 : "nor.userfs"
56702e6014SWolfgang Denk0x02280000-0x03e80000 : "nor.rootfs"
57702e6014SWolfgang Denk0x01fe0000-0x01fe3000 : "FIS directory"
58702e6014SWolfgang Denk0x01fff000-0x04000000 : "Redboot config"
59702e6014SWolfgang Denk
60702e6014SWolfgang DenkNAND partitions can be recognized enabling in kernel CONFIG_MTD_REDBOOT_PARTS.
61702e6014SWolfgang DenkFor this board, CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK should be set to 2.
62702e6014SWolfgang Denk
63702e6014SWolfgang DenkHowever, the setup in redboot is not correct and does not use the whole flash.
64702e6014SWolfgang Denk
65702e6014SWolfgang DenkBetter solution is to use the kernel parameter mtdparts.
66702e6014SWolfgang DenkHere the resulting script to be defined in RedBoot with fconfig:
67702e6014SWolfgang Denk
68702e6014SWolfgang Denkload -r -b 0x100000 sbabic/mx35pdk/zImage.2.6.37
69702e6014SWolfgang Denkexec -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)"
70702e6014SWolfgang Denk
71702e6014SWolfgang DenkFlashing U-Boot
72702e6014SWolfgang Denk--------------------------------
73702e6014SWolfgang Denk
74*a187559eSBin MengU-Boot should be stored on the NOR flash.
751d9b0332SFabio Estevam
76702e6014SWolfgang DenkThe boot storage can be select using the switches on the personality board
77702e6014SWolfgang Denk(SW1-SW2) and on the DEBUG board (SW4-SW10).
78702e6014SWolfgang Denk
79702e6014SWolfgang DenkIf something goes wrong flashing the bootloader, it is always possible to
80702e6014SWolfgang Denkrecover the board booting from the other device.
81702e6014SWolfgang Denk
82702e6014SWolfgang DenkSaving U-Boot in the NOR flash
83702e6014SWolfgang Denk---------------------------------
84702e6014SWolfgang Denk
85702e6014SWolfgang DenkCheck the partition for boot in the NOR flash. Setting the mtdparts as reported,
86702e6014SWolfgang Denkthe boot partition should be /dev/mtd0.
87702e6014SWolfgang Denk
88702e6014SWolfgang DenkCreating 6 MTD partitions on "mxc_nor_flash.0":
89702e6014SWolfgang Denk0x00000000-0x00080000 : "Bootloader"
90702e6014SWolfgang Denk0x00080000-0x00480000 : "nor.Kernel"
91702e6014SWolfgang Denk0x00480000-0x02280000 : "nor.userfs"
92702e6014SWolfgang Denk0x02280000-0x03e80000 : "nor.rootfs"
93702e6014SWolfgang Denk0x01fe0000-0x01fe3000 : "FIS directory"
94702e6014SWolfgang Denk0x01fff000-0x04000000 : "Redboot config"
95702e6014SWolfgang Denk
96702e6014SWolfgang DenkTo erase the whole partition:
97702e6014SWolfgang Denk$ flash_eraseall /dev/mtd0
98702e6014SWolfgang Denk
99*a187559eSBin MengWriting U-Boot:
100702e6014SWolfgang Denkdd if=u-boot.bin of=/dev/mtd0
101702e6014SWolfgang Denk
102702e6014SWolfgang DenkTo boot from NOR, you have to select the switches as follows:
103702e6014SWolfgang Denk
104702e6014SWolfgang DenkPersonality board
105702e6014SWolfgang Denk	SW2	all off
106702e6014SWolfgang Denk	SW1	all off
107702e6014SWolfgang Denk
108702e6014SWolfgang DenkDebug Board:
109702e6014SWolfgang Denk	SW5	0
110702e6014SWolfgang Denk	SW6	0
111702e6014SWolfgang Denk	SW7	0
112702e6014SWolfgang Denk	SW8	1
113702e6014SWolfgang Denk	SW9	1
114702e6014SWolfgang Denk	SW10	0
115