View previous topic :: View next topic |
Author |
Message |
Mardok45 n00b
Joined: 21 Jun 2008 Posts: 69 Location: Right behind you
|
Posted: Fri Sep 14, 2018 10:23 pm Post subject: genkernel - create initramfs from a crossdev environment |
|
|
Is there a way to create an initramfs from a crossdev root? I have /usr/armv6j-hardfloat-linux-gnueabi/ that was created from crossdev and want to create an initramfs from it with genkernel. My goal is to have my RPI mount my crossdev environment as the root via NFS. _________________
Bones McCracker wrote: | Somebody needs to sig that. |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Fri Sep 14, 2018 11:01 pm Post subject: |
|
|
Mardok45,
You don't need an initrd to mount an NFS root on a Raspberry Pi.
The kernel can do that with the right kernel command line.
You may need to change the kernel configuration so that it has the right support built in.
Build the Pi kernel by cross compiling. The kernel is one of the easier packages to cross compile. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Fri Sep 14, 2018 11:01 pm Post subject: |
|
|
Moved from Other Things Gentoo to Gentoo on ARM. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Mardok45 n00b
Joined: 21 Jun 2008 Posts: 69 Location: Right behind you
|
Posted: Sat Sep 15, 2018 4:32 pm Post subject: |
|
|
I wanted to use its wifi connection instead of its ethernet, which will require pulling in some modules and firmware (as well as writing some custom scripts). I would like to use a tool to automate this. Is there anything else out there? _________________
Bones McCracker wrote: | Somebody needs to sig that. |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Sat Sep 15, 2018 4:57 pm Post subject: |
|
|
Mardok45,
There is a script provided by the kernel.
You feed it with a list of files to include in the initrd and an init script and it builds your initrd.
The hard bit is the init script.
You can build all the required kernel code and firmware into your kernel binary. This is a good thing.
Your initrd then becomes kernel agnostic as it only contains user space tools. That means there is no need to update it with every kernel.
The script is /usr/src/linux/usr/gen_init_cpio. I've never tried it in a cross environment.
The hard bit of doing root over NFS is not to restart the network connection when the system boots, or at least, if you do, you need to be sure to keep the same IP.
Root over NFS over WiFi will be horribly slow. WiFi is only half duplex.
If you haven't done root over NFS before, make it work with wired first, or do you have to go straight to WiFi?
-- edit --
There is another way. It is possible to chroot into your /usr/armv6j-hardfloat-linux-gnueabi/ root filesystem from the build host, with the aid of QEMU.
Then your build host runs your armv6j code. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|