Skip to contentSkip to conversation

Adding new board support

DISCUSSION Varka Bhadram 7 participants 8 messages Jun 6, 2014 – Jun 18, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

I am having a board which is customized for our requirement and it is based on cortex-a8 arm architecture.

I want to add the board support for this in linux kernel. From where can i start to get it work...?

Any tutorial for this to be done...?

Thanks and Regards,
Varka Bhadram
-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140606/9f4d4c97/attachment.html

#1 lore raw

Might be a good thing to start with something easier. If you can't navigate the source tree well enough to find the relevant code you will have a hard time rewriting stuff for different hardware.

Quoted 31 lines · Varka Bhadram

Hi,

I am having a board which is customized for our requirement and it is based on cortex-a8 arm architecture.

I want to add the board support for this in linux kernel. From where can i start to get it work...?

Any tutorial for this to be done...?

Thanks and Regards,
Varka Bhadram

-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#2 lore raw
Quoted 37 lines · Kristofer Hallin

Might be a good thing to start with something easier. If you can't navigate the source tree well enough to find the relevant code you will have a hard time rewriting stuff for different hardware.

Quoted 26 lines · Varka Bhadram

Hi,

I am having a board which is customized for our requirement and it is based on cortex-a8 arm architecture.

I want to add the board support for this in linux kernel. From where can i start to get it work...?

Any tutorial for this to be done...?

Thanks and Regards,
Varka Bhadram

-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

Quoted 5 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Quoted 4 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Hi Varka,

I would suggest you the following:-
1. Create a config file under arch/arm/configs/ for your board. You may refer to any of the standard configuration which closely resembles your board's configuration. To start with enable the basic configurations such as processor, timer, uart, etc and disable SMP which are the bare minimum requirements for the board to boot.
2. Add a folder under arch/arm/<mach-yourplatformname>. Add board.c where your can register your platform devices such as pcie, nand, usb, uart, gpio, rtc etc
3, Under the same folder above, add timer.c to initialize your timers.Add clock.c to enable/disable clocks and change clock rate of various Functional Blocks. Add <yourplatformname.c> to initialize your processor specific details such as global timers, arm pmu, interrupts, cache, global dma, ACP, SCU and inter-processor interrupt( if later you decide to enable SMP)
4. It is advisable to refer to a standard platform (like versatile - express ) to understand the board specific configurations in Linux.

Hope this helps to get you started,

Regards,
Ayan Kumar Halder

#3 lore raw

Thank you for the guidence...

Is there any tutorial to how to do the development for the board. ?

Thanks,

-Varka Bhadram

Quoted 66 lines · AYAN KUMAR HALDER
Quoted 37 lines · Kristofer Hallin

Might be a good thing to start with something easier. If you can't navigate the source tree well enough to find the relevant code you will have a hard time rewriting stuff for different hardware.

Quoted 26 lines · Varka Bhadram

Hi,

I am having a board which is customized for our requirement and it is based on cortex-a8 arm architecture.

I want to add the board support for this in linux kernel. From where can i start to get it work...?

Any tutorial for this to be done...?

Thanks and Regards,
Varka Bhadram

-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

Quoted 5 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Quoted 4 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Hi Varka,

I would suggest you the following:-
1. Create a config file under arch/arm/configs/ for your board. You may refer to any of the standard configuration which closely resembles your board's configuration. To start with enable the basic configurations such as processor, timer, uart, etc and disable SMP which are the bare minimum requirements for the board to boot.
2. Add a folder under arch/arm/<mach-yourplatformname>. Add board.c where your can register your platform devices such as pcie, nand, usb, uart, gpio, rtc etc
3, Under the same folder above, add timer.c to initialize your timers.Add clock.c to enable/disable clocks and change clock rate of various Functional Blocks. Add <yourplatformname.c> to initialize your processor specific details such as global timers, arm pmu, interrupts, cache, global dma, ACP, SCU and inter-processor interrupt( if later you decide to enable SMP)
4. It is advisable to refer to a standard platform (like versatile - express ) to understand the board specific configurations in Linux.

Hope this helps to get you started,

Quoted 7 lines

Regards,
Ayan Kumar Halder

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140609/7ec25939/attachment-0001.html

#4 lore raw
Quoted 4 lines · Varka Bhadram

Thank you for the guidence...

Is there any tutorial to how to do the development for the board. ?

Hi
I work in Vector Institute and I have done a similar development for our
own custom designed board based on iMX.
I have not found any tutorial for creating the BSP , just look at the other
board configurations and you will have an idea about how to start it.
But let me assure you that it will be a very frustrating when u spend 2 - 3
days to make a code and when you test it , you see that its not working and
you need to start all over again .. but ultimately its fun , and when the
board boots you will get a kind of satisfaction which can not be compared
with any other thing ..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140609/a730d572/attachment.html

#5 lore raw

Adding to others

If you are working on latest kernel versions, make sure to add Device tree file as well in arch/arm/boot/dts/

Thanks,
Vignesh Radhakrishnan

Quoted 23 lines · Sudip Mukherjee
Quoted 4 lines · Varka Bhadram

Thank you for the guidence...

Is there any tutorial to how to do the development for the board. ?

Hi
I work in Vector Institute and I have done a similar development for our own custom designed board based on iMX.
I have not found any tutorial for creating the BSP , just look at the other board configurations and you will have an idea about how to start it. But let me assure you that it will be a very frustrating when u spend 2 - 3 days to make a code and when you test it , you see that its not working and you need to start all over again .. but ultimately its fun , and when the board boots you will get a kind of satisfaction which can not be compared with any other thing ..

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Signature · 1 line
http://vigneshradhakrishnan.blogspot.com/
#6 lore raw
In reply to AYAN KUMAR HALDER

Hello,

Quoted 8 lines · AYAN KUMAR HALDER

1. Create a config file under arch/arm/configs/ for your board. You may refer to any of the standard configuration which closely resembles your board's configuration. To start with enable the basic configurations such as processor, timer, uart, etc and disable SMP which are the bare minimum requirements for the board to boot.
2. Add a folder under arch/arm/<mach-yourplatformname>. Add board.c where your can register your platform devices such as pcie, nand, usb, uart, gpio, rtc etc

Quoted 8 lines

3, Under the same folder above, add timer.c to initialize your timers.Add clock.c to enable/disable clocks and change clock rate of various Functional Blocks. Add <yourplatformname.c> to initialize your processor specific details such as global timers, arm pmu, interrupts, cache, global dma, ACP, SCU and inter-processor interrupt( if later you decide to enable SMP)
4. It is advisable to refer to a standard platform (like versatile - express ) to understand the board specific configurations in Linux.

Sorry to say so, but those recommendations are quite wrong when the goal is to add the support for a new _board_ in the kernel. What you're describing here are roughly the steps to add the support for a new SoC or family of SoC.

If what's needed is adding support for a new board that uses an ARM SoC already supported by the kernel, then all what's needed is either writing a Device Tree file (if the ARM SoC in question is supported through the Device Tree) or writing a board file in an existing mach-<foo> folder.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

Also It is depends on Kernel Version you are trying to add support for New Board.If your Kernel version doesn't support device tree blob then adding some Board files would be sufficient enough and you can also take reference from the other Board which is similar to your Board.

Regards
Sanjeev Sharma

Quoted 40 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · AYAN KUMAR HALDER

1. Create a config file under arch/arm/configs/ for your board. You may refer to any of the standard configuration which closely resembles your board's configuration. To start with enable the basic configurations such as processor, timer, uart, etc and disable SMP which are the bare minimum requirements for the board to boot.
2. Add a folder under arch/arm/<mach-yourplatformname>. Add board.c where your can register your platform devices such as pcie, nand, usb, uart, gpio, rtc etc

Quoted 8 lines

3, Under the same folder above, add timer.c to initialize your timers.Add clock.c to enable/disable clocks and change clock rate of various Functional Blocks. Add <yourplatformname.c> to initialize your processor specific details such as global timers, arm pmu, interrupts, cache, global dma, ACP, SCU and inter-processor interrupt( if later you decide to enable SMP)
4. It is advisable to refer to a standard platform (like versatile - express ) to understand the board specific configurations in Linux.

Sorry to say so, but those recommendations are quite wrong when the goal is to add the support for a new _board_ in the kernel. What you're describing here are roughly the steps to add the support for a new SoC or family of SoC.

If what's needed is adding support for a new board that uses an ARM SoC already supported by the kernel, then all what's needed is either writing a Device Tree file (if the ARM SoC in question is supported through the Device Tree) or writing a board file in an existing mach-<foo> folder.

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Quoted 5 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140618/a0071d99/attachment.html