Can the F1C100s dream of embedded development for mediocre Linux users?

Hello, this is uzulla of Web-based engineers usually. I am studying at a study group called Low Level Study Group.

This is an Advent calendar article of "Japan Android Association Akihabara Branch Robot Department Advent Calendar 2020", which is a built-in, electronic work story, and does not talk about the Web. Many of my acquaintances are web-based, so please understand that there may be some redundancy for those who know it.

The following is "a collection of links that I would have been comfortable if I knew this from the beginning" (it has happened).

I'm interested in F1C100s/200s (about a year)

image.png

F1C100s is sold by Allwinner, SoC with (embedded) Arm (processor) (or rather, considering DRAM) SIP (Example)) (Roughly speaking, SoC/SIP is a chip in which various chips are put into one "chip" to form a system). Originally made for tablets and media players, it seems to be a historic chip.

Recently, it has been used in Game Gear Micro, and an SD card size development board called Lichee Nano has come out, and I think it has become a little famous.

Why are you curious?

I and everyone like (?) Gadgets, I like them too. I've been buying it, but it's human nature that I want to make it soon.

I used to distribute electronic name tags at a conference called Builderscon It was a lot of fun, it was made with Raspberry Pi, but the cost is high! And woodworking!

Reflecting on that (?), I also made something called REAL FM with ESP32 after the electronic name tag. After exhibiting at Bilcon, I exhibited at Tsukuba Mini Maker Faire 2020, but after all the cost is high and the development of ESP32 is troublesome (for Web people)! I want to write in a modern language! I mean, I want to write in LL! I mean, I want to move PHP! Give me a file system! After all, it is natural that I want Linux.

This chip that I learned about it is composed of CPU + DRAM (100s: 32Mbyte, 200s: 64Mbyte), and Linux runs if you connect SPI Flash (example) or SD card with a line. (must. In fact, there is a precedent called Business card that runs Linux, and the number of parts is quite small, and you can see that chips other than F1C100s are made up of general-purpose parts. In other words, it is cheap and easy to make (from the base) (should). In terms of performance, it is used in Game Gear Micro and Handheld Emulator, so you should be able to do various things.

I mean, I don't feel like drawing a base pattern that makes DRAM work properly ... So I want to use a SIP chipThere is also a circuit diagram! The best open sourceThere is also a BOM-like thing!

Should I use the existing SBC?

By the way, SBC of Linux is Raspberry pi (there are various theories). Raspberry Pi is really well made, cheap, and easily available in Japan. But the real awesomeness isn't there, I think it's the existence of Raspberry Pi OS (renamed from Raspbian). I think RPiOS is "a recent kernel, the drivers are completely following, and the userland (what is the package?) Is being updated properly", which is really amazing.

(And I end up with the question, "Why can't other companies manage it, why isn't there a'real'RP clone?" ... That chip (Broadcom's BCM2XXX) won't come out. Bootloader too. It seems to be non-OSS)

However, even though it is cheap, it is expensive to scatterRaspberry pi zero (non-w/wh) is 600-700 yen, and if you can get a lot of this, it's cheap (yet), but you can't get the number because it's for education!

Other than RPi, unexpectedly "Linux is moving'cheap'SBC" is not so much, sad. You have no choice but to make your own ...

But new and old

By the way, when it comes to using (?) F1C100s, the pain is that the environment is "old". First, the Kernel is old. For development boards and chips that are sung as "Linux compatible," the manufacturer (usually) forks some version of Linux, applies the driver, and BSP (a set of software that runs Linux on that board. ), And seems to end there (there is no continuous update, some support for a fee). (The bsp of licheepi nano is here It's a storage service of baido, so DL is very good)

For example, on the F1C100s documentation (http://nano.lichee.pro/index.html), the official kernel is (4.14) [https://github.com/Lichee-Pi/linux/tree/nano-4.14-exp). When I dug a branch often, I found out that it was nano-5.2-flash! I think, but it seems that there are USB device cannot be recognized as it is. The information around here is not officially written, so I have to do (hard) dig into forums etc..

If the kernel is old, the latest code (or rather, around libc?) Is awkward and awkward. Linux protects ABI (LSB) so much that old software (independent of the kernel) works, but new software (libraries) may not work. And there may or may not be a driver.

Returning to the story, in other words (chip maker, board maker) official offer does not follow the kernel version upgrade "too much", so even now with Linux 5.10, it will be 4 series for full function support. Volunteer maintenance may also integrate and follow the main line of the head family (Sunxi for AllWinner system), but after all all functions are not included (for example, F1C100s has audio and video Also drop?).

And distribution (which is what the average person refers to) is also difficult. For example, there are Various embedded Linux distributions, and Armbian for full spec (?) Like RPiOS, but BeagleBoard and [Orange Pi]. ](http://www.orangepi.org/) and ODROID from HardKernel are good, but they are not something that can be used with F1C100s. There is no "installer" (customized), and some distros do not support armel (or are more subdivided).

Aside: Arm is arm (up to here OABI), (from here EABI) armel, armhf, AArch64 (≒ Arm64) ... No actual packages are more disjointed Well ... for more details see Wikipedia, but since the F1C100s is the core of the ARM9 family v5TEJ architecture ARM926EJ-S, it is a delicate (powerless) zone called armel.

"Linux works!" That's right, but I couldn't expect something like "Recent Linux is working properly! There is an installer!" That feels like using Linux on a PC.

So, you have to either "give up on the Linux provided from the beginning and continue using it" or "build everything yourself".

Build

If you have a Linux environment, as mentioned above, if you can clear where to bring the kernel and what kind of patch to apply, building is very easy these days (if the source is not broken). I have to put in various tools and source code & build is a heavy process, so I recommend Linux on Docker. Or rather, the official distributes a set with docker image

If you google with arm-linux-gnueabi, you can see that the compiler is apt, and usually make menu conig… you don't have to, usually the official provides a config file, so copy it. , make oldconfig and make all arch = ARM CROSS_COMPILE = arm-none-eabi- to cross-compile. There is so much information around here, so I'll omit it.

If the build passes successfully, something like arch/arm/boot/zImage will be generated, create initramfs, create [image]](http://www.vjiot.net/typecho) /index.php/archives/53/) m burn to icroSD, etc..

Oh, and you also need u-boot as a Linux loader, there is a branch in the official fork

By the way

Build u-boot, linux kernel, initramfs and Tested with QEMU's Arm emulator without a real machine Create a microSD image from it and move it on the actual machine, Furthermore, I would like to talk about the fact that the OTG connector recognizes a USB device, a technically suitable Wifi dongle, and uses TCPIP.

There is a deadline for the Advent calendar, so let me do it next time! (Although it is progressing halfway, I tried again, I could not make it into letters, December ...)

And I want to organize the user land (world) by hand (build it myself), and if possible, manage the package easily by using OpenWrt or Armbian.

I used to do this kind of handiwork, so I can do it! I was proud of it, but I realize that the x86 environment was really easy mode. I don't know anything about Arm (around the boot).

I'm sorry for the dragonfly with a broken end (dragonfly with a broken neck?).

I want to design a new, Linux-powered mystery gadget and put it on the market. I will continue to do my best in the future, if progress is made again.

Below

An example of how this is actually moving with the F1C100s

image.png

I'm looking at a different CPU

I'm afraid I'm giving up because it's expensive, but it's a different CPU (RockChip system), but it's easy to have this much (memory 1GB, 4 cores) specs ... image.png

image.png In the end, I'd be happy if I could make this much. (Now, Pocket CHIP)

However, when you make a mysterious gadget, you feel like "Why can you make such a cheap Chinese/Korean/UK emulator?"

It was an abnormal snake leg.

Recommended Posts

Can the F1C100s dream of embedded development for mediocre Linux users?
Avoiding the pitfalls of using a Mac (for Linux users?)
[Linux] [Initial Settings] Table of Contents for Development Environment Setup
Check the memory protection of linux kerne with the code for ARM
A memo for utilizing the unit test mechanism KUnit of the Linux kernel
What Java users thought of using the Go language for a day