Skip to content

Commit

Permalink
owut: revert rootfs restrictions
Browse files Browse the repository at this point in the history
Some platforms have mtdblock devices and also store the rootfs on a
resizable partition (one case is octeon/generic:ubnt-usg).  Remove the
code that disables --rootfs-size until such time as we can determine
the device type and size available for the rootfs partition properly.

Signed-off-by: Eric Fahlgren <[email protected]>
  • Loading branch information
efahl committed Jan 27, 2025
1 parent 2bf45d5 commit b469547
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions files/owut
Original file line number Diff line number Diff line change
Expand Up @@ -1747,12 +1747,6 @@ function blob(report)
};

if (options.rootfs_size) {
// Disallow use of --rootfs-size on devices that cannot be resized.
let dirs = filter(fs.lsdir("/sys/class/block/"), (d) => match(d, /^(mtdblock|ubiblock|fit)[0-9]/));
if (length(dirs) > 0) {
L.die("This device does not have a resizeable root partition, do not use '--rootfs-size'.\n");
}

blob.rootfs_size_mb = options.rootfs_size;
L.log(log_level, " ROOTFS_PARTSIZE set to %d MB\n", options.rootfs_size);
}
Expand Down

3 comments on commit b469547

@jasisk
Copy link

@jasisk jasisk commented on b469547 Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efahl another such device is the gl-MV1000 which has a 8GiB eMMC.

# ll /sys/class/block/
drwxr-xr-x    2 root     root             0 Jan  1  1970 ./
drwxr-xr-x   42 root     root             0 Jan  1  1970 ../
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop0 -> ../../devices/virtual/block/loop0/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop1 -> ../../devices/virtual/block/loop1/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop2 -> ../../devices/virtual/block/loop2/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop3 -> ../../devices/virtual/block/loop3/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop4 -> ../../devices/virtual/block/loop4/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop5 -> ../../devices/virtual/block/loop5/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop6 -> ../../devices/virtual/block/loop6/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 loop7 -> ../../devices/virtual/block/loop7/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mmcblk1 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d00d8000.mmc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mmcblk1boot0 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d00d8000.mmc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot0/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mmcblk1boot1 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d00d8000.mmc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot1/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mmcblk1p1 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d00d8000.mmc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1p1/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mmcblk1p2 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d00d8000.mmc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1p2/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mtdblock0 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d0010600.spi/spi_master/spi0/spi0.0/mtd/mtd0/mtdblock0/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mtdblock1 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d0010600.spi/spi_master/spi0/spi0.0/mtd/mtd1/mtdblock1/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mtdblock2 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d0010600.spi/spi_master/spi0/spi0.0/mtd/mtd2/mtdblock2/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mtdblock3 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d0010600.spi/spi_master/spi0/spi0.0/mtd/mtd3/mtdblock3/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mtdblock4 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d0010600.spi/spi_master/spi0/spi0.0/mtd/mtd4/mtdblock4/
lrwxrwxrwx    1 root     root             0 Jan  1  1970 mtdblock5 -> ../../devices/platform/soc/soc:internal-regs@d0000000/d0010600.spi/spi_master/spi0/spi0.0/mtd/mtd5/mtdblock5/

@efahl
Copy link
Owner Author

@efahl efahl commented on b469547 Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that added info! I'm slogging through the various platforms to see when I can/should disable that option, so every bit of information helps.

@jasisk
Copy link

@jasisk jasisk commented on b469547 Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efahl my pleasure. Lemme know if there is any other info I can provide to help out.

Please sign in to comment.