Building a minimalistic Gargoyle build for Dev purposes

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
StopSpazzing
Posts: 80
Joined: Mon Jun 30, 2014 7:14 pm

Building a minimalistic Gargoyle build for Dev purposes

Post by StopSpazzing »

Hey everyone, long time no talk to (like 4 years wow). I'm slowly getting back into Gargoyle and working currently on the modern theme I started. Issue is I cant find my TL-WDR3600 I had for some odd reason so have to use my really really old Broadcom based Linksys e2000 (Yeah I know) which has 8mb flash memory
More specs here: https://wiki.dd-wrt.com/wiki/index.php/Linksys_E2000

Issue is when I attempt to flash 1.12 (generic) or build latest 1.13 it bricks the router and spits out errors and reboots itself. Thankfully I have an 8 core 16 thread cpu now that can handle this easily and quickly. To fix this I can serial connect to it so I did to recover and I flashed 1.10 (generic) without issues.

The differences in sizes are 4.3MB vs 5.7MB images. I dont see why this would be an issue with the available flash memory. Tried custom building a smaller image but seems .config gets overrided from broadcom-src folder.

Since I can flash via serial can test bunch of stuff so no really worried, but wanted to know what I can remove to make a bare minimum gargoyle image to use for dev purposes like theme/plugin testing? And what is the proper way to do it?

Lantis
Moderator
Posts: 5827
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by Lantis »

It's a brcm47xx device right? There's been something wrong with that profile since 1.12 I think. I don't have any to try and debug or fix it. Posting a serial output might be useful to understand what is wrong.

For what you're trying to do, I'd probably just setup a VM and install x86 Gargoyle on it.

If you want bare minimum build, you can remove QoS (and tc) which will save you about 1MB. That's only possible from 1.12 onwards I think.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Lantis
Moderator
Posts: 5827
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by Lantis »

I'm also in the process of making docker recipes for building Gargoyle which I should be able to make available by the end of the weekend.
This would help you compile, but not test.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

StopSpazzing
Posts: 80
Joined: Mon Jun 30, 2014 7:14 pm

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by StopSpazzing »

Lantis wrote:
Fri Nov 20, 2020 7:20 pm
It's a brcm47xx device right? There's been something wrong with that profile since 1.12 I think. I don't have any to try and debug or fix it. Posting a serial output might be useful to understand what is wrong.

For what you're trying to do, I'd probably just setup a VM and install x86 Gargoyle on it.

If you want bare minimum build, you can remove QoS (and tc) which will save you about 1MB. That's only possible from 1.12 onwards I think.
Yes it is brcm47xx. Totally didn't realize x86 Gargoyle was available. Yeah that would make my life million times easier. But for everyone else still using this device, I will get you the serial output to hopefully fix this issue. :)
Lantis wrote:
Fri Nov 20, 2020 7:21 pm
I'm also in the process of making docker recipes for building Gargoyle which I should be able to make available by the end of the weekend.
This would help you compile, but not test.
I'm using WSL 2 without issues but would make it easier to throw it on my docker server and build everything there. No rush! Thanks again for the information.

On a side note, is there any particular reason for not having a minimalistic image where everything non important needs to be downloaded separately? Not sure if this was addressed before.

StopSpazzing
Posts: 80
Joined: Mon Jun 30, 2014 7:14 pm

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by StopSpazzing »

Lantis wrote:
Fri Nov 20, 2020 7:21 pm
I'm also in the process of making docker recipes for building Gargoyle which I should be able to make available by the end of the weekend.
This would help you compile, but not test.
What do you have so far? What base are you using? Please tell me you aren't using alpine... :?

Should be super easy to make a docker image... already can see the compose file in my head.

Lantis
Moderator
Posts: 5827
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by Lantis »

No minimalistic image because that's just not what people want. Putting as much feature in as possible (without over sizing the image and therefore making it not generate) is the goal.

I can give you what i have so far. I'm not done yet because i'm actually trying to go back and make sure that everything back to 1.6 is buildable. I've got >=1.10.x working. I'm testing 1.8.x now.

For 1.13.x

Create new folder ~/docker-gargoyle-builder
Create Dockerfile with the below contents

Code: Select all

FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive; \
    export DEBCONF_NONINTERACTIVE_SEEN=true; \
    echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
    echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
    apt-get update &&\
    apt-get install -qqy --no-install-recommends build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo npm python-is-python3 ssh-client wget curl file screen && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    useradd -m user

USER user
WORKDIR /home/user

# set dummy git config
RUN git config --global user.name "user" && git config --global user.email "user@example.com"

Code: Select all

docker build -t gargoyle_builder_1.13.x .
Create "mybuild" dir for hosting the files

Code: Select all

docker run -v ~/docker-gargoyle-builder/1.13.x/mybuild:/home/user -it gargoyle_builder_1.13.x /bin/bash

Code: Select all

git clone https://github.com/ericpaulbishop/gargoyle.git
cd gargoyle
git checkout master
Now run whatever make target you're after.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

StopSpazzing
Posts: 80
Joined: Mon Jun 30, 2014 7:14 pm

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by StopSpazzing »

Lantis wrote:
Sat Nov 21, 2020 12:38 am
No minimalistic image because that's just not what people want. Putting as much feature in as possible (without over sizing the image and therefore making it not generate) is the goal.

I can give you what i have so far. I'm not done yet because i'm actually trying to go back and make sure that everything back to 1.6 is buildable. I've got >=1.10.x working. I'm testing 1.8.x now.

For 1.13.x

Create new folder ~/docker-gargoyle-builder
Create Dockerfile with the below contents

Code: Select all

FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive; \
    export DEBCONF_NONINTERACTIVE_SEEN=true; \
    echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
    echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
    apt-get update &&\
    apt-get install -qqy --no-install-recommends build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo npm python-is-python3 ssh-client wget curl file screen && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    useradd -m user

USER user
WORKDIR /home/user

# set dummy git config
RUN git config --global user.name "user" && git config --global user.email "user@example.com"

Code: Select all

docker build -t gargoyle_builder_1.13.x .
Create "mybuild" dir for hosting the files

Code: Select all

docker run -v ~/docker-gargoyle-builder/1.13.x/mybuild:/home/user -it gargoyle_builder_1.13.x /bin/bash

Code: Select all

git clone https://github.com/ericpaulbishop/gargoyle.git
cd gargoyle
git checkout master
Now run whatever make target you're after.
Oh nice! I came up with this today...
docker-compose.yml

Code: Select all

version: "3.8"
services:
  web:
    build: .
    volumes:
      - .:/src/gargoyle/images
Dockerfile

Code: Select all

FROM ubuntu:latest
WORKDIR /src/gargoyle
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository universe && add-apt-repository multiverse && apt-get update && apt-get install -y gcc g++ make wget python3-dev python-dev build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo curl
RUN curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh && bash nodesource_setup.sh && apt-get update && apt-get install -y nodejs && apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/{apt,dpkg,cache,log}/ && rm -rf ./*
RUN git clone git://github.com/ericpaulbishop/gargoyle.git .
Throw those in a directory, run

Code: Select all

docker-compose run web make r71xx.usb_large
or whatever you want. It will spit out your images in the images folder in the directory where these files are located.

however errors with
checking whether mknod can create fifo without root privileges... configure: err or: in `/src/gargoyle/ar71xx-src/build_dir/host/tar-1.32':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGU RE=1 in environment to bypass this check)
so obv need to set a user.

Lantis
Moderator
Posts: 5827
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Building a minimalistic Gargoyle build for Dev purposes

Post by Lantis »

I got 1.8.x building tonight. I'll fix 1.6.x tomorrow
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply