Doodle3D / WiFi-Box

The Doodle3D WiFi-Box for wireless 3D-printing
GNU General Public License v3.0
3 stars 1 forks source link

(Re-)add ch341 and cp210x usb-serial drivers #18

Closed peteruithoven closed 8 years ago

peteruithoven commented 8 years ago

In beta release 0.10.8-a (11 nov 2015) we added the ch341 and cp210x usb-serial drivers, but we got reports that they might be missing.

peteruithoven commented 8 years ago

One question that remains is how much space these drivers use, seeing that we don't have much space available.

peteruithoven commented 8 years ago

I did a clean install of 0.10.11 (released: Jun 15, 2016) to check out our current disk usage.

# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  768.0K    216.0K    552.0K  28% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.4M    124.0K     14.2M   1% /tmp
tmpfs                    14.4M     52.0K     14.3M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3          768.0K    216.0K    552.0K  28% /overlay
overlayfs:/overlay      768.0K    216.0K    552.0K  28% /

After saving a few big sketches we get:

# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  768.0K    300.0K    468.0K  39% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.4M    128.0K     14.2M   1% /tmp
tmpfs                    14.4M     52.0K     14.3M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3          768.0K    300.0K    468.0K  39% /overlay
overlayfs:/overlay      768.0K    300.0K    468.0K  39% /

So sketches are saved on rootfs, which has 552.0K available on a fresh WiFi-Box.

peteruithoven commented 8 years ago

Using the interactive mode of our buildroot, with a fresh container, I enabled the drivers: In kernel modules > USB Support > kmod-usb-serial I enabled:

Then I build the image and flashed it to a WiFi-Box.

# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  768.0K    212.0K    556.0K  28% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.4M     92.0K     14.3M   1% /tmp
/dev/mtdblock3          768.0K    212.0K    556.0K  28% /overlay
overlayfs:/overlay      768.0K    212.0K    556.0K  28% /
tmpfs                   512.0K         0    512.0K   0% /dev

Weird enough we seem to have 4K extra space...

lsmod confirms we have the drivers:

~# lsmod
...
ch341                   4160  0 
...
cp210x                  7168  0 

With another fresh interactive container, with default settings I get:

# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  768.0K    212.0K    556.0K  28% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.4M     92.0K     14.3M   1% /tmp
/dev/mtdblock3          768.0K    212.0K    556.0K  28% /overlay
overlayfs:/overlay      768.0K    212.0K    556.0K  28% /
tmpfs                   512.0K         0    512.0K   0% /dev

Not sure why there is this 4K difference between the latest released version and this version. Especially since we use Docker, which means we always use the same OS, packages etc etc.

But I think we can safely add these drivers.

peteruithoven commented 8 years ago

I updated the images following the following instructions: https://github.com/Doodle3D/openwrt-buildroot/blob/master/README.md#updating-image