1*4882a593SmuzhiyunBoard: Nokia RX-51 aka N900 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis board definition results in a u-boot.bin which can be chainloaded 4*4882a593Smuzhiyunfrom NOLO in qemu or on a real N900. It does very little hardware config 5*4882a593Smuzhiyunbecause NOLO has already configured the board. Only needed is enabling 6*4882a593Smuzhiyuninternal eMMC memory via twl4030 regulator which is not enabled by NOLO. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunNOLO is expecting a kernel image and will treat any image it finds in 9*4882a593Smuzhiyunonenand as such. This u-boot is intended to be flashed to the N900 like 10*4882a593Smuzhiyuna kernel. In order to transparently boot the original kernel, it will be 11*4882a593Smuzhiyunappended to u-boot.bin at 0x40000. NOLO will load the entire image into 12*4882a593Smuzhiyun(random) memory and execute u-boot, which saves hw revision, boot reason 13*4882a593Smuzhiyunand boot mode ATAGs set by NOLO. Then the bootscripts will attempt to load 14*4882a593SmuzhiyunuImage or boot.scr from a fat, ext2/ext3 or ext4 filesystem in external 15*4882a593SmuzhiyunSD card or internal eMMC memory. If this fails or keyboard is closed then 16*4882a593Smuzhiyunthe appended kernel image will be booted using some generated and some 17*4882a593Smuzhiyunstored ATAGs (see boot order). 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunThere is support for hardware watchdog. Hardware watchdog is started by 20*4882a593SmuzhiyunNOLO so u-boot must kick watchdog to prevent reboot device (but not very 21*4882a593Smuzhiyunoften, max every 2 seconds). There is also support for framebuffer display 22*4882a593Smuzhiyunoutput with ANSI espace codes and the N900 HW keyboard input. USB tty works 23*4882a593Smuzhiyunbut is disabled because it prevents the current Maemo kernel from booting. 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunWhen U-Boot is starting it enable IBE bit in Auxiliary Control Register, 26*4882a593Smuzhiyunwhich is needed for Thumb-2 ISA support. It is workaround for errata 430973. 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunDefault boot order: 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun * 0. if keyboard is closed boot automatically attached kernel image 31*4882a593Smuzhiyun * 1. try boot from external SD card 32*4882a593Smuzhiyun * 2. try boot from internal eMMC memory 33*4882a593Smuzhiyun * 3. try boot from attached kernel image 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunBoot from SD or eMMC in this order: 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun * 1. 38*4882a593Smuzhiyun * 1.1 find boot.scr on first fat partition 39*4882a593Smuzhiyun * 1.2 find uImage on first fat parition 40*4882a593Smuzhiyun * 1.3 same order for 2. - 4. fat partition 41*4882a593Smuzhiyun * 2. same as 1. but for ext2/3 partition 42*4882a593Smuzhiyun * 3. same as 1. but for ext4 partition 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunAvailable additional commands/variables: 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun * run sercon - Use serial port for control 48*4882a593Smuzhiyun * run usbcon - Use usbtty for control 49*4882a593Smuzhiyun * run vgacon - Use framebuffer and HW keyboard for control (default) 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun * run sdboot - Boot from external SD card (see boot order) 52*4882a593Smuzhiyun * run emmcboot - Boot from internal eMMC memory (see boot order) 53*4882a593Smuzhiyun * run attachboot - Boot attached kernel image (attached to U-Boot binary) 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun * run scriptload - Load boot script ${mmcscriptfile} 56*4882a593Smuzhiyun * run scriptboot - Run loaded boot script 57*4882a593Smuzhiyun * run kernload - Load kernel image ${mmckernfile} 58*4882a593Smuzhiyun * run initrdload - Load initrd image ${mmcinitrdfile} 59*4882a593Smuzhiyun * run kernboot - Boot loaded kernel image 60*4882a593Smuzhiyun * run kerninitrdboot - Boot loaded kernel image with loaded initrd image 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun * run trymmcscriptboot - Try to load and boot script ${mmcscriptfile} 63*4882a593Smuzhiyun * run trymmckernboot - Try to load and boot kernel image ${mmckernfile} 64*4882a593Smuzhiyun * run trymmckerninitrdboot - Try to load and boot kernel image ${mmckernfile} 65*4882a593Smuzhiyun with initrd image ${mmcinitrdfile} 66*4882a593Smuzhiyun 67*4882a593SmuzhiyunAdditional variables for loading files from mmc: 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun * mmc ${mmcnum} (0 - external, 1 - internal) 70*4882a593Smuzhiyun * partition number ${mmcpart} (1 - 4) 71*4882a593Smuzhiyun * parition type ${mmctype} (fat, ext2) 72*4882a593Smuzhiyun 73*4882a593SmuzhiyunAdditional varuables for booting kernel: 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun * setup_omap_atag - Add OMAP table into atags structure (needs maemo kernel) 76*4882a593Smuzhiyun * setup_console_atag - Enable serial console in OMAP table 77*4882a593Smuzhiyun * setup_boot_reason_atag - Change boot reason in OMAP table 78*4882a593Smuzhiyun * setup_boot_mode_atag - Change boot mode in OMAP table 79*4882a593Smuzhiyun 80*4882a593SmuzhiyunUSB TTY: 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTY is disabled. 83*4882a593Smuzhiyun For enabling USB TTY just add this line to file include/configs/nokia_rx51.h 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun #define CONFIG_USB_TTY 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun 88*4882a593SmuzhiyunONENAND support: 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun ONENAND support is disabled because not working yet and cause linux kernel to 91*4882a593Smuzhiyun crash or no access to mtd. For enabling ONENAND support add this line at begin 92*4882a593Smuzhiyun of file include/configs/nokia_rx51.h 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun #define ONENAND_SUPPORT 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun 97*4882a593SmuzhiyunUBIFS support: 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun UBIFS support is disabled, because U-Boot image is too big and cannot be 100*4882a593Smuzhiyun flashed with attached zImage to RX-51 kernel nand area. For enabling UBIFS 101*4882a593Smuzhiyun support first enable ONENAND support and then add this line at begin of file 102*4882a593Smuzhiyun include/configs/nokia_rx51.h 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun #define UBIFS_SUPPORT 105