Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => RT5350F => Topic started by: niel on September 06, 2018, 02:36:38 PM

Title: Flash Image Ubuntu 18.04
Post by: niel on September 06, 2018, 02:36:38 PM
Hi All,

I'm struggling to get the flash image working under Ubuntu 18.04

I've done the following, as from the Wiki:

1. git clone https://github.com/OLIMEX/openwrt -b rt5350f
2. cd Openwrt
3. make

I get the following:

$ make
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... failed.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install Git (git-core) >= 1.6.5

/home/niel/openwrt/openwrt/include/prereq.mk:12: recipe for target 'prereq' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/niel/openwrt/openwrt/include/toplevel.mk:140: recipe for target 'staging_dir/host/.prereq-build' failed
make[2]: *** [staging_dir/host/.prereq-build] Error 1
/home/niel/openwrt/openwrt/include/toplevel.mk:69: recipe for target 'prepare-tmpinfo' failed
make[1]: *** [prepare-tmpinfo] Error 2
/home/niel/openwrt/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

I then got the following patch,

git-version-check-fix.patch and use git apply ggit-version-check-fix.patch

I then run make again with more success, but I get the following:

$ make
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.
Collecting package info: done
Collecting target info: done
make[2]: Entering directory '/home/niel/openwrt/openwrt/scripts/config'
conf.c: In function 'check_stdin':
conf.c:77:3: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(_("aborted!\n\n"));
   ^~~~~~
conf.c:78:3: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(_("Console input/output is redirected. "));
   ^~~~~~
conf.c:79:3: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(_("Run 'make oldconfig' to update configuration.\n\n"));
   ^~~~~~
conf.c: In function 'conf_askvalue':
conf.c:89:3: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(_("(NEW) "));
   ^~~~~~
conf.c: In function 'conf_choice':
conf.c:290:5: warning: format not a string literal and no format arguments [-Wformat-security]
     printf(_(" (NEW)"));
     ^~~~~~
conf.c: In function 'check_conf':
conf.c:438:6: warning: format not a string literal and no format arguments [-Wformat-security]
      printf(_("*\n* Restart config...\n*\n"));
      ^~~~~~
conf.c: In function 'main':
conf.c:615:6: warning: format not a string literal and no format arguments [-Wformat-security]
      _("\n*** The configuration requires explicit update.\n\n"));
      ^
conf.c:669:4: warning: format not a string literal and no format arguments [-Wformat-security]
    fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
    ^~~~~~~
conf.c:673:4: warning: format not a string literal and no format arguments [-Wformat-security]
    fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
    ^~~~~~~
conf.c:684:4: warning: format not a string literal and no format arguments [-Wformat-security]
    fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
    ^~~~~~~
make[2]: Leaving directory '/home/niel/openwrt/openwrt/scripts/config'
make[1] world
make[2] tools/install
make[3] -C tools/patch compile
make[3] -C tools/patch install
make[3] -C tools/sed compile
make[3] -C tools/sed install
make[3] -C tools/m4 compile
make[3] -C tools/m4 install
make[3] -C tools/autoconf compile
make[3] -C tools/autoconf install
make[3] -C tools/pkg-config compile
make[3] -C tools/pkg-config install
make[3] -C tools/xz compile
make[3] -C tools/xz install
make[3] -C tools/automake compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/niel/openwrt/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 1


I can't seem to fix this even with make distclean

Thanks,
Niel





Title: Re: Flash Image Ubuntu 18.04
Post by: niel on September 06, 2018, 02:38:34 PM
I forgot to add that I've tried the suggested:

make -j1 V=s

make[1]: Entering directory '/home/niel/openwrt/openwrt'
make[2]: Entering directory '/home/niel/openwrt/openwrt'
+ mkdir -p /home/niel/openwrt/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2
+ cd /home/niel/openwrt/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2
+ mkdir -p bin lib include stamp
mkdir -p /home/niel/openwrt/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp
touch /home/niel/openwrt/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/.prepared
+ mkdir -p /home/niel/openwrt/openwrt/staging_dir/host
+ cd /home/niel/openwrt/openwrt/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/niel/openwrt/openwrt/build_dir/host/stamp /home/niel/openwrt/openwrt/staging_dir/host/include/sys
install -m0644 /home/niel/openwrt/openwrt/tools/include/*.h /home/niel/openwrt/openwrt/staging_dir/host/include/
install -m0644 /home/niel/openwrt/openwrt/tools/include/sys/*.h /home/niel/openwrt/openwrt/staging_dir/host/include/sys/
ln -sf lib /home/niel/openwrt/openwrt/staging_dir/host/lib64
touch /home/niel/openwrt/openwrt/staging_dir/host/.prepared
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/patch'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/patch'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/patch'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/patch'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/sed'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/sed'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/sed'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/sed'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/m4'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/m4'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/m4'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/m4'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/autoconf'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/autoconf'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/autoconf'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/autoconf'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/pkg-config'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/pkg-config'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/pkg-config'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/pkg-config'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/xz'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/xz'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/xz'
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/xz'
make[3]: Entering directory '/home/niel/openwrt/openwrt/tools/automake'
(cd /home/niel/openwrt/openwrt/build_dir/host/automake-1.15; AUTOM4TE=/home/niel/openwrt/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/niel/openwrt/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/niel/openwrt/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/niel/openwrt/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/niel/openwrt/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/niel/openwrt/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/niel/openwrt/openwrt/staging_dir/host/bin/libtool M4=/home/niel/openwrt/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true STAGING_DIR="" ./bootstrap.sh)
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at ./bin/automake.tmp line 3938.
Makefile:50: recipe for target '/home/niel/openwrt/openwrt/build_dir/host/automake-1.15/.configured' failed
make[3]: *** [/home/niel/openwrt/openwrt/build_dir/host/automake-1.15/.configured] Error 255
make[3]: Leaving directory '/home/niel/openwrt/openwrt/tools/automake'
tools/Makefile:122: recipe for target 'tools/automake/compile' failed
make[2]: *** [tools/automake/compile] Error 2
make[2]: Leaving directory '/home/niel/openwrt/openwrt'
tools/Makefile:121: recipe for target '/home/niel/openwrt/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy' failed
make[1]: *** [/home/niel/openwrt/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2
make[1]: Leaving directory '/home/niel/openwrt/openwrt'
/home/niel/openwrt/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2
Title: Re: Flash Image Ubuntu 18.04
Post by: LubOlimex on September 07, 2018, 02:42:42 PM
What is the GCC version?

Maybe some dependencies are missing probably libc6-dev or maybe build-essential. Use apt install to get those.
Title: Re: Flash Image Ubuntu 18.04
Post by: zgyarmati on September 23, 2018, 03:59:35 PM
 Also, please note that the OpenWrt version linked on the Olimex wiki and you are using is rather old, and since then there is full support for the RT5350F-OLINUXINO boards in the mainline OpenWrt project, so probably you get better results with using that one, and most importantly better support from the OpenWrt community.
Title: Re: Flash Image Ubuntu 18.04
Post by: vinczo on November 13, 2018, 04:42:18 PM
QuoteBuild dependency: Please install Git (git-core) >= 1.6.5

This reminds me of a bug we had when trying to compile OpenWrt from the Olimex source as you did with Ubuntu 18.04 as Host compiler. It had something to do not only with the version of GCC, but with many other packages and fixes necessary.

The compilation process works well on Ubuntu 16.04

I'd try what LubOlimex suggested.
The simplest workaround for us at that time ( since we didn't want to waste time on it ) was to create a VM with Ubuntu 16.04

Edit:
We recentrly tried using Docker to use Ubuntu 16.04 and that seems much simpler and efficient.
Title: Re: Flash Image Ubuntu 18.04
Post by: SAbadshah on November 21, 2022, 09:57:46 AM
Also, keep in mind that the OpenWrt version you are using, which is linked on the Olimex wiki, is quite outdated. Ever since the mainline OpenWrt project added full support for the RT5350F-OLINUXINO boards, (https://top20plus.com/what-size-skateboard-should-i-get/) using that version is likely to yield better results and, most importantly, better support from the OpenWrt community.