Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 1 | Board: Nokia RX-51 aka N900 |
| 2 | |
| 3 | This board definition results in a u-boot.bin which can be chainloaded |
| 4 | from NOLO in qemu or on a real N900. It does very little hardware config |
| 5 | because NOLO has already configured the board. Only needed is enabling |
| 6 | internal eMMC memory via twl4030 regulator which is not enabled by NOLO. |
| 7 | |
| 8 | NOLO is expecting a kernel image and will treat any image it finds in |
| 9 | onenand as such. This u-boot is intended to be flashed to the N900 like |
| 10 | a kernel. In order to transparently boot the original kernel, it will be |
| 11 | appended to u-boot.bin at 0x40000. NOLO will load the entire image into |
| 12 | (random) memory and execute u-boot, which saves hw revision, boot reason |
| 13 | and boot mode ATAGs set by NOLO. Then the bootscripts will attempt to load |
| 14 | uImage or boot.scr from a fat, ext2/ext3 or ext4 filesystem in external |
| 15 | SD card or internal eMMC memory. If this fails or keyboard is closed then |
| 16 | the appended kernel image will be booted using some generated and some |
| 17 | stored ATAGs (see boot order). |
| 18 | |
Pali Rohár | f459d32 | 2020-06-01 00:26:32 +0200 | [diff] [blame] | 19 | For generating combined image of u-boot and kernel there is a simple script |
| 20 | called u-boot-gen-combined. It is available in following repository: |
| 21 | |
| 22 | https://github.com/pali/u-boot-maemo |
| 23 | |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 24 | There is support for hardware watchdog. Hardware watchdog is started by |
| 25 | NOLO so u-boot must kick watchdog to prevent reboot device (but not very |
| 26 | often, max every 2 seconds). There is also support for framebuffer display |
Pali Rohár | 57ac287 | 2021-02-20 11:50:15 +0100 | [diff] [blame] | 27 | output with ANSI escape codes and the N900 HW keyboard input. |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 28 | |
| 29 | When U-Boot is starting it enable IBE bit in Auxiliary Control Register, |
| 30 | which is needed for Thumb-2 ISA support. It is workaround for errata 430973. |
| 31 | |
| 32 | Default boot order: |
| 33 | |
| 34 | * 0. if keyboard is closed boot automatically attached kernel image |
| 35 | * 1. try boot from external SD card |
| 36 | * 2. try boot from internal eMMC memory |
| 37 | * 3. try boot from attached kernel image |
| 38 | |
| 39 | Boot from SD or eMMC in this order: |
| 40 | |
| 41 | * 1. |
| 42 | * 1.1 find boot.scr on first fat partition |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 43 | * 1.2 find uImage on first fat partition |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 44 | * 1.3 same order for 2. - 4. fat partition |
| 45 | * 2. same as 1. but for ext2/3 partition |
| 46 | * 3. same as 1. but for ext4 partition |
| 47 | |
| 48 | |
| 49 | Available additional commands/variables: |
| 50 | |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 51 | * run sdboot - Boot from external SD card (see boot order) |
| 52 | * run emmcboot - Boot from internal eMMC memory (see boot order) |
| 53 | * run attachboot - Boot attached kernel image (attached to U-Boot binary) |
| 54 | |
| 55 | * run scriptload - Load boot script ${mmcscriptfile} |
| 56 | * run scriptboot - Run loaded boot script |
| 57 | * run kernload - Load kernel image ${mmckernfile} |
| 58 | * run initrdload - Load initrd image ${mmcinitrdfile} |
| 59 | * run kernboot - Boot loaded kernel image |
| 60 | * run kerninitrdboot - Boot loaded kernel image with loaded initrd image |
| 61 | |
| 62 | * run trymmcscriptboot - Try to load and boot script ${mmcscriptfile} |
| 63 | * run trymmckernboot - Try to load and boot kernel image ${mmckernfile} |
| 64 | * run trymmckerninitrdboot - Try to load and boot kernel image ${mmckernfile} |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 65 | with initrd image ${mmcinitrdfile} |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 66 | |
| 67 | Additional variables for loading files from mmc: |
| 68 | |
| 69 | * mmc ${mmcnum} (0 - external, 1 - internal) |
| 70 | * partition number ${mmcpart} (1 - 4) |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 71 | * parition type ${mmctype} (fat, ext2, ext4) |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 72 | |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 73 | Additional variables for booting kernel: |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 74 | |
| 75 | * setup_omap_atag - Add OMAP table into atags structure (needs maemo kernel) |
| 76 | * setup_console_atag - Enable serial console in OMAP table |
| 77 | * setup_boot_reason_atag - Change boot reason in OMAP table |
| 78 | * setup_boot_mode_atag - Change boot mode in OMAP table |
| 79 | |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 80 | Variable setup_omap_atag is automatically set when booting attached kernel. |
| 81 | When variable setup_omap_atag is set, variable setup_console_atag is unset |
| 82 | and u-boot standard output is set to serial then setup_console_atag is |
| 83 | automatically set to 1. So output from Maemo kernel would go to serial port. |
| 84 | |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 85 | UBIFS support: |
| 86 | |
| 87 | UBIFS support is disabled, because U-Boot image is too big and cannot be |
| 88 | flashed with attached zImage to RX-51 kernel nand area. For enabling UBIFS |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 89 | support add following lines into file configs/nokia_rx51_defconfig |
Pali Rohár | ed407be | 2012-10-29 07:54:01 +0000 | [diff] [blame] | 90 | |
Pali Rohár | 42e0570 | 2020-04-01 00:35:17 +0200 | [diff] [blame] | 91 | CONFIG_CMD_UBI=y |
| 92 | CONFIG_CMD_UBIFS=y |
| 93 | CONFIG_MTD_UBI_FASTMAP=y |
| 94 | CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1 |