[U-Boot] [PATCH v2 11/11] New board support: Nokia RX-51 aka N900

Wolfgang Denk wd at denx.de
Sat Apr 28 23:32:25 CEST 2012


Dear =?UTF-8?q?Pali=20Roh=C3=A1r?=,

In message <1335634011-9104-12-git-send-email-pali.rohar at gmail.com> you wrote:
> VGhpcyBib2FyZCBkZWZpbml0aW9uIHJlc3VsdHMgaW4gYSB1LWJvb3QuYmluIHdoaWNoIGNhbiBi
> ZSBjaGFpbmxvYWRlZApmcm9tIE5PTE8gaW4gcWVtdSBvciBvbiBhIHJlYWwgTjkwMC4gSXQgZG9l
> cyB2ZXJ5IGxpdHRsZSBoYXJkd2FyZSBjb25maWcKYmVjYXVzZSBOT0xPIGhhcyBhbHJlYWR5IGNv
> bmZpZ3VyZWQgdGhlIGJvYXJkLiBPbmx5IG5lZWRlZCBpcyBlbmFibGluZwppbnRlcm5hbCBlTU1D
...

Please stop sending base64 encoded patches!   Send plain text only!


> This board definition results in a u-boot.bin which can be chainloaded
> from NOLO in qemu or on a real N900. It does very little hardware config
> because NOLO has already configured the board. Only needed is enabling
> internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
> 
> NOLO is expecting a kernel image and will treat any image it finds in
> onenand as such. This u-boot is intended to be flashed to the N900 like
> a kernel. In order to transparently boot the original kernel, it will be
> appended to u-boot.bin at 0x40000. NOLO will load the entire image into
> memory and execute u-boot, which saves the ATAGs set by NOLO. Then the
> bootscripts will attempt to load uImage or boot.scr from a fat or ext2
> filesystem in external SD card or internal eMMC memory. If this fails
> or keyboard is closed the appended kernel image will be booted using the
> stored ATAGs (see boot order).
> 
> There is support for hardware watchdog. It is started by NOLO so u-boot
> must kick watchdog to prevent reboot device (but not very often, max
> every 2 seconds). There is also support for framebuffer display output
> with ANSI espace codes and the N900 HW keyboard input. USB tty works but
> is disabled because it prevents the current Maemo kernel from booting.
> 
> Based on previous work by: Alistair Buxton <a.j.buxton at gmail.com>
> 
> Default boot order:
> 
>  * 0. if keyboard is closed boot automatically attached kernel image
>  * 1. try boot from external SD card
>  * 2. try boot from internal eMMC memory
>  * 3. try boot from attached kernel image
> 
> Boot from SD or eMMC in this order:
> 
>  * find boot.scr on first fat partition
>  * find uImage on first fat parition
>  * same order for 2. - 4. fat partition
> 
>  * find boot.scr on first ext2 partition
>  * find uImage on first ext2 parition
>  * same order for 2. - 4. ext2 partition
> 
> Available additional commands/variables:
> 
>  * run sercon - Use serial port for control
>  * run usbcon - Use usbtty for control
>  * run vgacon - Use framebuffer and HW keyboard for control (default)
> 
>  * run sdboot - Boot from external SD card (see boot order)
>  * run emmcboot - Boot from internal eMMC memory (see boot order)
>  * run attachboot - Boot attached kernel image (attached to U-Boot binary)
> 
>  * run scriptload - Load boot script ${mmcscriptfile}
>  * run scriptboot - Run loaded boot script
>  * run kernload - Load kernel image ${mmckernfile}
>  * run initrdload - Load initrd image ${mmcinitrdfile}
>  * run kernboot - Boot loaded kernel image
>  * run kerninitrdboot - Boot loaded kernel image with loaded initrd image
> 
>  * run trymmcscriptboot - Try to load and boot script ${mmcscriptfile}
>  * run trymmckernboot - Try to load and boot kernel image ${mmckernfile}
>  * run trymmckerninitrdboot - Try to load and boot kernel image ${mmckernfile}
>                               with initrd image ${mmcinitrdfile}
> 
> Variables for loading files from mmc:
> 
>  * mmc ${mmcnum} (0 - external, 1 - internal)
>  * partition number ${mmcpart} (1 - 4)
>  * parition type ${mmctype} (fat, ext2)

While it is a good idea to provide documentation, this is the wrong
place for it.  Here in the commit message is about the last place
where most of the users will search for it.  Please provide a README
for this board - either in the board directory, or in doc/

BUt also keep in mind that this is a maintenance problem - who will
make sure that this documentation gets updated when someone changes to
code?


>  board/nokia/rx51/Makefile        |   46 +++++
>  board/nokia/rx51/lowlevel_init.S |   71 +++++++
>  board/nokia/rx51/rx51.c          |  380 ++++++++++++++++++++++++++++++++++++++
>  board/nokia/rx51/rx51.h          |  378 +++++++++++++++++++++++++++++++++++++
>  boards.cfg                       |    1 +
>  include/configs/nokia_rx51.h     |  373 +++++++++++++++++++++++++++++++++++++
>  6 files changed, 1249 insertions(+)
>  create mode 100644 board/nokia/rx51/Makefile
>  create mode 100644 board/nokia/rx51/lowlevel_init.S
>  create mode 100644 board/nokia/rx51/rx51.c
>  create mode 100644 board/nokia/rx51/rx51.h
>  create mode 100644 include/configs/nokia_rx51.h

Entry in MAINTAINERS missing.

> +/*
> + * Size of malloc() pool
> + */
> +#define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB Sector */
> +#define CONFIG_UBI_SIZE			(512 << 10)	/* 512 KiB Sector */
> +#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + CONFIG_UBI_SIZE + \
> +					(128 << 10))

Comment appears to be misplaced.

> +/* Maemo kernel 2.6.28 will crash if u-boot enable usb tty */
> +/*
> +#define CONFIG_USB_TTY
> +*/

Please remove dead code.

> +/* OneNand support is disabled, because U-Boot image is too big */
> +/* Uncomment next line to enable it */
> +/* #define ONENAND_SUPPORT */

Incorrect multiline comment / please remove dead code.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A year spent in artificial intelligence is enough to make one believe
in God.


More information about the U-Boot mailing list