Skip to contentSkip to conversation

Documentation:openrisc: Add build instructions with initramfs

PATCH Superseded Ann Yun 2 participants 3 messages Apr 25, 2025 – Apr 26, 2025

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Ann Yun

author
#0 lore raw

PATCH 1/1 Documentation:openrisc: Add build instructions with initramfs

Mention how to include initramfs when building the kernel

---
 Documentation/arch/openrisc/openrisc_port.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/arch/openrisc/openrisc_port.rst +4 -0
index a8f307a3b499..4ab28879d7ed 100644
@@ -40,6 +40,10 @@ Build the Linux kernel as usual::
 	make ARCH=openrisc CROSS_COMPILE="or1k-linux-" defconfig
 	make ARCH=openrisc CROSS_COMPILE="or1k-linux-"
 
+If you want to embed initramfs in the kernel, also pass ``CONFIG_INITRAMFS_SOURCE``. For example::
+
+	make ARCH=openrisc CROSS_COMPILE="or1k-linux-" CONFIG_INITRAMFS_SOURCE="path/to/rootfs path/to/devnodes"
+
 3) Running on FPGA (optional)
 
 The OpenRISC community typically uses FuseSoC to manage building and programming
Signature · 1 line
2.37.2
maintainer
#1 lore raw
Quoted 12 lines · Ann Yun

Mention how to include initramfs when building the kernel

---
 Documentation/arch/openrisc/openrisc_port.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/arch/openrisc/openrisc_port.rst +0 -0
index a8f307a3b499..4ab28879d7ed 100644

Documentation/arch/openrisc/openrisc_port.rst Build the Linux kernel as usual:: · line 46

Quoted 7 lines
Documentation/arch/openrisc/openrisc_port.rst +4 -0
@@ -40,6 +40,10 @@ Build the Linux kernel as usual::
 	make ARCH=openrisc CROSS_COMPILE="or1k-linux-" defconfig
 	make ARCH=openrisc CROSS_COMPILE="or1k-linux-"
 
+If you want to embed initramfs in the kernel, also pass ``CONFIG_INITRAMFS_SOURCE``. For example::
+
+	make ARCH=openrisc CROSS_COMPILE="or1k-linux-" CONFIG_INITRAMFS_SOURCE="path/to/rootfs path/to/devnodes"
+

I think this is good, but maybe we can mention to refer to Documentation/filesystems/ramfs-rootfs-initramfs.rst for more details on this?

Also, it may be helpful to mention we can get pre-built busybox rootfs images here:

https://github.com/stffrdhrn/or1k-rootfs-build/releases

But if we do that then it would be better to show how to use thos rootfs images, which maybe something better we have in our openrisc/tutorials[0].

-Stafford

[0] https://github.com/openrisc/tutorials

Quoted 6 lines
Documentation/arch/openrisc/openrisc_port.rst +0 -0
 3) Running on FPGA (optional)
 
 The OpenRISC community typically uses FuseSoC to manage building and programming
Signature · 1 line
2.37.2
author
#2 lore raw

Hi Stafford,

I am sending my same reply to the whole group again, because I previously did not do "Reply All".

Quoted 3 lines · Stafford Horne

I think this is good, but maybe we can mention to refer to Documentation/filesystems/ramfs-rootfs-initramfs.rst for more details on this?

Thanks for pointing that out. That is an excellent idea, I will add that.

Quoted 11 lines

Also, it may be helpful to mention we can get pre-built busybox rootfs images here:

https://github.com/stffrdhrn/or1k-rootfs-build/releases

But if we do that then it would be better to show how to use thos rootfs images, which maybe something better we have in our openrisc/tutorials[0].

-Stafford

[0] https://github.com/openrisc/tutorials

Exactly! I was working on a QEMU tutorial inside openrisc/tutorials and that prompted me to add that one line here.

Ann