LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-30-2018, 11:11 PM   #1
ballsystemlord
Member
 
Registered: Aug 2014
Distribution: Devuan
Posts: 203

Rep: Reputation: Disabled
Question I need help understanding SBCs


I have spent the last umpteen years learning Linux, reading Linux books, and studying Linux. However, when I bought a PocketCHIP (nextthing product), and an RK3399 (firefly product), I immediately experienced problems. Lots of problems -- just understanding and doing basic things with the SBCs.
One way of inspecting a system is to look at /ect/fstab. Both boards have a blank one! How does init mount your root fs if your fstab file is blank?!
Another is to cat /proc/cpuinfo. The RK3399 has 6 cores, 4 A53s and 2 A72s. According to cpuinfo the CPUs all have 48 BOGO MIPS! How does a faster clocked and faster arch produce an equal speed processor!? The Linux kernel depends on this information to get an idea of what cores to place tasks on.
I decided to examine the partition setup, only parted and gdisk cannot detect what kind of partition table the RK3399 has. How can Linux read a partition table but not know what it is?!
PocketCHIP is worse (this part is from memory), have you ever heard of the "Windows no touch me dread"? I have caught it! Badly! Every time I touch something the filesystem corrupts! I know what I am doing, no dd going on here, just package and config file changes.
So I say, "Well, I know how to fsck at run level 1", so I boot it and try to tell the uboot loader to boot /bin/sh in the initrd but I cannot find the option in the boot loader and the serial console's fsck will not fix the corruptions!
I figured I could get my data off and reflash, but I have had no luck there either.
When it was working I would try to access the console (CTRL-ALT-F#), no console, nothing. Doesn't every Linux system has a console?!
PocketCHIP has a small screen, so I figured that windows would auto resize to fit, no such thing, many just go off screen, dialog boxes just close when I move them. Many windows seem to have an absolute fixed size, how would I change that? No idea. I've never even heard of that before and I participate in 2 WM MLs.
What support do the various SBCs have with respect to their kernels and peripherals? PocketCHIP has a really strange keyboard problem, fixed by Xmodmap currently. My RK3399 has an M.2 slot that seems to only support NVME SSDs and as for the MIPI-CSI2 support, it's anyones best guess in spite of the various statements saying that duel cameras are supported.
And how to hack support for these various things? I've no idea. I have asked. Maybe I need reverse engineering skills. Maybe I just need to look at a few bits and then modify a few config parameters. Maybe it is impossible.

Worst of all, most any question I ask on the various forums, MLs, and BBSs goes unanswered, many other people seem to suffer from the same silence. It seems no body knows -- anything.

Are my experiences normal?
What do I need to know to fix these things?
Why are SBC's so strange?
 
Old 09-30-2018, 11:39 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
First: I have never worked with these particular boards. I have an Odroid though.
Quote:
Originally Posted by ballsystemlord View Post
One way of inspecting a system is to look at /ect/fstab. Both boards have a blank one! How does init mount your root fs if your fstab file is blank?!
Not sure how that works on those boards, but as far as I know fstab is not normally used to mount root. Rather, this is a kernel parameter, for example on my Odroid:
Code:
$ cat /proc/cmdline
root=UUID=e139ce78-9841-40fe-8823-96a304a09859 ....
Admittedly the Odroid does have an entry for root in the fstab. This is just for documentation purposes, I think, and/or fsck.

Quote:
Originally Posted by ballsystemlord View Post
Another is to cat /proc/cpuinfo. The RK3399 has 6 cores, 4 A53s and 2 A72s. According to cpuinfo the CPUs all have 48 BOGO MIPS! How does a faster clocked and faster arch produce an equal speed processor!? The Linux kernel depends on this information to get an idea of what cores to place tasks on.
I think BogoMIPS are called BogoMIPS for a good reason. Just FYI, here is my result (ARM CPU):
Code:
$ sudo dmesg |grep -i mips
[    0.378921] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.618620] SMP: Total of 4 processors activated (8.00 BogoMIPS).
$ grep -i mips /proc/cpuinfo
BogoMIPS        : 3.27
BogoMIPS        : 3.27
BogoMIPS        : 3.27
BogoMIPS        : 3.27
It's not even the same number. Hmmm. Anyway, I strongly doubt that the Linux kernel makes scheduling decisions based on BogoMIPS (but that's just me).

Quote:
Originally Posted by ballsystemlord View Post
I decided to examine the partition setup, only parted and gdisk cannot detect what kind of partition table the RK3399 has. How can Linux read a partition table but not know what it is?!
That's odd. Did you try fdisk? Is there an error message? A message in the message buffer?

(snip)

Quote:
Originally Posted by ballsystemlord View Post
the serial console's fsck will not fix the corruptions!
Why do you have corruptions in the first place, and what kind of corruptions are they? I think that fsck has limitations, especially on a non-journaled filesystem.

Quote:
Originally Posted by ballsystemlord View Post
When it was working I would try to access the console (CTRL-ALT-F#), no console, nothing. Doesn't every Linux system has a console?!
Depends on the kernel parameter console=tty0 or so.

Sorry I have no opinion or solution for the remaining PocketCHIP related questions. Is Next Thing Co still in existence?

One last opinion though:

Quote:
Originally Posted by ballsystemlord View Post
Why are SBC's so strange?
Because they are tiny and their architectures are different from the IBM PC on which Linux was created, and the Intel-based servers on which Linux runs in large numbers these days. Also, the companies that make them are often as small as the SBCs themselves, thus support may be less polished than, say, for Linux on Proliants.
 
Old 10-01-2018, 01:49 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052Reputation: 6052
here's my layman opinion (and please correct me if i'm wrong):
SBC's don't have BIOSes.
a bios is a great sort of compatibility layer that allows operating systems to work on all sorts of hardware.
but on an SBC, the OS has to communicate to the hardware directly.
which basically means a different, specialised basic system (kernel?) for each and every SBC. what a mess.
we IBM compatible PC users are so spoiled!

about the filesystem problems you experience, i think they are very specific to your current situation, but not specific to SBCs in general. maybe a hardware problem.
 
Old 10-01-2018, 02:30 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,108

Rep: Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138Reputation: 7138
yes, as it was already mentioned/explained the hardware is different (= special) and although the linux kernel is more or less general these extreme cases usually not built-in. These special hardware require special drivers and sometimes "unusual" solutions.
By the way, what kind of OS is installed?
 
Old 10-01-2018, 04:58 AM   #5
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,287

Rep: Reputation: Disabled
ARM processors are only just beginning to become more mainstream, up until now each & every one of those had their own board makers O/S.
With Android, things got better, but only for the most used chips.

The Raspberry Pi has a whole foundation behind it, & that is why it works, but it has its own way of booting up the chips for Linux to use.

I waited until these boards became more mainstream before I jumped in, & I chose the Raspberry Pi for the very reason that it did run Linux OK.
 
Old 10-01-2018, 09:06 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,906
Blog Entries: 43

Rep: Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142Reputation: 3142
Member response

Hi,

The Raspberry Pi does use a Linux based OS and the organization recommends Raspbian;
Quote:
From https://www.makeuseof.com/tag/gpio-zero-raspberry-pi/

The Raspberry Pi is the perfect computer for learning. The Linux-based Raspbian OS has Python built in, which makes it a great first system for beginner coders. Its General Purpose Input/Output (GPIO) pins make it easy for budding makers to experiment with DIY electronics projects.
It’s especially easy when you use code libraries that control these pins, and the popular RPi.GPIO Python library is an excellent example of such a library. But is it the best path for beginners? Join us as we investigate.
You can look at https://projects.raspberrypi.org/en/...etting-started for more information.
Hope this helps.
Have fun & enjoy!
 
1 members found this post helpful.
Old 10-03-2018, 12:52 AM   #7
ballsystemlord
Member
 
Registered: Aug 2014
Distribution: Devuan
Posts: 203

Original Poster
Rep: Reputation: Disabled
Sorry for the late reply. I will write something more intelligible in the morning.
Please see the announcement at the top of this page:
www.chip-community.org/index.php/Main_Page
Considering that they were always sold out of CHIPs I'm shocked and blindsided.
If I have a lemon I'm stuck with it -- permanently. I might find a replacement on ebay, but not for $9.
BTW: I'm not interested in or talking about the RPI.

Last edited by ballsystemlord; 10-03-2018 at 09:55 AM. Reason: Fixed broken link. Next time don't post when over-tired.
 
Old 10-03-2018, 06:59 AM   #8
average_user
Member
 
Registered: Dec 2010
Location: Warsaw, Poland
Distribution: Slackware
Posts: 560

Rep: Reputation: 220Reputation: 220Reputation: 220
Relax, embedded is different. Small devices are mostly based on ARM/ARM64 and only rarely MIPS, often raw NAND/NOR flash is used instead of HDD and for this reason exotic filesystems such UBIFS, JFFS or SQUASHFS are used. Busybox is commonly used and that means stripped versions of common utilities such as grep and no systemd and no bash and udhcpc instead of dhclient/dhcpcd but of course variations exist. Often uclibc or musl is used in place of glibc and all binaries are heavily stripped to save space. Sometimes dropbear is used instead of OpenSSH if there is SSH at all because serial console is used as a primary method of communicating with the device. In many cases manufacturers put their forked versions of Linux on the board and documentation is often scarce. And as you mentioned yourself, U-Boot instead of BIOS.

That being said, after taking a look at http://www.chip-community.org/index....re_and_Feeding I guess that the device you use is not that different from today's regular Linux desktop systems.

And you posted incorrect link - it should be: http://www.chip-community.org/index.php/Main_Page

Last edited by average_user; 10-03-2018 at 07:08 AM.
 
Old 10-03-2018, 09:48 PM   #9
ballsystemlord
Member
 
Registered: Aug 2014
Distribution: Devuan
Posts: 203

Original Poster
Rep: Reputation: Disabled
Update:
The CHIP websites and associated forums are down. I have no idea where the user base went.

Quote:
Originally Posted by berndbausch View Post
First: I have never worked with these particular boards. I have an Odroid though.

Not sure how that works on those boards, but as far as I know fstab is not normally used to mount root. Rather, this is a kernel parameter, for example on my Odroid:
Code:
$ cat /proc/cmdline
root=UUID=e139ce78-9841-40fe-8823-96a304a09859 ....
Admittedly the Odroid does have an entry for root in the fstab. This is just for documentation purposes, I think, and/or fsck.
Which is why we need it so much, docs and fsck are both really good things.

Quote:
Originally Posted by berndbausch View Post
I think BogoMIPS are called BogoMIPS for a good reason. Just FYI, here is my result (ARM CPU):
Code:
$ sudo dmesg |grep -i mips
[    0.378921] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.618620] SMP: Total of 4 processors activated (8.00 BogoMIPS).
$ grep -i mips /proc/cpuinfo
BogoMIPS        : 3.27
BogoMIPS        : 3.27
BogoMIPS        : 3.27
BogoMIPS        : 3.27
It's not even the same number. Hmmm. Anyway, I strongly doubt that the Linux kernel makes scheduling decisions based on BogoMIPS (but that's just me).
Hmm. You're right! I really thought that the kernel reused the BOGOMIPS for scheduling. I wonder how it does it then... I'll have to read up.
I'm still surprised that my 2 large ad 4 small cores have the same BOGOMIPS.
If I may, what cores are you testing?

Quote:
Originally Posted by berndbausch View Post
That's odd. Did you try fdisk? Is there an error message? A message in the message buffer?

(snip)


Why do you have corruptions in the first place, and what kind of corruptions are they? I think that fsck has limitations, especially on a non-journaled filesystem.
How? It's been a while, so I don't remember clearly. I shut PocketCHIP down and then rebooted, or maybe it froze and I rebooted it manually.
I'll include all the gory details below.

Quote:
Originally Posted by berndbausch View Post
Sorry I have no opinion or solution for the remaining PocketCHIP related questions. Is Next Thing Co still in existence?
Unfortunately, they seem to be out of business. Not I thought that they would ever solve the problems anyway...
As I said above they were always sold out of CHIPs. I thought they would make a second version.

Quote:
Originally Posted by berndbausch View Post
One last opinion though:

Because they are tiny and their architectures are different from the IBM PC on which Linux was created, and the Intel-based servers on which Linux runs in large numbers these days. Also, the companies that make them are often as small as the SBCs themselves, thus support may be less polished than, say, for Linux on Proliants.
I tried using artha without success, please define "Proliants".
As for less than perfect support, I thought that my GFX card had less than perfect support and it was made by AMD! Until about 1 year ago it did have lots of hangs.

Quote:
Originally Posted by pan64 View Post
yes, as it was already mentioned/explained the hardware is different (= special) and although the linux kernel is more or less general these extreme cases usually not built-in. These special hardware require special drivers and sometimes "unusual" solutions.
By the way, what kind of OS is installed?
Firefly's

Code:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"

Linux firefly 4.4.16 #974 SMP PREEMPT Tue Mar 7 11:07:30 CST 2017 aarch64 aarch64 aarch64 GNU/Linux
(Pocket)CHIP is a Debian system. Pretty much stock. Even lesspipe was not setup.

Here is a complete dump of my recovery attempt (I did a day ago), and all associated info I could collect:
https://paste.debian.net/1045793/

Thanks!
 
Old 10-05-2018, 11:48 PM   #10
ballsystemlord
Member
 
Registered: Aug 2014
Distribution: Devuan
Posts: 203

Original Poster
Rep: Reputation: Disabled
My paste was sacrificed to the internet gods. Here's a new one, it should be up for a month:
http://dpaste.com/0TDGDTG
 
Old 10-17-2018, 04:14 PM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 15,727

Rep: Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223Reputation: 2223
I'll throw one suggestion at where the company went.

Products out, profits in; THEN they realize the product sucks, the customers are looking for solutions to insoluble problems, they see lawsuits and returns coming. . .

It's fairly easy to "Wash" a company, sell it's assets to your next operation, transfer worthwhile staff to a new payroll, cancel leases and cease trading. The accountant liquidates, tax gets paid and the company is gone. It helps if you have a string of companies, and are contracting out capital intensive work like manufacturing.

In another place, a new startup opens it's doors, you've left a pile of liabilities and very little assets behind. You can't try that in Europe/America, but the law isn't as tight everywhere.

Last edited by business_kid; 10-17-2018 at 04:17 PM.
 
Old 10-17-2018, 08:31 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,821

Rep: Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610Reputation: 3610
"48 BOGO MIPS"

A few decades ago that was sort of a humorous stab at a windows metric. I think we all agree that the number is almost useless for deciding work ability.

I've never heard of kernel scheduling being automatically set by any install time metric. Could be wrong. The kernel settings are usually built in at kernel build sheet time.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help with understanding the 'with' keyword and understanding file reading and writing. vysero Programming 3 05-30-2018 03:37 PM
LXer: Will SUSE Bring SBCs to Datacenters? LXer Syndicated Linux News 0 12-31-2016 01:12 AM
LXer: ARMBRIX Zero SBCs bubble bursts LXer Syndicated Linux News 0 03-19-2013 07:10 AM
New forum for microcontrollers and SBCs. tekra LQ Suggestions & Feedback 14 10-10-2012 03:03 PM
LXer: Kontron SBCs support Linux LXer Syndicated Linux News 0 03-02-2008 06:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:45 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
Open Source Consulting | Domain Registration