LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-12-2019, 12:37 PM   #1
tzykid
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Rep: Reputation: Disabled
Can I build an OS with these files?


Greetings,

I work for an equipment refurbisher and some of the equipment we have run an embedded PC which uses a flash drive as its internal storage. For this particular piece of equipment the flash drive is not here. I have a resources disk that has an os-packets folder. In the folder are the following files:

bboxconfig.txt

binutils-2.22-17.2.3.src.rpm

busybox-1.20.2.tar.bz2

gcc47-4.7.1_20120723-1.1.1.src.rpm

glib-2.15-22.6.4.src.rpm

libopenssl0_9_8-0.98x-1.1.2.src.rpm

libreadline5-5.2-127.1.2.src.rpm

linux-3.12.21.tar.xz

linuxconfig.txt

ncurses-5.9-12.5.1.src.rpm

python-2.7.3.tar.bz2

syslinux-3.72.tar.bz2

zlib-1.2.7-2.1.2.src.rpm



Can I build a working OS from these files? Where would I start?

From what I have been researching and what I'm told, the bootloader would be syslinux-3.72.tar.bz2 and the kernel is linux-3.12.21.tar.xz. I also assume that the linuxconfig.txt is the kernel options that are required for our embedded PC. I just don't know how to stir, mix, and bake this into an OS.

Any advice?
 
Old 06-12-2019, 01:55 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,696
Blog Entries: 13

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
I would say "yes" that there is a way to build a working OS from those files.

Likely using these files there's a process likely to be followed which would build the OS for that embedded PC.

What's missing is instructions.

Most of the .rpm files seem to be libraries, which are support files. Necessary, but probably not the actual starting points.

There are text files, but they also seem to imply static configuration files. Still I'd give them a look to see what they contain.

More typically you'd expect a README file to tell you information about how to complete the full process. If there is any other documentation provided, I'd check that. I'd also see if there are any hidden files. For Linux these are files that start with a dot in the name, such as .bashrc That is a file, but when you look at a directory listing in the normal manner, you don't get shown that file. Maybe there are some hidden files which contain the instructions, but there a no guarantees.

Another thing to do would be to extract the bz2 files and xz files and see if there are any README type of files or INSTALL or other files which describe how to proceed. And while there may be a BUILD, or INSTALL file in the linux tar.xz file, it may apply solely to that file, which may be the kernel. So it may not cover the details to build the actual full disk, and just tell you or help you build or install the kernel.

The best recommendation is to find documentation for the build and install process for those systems, which I do not feel is included with what you see.
 
1 members found this post helpful.
Old 06-12-2019, 02:23 PM   #3
tzykid
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you!
Great explanation of the files, I really appreciate that. This seems like a great start.
Quote:
The best recommendation is to find documentation for the build and install process for those systems, which I do not feel is included with what you see.
I'm going to check for any install or readme files in the .xz and .bz2 archives. I was hoping there would be some standard I could follow to get this running. That seems to not be the case.
Scary question: If I do not find any relevant documentation on the resources disk, am I out of luck?

Also, the .txt files look to me to be a kernel config file and a busybox config file. no useful information I was able to get out of them. I assume I can import the linuxconfig file to properly configure the kernel, when I get to that step.

Last edited by tzykid; 06-12-2019 at 02:26 PM.
 
Old 06-12-2019, 02:54 PM   #4
tzykid
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
So, after examining the files more thoroughly, I have found generic readme's and install and howto documents for the individual pieces. I have not located any document to tie everything together and make it coherent. It most likely is not a public document for this software.

My quest to find a starting point continues....

If I were to look at this as a generic super simple/light OS I feel like I would want to:

1. take a USB drive and extract the kernel to it
2. Use syslinux to build a bootloader
3. ??? (my inexperience says I need more than a bootloader and kernel to have somethign functional)
4. load buzybox or dev tools (I don't know which would go first)
5. load the rest of the packages.

Does this seem logical?
I have never ran into anything like this before. I've loaded my fair share of ubuntu and some CentOS...
but this feels very different.
 
Old 06-12-2019, 03:06 PM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,696
Blog Entries: 13

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
For Linux you need a bootloader, kernel, and root file system.

Meanwhile for an embedded system, you need the correct versions all set up the way they designed them to be. Such as a kernel which may be xx years old, or something.

My suspicion would be that you'd find install or build information for each individual piece, only because that is very common. That does not guarantee you'd be able to integrate them together exactly as intended for their product.

You need product design documents which describe the process that they follow. There also may be tools which "use" those files, but aren't on that disk.

You can try to extract the syslinux, the kernel, and busybox all to a drive and see if you can get that to boot, and then install the various libraries. I'm expecting you'd end up trying a lot of variations and obtaining varied results, anywhere from: nothing at all, partial boot with eventual crash, to full boot but then nothing evident, i.e. no product operation in the expected sense. Not that you specifically wish to make this product operate exactly as intended, or maybe you do.
 
1 members found this post helpful.
Old 06-12-2019, 03:09 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,696
Blog Entries: 13

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
Since you're a refurbishing company, do you have any other samples? And do any of them have a full install? Or did you obtain all of these in a similar state?

Another option is whether or not these can just run any form of Linux and not care about the original. Or if you can find a distribution which has the 3-12.21 kernel and see if that boots. It's about 5 years old I think. May be worth trying just any distribution which is suitable for the processor which that computer contains. Do you at least have the hardware specs for the system?
 
1 members found this post helpful.
Old 06-12-2019, 03:34 PM   #7
tzykid
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
You can try to extract the syslinux, the kernel, and busybox all to a drive and see if you can get that to boot, and then install the various libraries. I'm expecting you'd end up trying a lot of variations and obtaining varied results, anywhere from: nothing at all, partial boot with eventual crash, to full boot but then nothing evident, i.e. no product operation in the expected sense. Not that you specifically wish to make this product operate exactly as intended, or maybe you do.
This is where I feel I'm headed. I have some time to try to figure this out, so I want to do some learning and trial and error. I assumed this would be the case.
Quote:
You can try to extract the syslinux, the kernel, and busybox all to a drive and see if you can get that to boot
Is that it? Just extract the files and it *may* just work? Then add packages from there?

Quote:
do you have any other samples?
No, we sometimes do have them, but currently, this is our only one. Untill yesterday I honestly did not know this is how the embedded PCs were running. I had assumed it was some sort of ROM on a board. This makes my life easier if I can work my way through it.

Quote:
Another option is whether or not these can just run any form of Linux and not care about the original. Or if you can find a distribution which has the 3-12.21 kernel and see if that boots.
I was able to do this! I installed OpenSuse 12.2 onto a flash drive and the embedded Pc boots to a command line. I feel like I need the extra packages installed to get it to function the way it should. But this is another avenue I plan to explore if I cannot get the kernel running from the resource disk.

And if anyone wants to know the specs:
Intel Core2 DUO E8400
2 GB ram
fujitsu d2831-s12 MOBO
BIOS version 6.0
 
Old 06-12-2019, 04:55 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,588

Rep: Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698
Quote:
I feel like I need the extra packages installed to get it to function the way it should.
How should it function? The motherboard is a micro ATX form factor so while the board is smaller then a normal motherboard i.e 9.6 9.6 in (244 244 mm) it is still just a 64 BIT PC. Granted you probably can get a working system is there anything else on the resources disk that has the program or whatever to run whatever it actually is meant to do? It might actually have an image file for the complete OS.

ftp://ftp.ts.fujitsu.com/pub/mainboa...2831_D2836.pdf
 
1 members found this post helpful.
Old 06-12-2019, 07:57 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 14,946
Blog Entries: 25

Rep: Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208Reputation: 4208
OP, you might want to take a look at the LFS documentation, if you have not done so already.
 
1 members found this post helpful.
Old 06-13-2019, 04:49 AM   #10
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 2,991

Rep: Reputation: Disabled
Looks to be mainly Intel chips on those boards, so I'd just try a regular distro running 'live' from USB/pendrive.

(AntiX & MX Linux are my favourites.)
 
Old 06-13-2019, 08:05 AM   #11
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,696
Blog Entries: 13

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
Quote:
Originally Posted by tzykid View Post
Is that it? Just extract the files and it *may* just work? Then add packages from there?
A full Linux install is exactly what I said before.
  1. A way to boot, the bootloader
  2. The Linux kernel
  3. A root file system
End of story. So yes, that should be it.

As far as it *may* just work. Yes, exactly, and sorry if that sounds negative or something. It is not mean spirited, nor intended to be. You are dealing with some code that someone else developed and has not provided detailed documentation about. And basically because they did not intend to provide their install steps and full information freely, or if they did, they did not finish, or etc.

I've made embedded Linux products. They are commercial products. A company selling their product does not always care if anyone can play around with the Linux on their system. It was intended to fulfill exactly one purpose, the purpose of their product. Many times it is just a proprietary design. Not some serious secret, however also not intended to be an open system where their customers are free to customize. Instead they just happened to use Linux. People also use things like FreeRTOS, VxWorks, or some other commercial or open RTOS. Most of the time when developing a product, they develop the product application, and they protect that code as much as the company asks them too, or the team discusses how much protection versus not, that is important to them. Sometimes it is too expensive in R&D time to bother. Plus if their application code is in binary form, what do they care if someone can play with the general form of Linux which is on their system. They probably say, "You modify the contents of our product, the product is no longer valid." And then they charge support money to fix what you should have left alone. Again, that's not them trying to be negative, it may simply never have been their intentions to provide a general and open Linux distribution for people to play with. Instead they used Linux to provide an operating system where they could run their application. And then they wrote their application, probably somewhere in those files, but in binary form, not source code.

Sounds as if the company either no longer exists, or they no longer sell or support these systems. That's the business world, and there is no rule saying that whatever they once developed, that they're required to provide all support code and documentation to the world.

There's also no rule that whatever they once sold needs to be useful for any other purpose than what it was intended for, nor that it has to be capable of being reverse engineered by anybody.
 
1 members found this post helpful.
Old 06-13-2019, 08:25 AM   #12
tzykid
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
How should it function?
From seeing a different unit boot up, what I gather, is that after the OS boots it loads Busybox. busybox has a custom configuration that listens on port 32768 for information coming from the networked windows system. When the windows system connects, that's when I get fuzzy on the process. It seems to dump configuration and tune information to the system and begins checking the equipment. I'm not sure if this is a function of the OS that is in the equipment or the Windows PC. But, I'm not sure this matters as everything happens inside busybox and I have what I believe to be the config file for busybox in the resource disk. (busyboxconfig.txt)

Quote:
OP, you might want to take a look at the LFS documentation, if you have not done so already.
I did NOT know this existed. This is a valuable resource, thank you very much for pointing me to it. Resources like the one you listed are really what I was looking for when I made this post. I have exhausted my googlefu in my search for answers before I posted and the LFS documentation never came up.

So, currently, my plan is to attempt to extract the syslinux, kernel, and busybox to a USB.. see if that will just 'work'
then I will begin diving into the LFS documentation if plan A does not work.
I will report back later today on my success/failure
Thank you everyone so far, this has been majorly helpful in my quest!
 
Old 06-13-2019, 08:36 AM   #13
tzykid
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
rtmistler

i did not take that negatively at all.
Thank you for your input. I wanted to make sure I understood what you were saying, so I reworded it and asked the question.
Quote:
I've made embedded Linux products.
I appreciate your experience and answering as thoroughly as you have.

Quote:
Sounds as if the company either no longer exists, or they no longer sell or support these systems.
This is my exact problem.

sorry my inexperience with this is showing, but you've been a great help pointing me in the right direction and getting me started on the right path to attempt to figure this out. I am going to begin working on this and come back with my findings and try not to ask more dumb questions!
 
Old 06-13-2019, 09:16 AM   #14
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,696
Blog Entries: 13

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
Your questions are not dumb, please don't self criticize yourself this way.

You're taking on an effort for which I would not have the fortitude to perform. Yes I realize it is for work and for a potential business interest. Best of luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/sda2 is almost full. How can I remove files from it and put these files elsewhere there is lots of space? e041110 Linux - Desktop 11 03-08-2018 02:15 PM
[SOLVED] Linux 4.4 seems to refuse to build IPv6 for the 64-bit build - 32-bit build works fine GameCodingNinja Linux From Scratch 2 02-07-2016 06:40 PM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM
Which is the kernel build directory? I Can't find kernel build files crabsody Debian 7 01-09-2007 04:48 AM
I can see shared units on Windows boxes, but can't see any files within these units emiliofil Linux - Networking 2 01-24-2005 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration