Not booting RAM file system embedded in Linux Kernel - linux

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.

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

How are device nodes created in Embedded Linux without udev?

I have a linux built with a buildroot for a Beaglebone wireless board. In the root file system, when it is still on the host and has not been copied to the target, in the /dev folder, there are device files fd, log, stderr, stdin, stdout only. When I load this root file system on the target and launch the target, there are many more devices - many tty, zero, urandom etc. They are created during the Linux boot process. Buildroot built the system using simple busybox init program. In init scripts i do not see the process of creating device nodes, who creates this device nodes?
Your system is probably using devtmpfs. It is a pseudo filesystem that is mounted on /dev where the kernel will populate device nodes for devices it knows about.
udev relies on devtmpfs since commit 220893b3cbdb ("remove mknod() logic and rely on 'devtmpfs'") which is 9 years old now.
If your target is running busybox, you may have the mdev applet. Look at the installed applets with busybox --help.
mdev uses a configuration file: /etc/mdev.conf

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.

embedded linux, initramfs with buildroot

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"

Where is kernel configuration stored on Linux target?

I'm working on an embedded ARM Debian Linux system. The system ships with a default image on the SD card. What I'd like to do is try and determine which kernel settings where used in building the kernel that's running on that card.
Is there any way to do that?
Assuming no copy can be found under /boot then:
If CONFIG_IKCONFIG_PROC is set then a compressed copy of the configuration will be found at /proc/config.gz
If CONFIG_IKCONFIG is set but not CONFIG_IKCONFIG_PROC the extract-ikconfig script can be used to extract the .config file from a kernel image file (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/extract-ikconfig?id=HEAD)

Resources