A huge thank you to the community for providing knowledge and help that contributed to create this project.
Lenovo M720Q Tiny Build
CPU: Intel i3-8100T
IGPU: Intel UHD Graphics 630
SSD: SK hynix SSS0L24743 128GB 2242 M.2 SSD NVME PCIE
Ram: Samsung M471A1K43CB1-CTD (2x8) 16GB
Ethernet Card: Dell intel I350-T4 Quad Port
OpenWrt Version: 22.03
Target Build: X86_64 EFI
OpenWrt File System: Squashfs with ext4 partition / preserved partition table
OpenWrt Custom Image Build: Yes
The Lenovo M720Q, if you are willing to take the time, it makes a great router.
You will need
-
A Lenovo M720Q of course!
-
Riser Card (Original Model).
-
PCIe I350-T4 Quad Port.
-
Baffle/Back Bracket.
-
SSD M.2 Nvme PCIe
Power Source:
Lenovo states that you will need to use a 135W power adapter if you choose to use the proprietary PCIE (You will need a proprietary Lenovo riser card).
I have been using the 65 Watt power adapter but YMMV.
PCIE slot and the Proprietary Lenovo Riser Card:
The PCIe slot is 3.0 x8 low profile according to the documentation.
PCIe x16 Riser Card works fine and can be ordered from Encompass the official Lenovo parts store.
fru is 01AJ940
The Ethenet card:
thank you @frollic for helping me source the I350-T4 Quad Ethernet Card.
The Dell intel I350-T4 Quad Port works great. (I can not comment on comptability with other ethernet cards).
Warning: There are a lot fake ones out there. If you are looking for a Intel I350-T4 Quad Port Card make sure the delta chips is embossed.
The baffle:
You will need to purchase a baffle that is made specifically for this case.
It took about 3 weeks.
To purchase the baffle you can you use superbuy, Backplate
The Sata Hard Drive:
You can not install a sata hard drive if you are going to have a PCIE Card in due to space.
Instead on the back of the case a m.2 nvme ssd can be installed.
Possible issue you may run into:
When first booting the mini pc I ran into the issue of the ports not being assigned.
This was solved from some help by @mk24
Openwrt Image built with squashfs and a reserved extra parition that survives updates:
Shout out to @fantom-x and @takimata
(Make sure you read the image building documentation so you can install all the required packages for your linux distro to be able to build the image.)
-
Using a linux distro download the latest
openwrt-imagebuilder-22.03.0-x86-64.Linux-x86_64.tar.xz and extract the archive.
-
In the extracted folder Edit the
.config file
sections toCONFIG_TARGET_KERNEL_PARTSIZE=32 CONFIG_TARGET_ROOTFS_PARTSIZE=2048
-
Open a terminal in the extracted folder and run
make image PROFILE="generic" FILES="files" PACKAGES="unzip tar htop fdisk luci block-mount"
-
Extract the generated
x86-64-generic-squashfs-combined-efi
archive (Images show up inbin/targets
). -
Flash the image to the M720Q.
-
Before booting into openwrt, use gparted to create a extra partition from the unused space on the openwrt drive.
-
Boot into Openwrt.
-
Check internet connectivity.
-
If you have ethernet port issues use @mk24's fix.
-
Backup the
fstab
and 'network file' from/etc/config
to somewhere that is not your openwrt machine. -
Use image builder to create a second image. You will be using the same edits to the
.config file
, the same commands to create the image but first create a folder inside image builder calledfiles
. -
inside
files
create a folder calledetc
and a folder inetc
calledconfig
. Place yourfstab
andnetwork file
into 'config' then use image builder to create the image. -
On OpenWrt run the command
sed -i 's/ALLOW_BACKUP=1/ALLOW_BACKUP=0/' /usr/libexec/validate_firmware_image
to prevent any previous configs from conflicting before upgrading using the new image. -
From luci flash the new image. Make sure the new image is not extracted or else it will it will fail to flash.
-
Reboot OpenWrt and make sure your extra partition still exists.
-
You should then be able mount it using blocks from luci.
Final Words: The build was a good learning experience and although its not for everyone its something you want to think about if you are planning on using 1Gbp's internet speeds.
Thank you everyone for all the help and hope the information in this post will be of help to those who are considering doing custom router builds.