This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Booting into initramfs (RAM) [solved]
#1
Hello,

I try to boot into initramfs from RAM. I tried to rebuild a custom kernel with the manual from h_ttps://tinkerboarding.co.uk/wiki/index.php?title=Software#How_to_build_Kernel.2FU-boot_source_code which looks promising.
I have done this project successfully in the past but now I needed an updated version of the kernel, so I got all the latest stuff as described in the link.
My build host is:
Xubuntu 18.04 bionic LTS with  arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 7.4.0 as compiler.

I patched the automatic rootfs function out of uboot all else is stock configuration from linked git repo.

Kernel command line (extlinux):
Code:
earlyprintk console=ttyS3,115200n8 splash raid=noautodetect plymouth.ignore-serial-consoles ro init=/sbin/init snd-pcm-oss.dsp-map=2 root=/dev/ram0 uboot_version=2017.07-g135bc937d6-dirty


It builds without problems and also the kernel is booting. But as init should be called there is only a error message.
How can the kernel not find a build in initramfs? (That's what I did. I also tried giving it as a extlinux command with initrd don't have the exact command anymore but doesn't work ether)
I validated that the rootfs itself works by installing it on the SD card  instead of the normal rootfs from the official tinkerboard image. But I can't get it to boot into the RAM? Any ideas will be apreciated.


Thanks in advance
Ben


Error:
... snip ...
Code:
[   13.322528] ### dt-test ### end of unittest - 148 passed, 0 failed
[   13.331445] asoc-simple-card sound-simple-card: audio jack plug out
[   13.336552] vcc_sd: disabling
[   13.336557] vcc_flash: disabling
[   13.336560] vdd_logic: disabling
[   13.337074] ALSA device list:
[   13.337078]   #0: Generic USB Audio OnBoard at usb-ff500000.usb-1, high speed
[   13.337080]   #1: rockchip,miniarm-codec
[   13.337152] Warning: unable to open an initial console.
[   13.337214] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
[b][   13.337404] VFS: Cannot open root device "ram0" or unknown-block(1,0): error -2[/b]
[b][   13.337407] Please append a correct "root=" boot option; here are the available partitions:[/b]
[b][   13.337417] 0100            4096 ram0  (driver?)[/b]
[b][   13.337432] b300         7761920 mmcblk0  driver: mmcblk[/b]
[b][   13.337440]   b301           65536 mmcblk0p1 42943aae-01[/b]
[b][   13.337446] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)[/b]
[   13.337453] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.132+ #26
[   13.337456] Hardware name: Rockchip (Device Tree)
[   13.337483] [<c0110144>] (unwind_backtrace) from [<c010bdf0>] (show_stack+0x20/0x24)
[   13.337497] [<c010bdf0>] (show_stack) from [<c050db10>] (dump_stack+0x84/0xa4)
[   13.337512] [<c050db10>] (dump_stack) from [<c01ec4e8>] (panic+0x98/0x200)
[   13.337526] [<c01ec4e8>] (panic) from [<c12013a8>] (mount_block_root+0x198/0x238)
[   13.337535] [<c12013a8>] (mount_block_root) from [<c1201600>] (mount_root+0xd0/0x124)
[   13.337543] [<c1201600>] (mount_root) from [<c12017dc>] (prepare_namespace+0x188/0x1c8)
[   13.337552] [<c12017dc>] (prepare_namespace) from [<c1200f24>] (kernel_init_freeable+0x1f8/0x26c)
[   13.337562] [<c1200f24>] (kernel_init_freeable) from [<c0c287d4>] (kernel_init+0x18/0x170)
[   13.337574] [<c0c287d4>] (kernel_init) from [<c01076d0>] (ret_from_fork+0x14/0x24)
[   13.337583] CPU1: stopping
[   13.337590] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.132+ #26

... snip ... all cpu cores have this message repeated.
Reply
#2
> I try to boot into initramfs from RAM. I tried to rebuild a custom kernel with the manual from

This will work - initrd support comes OOB - with better results:
https://github.com/armbian/build
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Reply
#3
Ok, looks promising. I'm going to create the initramfs native in armbian as the armbian cross-compie-scripts are yet another build env I would need to lern. But that should be enough for now.
Reply
#4
There is nothing to learn if you want to rebuild image (with minimal changes).

Native building is more complicated. This is not mainstream x86 linux kernel, nor official ubuntu.
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Reply
#5
I boot into armbian and use update-initramfs. I'm pleased how smooth this works compared to a cross build :-) I need to add many custom tools and stuff to the ramdisk. So that's fine.
Thank you for the Armbian (link)!

Is there a "solved" button for the thread? I should create a new post for the following stuff shouldn't I?

In the Armbian (minimal) image Bluetooth is not working. I need BLE. Is it still a fact, that bluetooth is not patched into the armbian kernel?
[FAILED] Failed to start Realtek H5 bluetooth support. Works now, just needed to install some stuff. Armbian is great. Thank's for your help Igor!
[-] The following 1 user Likes stretchdude's post:
  • igorpec
Reply
#6
Bluetooth works OOB, just not on minimal image ... Smile

> Armbian is great.

We made 20-30 hours daily on the project. For past seven years. It has to show somewhere Smile
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)