cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Linux Hwselect

Linux Hwselect




0 / 5 (0 votes cast)


The hwselect script will prepare the headers of the memory and io port maps of your board.

Change to the uClinux-dist directory

make vendor_hwselect SYSPTF=/path_to/your_sytem.ptf # this is instead of make hwselect

If you change the ptf later, you may have to make clean the kernel dir. Then run make vendor_hwselect SYSPTF=/path_to/your_sytem.ptf again.

If you use Altera Nios II dev boads, look for the (any) .ptf and .sof in dir, /opt/altera8.0/nios2eds/examples/verilog/ , e.g. If you use Altera Cyclone II Nios dev board with 2C35, the .ptf file is:

/opt/altera8.0/nios2eds/examples/verilog/niosII_cycloneII_2c35/full_featured/NiosII_?cycloneII_2c35_full_featured_sopc.ptf

and the .sof is 

NiosII_cycloneII_2c35_full_featured.sof

The ptf must match your board and the sof.

If you use DE2, look in DE2 support CD:

DE2_System/DE2_demonstrations/DE2_NET/ nios_0.ptf and DE2_NET.sof

(look for *.ptf, the filename may change)

You should select a Nios2 cpu, and sdram/ddr/ddr2_sdram. Your memory size should be at least 8MB.

Here is the example of NEEK,

RUNNING hwselect


--- Please select which CPU you wish to build the kernel against:

(1) cpu - Class: altera_nios2 Type: f Version: 7.071

Selection: 1

--- Please select a device to execute kernel from:

(1) ext_flash

Class: altera_avalon_cfi_flash

Size: 16777216 bytes

(2) ssram

Class: altera_avalon_cy7c1380_ssram

Size: 1048576 bytes

(3) ddr_sdram

Class: ddr_high_perf

Size: 33554432 bytes

Selection: 3

--- Summary using

PTF: /home/hippo/boards/ocm/cycloneIII_embedded_evaluation_kit_standard_sopc.ptf

CPU: cpu

Program memory to execute from: ddr_sdram

--- Settings written to /home/hippo/nios2-linux/uClinux-dist/linux-2.6.x/arch/nios2/hardware.mk

When you compile the kernel, file linux-2.6.x/include/asm-nios2/nios2.h will be generated. It contains the memory and io ports address of your board. 

Version history
Last update:
‎06-24-2019 08:43 PM
Updated by:
Contributors