Message ID | 20230223232342.1870369-1-tharvey@gateworks.com |
---|---|
State | Accepted, archived |
Headers | show |
Series | octeontx: kernel: add USB storage boot support | expand |
24 lut 2023 o 00:28 Tim Harvey <tharvey@gateworks.com> napisał(a): > Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass > Storage device. > > This increases the kernel Image by 66KiB Do we have any device that has firmware installed on USB storage device and it boots from it?
On Fri, Feb 24, 2023 at 12:16 AM Rafał Miłecki <zajec5@gmail.com> wrote: > > 24 lut 2023 o 00:28 Tim Harvey <tharvey@gateworks.com> napisał(a): > > Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass > > Storage device. > > > > This increases the kernel Image by 66KiB > > Do we have any device that has firmware installed on USB storage > device and it boots from it? This is intended to be used where the boot firmware boots on the SoC's boot device (emmc in the case of the Gateworks Newport octeontx board) but the OpenWrt OS itself (bootfs/rootfs) are on USB. The user may have for example a backup or alternate OS on different devices (USB, SATA, microSD, etc). It looks to me like many targets enable this and I believe it was enabled in a previous kernel version but I find its something that often gets disabled likely be accident when bumping kernels. Tim
On Fri, Feb 24, 2023 at 12:18 AM Rafał Miłecki <zajec5@gmail.com> wrote: > > 24 lut 2023 o 00:28 Tim Harvey <tharvey@gateworks.com> napisał(a): > > Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass > > Storage device. > > > > This increases the kernel Image by 66KiB > > Do we have any device that has firmware installed on USB storage > device and it boots from it? Not sure if you're asking specifically about Tim's / octeontx's case or in general, but see the ipq806x and ipq40xx "chromium" sub-targets. The Google WiFi and the OnHub devices can boot from USB storage; and this is the primary way to install OpenWrt on them. Because of kernel config complaints, I made them separate sub-targets to include USB_STORAGE drivers. Brian
On Thu, Feb 23, 2023 at 3:23 PM Tim Harvey <tharvey@gateworks.com> wrote: > > Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass > Storage device. > > This increases the kernel Image by 66KiB > > Signed-off-by: Tim Harvey <tharvey@gateworks.com> > --- > target/linux/octeontx/config-5.15 | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/linux/octeontx/config-5.15 b/target/linux/octeontx/config-5.15 > index 40cab28f60a0..c2ad7e7ab9d7 100644 > --- a/target/linux/octeontx/config-5.15 > +++ b/target/linux/octeontx/config-5.15 > @@ -59,6 +59,7 @@ CONFIG_BLK_DEV_BSG=y > CONFIG_BLK_DEV_BSGLIB=y > CONFIG_BLK_DEV_BSG_COMMON=y > CONFIG_BLK_DEV_LOOP=y > +CONFIG_BLK_DEV_SD=y > CONFIG_BLK_MQ_PCI=y > CONFIG_BLK_MQ_VIRTIO=y > CONFIG_BLK_PM=y > @@ -401,6 +402,7 @@ CONFIG_UNMAP_KERNEL_AT_EL0=y > CONFIG_USB=y > CONFIG_USB_COMMON=y > CONFIG_USB_PCI=y > +CONFIG_USB_STORAGE=y > CONFIG_USB_SUPPORT=y > # CONFIG_USB_UHCI_HCD is not set > CONFIG_USB_XHCI_HCD=y > -- > 2.25.1 > Any additional comments or discussion on this? CONFIG_BLK_DEV_SD=y is required to allow OpenWrt's rootfs on a SCSI block device such as mSATA. CONFIG_USB_STORAGE=y is required additionally to allow OpenWrt's rootfs on a USB mass storage device. Both cases are useful if for example the bootloader is on different boot device than OpenWrt's rootfs. This differs from enabling USB mass storage via kmod-usb-storage as that gets loaded as a module after OpenWrt's rootfs is mounted. This seems like a relatively small increase in kernel size for the functionality. Best Regards, Tim
diff --git a/target/linux/octeontx/config-5.15 b/target/linux/octeontx/config-5.15 index 40cab28f60a0..c2ad7e7ab9d7 100644 --- a/target/linux/octeontx/config-5.15 +++ b/target/linux/octeontx/config-5.15 @@ -59,6 +59,7 @@ CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_BSG_COMMON=y CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_SD=y CONFIG_BLK_MQ_PCI=y CONFIG_BLK_MQ_VIRTIO=y CONFIG_BLK_PM=y @@ -401,6 +402,7 @@ CONFIG_UNMAP_KERNEL_AT_EL0=y CONFIG_USB=y CONFIG_USB_COMMON=y CONFIG_USB_PCI=y +CONFIG_USB_STORAGE=y CONFIG_USB_SUPPORT=y # CONFIG_USB_UHCI_HCD is not set CONFIG_USB_XHCI_HCD=y
Enable BLK_DEV_SD and USB_STORAGE so that rootfs can be on a USB Mass Storage device. This increases the kernel Image by 66KiB Signed-off-by: Tim Harvey <tharvey@gateworks.com> --- target/linux/octeontx/config-5.15 | 2 ++ 1 file changed, 2 insertions(+)