embedded linux, initramfs with buildroot - linux

in my embedded system I'd like to use initramfs to perform some special operation.
Someone managed to make initramfs work?
I'm using buildroot 2016.2, the kernel is from my provider and we are at 3.0.x. I've enabled initramfs, so I just have to pass the path to my cpio.
At the moment getty is not working.
can't opegetty: can't opegetty: can't opegetty:
and hang forever.
Any idea?could be a toolchain problem?
I have used the tag initrd because there is not "initramfs"

Related

Why mdev or udev does not create disk nodes when used kernel is from any distribution

I created a minimal linux init with just busybox to do experiments or use it to recover my work linux. But i got stuck and was fustruted alot that i could not find any disks in /dev. I tried both mounting udev as devtmpfs and tmpfs with mdev -s. Both none seemed to work. Lickily i tried compiling a kernel and booting it i realised kernel was the issue. I also noticed my pluged mouse light was off as if the pc was turned off
I tried kernel from both debian and ubuntu. But same result.
Now im happy with what i got. But using custom kernel means i cant make use of the already existing drivers on a target linux when i do chroot.
So i wanna know why the kernels that come with distros does not generate disk blocks
Edit 1:
My question is,why i cant find ant /dev/sdX or my external keyboard does not work when i boot with kernel from distro isos

Integrate buildroot with BeagleBone github repository

I am using Buildroot to produce root filesystem and kernel for my BeagleBone Black. Currently I provide my custom kernel to buildroot. But I noticed there is several ready-made kernels for BeagleBone Black on GitHub.
Since Buildroot allows to download kernel source directly from a git repository, I should be able just to point Buildroot to the BeagleBone's kernel repository on GitHub and Buildroot should download and compile the kernel for me.
Unfortunately the things are not so easy. When I specify BeagleBone's kernel repository in Buildroot, the kernel source is successfully cloned, but there is no default configuration and maybe some patch work is also necessary.
Did anybody try to integrate Buildroot with BeagleBone's GitHub's kernel sources?
Why don't you use the beaglebone_defconfig configuration provided by Buildroot. It uses a 4.4 kernel for the BeagleBone, fetched from git://git.ti.com/processor-sdk/processor-sdk-linux.git.

Patching and compiling kernel, in which directory

I'm trying to apply a patch to my kernel source with limited success. The target machine is really some ARM device, but I haven't compiled a kernel before so I thought I'd start with an x86_64 kernel. This has been only marginally easier :)
Now, according to some tutorials, it seemed like we should use the source in /usr/src/linux-something. But when I tried to patch there I got
File Documentation/sysrq.txt is read-only; trying to patch anyway
patch: **** Can't create temporary file Documentation/sysrq.txt.oG1oiZW : Permission denied
even under sudo. So I tried just copying the patch and the linux source folder to my home directory and patched it from there. This worked. Why is this and will this have any weird side effects when compiling?
It seems you have no permission to /usr/src/linux-something. Download kernel source, put it anywere you could, then patch & compile it.
Build a x86_64 arch kernel from source which downloaded from kernel.org is well, if you wanna build an arm arch kernel for a special board, use buildroot or openwrt is better.
The package manager for some distributions installs the kernel source in /usr/src and distribution-specific build scripts may assume that the source is in that directory.
However, if you download vanilla kernel source from kernel.org, you should be able to build it anywhere.

How to put files into riscv linux?

ri
1.We tried to install the rocket chip with risc-v linux on Zedboard, and we had successfully entered riscv linux. However, we couldn't put the files compiled by assembler(using the instruction : riscv64-unknown-linux-gnu-g++) into riscv linux. Would someone please tell me how to put it in? (p.s we tried to mount the files into the file called root.bin,but it seems that risc-v linux doesn't use this file to boot.)
2. If we use the linux instrustion [make CONFIG=RoccExampleConfig] on our workshop, would it be RoCC there? If not, how to enable RoCC?
The file boot.bin is read by the firmware executed by the Zynq ARM CPU on boot. It contains the boot loader and instructions to boot Linux on that CPU. It may also contain a bitstream for the programmable logic.
According to https://github.com/ucb-bar/fpga-zynq/issues/22 you need to put your files into the RISC-V initramfs file until tether is working.

Not booting RAM file system embedded in Linux Kernel

We have a Linux embedded system that we would like to boot from Flash file system, but have a RAMFS embedded into the kernel that can be seen by the kernel after boot.
Is it possible to embed a RAM File system inside the Linux Kernel (v3.3), that can be used after kernel boot, that the kernel does not use for booting?
Thanks.
Absolutely! Just make a script which mounts a tmpfs on your preferred mount point and that extracts in it a tarball that has been bundled in you rootfs.

Resources