* [U-Boot] [PATCH] nios2: add README.nios2
@ 2015-10-19 6:06 Thomas Chou
2015-10-19 12:35 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Thomas Chou @ 2015-10-19 6:06 UTC (permalink / raw)
To: u-boot
Add README.nios2 about how to add nios2 boards to u-boot.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
doc/README.nios2 | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 doc/README.nios2
diff --git a/doc/README.nios2 b/doc/README.nios2
new file mode 100644
index 0000000..9f248ac
--- /dev/null
+++ b/doc/README.nios2
@@ -0,0 +1,86 @@
+Nios II is a 32-bit embedded-processor architecture designed
+specifically for the Altera family of FPGAs.
+
+Please refer to the link for more information on Nios II,
+https://www.altera.com/products/processors/overview.html
+
+Please refer to the link for Linux port and toolchains,
+http://rocketboards.org/foswiki/view/Documentation/NiosIILinuxUserManual
+
+The Nios II port of u-boot is controlled by device tree. To add a new
+board/configuration (eg, mysystem) to u-boot, you will need three files.
+
+1. The device tree source which descibe the hardware, dts file.
+ arch/nios2/dts/mysystem.dts
+
+2. Default configuration of Kconfig, defconfig file.
+ configs/mysystem_defconfig
+
+3. The legacy board header file.
+ include/configs/mysystem.h
+
+The device tree source must be generated from your qsys/sopc design file
+using the sopc2dts tool. Then modified to fit your configuration. Please
+find the sopc2dts download and usage at the wiki,
+http://www.alterawiki.com/wiki/Sopc2dts
+
+java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
+
+You will need to add additional properties to the dts. Please find an
+example at, arch/nios2/dts/3c120_devboard.dts.
+
+1. Add "u-boot,dm-pre-reloc" property to the cpu and the serial node
+which you will use for console.
+
+2. Add "stdout-path=..." property with your serial path to the chosen
+node.
+
+Next, you will need a default config file. You may start with
+nios2-generic_defconfig, modify the options and save it.
+
+make nios2-generic_defconfig
+make menuconfig
+make savedefconfig
+cp defconfig configs/mysystem_defconfig
+
+You will need to change the names of board header file and device tree,
+and select the drivers.
+
+Nios II architecture --->
+ (mysystem) Board header file
+Device Tree Control --->
+ (mysystem) Default Device Tree for DT control
+
+There is a selection of "Provider of DTB for DT control" in the Device
+Tree Control menu.
+
+( ) Separate DTB for DT control, will cat the dtb to end of u-boot
+binary, output u-boot-dtb.bin. This should be used for production.
+If you use boot copier, like epcs boot copier, make sure the copier
+copies all the u-boot-dtb.bin, not just u-boot.bin.
+
+( ) Embedded DTB for DT control, will include the dtb inside the u-boot
+binary. This is handy for development, eg, using gdb or nios2-download.
+
+The last thing, legacy board header file describes those config options
+not covered in Kconfig yet. You may copy it from nios2-generic.h.
+
+cp include/configs/nios2-generic.h include/configs/mysystem.h
+
+Please change the sdram base and size to your board. The base should be
+cached virtual address, for nios2 with mmu it is 0xCxxx-xxxx to
+0xDxxx-xxxx.
+
+#define CONFIG_SYS_SDRAM_BASE 0xD0000000
+#define CONFIG_SYS_SDRAM_SIZE 0x08000000
+
+You will need to change the environment variables location and setting,
+too. You may change other configs to fit your board.
+
+After all these changes, you may build and test.
+
+export CROSS_COMPILE=nios2-elf- (or nios2-linux-gnu-)
+make mysystem_defconfig
+make
+
+Enjoy!
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] nios2: add README.nios2
2015-10-19 6:06 [U-Boot] [PATCH] nios2: add README.nios2 Thomas Chou
@ 2015-10-19 12:35 ` Marek Vasut
2015-10-20 1:48 ` [U-Boot] [PATCH v2] " Thomas Chou
2015-10-21 14:42 ` [U-Boot] [PATCH v3] " Thomas Chou
2 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2015-10-19 12:35 UTC (permalink / raw)
To: u-boot
On Monday, October 19, 2015 at 08:06:16 AM, Thomas Chou wrote:
Hi!
> Add README.nios2 about how to add nios2 boards to u-boot.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
> doc/README.nios2 | 86
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed,
> 86 insertions(+)
> create mode 100644 doc/README.nios2
>
> diff --git a/doc/README.nios2 b/doc/README.nios2
> new file mode 100644
> index 0000000..9f248ac
> --- /dev/null
> +++ b/doc/README.nios2
> @@ -0,0 +1,86 @@
> +Nios II is a 32-bit embedded-processor architecture designed
> +specifically for the Altera family of FPGAs.
> +
> +Please refer to the link for more information on Nios II,
> +https://www.altera.com/products/processors/overview.html
> +
> +Please refer to the link for Linux port and toolchains,
> +http://rocketboards.org/foswiki/view/Documentation/NiosIILinuxUserManual
> +
> +The Nios II port of u-boot is controlled by device tree. To add a new
> +board/configuration (eg, mysystem) to u-boot, you will need three files.
> +
> +1. The device tree source which descibe the hardware, dts file.
> + arch/nios2/dts/mysystem.dts
> +
> +2. Default configuration of Kconfig, defconfig file.
> + configs/mysystem_defconfig
> +
> +3. The legacy board header file.
> + include/configs/mysystem.h
> +
> +The device tree source must be generated from your qsys/sopc design file
> +using the sopc2dts tool. Then modified to fit your configuration. Please
> +find the sopc2dts download and usage at the wiki,
> +http://www.alterawiki.com/wiki/Sopc2dts
> +
> +java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
> +
> +You will need to add additional properties to the dts. Please find an
> +example at, arch/nios2/dts/3c120_devboard.dts.
> +
> +1. Add "u-boot,dm-pre-reloc" property to the cpu and the serial node
> +which you will use for console.
Explanation why or link to another document in doc/ would help here I think.
> +2. Add "stdout-path=..." property with your serial path to the chosen
> +node.
> +
> +Next, you will need a default config file. You may start with
> +nios2-generic_defconfig, modify the options and save it.
> +
> +make nios2-generic_defconfig
> +make menuconfig
> +make savedefconfig
> +cp defconfig configs/mysystem_defconfig
> +
> +You will need to change the names of board header file and device tree,
> +and select the drivers.
> +
> +Nios II architecture --->
> + (mysystem) Board header file
> +Device Tree Control --->
> + (mysystem) Default Device Tree for DT control
> +
> +There is a selection of "Provider of DTB for DT control" in the Device
> +Tree Control menu.
> +
> +( ) Separate DTB for DT control, will cat the dtb to end of u-boot
> +binary, output u-boot-dtb.bin. This should be used for production.
> +If you use boot copier, like epcs boot copier, make sure the copier
> +copies all the u-boot-dtb.bin, not just u-boot.bin.
> +
> +( ) Embedded DTB for DT control, will include the dtb inside the u-boot
> +binary. This is handy for development, eg, using gdb or nios2-download.
> +
> +The last thing, legacy board header file describes those config options
> +not covered in Kconfig yet. You may copy it from nios2-generic.h.
> +
> +cp include/configs/nios2-generic.h include/configs/mysystem.h
> +
> +Please change the sdram base and size to your board. The base should be
s/to your/to match your/
> +cached virtual address, for nios2 with mmu it is 0xCxxx-xxxx to
> +0xDxxx-xxxx.
MMU should be in capitals I think. And the address should use underscore instead
of dash, the dash is really confusing there.
> +#define CONFIG_SYS_SDRAM_BASE 0xD0000000
> +#define CONFIG_SYS_SDRAM_SIZE 0x08000000
> +
> +You will need to change the environment variables location and setting,
> +too. You may change other configs to fit your board.
> +
> +After all these changes, you may build and test.
> +
> +export CROSS_COMPILE=nios2-elf- (or nios2-linux-gnu-)
> +make mysystem_defconfig
> +make
> +
> +Enjoy!
Thanks for the README, it's really helpful!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH v2] nios2: add README.nios2
2015-10-19 6:06 [U-Boot] [PATCH] nios2: add README.nios2 Thomas Chou
2015-10-19 12:35 ` Marek Vasut
@ 2015-10-20 1:48 ` Thomas Chou
2015-10-20 21:25 ` Marek Vasut
2015-10-21 14:42 ` [U-Boot] [PATCH v3] " Thomas Chou
2 siblings, 1 reply; 8+ messages in thread
From: Thomas Chou @ 2015-10-20 1:48 UTC (permalink / raw)
To: u-boot
Add README.nios2 about how to add nios2 boards to u-boot.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
v2
add ref and fix words as suggested by Marek.
doc/README.nios2 | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)
create mode 100644 doc/README.nios2
diff --git a/doc/README.nios2 b/doc/README.nios2
new file mode 100644
index 0000000..453c7c7
--- /dev/null
+++ b/doc/README.nios2
@@ -0,0 +1,97 @@
+Nios II is a 32-bit embedded-processor architecture designed
+specifically for the Altera family of FPGAs.
+
+Please refer to the link for more information on Nios II,
+https://www.altera.com/products/processors/overview.html
+
+Please refer to the link for Linux port and toolchains,
+http://rocketboards.org/foswiki/view/Documentation/NiosIILinuxUserManual
+
+The Nios II port of u-boot is controlled by device tree. Please check
+out doc/README.fdt-control.
+
+To add a new board/configuration (eg, mysystem) to u-boot, you will need
+three files.
+
+1. The device tree source which describes the hardware, dts file.
+ arch/nios2/dts/mysystem.dts
+
+2. Default configuration of Kconfig, defconfig file.
+ configs/mysystem_defconfig
+
+3. The legacy board header file.
+ include/configs/mysystem.h
+
+The device tree source must be generated from your qsys/sopc design
+using the sopc2dts tool. Then modified to fit your configuration. Please
+find the sopc2dts download and usage at the wiki,
+http://www.alterawiki.com/wiki/Sopc2dts
+
+java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
+
+You will need to add additional properties to the dts. Please find an
+example at, arch/nios2/dts/3c120_devboard.dts.
+
+1. Add "u-boot,dm-pre-reloc" property to the CPU and the serial node
+which you will use for console. This will allow these nodes be loaded in
+the first part of board initialization, pre-relocation. Please refer to
+doc/driver-model/README.txt for explaination of this property.
+
+2. Add "stdout-path=..." property with your serial path to the chosen
+node.
+
+3. If you use SPI/EPCS or I2C, you will need to add aliases to number
+the sequence of these devices, like this,
+ aliases {
+ spi0 = &epcs_controller;
+ };
+
+Next, you will need a default config file. You may start with
+nios2-generic_defconfig, modify the options and save it.
+
+make nios2-generic_defconfig
+make menuconfig
+make savedefconfig
+cp defconfig configs/mysystem_defconfig
+
+You will need to change the names of board header file and device tree,
+and select the drivers with menuconfig.
+
+Nios II architecture --->
+ (mysystem) Board header file
+Device Tree Control --->
+ (mysystem) Default Device Tree for DT control
+
+There is a selection of "Provider of DTB for DT control" in the Device
+Tree Control menu.
+
+( ) Separate DTB for DT control, will cat the dtb to end of u-boot
+binary, output u-boot-dtb.bin. This should be used for production.
+If you use boot copier, like EPCS boot copier, make sure the copier
+copies all the u-boot-dtb.bin, not just u-boot.bin.
+
+( ) Embedded DTB for DT control, will include the dtb inside the u-boot
+binary. This is handy for development, eg, using gdb or nios2-download.
+
+The last thing, legacy board header file describes those config options
+not covered in Kconfig yet. You may copy it from nios2-generic.h.
+
+cp include/configs/nios2-generic.h include/configs/mysystem.h
+
+Please change the SDRAM base and size to match your board. The base
+should be cached virtual address, for Nios II with MMU it is 0xCxxx_xxxx
+to 0xDxxx_xxxx.
+
+#define CONFIG_SYS_SDRAM_BASE 0xD0000000
+#define CONFIG_SYS_SDRAM_SIZE 0x08000000
+
+You will need to change the environment variables location and setting,
+too. You may change other configs to fit your board.
+
+After all these changes, you may build and test.
+
+export CROSS_COMPILE=nios2-elf- (or nios2-linux-gnu-)
+make mysystem_defconfig
+make
+
+Enjoy!
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH v2] nios2: add README.nios2
2015-10-20 1:48 ` [U-Boot] [PATCH v2] " Thomas Chou
@ 2015-10-20 21:25 ` Marek Vasut
2015-10-21 0:29 ` Thomas Chou
0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2015-10-20 21:25 UTC (permalink / raw)
To: u-boot
On Tuesday, October 20, 2015 at 03:48:46 AM, Thomas Chou wrote:
> Add README.nios2 about how to add nios2 boards to u-boot.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
> v2
> add ref and fix words as suggested by Marek.
>
> doc/README.nios2 | 97
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed,
> 97 insertions(+)
> create mode 100644 doc/README.nios2
>
> diff --git a/doc/README.nios2 b/doc/README.nios2
> new file mode 100644
> index 0000000..453c7c7
> --- /dev/null
> +++ b/doc/README.nios2
> @@ -0,0 +1,97 @@
> +Nios II is a 32-bit embedded-processor architecture designed
> +specifically for the Altera family of FPGAs.
> +
> +Please refer to the link for more information on Nios II,
> +https://www.altera.com/products/processors/overview.html
> +
> +Please refer to the link for Linux port and toolchains,
> +http://rocketboards.org/foswiki/view/Documentation/NiosIILinuxUserManual
> +
> +The Nios II port of u-boot is controlled by device tree. Please check
> +out doc/README.fdt-control.
> +
> +To add a new board/configuration (eg, mysystem) to u-boot, you will need
> +three files.
> +
> +1. The device tree source which describes the hardware, dts file.
> + arch/nios2/dts/mysystem.dts
> +
> +2. Default configuration of Kconfig, defconfig file.
> + configs/mysystem_defconfig
> +
> +3. The legacy board header file.
> + include/configs/mysystem.h
> +
> +The device tree source must be generated from your qsys/sopc design
> +using the sopc2dts tool. Then modified to fit your configuration. Please
> +find the sopc2dts download and usage at the wiki,
> +http://www.alterawiki.com/wiki/Sopc2dts
> +
> +java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
Just a hint -- in case you're listing a command, add a dollar sign before
it to be explicit it's a command, like this:
$ java -jar ...
Otherwise,
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH v2] nios2: add README.nios2
2015-10-20 21:25 ` Marek Vasut
@ 2015-10-21 0:29 ` Thomas Chou
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Chou @ 2015-10-21 0:29 UTC (permalink / raw)
To: u-boot
Hi Marek,
On 10/21/2015 05:25 AM, Marek Vasut wrote:
>> +java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
>
> Just a hint -- in case you're listing a command, add a dollar sign before
> it to be explicit it's a command, like this:
>
> $ java -jar ...
Thanks for the hint. I will add that.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH v3] nios2: add README.nios2
2015-10-19 6:06 [U-Boot] [PATCH] nios2: add README.nios2 Thomas Chou
2015-10-19 12:35 ` Marek Vasut
2015-10-20 1:48 ` [U-Boot] [PATCH v2] " Thomas Chou
@ 2015-10-21 14:42 ` Thomas Chou
2015-10-22 1:40 ` Marek Vasut
2015-10-23 0:19 ` Thomas Chou
2 siblings, 2 replies; 8+ messages in thread
From: Thomas Chou @ 2015-10-21 14:42 UTC (permalink / raw)
To: u-boot
Add README.nios2 about how to add nios2 boards to u-boot.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
---
v2
add ref and fix words as suggested by Marek.
v3
add a dollar sign before a command.
remove u-boot,dm-pre-reloc property. it is not needed now.
doc/README.nios2 | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 doc/README.nios2
diff --git a/doc/README.nios2 b/doc/README.nios2
new file mode 100644
index 0000000..2dab7d1
--- /dev/null
+++ b/doc/README.nios2
@@ -0,0 +1,95 @@
+Nios II is a 32-bit embedded-processor architecture designed
+specifically for the Altera family of FPGAs.
+
+Please refer to the link for more information on Nios II,
+https://www.altera.com/products/processors/overview.html
+
+Please refer to the link for Linux port and toolchains,
+http://rocketboards.org/foswiki/view/Documentation/NiosIILinuxUserManual
+
+The Nios II port of u-boot is controlled by device tree. Please check
+out doc/README.fdt-control.
+
+To add a new board/configuration (eg, mysystem) to u-boot, you will need
+three files.
+
+1. The device tree source which describes the hardware, dts file.
+ arch/nios2/dts/mysystem.dts
+
+2. Default configuration of Kconfig, defconfig file.
+ configs/mysystem_defconfig
+
+3. The legacy board header file.
+ include/configs/mysystem.h
+
+The device tree source must be generated from your qsys/sopc design
+using the sopc2dts tool. Then modified to fit your configuration. Please
+find the sopc2dts download and usage at the wiki,
+http://www.alterawiki.com/wiki/Sopc2dts
+
+$ java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
+
+You will need to add additional properties to the dts. Please find an
+example at, arch/nios2/dts/3c120_devboard.dts.
+
+1. Add "stdout-path=..." property with your serial path to the chosen
+node, like this,
+ chosen {
+ stdout-path = &jtag_uart;
+ };
+
+2. If you use SPI/EPCS or I2C, you will need to add aliases to number
+the sequence of these devices, like this,
+ aliases {
+ spi0 = &epcs_controller;
+ };
+
+Next, you will need a default config file. You may start with
+nios2-generic_defconfig, modify the options and save it.
+
+$ make nios2-generic_defconfig
+$ make menuconfig
+$ make savedefconfig
+$ cp defconfig configs/mysystem_defconfig
+
+You will need to change the names of board header file and device tree,
+and select the drivers with menuconfig.
+
+Nios II architecture --->
+ (mysystem) Board header file
+Device Tree Control --->
+ (mysystem) Default Device Tree for DT control
+
+There is a selection of "Provider of DTB for DT control" in the Device
+Tree Control menu.
+
+( ) Separate DTB for DT control, will cat the dtb to end of u-boot
+binary, output u-boot-dtb.bin. This should be used for production.
+If you use boot copier, like EPCS boot copier, make sure the copier
+copies all the u-boot-dtb.bin, not just u-boot.bin.
+
+( ) Embedded DTB for DT control, will include the dtb inside the u-boot
+binary. This is handy for development, eg, using gdb or nios2-download.
+
+The last thing, legacy board header file describes those config options
+not covered in Kconfig yet. You may copy it from nios2-generic.h.
+
+$ cp include/configs/nios2-generic.h include/configs/mysystem.h
+
+Please change the SDRAM base and size to match your board. The base
+should be cached virtual address, for Nios II with MMU it is 0xCxxx_xxxx
+to 0xDxxx_xxxx.
+
+#define CONFIG_SYS_SDRAM_BASE 0xD0000000
+#define CONFIG_SYS_SDRAM_SIZE 0x08000000
+
+You will need to change the environment variables location and setting,
+too. You may change other configs to fit your board.
+
+After all these changes, you may build and test.
+
+$ export CROSS_COMPILE=nios2-elf- (or nios2-linux-gnu-)
+$ make mysystem_defconfig
+$ make
+
+Enjoy!
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH v3] nios2: add README.nios2
2015-10-21 14:42 ` [U-Boot] [PATCH v3] " Thomas Chou
@ 2015-10-22 1:40 ` Marek Vasut
2015-10-23 0:19 ` Thomas Chou
1 sibling, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2015-10-22 1:40 UTC (permalink / raw)
To: u-boot
On Wednesday, October 21, 2015 at 04:42:03 PM, Thomas Chou wrote:
> Add README.nios2 about how to add nios2 boards to u-boot.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> Acked-by: Marek Vasut <marex@denx.de>
Nice :-)
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH v3] nios2: add README.nios2
2015-10-21 14:42 ` [U-Boot] [PATCH v3] " Thomas Chou
2015-10-22 1:40 ` Marek Vasut
@ 2015-10-23 0:19 ` Thomas Chou
1 sibling, 0 replies; 8+ messages in thread
From: Thomas Chou @ 2015-10-23 0:19 UTC (permalink / raw)
To: u-boot
On 10/21/2015 10:42 PM, Thomas Chou wrote:
> Add README.nios2 about how to add nios2 boards to u-boot.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> Acked-by: Marek Vasut <marex@denx.de>
> ---
> v2
> add ref and fix words as suggested by Marek.
> v3
> add a dollar sign before a command.
> remove u-boot,dm-pre-reloc property. it is not needed now.
>
> doc/README.nios2 | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 doc/README.nios2
>
Applied to u-boot-nios.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-10-23 0:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 6:06 [U-Boot] [PATCH] nios2: add README.nios2 Thomas Chou
2015-10-19 12:35 ` Marek Vasut
2015-10-20 1:48 ` [U-Boot] [PATCH v2] " Thomas Chou
2015-10-20 21:25 ` Marek Vasut
2015-10-21 0:29 ` Thomas Chou
2015-10-21 14:42 ` [U-Boot] [PATCH v3] " Thomas Chou
2015-10-22 1:40 ` Marek Vasut
2015-10-23 0:19 ` Thomas Chou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox