Getting started with this ARM7 board - linux

This bad boy arrived in the post recently. But, didn't have any instructions, CD-ROM or Dev Kit stuff.
Despite lack of instructions, I'm pretty sure we should be able to get it going with DS-5, a JTAG cable and embedded linux. The goal is to get a small web server/site running on it.
It's an UB4020EVB board with SEP 4020 ARM7 chip. Has JTAG, USB and ethernet connections.
Does anyone know a) What hardware kit I need to get it up and running with an OS, and b) if there's any particular JTAG cable we need.
Any help appreciated.
Thanks!
T

Good luck; all the data I can find on this is in Chinese. Apart from that ARM7 is not a good platform for Linux since it lacks an MMU. uCLinux will run without an MMU, but rather misses much of the benefit of using Linux in the first instance.

Related

Linux - Nic's flags configuration

Context
Debian 64 bit. kernel 3.18.x
Litterally struggling to understand how a network driver is initialized.
I mean how to choose which flag to set. I dig in the kernel for days now to train myself. The card setup is the only point I miss.
I take the intel 82574 as an example. I downloaded the card's datasheet, saw many information but not a clue on how to setup the hardware.
Question
Where to start to know what flags to set ? The datasheet didn't helped me (i am not very experienced but willing to learn).
Please give me a starting point, a tip or anything to help me understand what is going on in the already written open sourced driver.
How can a developer knows how to initialize his nic ? (yes reinventing the wheel the time to understand)
You'll need to read the source code of the kernel module that handles your specific NIC.
EDIT: Of course, to develop such a module, you'd usually just use a register map as specified in a data sheet or application node; often, manufacturers develop their linux drivers themselves, so the driver developers might even be the same people that developed the chipset (because it's really handy to have a platform to test against -- it's impossible to test hardware without having something like a driver, so you might as well write a proper driver).
Furthermore, devices often come with code examples -- no one is going to build a device based on an IC that he has not seen in action.
If you've got access to neither proper documentation nor source, you can only reverse engineer - and that's an incredibly large field.
Using your example with the Intel 82574 Network Adapter, Intel provides a zip file of the source code used to build the Linux driver. The driver is like all drivers in that it hooks into the OS API for Networking.
The Linux networking API is document on both the linux.org site and discussed on popular Linux sites like lwn.org. Below is the link to lwn's chapter on Network drivers using the networking API called NAPI.
https://static.lwn.net/images/pdf/LDD3/ch17.pdf
You'll notice in the Intel igb driver source code that the NAPI net_device data structure is one of the first things that is setup. It registers the driver with the OS. This way the OS knows which igb functions to call when loading/unloading the driver, or when needing to send/receive data.
The igb functions read/modify/write the necessary bits in the 82574's memory-mapped registers that control and monitor the device. The device registers are all documented in the 82574 datasheet available on Intel's site. And this is usually the case for almost any networking company like Broadcom/Chelsio/Mellanox/Marvell.
Hope that helps a little more.

Benefits of UNIX or UNIX variant on microcontroller?

This may be a foolish question but I've been searching around for some time and don't see a clear answer. I've seen several microcontrollers advertised as running Unix-like software (Linux, Ubuntu) for example, the BeagleBone Black and Arduino Yun. Can someone please explain to me the benefit of this? So far I've used a couple of microcontrollers like the Arduino Uno/Duo, Freescale FRDM and STM32 Discovery which either didn't have this feature or I was not aware of it. I'm starting to see it more and more on newer microcontrollers so I'd like to know what it brings to the table.
Full disclosure: I've had minimal exposure to UNIX and its variants so far so please talk slowly and use small words =)
Hope to hear from you,
Yusif Nurizade
You get complex drivers already included Linux for free (USB, internet protocols, storage media and file systems).
You can use lots of free software for the things not included in the kernel.
It is simpler to develop software on a full OS (easier to debug, look what is going on, change the configuration, etc etc).
The drawback is that the real-time capabilities are generally worse than for some small RTOS, and it needs more resources (a couple of megabytes memory).
In the heart of all Android and iphone is a Embedded Linux System. Without getting too deep
Linux + Java = Android
BSD Unix variant + C/C++/Object C = iOS
Now if you get deeper the above two statement can be argued for accuracy
All Android devices run on ARM based microprocessors. Beaglebone is one such open source hardware platform with can run Android as well as Embedded Linux distribution and even a Ubuntu.
Now (IMHO) Ubuntu is primarily for desktop and server application. Many of the popular computer server farms uses Ubuntu.
Now STM32 is a ARM based CORTEX-M micro control. Once again (IMHO) is mostly used for bare metal embedded applications. I have hard that FreeRTOS can be ported to TM4C123 ARM Cortex-M TM4C123.
Now the advantages of using Linux base micro controller architecture are
OS is free for the most part
Larger community of users
The industry is moving towards open source
Lot of free resources get up to speed
Disadvantage are
Learning curve is pretty steep
Expect to stumble and fall a few time
Below to two good resources to learn Beaglebone open source development
Beaglebone
Introduction to Beaglebone development by Derek Molloy of Dublin City University
HTH and good luck

Linux network driver port to ARM

I have a Linux network driver that was originally written for 2.4 kernel. It works perfect.
I want to port it to kernel 2.6.31 and then to ARM Linux with same kernel i.e. 2.6.31. I have actually done some minor changes to the driver so that it is able to compile under kernel 2.6.31 and it also loads and unloads without crashing. It also cross compiles for the ARM Linux. But I am unable to test it on ARM so far.
How do I check that the driver is fully compatible with the target kernel, and what considerations shall be made to make it compatible with ARM.
The driver is a virtual network device driver.
Thanks in advance.
Maybe you could use Qemu ( http://wiki.qemu.org/Main_Page) to emulate an ARM platform to be able to test your driver.
You cannot check the driver like that - you have to consider the API changes within 2.6.x series kernel. The changes are quite significant and the overall of the API's from the 2.4 series which is not currently in use.
I would suggest you to go here to the Amazon book store for this book in particular. The book is called 'Essential Linux Device Drivers', by Sreekrishnan Venkateswaran. A very well detailed explanation that will be your guidance in ensuring it works properly.
Since you mentioned the device driver is a network, presumably char device (You're not accessing it in blocks), well, the good news is that the 2.6.x series kernel APIs for the character devices are significantly easier and more centralized to focus on - in fact a lot of the framework is already in place in which the author of said book explains very clearly.
By the way, the book focusses on the latter 2.6.x series after 2.6.19, so this will help you clue in on what needs to be done to ensure your driver works.
You did not specify the ARM chipset you're targetting?
As for testing... well.. perhaps the best way to do this, this is dependant on how you answer the above question to you regarding ARM chipset - if its ARMv6, then perhaps, a cheap android handset that you can easily unlock and root, and pop the kernel in there and see what happens - sorry for sounding contrived but that's the best thing I can think of and that's what pops into my head, to enable you to test it out for ease of testing :)
PS: A lot of cheap ARMv6 handsets would have kernel 2.6.32 running Froyo if that's of any help!

Paravirtualizing linux on an ARM platform

I want to learn how to port linux to an ARM platform, and I am wondering if you guys have any tips or resources on how to do that? Everything from writing the boot file to setting up the interrupt vector, writing the linker script and having the executable system running.
I was thinking of buying a developer board to learn this, maybe Beagle board as it uses an ARM cortex processor and has a big user community. Is this a good idea? I am not very familiar with linux or porting operating systems in general, so any tips on how to get started would be nice!
What I want to do in the end is to virtualize all the linux kernels privileged operations to run in a hypervisor. Currently I have a hypervisor that is run beneath freeRTOS. All freeRTOS privileged operations (very few operations) have been changed to trap into the hypervisor by generating a SWI interrupt which leads to the hypervisor. What I want to do is too extend it to Linux instead which is more complex and alot bigger.
Best regards
Mr Gigu
You might want to check out the way it's done in L4Linux.
I would say start here...
http://elinux.org/BeagleBoard
From what I have seen, the Beagle Board seems to be one of the most widely supported boards 'community-wise' at this level.
As far as your questions goes, I am not totally sure what it is. If you are diving into all this embedded OS and linux stuff and want to have fun, that board is the probably way to go if you have some background with embedded development (which it seems you do). As far as professional development, not so sure...

Embedded Linux and device driver development

I plan to learn embedded linux and writing linux device drivers.
I need a dev board where I can,
Build and boot it with a linux distribution.
Write drivers for peripherals in the board.
(In future) Possible port Android to it
Can you suggest a dev kit to help me with this? Cost is not a bar - I am already familiar with linux at user space, I am willingly to spend to get better at the other side.
Thanks
James
How about a BeagleBoard (TI OMAP)? The Beagleboard has an active community and a lot of example projects, including an Android porting project. They're a few versions of Android behind the present day, but that should provide a starting point.
There is a new 25$ and 35$ option called Raspberry PI.
check this http://elinux.org/Android_on_OMAP
Google's Android on TI's ARM based OMAP SoCs / 2.6.23 Linux kernel
I think Armadeus project is for you. It is an open source project, that started in France and that is now expanding. The community is great and the number of peripherals is growing fast. Of course it is based on Linux.
A small company is building the boards. They are based on ARM9 and now ARM11. In the boards you also have a Xilinx FPGA, that open the doors for exciting experiments.
Hope this helps.
JCLL
Some cheap mini2440 linux board sounds like a good start. It can also run Android.
maybe you can have a Virtual Development Board, that is interesting.
Check also the OK6410 at http://www.arm9board.net, it is provided with Linux - 2.6.28 (2.6.36 in a quit near future) with all peripheral drivers and a basic Android system. You'll find it interesting and quit useful.

Resources