Docker compiling howto

Issue #146 resolved
rs232 created an issue

It would be nice is someone would have some time to spare to add a new file to the docker folder. Something called HOWTO and list in there all the commands needed from “pulling the debian image” until the “copying off the FT compiled image”..

Thanks

Comments (11)

  1. Wenger X Account Deactivated

    ‘make help’ in the docker folder lists available targets, e.g. ‘make build.ac68e’ will automatically build container and compile AC68-VPN image

  2. rs232 reporter

    In my mind the list starts like this:

    1. go to docker.com
    2. .
    3. .
    4. .
    5. .
    6. .
    7. .
    8. .
    9. .
    10. .
    11. .
    12. .
    13. .
    14. Copy off the compiled image.trx

    The howto you would expect to fill in the empty points.

    Thanks

  3. Wenger X Account Deactivated
    1. sudo apt install docker.io
    2. cd docker [directory in the freshtomato-arm repo]
    3. make build.[target you need]
    4. your .trx will be in the ‘release/src-rt-6.x.4708/image’ directory

  4. rs232 reporter

    Man…. I really appreciate your help, let me play bold here from a user perspective:

    • I type sudo in powershell and it says command not found
    • I tried entering freshtomato-arm it says directory not found

    You see where I’m coming from?

  5. Wenger X Account Deactivated

    Sorry. Of course you need Debian Linux installed (this is written in the repo readme). So,

    0. Install Debian Linux

  6. rs232 reporter

    May be not the way I meant… but managed to run docker as a local VM alternative on my windows10 laptop.

    Essentially the key steps needed:

    • you need docker desktop for windows
    • you need to install (as per 15th Aug 2021 at least) the external package called: Linux Kernel package
    • run docker desktop
    • install debian docker + run (this will create a container)
    • From the Debian container click the CLI button. THis will open window’s CMD which is crap, doesn’t support tab autofill not arrow-up to repeat the last command.
    • run apt update
    • From this point follow the FreshTomato Linux compiling guide. just a couple of notes from myself-

      • I personally didn’t install sudo
      • I didn't create an additional user as this container is exclusively dedicated to FT compiling
      • before the git clone I moved into /opt (personal preference I suppose)
      • The step: apt-get install linux-headers-$(uname -r) failed for me:
      • apt-get install linux-headers-$(uname -r) Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-headers-5.10.16.3-microsoft-standard-WSL2 E: Couldn't find any package by glob 'linux-headers-5.10.16.3-microsoft-standard-WSL2' E: Couldn't find any package by regex 'linux-headers-5.10.16.3-microsoft-standard-WSL2'

        still it seems to works regardless

    • You might want to run apt autoremove towards the end of the procedure

    # cd image
    # ls -la
    total 243260
    drwxr-xr-x  2 root root     4096 Aug 16 09:49 .
    drwxr-xr-x 26 root root     4096 Aug 16 09:49 ..
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC1750_B1-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC1900P-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC1900U-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC56U-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC66U_B1-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC67U-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-AC68U-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-N18U-ARM_NG-2021.5-AIO-64K.trx
    -rw-r--r--  1 root root 27676672 Aug 16 09:49 freshtomato-RT-N66U_C1-ARM_NG-2021.5-AIO-64K.trx
    

    I suppose the above images are meant to be exactly the same size right?

    So bottom line you can compile FreshTomato from Windows but docker will act as an alternative to a local VM run via vmware player/workstation or virtualbox to give an example

    Can anybody produce a lookalike version for Native Linux? I would expect the procedure to be substantially different.

    Thanks

  7. rs232 reporter

    Now the issue is: how do you access the Docker’s linux filesystem from the windows environment? Compiling woks perfectly (and super fast) but I’m puzzled on how to move the files out now…

  8. Log in to comment