For learning more about squash and images , i was able to extract the squashfilesystem from an existing openwrt image using binwalk.
I added a small text file to the /home folder.
How can i now rebuild the image with the modified filesystem folder using basic linux tools?
You generally won't, as you can use the imagebuilder to generate a fresh image (or build from source).
Working with the squashfs by hand is of course possible, but rather complicated and risky (details may depend on the device in question).
How and why is it difficult if i made only minor changes to the filesystem?
For me its not about using a simple tool like imagebuilder , but about the learning on images & contents & how they work for me and how i can use basic linux tools to work with them.
Because some devices (their OEM bootloaders) have quite peculiar requirements on the exact type of compression, down to the weirdest parameters. On top of that, many devices use a dynamic split between squashfs and overlay on the same partition, changing the squashfs alone would change the size and affect the overlay.
You can untangle all of that, it's just rocket science, but the imagebuilder (or building from source) does all that for you, in a reproducible and known-working way.
While it might sound counter-intuitive, it is actually easier and safer to use the 'normal' (well-tested) machinery to build images, than to 'hack' on existing/ binary ones manually.
is imagebuilder a tool i can use to reassemble all files i retrieved from an image (using binwalk) including my modified squashfs file to a new image?
No, it builds images from the default packages defined for your target device.
But you can (ab-)use it to inject (a limited set of-) additional files/
into the image.