no, can't use openwrt as a compile device.
If you got a recent enough Windows, you could use WSL (ideally WSL2) to set up a buildroot. No need to muck around with 3rd party virtualisation solutions.
Technically you could if you had native gcc, etc on the router. You could see if there is a gcc package to install and will fit in the available resources. If the package exists you can optimise space usage by using ImageBuilder to get a flashale image with the tools in it.
But I don't think many people do that so you may hit challenges people can't help you with, while the more normal route of building on PC should be easier to find support on.
BTW, I know you want to build the DAWN package, but try and keep this thread more generic on getting a baseline build working - we can pick up on local-git package builds in another thread if necessary.
Drifting OT, but I did set up an x86 OpenWrt VM that could itself compile OpenWrt while I was looking at getting local kernel gdb working. Is x86 a special case where it works?
x86 could be, since it's one of the usable platforms.
but I agree with your 2nd last post, probably not worth the trouble.
Maybe you can help me.
All i need is make standart firmware and add only one programm
Just firmware by default + dawn, and that is all (since esterday dawn has new option)
So i have installed Debian 11.2.0 on Vbox
I have install all the packages
apt update
apt install build-essential ccache ecj fastjar file g++ gawk gettext git java-propose-classpath libelf-dev libncurses5-dev libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget python3-distutils python3-setuptools python3-dev rsync subversion swig time xsltproc zlib1g-dev
then i
# Download and update the sources
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git pull
root@deb4core:/openwrt/openwrt2/openwrt# git pull
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Already up to date.
root@deb4core:/openwrt/openwrt2/openwrt# git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/lede-17.01
remotes/origin/master
remotes/origin/openwrt-18.06
remotes/origin/openwrt-19.07
remotes/origin/openwrt-21.02
then
git tag
git checkout v21.02.1
then
./scripts/feeds update -a
then
./scripts/feeds install -a
and
./scripts/feeds install dawn
and then i read instruction for DAWN and it says
Add DAWN to the build (under Network -> dawn)
so i ignore that and start
make menuconfig
make defconfig
so i choosed my target and profile also found dawn in Network section and made it *
then i press Save and saved it and Exit
root@deb4core:/openwrt/openwrt2/openwrt# make menuconfig
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
did i make all correct ?
what next it says start make
so i
make V=S
and i got
root@deb4core:/openwrt/openwrt2/openwrt# make V=S
make[2]: Entering directory '/openwrt/openwrt2/openwrt/scripts/config'
cc -O2 -c -o conf.o conf.c
cc conf.o confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o symbol.o util.o -o conf
make[2]: Leaving directory '/openwrt/openwrt2/openwrt/scripts/config'
time: target/linux/prereq#0.67#0.07#0.74
make[1] world
make[2] tools/compile
make[3] -C tools/flock compile
make[3] -C tools/xz compile
make[3] -C tools/sed compile
make[3] -C tools/tar compile
ERROR: tools/tar failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/openwrt/openwrt2/openwrt/include/toplevel.mk:230: world] Error 1
where did i go wrong?
now i am trying with 2 new steps
https://forum.openwrt.org/t/problem-during-my-image-build/85982/65?u=zebraonpc
You try to compile as "root"
And
S != s
--> V=s
yes i tried under root now i am trying under user with 2 additional steps
https://forum.openwrt.org/t/problem-during-my-image-build/85982/65?u=zebraonpc
and at the end i ran
make -j5 V=sc
my screen is like static on old TV
waiting to see some errors at the end
it is taking so long ... there is no way to make it on a router
4 cores 2Gb RAM
@ZebraOnPC you seem to work in write-only mode ...
in the other thread you were told NOT to use root user!
everything can be built and should be built as a normal unprivileged user starting from the step git clone ...
then the error message explains to run make as:
make with -j1 V=s or V=sc
but your run as
make -j5 V=sc
please follow the guide step by step and don't alter it, it is not that hard:
- install virtualbox
- install debian desktop as a guest in virtualbox
- install all the building tools
- create an unprivileged user (if somehow you skipped that part in debian installer)
- login to debian with your unprivileged user, from now on only use this user
- git clone, git checkout, ./scripts/feeds update -a, ./scripts/feeds install -a
- make menuconfig, select your profile, select whatever package you want, save
- make V=s download, make -j< cpu cores > V=s .... wait ..... wait ..... wait
- if you have error run make -j1 V=s
everything did under user
got this at the end
tar: binutils-2.34/gold: Cannot mkdir: No space left on device
tar: binutils-2.34/gold/object.h: Cannot open: No such file or directory
tar: binutils-2.34/gold: Cannot mkdir: No space left on device
tar: binutils-2.34/gold/archive.cc: Cannot open: No such file or directory
tar: binutils-2.34/gold: Cannot mkdir: No space left on device
tar: binutils-2.34/gold/gc.cc: Cannot open: No such file or directory
tar: binutils-2.34/Makefile.def: Cannot write: No space left on device
tar: binutils-2.34/ltoptions.m4: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors
make[3]: *** [Makefile:105: /home/user/openwrt/build_dir/toolchain-mips_mips32_gcc-8.4.0_musl/binut ils-2.34/.prepared] Error 2
make[3]: Leaving directory '/home/user/openwrt/toolchain/binutils'
time: toolchain/binutils/compile#5.25#2.84#18.30
ERROR: toolchain/binutils failed to build.
make[2]: *** [toolchain/Makefile:97: toolchain/binutils/compile] Error 1
make[2]: *** Waiting for unfinished jobs....
*** This configuration is not supported in the following subdirectories:
gdbserver sim
(Any other directories should still work fine.)
./configure: line 7076: echo: write error: No space left on device
conftest.c:1: fatal error: error closing /home/user/openwrt/tmp/ccqmgrns.s: No space left on device
compilation terminated.
*** The command 'gcc -o conftest -O2 -I/home/user/openwrt/staging_dir/host/include -I/home/user/op enwrt/staging_dir/host/include -L/home/user/openwrt/staging_dir/host/lib conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
sort: fflush failed: 'standard output': No space left on device
sort: write error
./configure: line 40: echo: write error: No space left on device
./configure: line 44: printf: write error: No space left on device
./configure: line 45: echo: write error: No space left on device
sort: write failed: 'standard output': No space left on device
sort: write error
./configure: line 54: echo: write error: No space left on device
./configure: line 59: printf: write error: No space left on device
./configure: line 60: echo: write error: No space left on device
sort: fflush failed: 'standard output': No space left on device
sort: write error
./configure: line 69: echo: write error: No space left on device
./configure: line 75: printf: write error: No space left on device
./configure: line 76: echo: write error: No space left on device
cat: write error: No space left on device
./configure: line 78: echo: write error: No space left on device
./configure: line 82: printf: write error: No space left on device
make[3]: *** [Makefile:62: /home/user/openwrt/build_dir/toolchain-mips_mips32_gcc-8.4.0_musl/gdb-10 .1/.configured] Error 1
make[3]: Leaving directory '/home/user/openwrt/toolchain/gdb'
time: toolchain/gdb/compile#5.86#3.06#18.66
ERROR: toolchain/gdb failed to build.
make[2]: *** [toolchain/Makefile:97: toolchain/gdb/compile] Error 1
make[2]: Leaving directory '/home/user/openwrt'
make[1]: *** [toolchain/Makefile:93: /home/user/openwrt/staging_dir/toolchain-mips_mips32_gcc-8.4.0 _musl/stamp/.toolchain_compile] Error 2
make[1]: Leaving directory '/home/user/openwrt'
make: *** [/home/user/openwrt/include/toplevel.mk:230: world] Error 2
user@deb4core:~/openwrt$
so now i am runung make with -j1 V=s
user@deb4core:~/openwrt$ make with -j1 V=s
/home/user/openwrt/scripts/config.guess: 111: echo: echo: I/O error
cat: write error: No space left on device
/home/user/openwrt/scripts/config.guess: 111: echo: echo: I/O error
cat: write error: No space left on device
/home/user/openwrt/scripts/config.guess: 111: echo: echo: I/O error
cat: write error: No space left on device
awk: cmd. line:14: (FILENAME=- FNR=58) fatal: print to "standard output" failed: No space left on device
/home/user/openwrt/tmp/info/.files-packageinfo.mk:58: *** unterminated call to function 'eval': missing ')'. Stop.
make[1]: *** [/home/user/openwrt/include/toplevel.mk:79: prepare-tmpinfo] Error 2
make: *** [/home/user/openwrt/include/toplevel.mk:228: with] Error 2
user@deb4core:~/openwrt$
user@deb4core:~/openwrt$ make -j1 V=s
/home/user/openwrt/tmp/info/.files-packageinfo.mk:58: *** unterminated call to function 'eval': missing ')'. Stop.
make[1]: *** [/home/user/openwrt/include/toplevel.mk:79: prepare-tmpinfo] Error 2
make: *** [/home/user/openwrt/include/toplevel.mk:228: world] Error 2
user@deb4core:~/openwrt$
no space ((
absolutely no f..ing way you should build the image on the router itself, unless it is a beefy x86 server!
i guess it is clear what is the problem
all right i will do this only under user
i see i have no space left it is my fault shoud have make it more (i made 8 Gb disk)
gonna make it all from the begining hahah again
why do you want to build a custom image first of all? you want to try dawn, that's all? because than use snapshot image and ready to go
esterday a prorammist added new function in DAWN and i need to test it fast
so us i understand it will take a while when i can download firmware with this new function
was this new code merged to snapshot branch? or it was just a new function in dawn's git repo?
because you checked out v21.02.1 that's the latest official release, the package development process does not really do backporting (unfortunately) so not sure the newest dawn would work with 21.02.1 ... so maybe you better to wait a little bit imho
I may be using more space than required due to multi-architecture builds, but my 16GB build partition is a little "strained", while a simpler one is currently using 12GB. I'm also using about 10GB for host pieces. Overall I think you're probably going to want ~24GB-32GB as a single partion environment.
/dev/sda1 14383112 10584780 3047996 78% /
/dev/sdb1 16447356 15153320 438844 98% /home/openwrt/openwrt
/dev/sdc1 24769916 11455796 12055880 49% /home/openwrt/stable
I remember it took me a few loops to get things working for the first time a couple of years ago. Worth it in the end though
There is a new release in my fork: https://github.com/Ian-Clowes/DAWN.
OP is trying to get it built to try some scenarios, and general path to self-sufficiency is to get the core OpenWrt build working first. Hence my comment above to focus here on the main build. Once that works adding in the git-src private build of DAWN should be quite easy.
I chose 21.2.1
why ?
why the packages is out to date? if i compiled new firmware on 21.2. branch?
where did i go wrong id all my packages out to date
image and package versioning is a bit complicated.
- when you select a particular release, 21.02.1 for example, it means that at some point of time owrt team decided that a snapshot of the source code is ready for release, it was taken "as is" and labeled as "release 21.02.1". they create all the images for the various hw based on that specific code. parallel to that, packages are built too, and package source is added to the image.
you can check it here for example: https://downloads.openwrt.org/releases/21.02.1/
targets - includes all images
packages is pointing to package-21.02 including all available packages.
-
now, the complicated bit: an image is using a particular kernel version (e.g. 5.4.x), but package developers are working in the snapshot branch which is way ahead and in snapshot kernel version is probably 5.10.x. this means once a package is updated (independently from the image!) as it is developed/tested/verified in the snapshot branch it may not work in a release branch, unless package maintainer verifies and or back-ports it.
-
when you use
opkg install
it is using the source from above and NOT any developer source, you'll get what is available in the official binary repo (see point 1). if a package is back-ported, you may able to upgrade to it. though you should be very careful not to blindly upgrade! there are many posts about this whole upgrade vs not upgrade, search for it! in short: do NOT upgrade unless you know what you are doing. -
you want to use a developer version of dawn which is not even in the snapshot branch! so it is definitely not available as binary *.ipk package. you should follow the guide @IanC provided above! make sure you read it thoroughly especially read the installation guide and follow the developer guide and make sure to read the "Creating a local DAWN development instance" section.