How to install transmission bittorrent client busybox function - embedded-linux

I found my WD MyPassport Wireless is running Buildroot Linaro linux with busybox; It doesn't have aptitude package manager. I don't know much about busybox; I came to know the commands provided by the busybox are called defined functions. How can I install Transmission BitTorrent client? I came across something called patch that i think provides Transmission function for the Buildroot busybox
http://buildroot-busybox.2317881.n4.nabble.com/PATCH-introducing-transmission-bittorrent-client-td7898.html
Is this the thing that does the thing? If so, how to go forward?
# uname -a
Linux Mammoth 3.2.0 #1 Tue Sep 8 14:42:47 CST 2015 armv7l GNU/Linux

You're confusing many things here. First "Buildroot Linaro" doesn't mean anything. Buildroot (http://buildroot.org) is an open-source project that provides an embedded Linux build system, Linaro (http://linaro.org) is a non-profit organization that enhances the support of the ARM architecture in the Linux eco-system. The main interaction between the two is that Buildroot can use a Linaro toolchain as the cross-compiler.
Indeed, there is nothing like "aptitude" on a Buildroot generated system, because we don't support binary packages. See http://buildroot.org/downloads/manual/manual.html#faq-no-binary-packages for details.
Finally, you're confusing Buildroot and Busybox. Busybox is a userspace application that provides a lightweight implementation of many basic Linux utilities. It is one of the 1600+ userspace packages provided by Buildroot.
Busybox definitely doesn't provide a Bittorent client. However, Buildroot indeed has a package for transmission.
So if you want to move forward, you need to get the source of the Buildroot that WD used to generate the firmware to your device, modify this Buildroot to add transmission, then re-build the filesystem using Buildrot, and finally flash it on your device.

Related

embedded linux kernel distribution

I am doing embedded system development with my EVM board. And now, i want to release my whole software to others. To get some referrences on how to package my software, i downloaded some other vendors' linux SDK.
The thing confused me is if its vendor modified the linux kernel, instead of releasing the SDK with a dirty kernel directly they all have a original clean kernel along with a patch containing this modification.
So,that is why? To avoid license? Linux kernel license requires the kernel not be spreaded with personal modification?
Thanks

setting up a development environment for Linux device driver

I am trying to read the LDD book by Jonathan Corbet, Greg Kroah-Hartman, Alessandro Rubini and implement the sample modules. So to begin with, I tried setting up a development system. Installed Ubuntu 16.04 Xenial. Now, I just created a directory and wrote the hello_world module with a Makefile. Got it built and run it, verified the dmesg logs.
Is that all the development setup? I searched online and found articles where they are asking to download and compile the kernel, use a VM to boot the kernel. What is the reason? Or what am I missing?
Is there any better article which clarifies this?
Thanks
hago
You can try one more way:
If you have native windows, install virtual machine software such as
Virtual box. Get your favourite Linux distribution (no bias, just
an example - Ubuntu) and install it through Virtual box.
Get the latest kernel (or of your choice) from kernel.org.
Choose the platform you want to build this kernel for. E.g arm64 or x86.
In case you do not have real boards (e.g RPi for arm variant), you can use qemu-arm64 or qemu-x86 to run your compiled kernel. This is also a good option when users do not have the boards.
Another good use case for using qemu for the newbie kernel developers is even they write some modules which crashes, then the qemu instance is crashed so no harm.
I think using qemu is a good option for people who starts to learn kernel programming and also want to try writing some of their modules and do not intend to purchase hardware at this point of time.
It depends on your target. For your case, you have made a kernel driver for your computer (it run Linux kernel).
But if you want to develop a Kernel driver for another target like Rasberry Pi, ARM board, X86-X64 board, ... you must learn to compile, edit Kernel config, boot Kernel image, ... because each target has different kernel versions.
You can refer to this training for more detail: https://bootlin.com/training/embedded-linux/

In what circumstances 'Openwrt ' is preferred over 'Buildroot' frame work?

I'm confused between Buildroot and OpenWrt. I mean in which scenario one will choose OpenWrt over Buildroot.
As per my understanding, there are only 2 differences between Buildroot and OpenWrt
OpenWrt provides package manager(opkg) which is not available for buildroot.
OpenWrt provides the good number of packages support for most networking related devices (routers, switches etc).
If I don’t need any package manager for a project and yet I want network support then I can choose Build root over OpenWrt, right? Is it not possible to build networking related packages in Buildroot itself?
I mean if package manager is not a concern we can go ahead with buildroot itself right? there is no need to opt OpenWrt?
If I'm wrong can anyone address the scenarios where buildroot fails and Openwrt wins?
I mean is it possible to achieve what OpenWrt is doing(Building Firmware images for networking related hardware) with Buildroot itself. I observed that the init process (early userspace) behaviour is different for Buildroot and OpenWrt.
In Buildroot init script will be read etc/inittab and the scripts under init.d will be executed.
In Openwrt procd is the init script (rc.common)and will run the scripts listed under init.d as well as scripts under rc.d.
Will this affect any way if I try to use Buildroot to generate an Image for the firmware which is supported by OpenWrt?
OpenWRT is based on Buildroot, just as Ubuntu is based on Debian. While the two projects share code, OpenWRT focuses on routers and the like, whereas buildroot is just a general purpose toolchain for embedded linux. What you should be asking yourself is, "Which of these two projects contain what I need to accomplish my task?"
OpenWRT can be compiled without opkg, in fact, many packages can be ripped out and it will work just fine. This is useful for devices with less resources.
Also, OpenWRT can be made to use regular init scripts; you don't have to use procd if you don't want to. The abstractions offered by it do make it easier to configure an existing package, however, if you are looking to port a new package, advanced knowledge of procd is needed to create those from scratch.

How to install a bare Linux kernel without any distribution to study it?

I want to study the kernel of Linux without any distribution.
I found the LoadLin boatloader of Ms-dos, but i think it works only in older version of windows (windows 95,98, ME).
So i need to install the kernel only in my PC if Possible.
How I can install it?
The kernel only is not that much useful to you; you'll probably need some shell and a working compiler if you want to test things first-hand, and these are not part of the kernel.
There's a distribution called Linux From Scratch which basically allows you to install the kernel and then whatever other stuff you want, literally from scratch (as in, by compiling stuff yourself and only adding what YOU want)
I am wondering though, what is it exactly you want to study and how does having a distribution affect your studying of the kernel? (Yes, some distributions ship custom kernels but the major features are almost always the same)
Minimal Linux Live is a small script that:
downloads the source for the kernel and busybox
compiles them
generates a bootable 8Mb ISO with them
The ISO then leaves you in a minimal shell with busybox.
With QEMU you can then easily boot into the system, which might be a more convenient way to study the kernel.
Or you can just use the Live ISO as a regular distribution and install it on metal.
Usage:
git clone https://github.com/ivandavidov/minimal
cd minimal/src
./build_minimal_linux_live.sh
# Wait.
# Install QEMU.
# minimal_linux_live.iso was generated
./qemu64.sh
and you will be left inside a QEMU Window with you new minimal system. Awesome.
See also:
https://unix.stackexchange.com/questions/17122/is-it-possible-to-install-the-linux-kernel-alone
https://superuser.com/questions/307087/linux-distro-with-just-busybox-and-bash
Why not use a distribution? Just get some free VM (eg. virtualbox) and install an arbitrary Linux distribution. You have all the build tools there you need to compile the kernel, without actually touching your system.

Playing/Learning -- QEMU (for ARM), Angstrom Linux (or Debian)

My ultimate goal is to do some programming for the Angstrom Linux (or Debian or other Linux distros), on QEMU emulating ARM processor board s.a. Versatile board. I am happy to experiement, but if someone has attempted something similar, and can give little guidance, it might hasten progress.
My understanding of the steps needed are:-
1. Build QEMU from source (although I am not sure if a prebuilt binary won't do). I found QEMuManager on Windows (XP being my Desktop OS on which I intend to run QEMU).
2. Install ARM tool chain (e.g. Yagarto / GNU-ARM for Cygwin?)
3. Download an Angstrom Linux tarball and build it
4. Create a QEMU image with Angstrom Linux.
However I am missing on the details, as I believe there are choices to be made at each of those steps.
IMHO you should use a linux distribution as host machine for your QEmu instead of trying to compile/install all the QEmu stuff in a cygwin based system, it will remove some futur headaches. You can use a VMWare player with an ubuntu image.
I used to play with this tutorial for Debian on QEMU.
The beagleboard, hawkboard, open-rd sites all tend to lead to their distros being built on qemu (arm), and from there there is no reason why you cannot just continue to keep running on the simulation instead of heading for hardware.
This is an example of how to do it with ubuntu.
https://wiki.edubuntu.org/ARM/RootfsFromScratch
Yes it is also possible to cross compile everything as well, I would start with wiki pages that hand hold you through all of the steps. Or as with the hawkboard or beagleboard get a pre-built binary (kernel and root file system) and just boot it and run on that environment and not mess with building everything.

Resources