LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Fundamental question about deployment of embedded linux systems (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/fundamental-question-about-deployment-of-embedded-linux-systems-4175622408/)

vegeta1in 01-25-2018 05:13 PM

Fundamental question about deployment of embedded linux systems
 
Hi all,

I am currently working on development of an embedded linux system and I am using a SOM from Emcraft - https://www.emcraft.com/products/777 for my development. Their boards come with an example project out of the box and they already have a file system, kernel image and a bootloader(uboot).

Over time, I have set up the host PC and cross compiler, used their example project as a framework for my development, installed more things on top of it(eg. QT, serial port libraries etc) and have modified the initramfs file and thereby the file-system. In short, I've set-up the system so that it builds the kernel image(project.uImage), device tree blob(project.dtb) and a project.ubi file. Using u-boot, I then transfer these three files to my development board using tftp, and the board starts running my application instead of theirs, even on boot-up. This sets up the back-ground.

Now to my main question: on my final product PCB, I am not going to have an ethernet port. In that case, how should I update the flash memory on the SOM? What would be the easiest way to do so? I am willing to include an SD card slot only for programming, but do not want to ship the product with it, so booting from SD card is not an option(unless it is just a one time thing, for programming). What I can do, is copying the contents of the SD card(which is the above three files) over to flash memory and then booting up from flash. Only question is, how do I do that(or is it even feasible)? Can u-boot copy contents from one place to other like that before booting?
Your inputs would be very much appreciated. Thanks!

rocq 01-26-2018 01:27 AM

Any interface to external memory (SD, USB, etc) would be good. U-boot supports a bunch of filesystem types, such as fat, ext, ubifs, jffs2, etc.

Consider to use barebox (https://www.barebox.org/) instead of u-boot. Barebox started as a fork of u-boot in which the barebox' team wanted to improve the flexibility of u-boot. For example, adding support for a new board can be quite hard in u-boot. You'll need more deep knowledge about your board and it's not just a matter of creating a board configuration. It also requires some extra coding. Also working with the u-boot shell can be quite complex for beginners.

Barebox tackles these kind of issues by using proven concepts from Linux, such as devicetree support and an integrated unix-like shell.

Anyway, do some googling and find out if it suits your dirty desires.

vegeta1in 01-26-2018 10:01 AM

Quote:

Anyway, do some googling and find out if it suits your dirty desires.
Haha, thanks, I will.

Quote:

For example, adding support for a new board can be quite hard in u-boot. You'll need more deep knowledge about your board and it's not just a matter of creating a board configuration.
Since you brought this up, I want to ask a long standing question I have before I develop and release my own board. So I am planning to use the Emcraft SOM on top of my custom carrier board. They also have a starter kit(which has the SOM and also a carrier board they made), and I am currently using it for my development. When I release my own board, I am planning to keep the interfaces and connections exactly the same as those in the baseboard(but probably get rid of extra things such as ethernet or USB). Would I still have to change U-boot or can I continue using the uboot that is shipped with the board? I don't see why I would have to change uboot, but I am just confirming.

Thanks!

rocq 01-29-2018 12:42 AM

Quote:

For example, adding support for a new board can be quite hard in u-boot. You'll need more deep knowledge about your board and it's not just a matter of creating a board configuration.
I just looked up if u-boot nowadays has devicetree support and it turns out it does (by looking at the sourcetree). That should make live easier...

Quote:

Since you brought this up, I want to ask a long standing question I have before I develop and release my own board. So I am planning to use the Emcraft SOM on top of my custom carrier board. They also have a starter kit(which has the SOM and also a carrier board they made), and I am currently using it for my development. When I release my own board, I am planning to keep the interfaces and connections exactly the same as those in the baseboard(but probably get rid of extra things such as ethernet or USB). Would I still have to change U-boot or can I continue using the uboot that is shipped with the board? I don't see why I would have to change uboot, but I am just confirming.
If u--boot is using devicetree support, you probably won't need to change u-boot. I'm not familiar with the Emcraft boards so I can't really give a decisive judgement here. I'm just assuming that the hardware setup is alike. You would probably just need to adapt the devicetree to suit your board (disabling the interfaces you don't need on your board).


All times are GMT -5. The time now is 05:53 AM.