Related
Trying to compile the source for the archos gen 8s. If I can compile it, I might be able to add in root support, but I have hit a snag. When I compile I get this:
Code:
make[4]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gthread'
make[3]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gthread'
Making install in gobject
make[3]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
/usr/bin/make glib-genmarshal
make[4]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
make[4]: `glib-genmarshal' is up to date.
make[4]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
&& echo "#define __G_MARSHAL_H__" >> xgen-gmh \
&& --nostdinc --prefix=g_cclosure_marshal ./gmarshal.list --header >> xgen-gmh \
&& echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
&& (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \
&& rm -f xgen-gmh xgen-gmh~ \
&& echo timestamp > stamp-gmarshal.h
[COLOR="Red"]/bin/bash: line 2: --nostdinc: command not found[/COLOR]
make[3]: *** [stamp-gmarshal.h] Error 127
make[3]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5'
make: *** [/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib/libglib-2.0.a] Error 2
I googled around and was unable to figure out what is going on there. --nostdinc should be a command for GCC, but doesn't seem to be working correctly. When I run gcc -v I get:
Code:
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
PS If you do get it compiled I found where you can override user for certain applications: /buildroot/package/dbus/archos.conf
It looks like this:
Code:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="com.archos.emaild"/>
</policy>
<!-- Add your service name
<policy user="root">
<allow own="com.archos.Service"/>
</policy>
-->
</busconfig>
the whole build process seems to be buggy as hell
# make menuconfig
results in
Code:
package/Config.in:443: can't open file "package/apdf/Config.in"
# make clean
results in
Code:
/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
make[2]: *** [uninstall-info-am] Error 1
make[2]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7/doc'
make[1]: *** [uninstall-recursive] Error 1
make[1]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7'
make: *** [diffutils-clean] Error 2
How long did yours compile for? Mine compiled for over an hour before failing.
I'll start all over again and measure it.
Code:
/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibcgnueabi-gcc -shared .libs/libgphoto2_la-gphoto2-abilities-list.o .libs/libgphoto2_la-ahd_bayer.o .libs/libgphoto2_la-bayer.o .libs/libgphoto2_la-gphoto2-camera.o .libs/libgphoto2_la-gphoto2-context.o .libs/libgphoto2_la-exif.o .libs/libgphoto2_la-gphoto2-file.o .libs/libgphoto2_la-gphoto2-filesys.o .libs/libgphoto2_la-gamma.o .libs/libgphoto2_la-jpeg.o .libs/libgphoto2_la-gphoto2-list.o .libs/libgphoto2_la-gphoto2-result.o .libs/libgphoto2_la-gphoto2-version.o .libs/libgphoto2_la-gphoto2-setting.o .libs/libgphoto2_la-gphoto2-widget.o -Wl,--rpath -Wl,/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/lib -L/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib -L/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/lib -L/usr/lib -lgphoto2_port -L/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/lib -L/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/lib -lltdl -lm -isysroot /data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir -mtune=cortex-a8 -isysroot /data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir -mtune=cortex-a8 -Wl,-soname -Wl,libgphoto2.so.2 -Wl,-version-script -Wl,.libs/libgphoto2.ver -o .libs/libgphoto2.so.2.4.0
/usr/lib/libltdl.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
libtool: install: error: relink `libgphoto2.la' with the above command before installing it
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/libgphoto2-2.4.9.1/libgphoto2'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/libgphoto2-2.4.9.1/libgphoto2'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/libgphoto2-2.4.9.1'
make: *** [/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/lib/libgphoto2.so] Error 2
real 38m3.275s
user 50m36.129s
sys 6m27.836s
I don't know why it's referring to /usr/lib/libltdl.so because this would be a 64bit lib of my linux machine. bug?
You two realise that you can't just use a PC version of gcc to compile an arm version of sw?
You need the crosscompile toolchain to do this, and than its working correctly.
the toolchain is inside the xxx.tgz archive and it is used for building. no need for extra toolchain
But laptopfeak is using something that does:
Target: i686-linux-gnu
wrong. he just typed gcc -v in his shell. this uses of course his very own gcc and not the one served by the archos toolchain.
when I type gcc -v using the archos toolchain it looks like this:
# gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/arm-linux-gcc -v
Using built-in specs.
Target: arm-linux-uclibcgnueabi
Configured with: /data/temp/archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/gcc-4.4.1/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=arm-linux-uclibcgnueabi --enable-languages=c,c++ --with-sysroot=/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir --with-build-time-tools=/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared --with-gmp=/data/temp/archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/gmp --with-mpfr=/data/temp/archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/mpfr --disable-nls --enable-threads --disable-multilib --with-tune=cortex-a8 --with-cpu=cortex-a8 --with-arch=armv7-a --with-fpu=vfp3 --with-float=softfp
Thread model: posix
gcc version 4.4.1 (GCC)
Click to expand...
Click to collapse
the toolchain builds the crosscompiler itself and then starts crosscompiling
I did find out why I was getting one of the errors. I was missing some dependencies. Found a quick tutorial on how to compile the kernel for the gen7. http://archos.g3nius.org/index.php?title=Compiling_gen7-gpl
Now I am getting an error about the .config file being out of date. Odd thing is that the make menuconfig does not work... as previously mentioned.
Code:
PATH="/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/bin:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/bin:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" \
./Configure linux-arm --prefix=/ \
--openssldir=/lib/ssl -L/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib -ldl \
-I/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/include threads \
shared no-idea no-mdc2 no-rc5)
Configuring for linux-arm
IsWindows=0
CC =gcc
CFLAG =-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -I/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/include -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DL_ENDIAN -DTERMIO -fomit-frame-pointer -Wall
EX_LIBS =-L/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib -ldl -ldl
BN_ASM =bn_asm.o
DES_ENC =des_enc.o fcrypt_b.o
BF_ENC =bf_enc.o
CAST_ENC =c_enc.o
RC4_ENC =rc4_enc.o
RC5_ENC =rc5_enc.o
MD5_OBJ_ASM =
SHA1_OBJ_ASM =
RMD160_OBJ_ASM=
PROCESSOR =
RANLIB =/usr/bin/ranlib
ARFLAGS =
PERL =/usr/bin/perl
THIRTY_TWO_BIT mode
DES_RISC1 used
BN_LLONG mode
RC4_CHUNK is undefined
make[1]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
Makefile is older than Makefile.org.
Reconfigure the source tree (via './config' or 'perl Configure'), please.
make[1]: *** [Makefile] Error 1
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
/usr/bin/make MAKE="/usr/bin/make -j1" CC=/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibcgnueabi-gcc -C /home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m all build-shared
make[1]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
Makefile is older than Makefile.org.
Reconfigure the source tree (via './config' or 'perl Configure'), please.
make[1]: *** [Makefile] Error 1
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
make: *** [/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m/apps/openssl] Error 2
[email protected]:~/Downloads/Archos/gen8-gpl-froyo/buildroot$ make menuconfig
make CC="/usr/bin/gcc" -C package/config conf mconf
make[1]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/package/config'
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c conf.c -o conf.o
conf.c: In function ‘conf_askvalue’:
conf.c:104: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
conf.c: In function ‘conf_choice’:
conf.c:362: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c kxgettext.c -o kxgettext.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/checklist.c -o lxdialog/checklist.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/inputbox.c -o lxdialog/inputbox.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/menubox.c -o lxdialog/menubox.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/textbox.c -o lxdialog/textbox.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/util.c -o lxdialog/util.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/yesno.c -o lxdialog/yesno.o
make[1]: *** No rule to make target `/usr/include/ncurses/ncurses.h', needed by `mconf.o'. Stop.
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/package/config'
make: *** [package/config/mconf] Error 2
Oh and this does seem to be the buggiest source/compile I have ever dealt with. But I did talk to someone on xchat last night and they said that they got it to compile out of box.
I installed a fresh ubuntu 10.10 into a virtual machine and installed the packages mentioned on this website: http://archos.g3nius.org/index.php?title=Compiling_gen7-gpl
currently building.. stay tuned..
edit: still buggy
Finally got it to compile thanks to jensbln:
According to him you have to: "disable gdb in /buildroot/local/g8_arm/g8_arm.config"
So I poked around in the g8_arm.config and found the gdb. I then set all instances of gdb to n instead of y. I then had to sudo make, because I was getting permission demied. After that it compiled fine.
Let's see if this works for me too...
edit: failed on the x64 machine.. not that surprisingly as others had problems too. testing on x32..
damn, its not working (failed because of missing symlinks to libmpfr.so.1)..
edit: ahh.. it seems that i missed this dependency: libmpfr1ldbl
edit2: yes, this was the missing dependency.
using a fresh ubuntu 10.10 x32, to compile the froyo gpl sources install these packages:
Code:
# apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl automake autoconf libtool gettext texinfo libmpfr1ldbl
edit3: make menuconfig does work too
Code:
# cd gen8-gpl-froyo/linux
# cp linux.config .config
# make oldconfig
# make menuconfig
chulri said:
the whole build process seems to be buggy as hell
# make menuconfig
results in
Code:
package/Config.in:443: can't open file "package/apdf/Config.in"
# make clean
results in
Code:
/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
make[2]: *** [uninstall-info-am] Error 1
make[2]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7/doc'
make[1]: *** [uninstall-recursive] Error 1
make[1]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7'
make: *** [diffutils-clean] Error 2
Click to expand...
Click to collapse
you are not supposed to use "make menuconfig"
just type "make" in the buildroot folder and it will build the kernel and buildroot packages that are in gen8 units...
@_nz_ you're late, see my last post.
btw: yes I'm supposed to use make menuconfig when I want to change kernel settings without changing the kernel config file manually
chulri said:
@_nz_ you're late, see my last post.
btw: yes I'm supposed to use make menuconfig when I want to change kernel settings without changing the kernel config file manually
Click to expand...
Click to collapse
sure. I was referring more to make menuconfig in buildroot which is not used during our SW development, so it's not really "supported" and might be broken. All our configs are hardcoded
it's not used inside buildroot, I use it inside linux
btw: do you work at archos?
chulri said:
it's not used inside buildroot, I use it inside linux
btw: do you work at archos?
Click to expand...
Click to collapse
Assuming it is the same nz that posts at archosfans then yes he/she is an Archos employee.
blazingwolf said:
Assuming it is the same nz that posts at archosfans then yes he/she is an Archos employee.
Click to expand...
Click to collapse
yes, we are
Hey -nz- I posted this on the Archos Fans forum in response to an answer to my question; why can't we reflash to 2.1. You probably didn't see it......what do you say?
Thanks for the reply about the bootloader. Again ignorance on my part. Surely Archos could release a patch that would allow the bootloader to install any version of the OS? I mean its all just code going into a certain memory address. I have a hard time with companies like Archos who seem to make things difficult for owners. I can see Apple doing it because they really are the 800 pound gorilla in the corner but the Dev Team and smart guys have always found a way round what they do. Archos are a relatively small fish in the pond. The tablet scene is moving very fast and new tablets are coming out every day.
It reminds me of the Pandigital novel. We pleaded with Pandigital to give us the source code. They said they would but never did. The smart guys were able to do wonders with what they had but ultimately within 3 months people had given up and moved on. Once the smart guys were gone all development stopped and now the PDN is just a mostly forgotten memory. If Pandigital had of opened up, the word of mouth would have spread, people would have bought their reader, hacked it and they would have both sold more and got the hearts and minds (and money) of people who would have considered any product they brought out. Now they are pretty much dead in the water and will likely just stay selling photo frames. People and technology has passed them by.
I won't say the same will happen to Archos. They are a bigger fish but they seem to have generated a lot of ill will over the 2.2 release. Even all those who were trumpeting how wonderful 2.2 was going to be have slunk away. Apple will bring out a new iPad next year. The price of the present one is dropping and will continue to do so. Say what you like about the iPad, but it works and it works well. It's too big and I'll probably sell mine again in a month or so depending on what comes out next in the 7 to 8 inch form factor.
Archos have the opportunity to buck the trend and open their software up and let people make it fly. There are some really sharp, switched on guys out there and if given the encouragement and support by Archos, they could do wonders. How cool would it be for Archos to be known as the one company that actually helped and supported its customers. The hardware is all there, the software is lacking but it is easier to make something better if it is only the software that is holding back the hardware.
So come on Mr Archos, if you are reading this, do some deep thinking. Be the tablet company of the people. Lets see some liberté, égalité, fraternité.
Hi all,
I'm trying to build CyanogenMod for intl G2 (the only change I've made is to add halo)
for the repo init I've done:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0 -g all,-notdefault,d802,lge
And then repo sync -j8
After that, like I've said, I've added halo.
And now I'm trying to build by doing:
Code:
$ source build/envsetup.sh
$ breakfast d802
but the only things I get is:
Code:
[email protected]:~/CM/G2# breakfast d802
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/lge/d802/cm.mk]]: "device/lge/g2-common/g2.mk" does not exist. Arrêt.
Device d802 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Traceback (most recent call last):
File "build/tools/roomservice.py", line 76, in <module>
result = json.loads(urllib.request.urlopen(githubreq).read().decode())
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/lge/d802/cm.mk]]: "device/lge/g2-common/g2.mk" does not exist. Arrêt.
** Don't have a product spec for: 'cm_d802'
** Do you have the right repo manifest?
I don't understand because when I take a look to device, there is no lge/d802 directory. By doing the init command, I would have to download specific files
also lunch and breakfast command gave me the same error...
Do you have an idea where I'm wrong and what can I do ? I think I've to download device specific files but how can I do this (if this is the error), normally before building, the files are downloaded ? I don't see...
Thanks in advance !
Up, if someone can help me :fingers-crossed:
I have the same problem, someone can help?
This is My first post on XDA
From the day I owned YUreka I always wished to compile my own kernel. I searched on the web for compiling 64bit android kernel but didn't get satisfying results. So I did some research and asked some android developers, I got help from some developers but some of the developer refused may be due to their attitude or may be they didn't want to share their ideas / knowledge. Anyways here's a guide for compiling 64 bit kernel. I have also made a video tutorial check that out [ status == uploaded ].
What will YU need :
1. Ubuntu 64 Bit OS
2. Good Internet Connection.
3. Usable Brain.
4. Basic Knowledge of Linux.
Lets Start
First we need to get some important stuff / tools / software .
1. Open Ubuntu Software center and install JDK 7 or JDK 8
2. Open terminal and run the following command
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now YU'r Linux machine is all set to compile kernel.
3. Now YU need to download a toolchain. I have uploaded the toolchain that i used for compiling the kernel. Click from here > h t t p s ://drive.google.com/open?id=0B9D4jOdpRzZHOURMTS1VaXplc0U
4. Time to download Kernel sources. For this tutorial I am using Varun Chitre's Thunderzap kernel. Here is the link for thunderzap's sources > h t t p s ://github.com/varunchitre15/thunderzap_tomato
.Select branch as cm 12.1 from left and press download on the right.
5. Make a directory "android-kernel" under "/Home" and place both the zips in "android-kernel" directory.
6. Extract both the zips. Now YU will have two folders one of toolchain and other of kernel source.
7. YU no more need the zip files just delete both the zips.
8. Open the kernel source folder and type the following code.
9. Run the following command to point the variable to toolchains path :
Code:
export CROSS_COMPILE=/home/r0h4n/android-kernel/aarch64-linux-android-4.9-uber-master/bin/aarch64-linux-android-
If YU followed along with me YU will just have to change the name of the user ( replace <r0h4n> with <YU'r username> )
10. Time to Compile your kernel :
Code:
export ARCH=arm64
Code:
export SUBARCH=arm64
Code:
export USE_CCACHE=1
Code:
make cyanogenmod_tomato-64_defconfig
The name of defconfig file may be different check it in "kernel_source/arch/arm64/defconfig/"
Code:
make menuconfig
Here YU can explore various options. I'll not explain everything in detail here.
Now the final command make. It takes a parameter -jn. Where ( n = # of threads per core + 1 )
I have a Dual core processor with 2 thread per processor so for me it is " make -j3 ".
Code:
make -j3
Now sit back and relax.......let the kernel compile
Got a compilation error ?
Post it here.
Now we need to create a flashable zip. Download this kernel flash zip from here > h t t p s : //drive.google.com/open?id=0B9D4jOdpRzZHdTJibndqQzhVdFk
1. Extract kernel.zip.
2. Navigate to tools in "/kernel".
3. Open "kernel_source/arch/arm64/boot/".
4. Copy "Image".
5. Replace it with the "Image" in "/kernel/tools/Image".
6. Copy "kernel_source/driver/stagging/prima/wlan.ko" and replace it with "kernel/system/lib/modules/wlan.ko".
7. Goto "/kernel" select all the three folders "META-INF", "system", "tools" and rezip it.
8. Flash the zip via recovery and now YU'r Phone rocks YU'r own compile kernel.
Rohan459 said:
This is My first post on XDA
Click to expand...
Click to collapse
Life saver for the 64bit part, thank you very much! :good::good::good:
some issues
Hello, i'm trying to compile this kernel (for xiaomi redmi note 3 "kenzo") https://github.com/cyanogenmod/android_kernel_xiaomi_msm8956/tree/stable/cm-13.0-ZNH5Y, and get the flashable zip.
I made a few tries and i can't do it, i going to tell you my problems and how i could fix some of them.
Error 1:
when i try to compile i get this error:
scripts/Makefile.build:455: recipe for target 'drivers/video/msm' failed
make[2]: *** [drivers/video/msm] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/video' failed
make[1]: *** [drivers/video] Error 2
make[1]: *** Waiting for unfinished jobs....
I solved it changing a line in /home/user/Desktop/android_kernel_xiaomi_msm8956-stable-cm-13.0-ZNH5Y/drivers/video/msm/msm_dba/msm_dba.c
I changed #include <msm_dba_internal.h> for rhis #include "msm_dba_internal.h"
After that i get another error.
Error 2:
After solve Error 1, when i try to compile i get this error:
make[1]: *** No rule to make target 'arch/arm64/boot/dts/msm8956-mtp.dtb', needed by 'arch/arm64/boot/Image.gz-dtb'. Stop.
make[1]: *** Waiting for unfinished jobs....
OBJCOPY arch/arm64/boot/Image
/home/guille/Desktop/android_kernel_xiaomi_msm8956-stable-cm-13.0-ZNH5Y/arch/arm64/Makefile:84: recipe for target 'Image.gz-dtb' failed
make: *** [Image.gz-dtb] Error 2
make: *** Waiting for unfinished jobs....
This error i solved disabling this line #CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y in cyanogenmod_kenzo_defconfig, but i don't know if this is the correct way.
After that changes i get finally the image (used in the tutorial) and image.gz, then i proced to put the image and wlan.ko in in kernel.zip, but when i flash it the phone don't boot.
What can i do?
P.S.: Sorry my bad english.
Hello the friend really super guide and especially the only one or with whom I managed to compile my own kernel.
Is especially as said in the OP I contact a lot of kernel dev and nobody answered so I will have only one person to thank lol.
omega691 said:
Hello, i'm trying to compile this kernel (for xiaomi redmi note 3 "kenzo") https://github.com/cyanogenmod/android_kernel_xiaomi_msm8956/tree/stable/cm-13.0-ZNH5Y, and get the flashable zip.
I made a few tries and i can't do it, i going to tell you my problems and how i could fix some of them.
Error 1:
when i try to compile i get this error:
scripts/Makefile.build:455: recipe for target 'drivers/video/msm' failed
make[2]: *** [drivers/video/msm] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/video' failed
make[1]: *** [drivers/video] Error 2
make[1]: *** Waiting for unfinished jobs....
I solved it changing a line in /home/user/Desktop/android_kernel_xiaomi_msm8956-stable-cm-13.0-ZNH5Y/drivers/video/msm/msm_dba/msm_dba.c
I changed #include <msm_dba_internal.h> for rhis #include "msm_dba_internal.h"
After that i get another error.
Error 2:
After solve Error 1, when i try to compile i get this error:
make[1]: *** No rule to make target 'arch/arm64/boot/dts/msm8956-mtp.dtb', needed by 'arch/arm64/boot/Image.gz-dtb'. Stop.
make[1]: *** Waiting for unfinished jobs....
OBJCOPY arch/arm64/boot/Image
/home/guille/Desktop/android_kernel_xiaomi_msm8956-stable-cm-13.0-ZNH5Y/arch/arm64/Makefile:84: recipe for target 'Image.gz-dtb' failed
make: *** [Image.gz-dtb] Error 2
make: *** Waiting for unfinished jobs....
This error i solved disabling this line #CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y in cyanogenmod_kenzo_defconfig, but i don't know if this is the correct way.
After that changes i get finally the image (used in the tutorial) and image.gz, then i proced to put the image and wlan.ko in in kernel.zip, but when i flash it the phone don't boot.
What can i do?
P.S.: Sorry my bad english.
Click to expand...
Click to collapse
Change directory and try again
Sent from my Redmi 3S using Tapatalk
i have this error:
sound/soc/msm/msm8996.c:34:26: fatal error: device_event.h: No such file or directory
#include <device_event.h>
^
compilation terminated.
i'm on ubuntu 16.04.02 x64
i think the problem is the library "libevent-dev" but i don't understand how to fix it because libevent-dev is installed
problem in yureka
i rooted my phone long back.. but i didnt used it...lots of problems in it it is in boot loop amd when ever it is luckily on wifi is not working ...it is not even displaying near by wifi and not even data connection ,i thought of new cm12 rom and flashed it stiill same issue. and more over after flashing stock cm12 and it is still in boot loop..please help
Hello there,
i am having this said problem when i follow your tutorial on how to build a 64bit kernel.
Code:
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from /home/protox/android/berlin_kernel/include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/mod_devicetable.h:11,
from scripts/mod/devicetable-offsets.c:2:
include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
^
compilation terminated.
/home/protox/android/berlin_kernel/scripts/mod/Makefile:34: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
scripts/Makefile.build:468: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/util.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
Makefile:559: recipe for target 'scripts' failed
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
Can you please help me out mate
Thanks
hello sir can you help me please??
my device is redmi note 4x ( mido ) snapdragon 625 64 bit i build kernel without error but when i want to flash it on my device
device not boot to system but to fastboot mod and need to flash other kernel to make it boot ?? any idea about that ?
Compiling kernrl
I need some help if any body is out there .after months of trying and trying i am finally able to compli my kernel .after is completes with no error i go to arch/arm64/boot and all i have is am image.gz and and image no ziamge or nothing ive goigle it but i cant figure out whats the next step
akino553 said:
hello sir can you help me please??
my device is redmi note 4x ( mido ) snapdragon 625 64 bit i build kernel without error but when i want to flash it on my device
device not boot to system but to fastboot mod and need to flash other kernel to make it boot ?? any idea about that ?
Click to expand...
Click to collapse
The kernel has not compiled properly...
fowler82 said:
I need some help if any body is out there .after months of trying and trying i am finally able to compli my kernel .after is completes with no error i go to arch/arm64/boot and all i have is am image.gz and and image no ziamge or nothing ive goigle it but i cant figure out whats the next step
Click to expand...
Click to collapse
Find a zip with the image.gz and image file and replace the files with ur compiled files.
Rohan459 said:
Find a zip with the image.gz and image file and replace the files with ur compiled files.
Click to expand...
Click to collapse
Once I build the kernel and I build the modules how do i find them to load them does anybody no
Toolchains
fowler82 said:
Once I build the kernel and I build the modules how do i find them to load them does anybody no
Click to expand...
Click to collapse
go in kernel root directory and within search box look for .ko files. It will give you a list of modules from where you can copy them and paste in your new ROM system/lib/modules directory.
can any device use the kernel.zip to flash the boot.img after replacing wlan.ko ?
Rohan459 said:
This is My first post on XDA
From the day I owned YUreka I always wished to compile my own kernel. I searched on the web for compiling 64bit android kernel but didn't get satisfying results. So I did some research and asked some android developers, I got help from some developers but some of the developer refused may be due to their attitude or may be they didn't want to share their ideas / knowledge. Anyways here's a guide for compiling 64 bit kernel. I have also made a video tutorial check that out [ status == uploaded ].
What will YU need :
1. Ubuntu 64 Bit OS
2. Good Internet Connection.
3. Usable Brain.
4. Basic Knowledge of Linux.
Lets Start
First we need to get some important stuff / tools / software .
1. Open Ubuntu Software center and install JDK 7 or JDK 8
2. Open terminal and run the following command
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now YU'r Linux machine is all set to compile kernel.
3. Now YU need to download a toolchain. I have uploaded the toolchain that i used for compiling the kernel. Click from here > h t t p s ://drive.google.com/open?id=0B9D4jOdpRzZHOURMTS1VaXplc0U
4. Time to download Kernel sources. For this tutorial I am using Varun Chitre's Thunderzap kernel. Here is the link for thunderzap's sources > h t t p s ://github.com/varunchitre15/thunderzap_tomato
.Select branch as cm 12.1 from left and press download on the right.
5. Make a directory "android-kernel" under "/Home" and place both the zips in "android-kernel" directory.
6. Extract both the zips. Now YU will have two folders one of toolchain and other of kernel source.
7. YU no more need the zip files just delete both the zips.
8. Open the kernel source folder and type the following code.
9. Run the following command to point the variable to toolchains path :
Code:
export CROSS_COMPILE=/home/r0h4n/android-kernel/aarch64-linux-android-4.9-uber-master/bin/aarch64-linux-android-
If YU followed along with me YU will just have to change the name of the user ( replace <r0h4n> with <YU'r username> )
10. Time to Compile your kernel :
Code:
export ARCH=arm64
Code:
export SUBARCH=arm64
Code:
export USE_CCACHE=1
Code:
make cyanogenmod_tomato-64_defconfig
The name of defconfig file may be different check it in "kernel_source/arch/arm64/defconfig/"
Code:
make menuconfig
Here YU can explore various options. I'll not explain everything in detail here.
Now the final command make. It takes a parameter -jn. Where ( n = # of threads per core + 1 )
I have a Dual core processor with 2 thread per processor so for me it is " make -j3 ".
Code:
make -j3
Now sit back and relax.......let the kernel compile
Got a compilation error ?
Post it here.
Now we need to create a flashable zip. Download this kernel flash zip from here > h t t p s : //drive.google.com/open?id=0B9D4jOdpRzZHdTJibndqQzhVdFk
1. Extract kernel.zip.
2. Navigate to tools in "/kernel".
3. Open "kernel_source/arch/arm64/boot/".
4. Copy "Image".
5. Replace it with the "Image" in "/kernel/tools/Image".
6. Copy "kernel_source/driver/stagging/prima/wlan.ko" and replace it with "kernel/system/lib/modules/wlan.ko".
7. Goto "/kernel" select all the three folders "META-INF", "system", "tools" and rezip it.
8. Flash the zip via recovery and now YU'r Phone rocks YU'r own compile kernel.
Click to expand...
Click to collapse
created kernel using tutorial,,,but this kernel boots in fastboot mode only..
dont know why..
device is lenovo k6 note(sd430 msm8937)
please help
i am facing this error and can not resolve the problem.
property '#gpio-cells' in node /soc/msm_cdc_pinctrl_us_euro_sw or bad phandle (referred from /soc/sound:qcom,cdc-us-eu-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/cdc_comp_pinctrl or bad phandle (referred from /soc/sound:qcom,cdc-comp-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_pri or bad phandle (referred from /soc/sound:qcom,pri-mi2s-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_quin or bad phandle (referred from /soc/sound:qcom,quin-mi2s-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_us_euro_sw or bad phandle (referred from /soc/sound-9335:qcom,cdc-us-eu-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_quin or bad phandle (referred from /soc/sound-9335:qcom,quin-mi2s-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (interrupts_property): interrupts size is (12), expected multiple of 8 in /soc/[email protected]
CC lib/mpi/generic_mpih-lshift.o
DTC arch/arm64/boot/dts/qcom/msm8953-ext-codec-rcm-overlay.dtbo
Error: ../arch/arm64/boot/dts/qcom/msm8953-audio-cdp.dtsi:14.1-11 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.dtbo:24: recipe for target 'arch/arm64/boot/dts/qcom/msm8953-ext-codec-rcm-overlay.dtbo' failed
make[3]: *** [arch/arm64/boot/dts/qcom/msm8953-ext-codec-rcm-overlay.dtbo] Error 1
../scripts/Makefile.build:653: recipe for target 'arch/arm64/boot/dts/qcom' failed
make[2]: *** [arch/arm64/boot/dts/qcom] Error 2
arch/arm64/Makefile:194: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 2
make[1]: *** Waiting for unfinished jobs..
Overview
I've created a very simple #!/bin/bash script (attached) to automate the initial build or subsequent rebuild of SpookCity138's ROM:
Slim Rom 7 for the Samsung S5 mini G800f (kminilte). The script simply automates the steps and processes created by others (none of which is my own work - all credit goes to the original creators). I have only tested this script on my own working environment: Gnome Ubuntu 17.04; 16GB RAM; i7-7700HQ; If your environment differs from this your experience may differ from mine.
How to Execute script
See readme at: https://github.com/fidoedidoe/build_scripts
Thanks
@spookcity138, @jimmy999x. Taking the time to educate me at each and every tentative step and demonstrating great patience
Contributors
spookcity138
jimmy999x
Script Source
The latest version of the script (and others for different devices) can be found here: https://github.com/fidoedidoe/build_scripts
SpookCity138's ROM
https://forum.xda-developers.com/galaxy-s5-mini/development/rom-slim-rom-7-nougat-t3558926
Created 2017-09-20
Last Updated 2017-12-09
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
wow, excellent, I have reviewed the code (I have not executed it yet) looks pretty good, it should work, I have to copy your script and modify it for other roms, thanks!
edit 1: it is possible to use this script (I use it and it works perfect) to automate even more the process of configuring the compilation environment https://github.com/akhilnarang/scripts
Also, for Ubunt 16.04 I added a couple more to make it easier some things:
cmake
nautilus (optional)
phablet-tools
unrar
silversearcher-ag (this is optional, but extremely useful for me, allows me to find the problematic lines inside a document or folder)
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
You need to apply some SELinux, CAF, And CM/LOS Patches to build a Nougat ROM for G800H, or that rom will not boot, or will shall not pass from build errors.
Is not a easy task.....
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
i found this on YT
so far so good for me
give it a try
https://youtu.be/UPOpJgqnlf8
not working for me -- using xubuntu 17.10
ko_taka said:
not working for me -- using xubuntu 17.10
Click to expand...
Click to collapse
Script updated on github (follow links for build_slimrom7_kminilte.sh). Tested on my laptop (Ubuntu gnome 17.04) and SlimRom7 version 1.17 builds successfully (although I have yet to test the build on the device). I'll update the attached zip in the opening page in the coming days, but as a general rule github is the best place to find latest version(s).
Thanks to @spookcity138 (again) for taking time the time and offering sound help / advice identifying the issues and resolve (the issue was within applying device specific patches ./apply.sh).
I am on 40GB partition. Not enough?
perly terminated.
Fetching projects: 70% (381/544) fatal: unable to access 'https://android.googlesource.com/platform/hardware/akm/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 73% (398/544) fatal: unable to access 'https://android.googlesource.com/platform/system/connectivity/shill/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 74% (403/544) fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
error: Cannot fetch platform/external/jsr330
Fetching projects: 78% (425/544) fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: index-pack failed
error: index-pack died
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
error: Cannot fetch SlimRoms/frameworks_base
Click to expand...
Click to collapse
ko_taka said:
I am on 40GB partition. Not enough?
Click to expand...
Click to collapse
Yeah,you're running out of space. I don't recall exactly what the sources and the build of a nougat ROM take,space wise. It seems a little weird you were running out of space syncing the sources. If I recall correctly nougat sources are somewhere between 25-30GB. I could be wrong though. The actual build itself (the out folder) also takes a fair bit of space. Again,just guessing,but around 15-20GB. I would say 60GB would be what you need.
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
build_slimrom7_kminilte.sh: 176: build_slimrom7_kminilte.sh: [[: not found
Remove references to OmniRom recovery...
remove config_uriBlruEnabled references, spoils the build...
alter local manifest files for slimrom 7 build compatability...
insert text into file: frameworks/base/core/res/res/values/config.xml...
delete file cm_arrays.xml...
remove flipflap stuff from device/samsung/smdk3470-common/smdk3470-common.mk...
build_slimrom7_kminilte.sh: 205: read: Illegal option -t
build_slimrom7_kminilte.sh: 210: build_slimrom7_kminilte.sh: [[: not found
patching file include/telephony/ril.h
Hunk #1 FAILED at 31.
Hunk #2 succeeded at 395 (offset -1 lines).
Hunk #3 succeeded at 409 (offset -1 lines).
Hunk #4 succeeded at 569 (offset -1 lines).
Hunk #5 succeeded at 624 (offset -1 lines).
Hunk #6 succeeded at 1023 (offset -1 lines).
Hunk #7 succeeded at 5217 (offset -1 lines).
Hunk #8 succeeded at 5866 (offset -1 lines).
1 out of 8 hunks FAILED -- saving rejects to file include/telephony/ril.h.rej
manually reapplying failed Hunk #1...
patching file ril/Android.mk
patching file ril/libril/Android.mk
patching file ril/libril/ril.cpp
patching file ril/libsecril-client/Android.mk
applying frameworks_av to frameworks/av
Applying: av: Add samsung wfd service
Applying: add Android M MediaBufferGroup:MediaBufferGroup() for libwvm.so
applying frameworks_native to frameworks/native
Applying: Revert "Remove Parcel::writeIntPtr."
Applying: add missing const getSensorList() for MM gpsd (G800FXXU1CPK5)
applying hardware_libhardware to hardware/libhardware
applying hardware_ril to hardware/ril
Applying: ril: recover on crash
applying hardware_samsung_ril to hardware/samsung/ril
Applying: add SetAudioMode and SetSoundClockMode for MM audio-ril
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/build_scripts/packages/services/Telephony: No such file or directory
build_slimrom7_kminilte.sh: 238: read: Illegal option -t
build_slimrom7_kminilte.sh: 243: build_slimrom7_kminilte.sh: [[: not found
prepare device specific code...
build_slimrom7_kminilte.sh: 249: build_slimrom7_kminilte.sh: source: not found
build_slimrom7_kminilte.sh: 250: build_slimrom7_kminilte.sh: lunch: not found
running croot...
build_slimrom7_kminilte.sh: 253: build_slimrom7_kminilte.sh: croot: not found
build_slimrom7_kminilte.sh: 262: read: Illegal option -t
build_slimrom7_kminilte.sh: 267: build_slimrom7_kminilte.sh: [[: not found
running mka bacon...
build_slimrom7_kminilte.sh: 273: build_slimrom7_kminilte.sh: mka: not found
Click to expand...
Click to collapse
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
The build did not start. It applied the patches successfully (all but one where there was an error) Then it is just a serious of failures. I have not used this script so I cant say specifically where you are going wrong. Does the script have executable permissions? (I assume so as it partially worked) Do you have all of the need dependencies for building Android? Thats not the issue I don't think,but you need them either way. Other than that I am not real sure honestly. You may need to wait for @fidoedidoe to help you. I'll reply back if any possible reason comes to mind.
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
Hi @ko_taka
@spookcity138 is correct, the script failed...when it succeeds it's pretty clear the last few messages published will read along the lines of: "Package Complete: .../out/target/product/kminilte/Slim-kminilte-7.1.2.build.1.17-UNOFFICIAL-20171209-1401.zip" followed by "#### make completed successfully (24:30 (mm:ss)) ####" (note the build time will vary depending on the power of your build machine and utilisation of ccache). Oh, FYI - my build folder is ~95GB in size (the ../out/ folder is 26GB and the ../.repo/ folder is 47GB!!)
Back to the script failure....first verify the following variable in the build_slimrom7_kminilte.sh is defined correctly for your environment:
Code:
WORK_DIRECTORY="$HOME/android/slimrom7"
For my personal build environment I keep the script (build_slimrom7_kminilte.sh) in a separate folder to where the source is located and the build is output to (just so i can purge those folders without losing the build script). FYI on your laptop your folder structure should look something like that shown below, with build_slimrom7.kminilte.sh stored in the folder .../build_scripts
Code:
/home/ferran/android/build_scripts
/home/ferran/android/slimrom7
Once the above is verified...the primary issue you have is every time you see "...[[: not found", the script is hitting an issue. Check that the first line of the script contains the line "#!/bin/bash ", this is called "shebang" and it tells your shell what program to interpret the script with, in our case we need "Bash". I'm now wondering what OS / Shell you're using (I use Ubuntu Gnome 17.04 with Bash version 4.4.7) does yours differ from this? To verify your Bash version:
Code:
$ bash -version
GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
You could try forcing your shell to use bash (from memory), by switching to the /build_scripts/ folder and running the following command (do not use sudo or any elevated permissions):
Code:
$ cd /home/ferran/android/build_scripts
$ ./build_slimrom7_kminilte.sh
Let me know how you get on, in essence the script is failing on the evaluation lines where "if [[....]]" is used. if we can't get it to work, in your case, the script may need to be altered to change the evaluation (perhaps "if [...]" would be more suitable). Anyway - give me some feedback and lets see if we can get you a little further.
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)
Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
Then build the package (if it's failing on test, you can remove the line TEST=test from the file debian/rules):
sudo dpkg-buildpackage -rfakeroot -b
Install new package:
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb
Click to expand...
Click to collapse
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
ko_taka said:
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Click to expand...
Click to collapse
Sounds like we're making progress. This is good. So, reading around the subject of square brackets vs double. It transpires converting the evaluations from double square brackets ([[..]]) to singles ([..]) may** change how variables are referenced. In my script I was forced to use double square brackets to correctly evaluate the response from the "read -r....." (read input) command (where it evaluates when upper or lower case Y is entered). If this command is changed from double square brackets to single ones the command then fails (on my setup). Further to this, in your reply it appears you're also having issues with the "read" command, for some reason your version doesn't support the -t directive (which waits for N seconds - ie: -t 5 will wait 5 seconds for user input).
For now the easiest thing to do is to remove *all* of the steps in the script that awaits input from the user to continue processing the script (they are non essential vanity items primarily used while I was building out the script). There are 7 is these in the script (look for "1/7", "2/7", "3/7", etc etc), just comment out (insert # at beginning of each line) for all 7 instances. There are ~10 lines per instance, examples of how instance #1 and #7 should look after editing is below. Just do the same for all 7 instances in your script and re run the script.
Code:
...
...
#PROMPT=""
#read -r -p "1/7. Initialise/Reinitialise Repo, first 'repo init' will take hours <Y/n>? (automatically continues unpromted after 5 seconds): " -t 5 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
...
#PROMPT=""
#read -r -p "7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
I'd be really interested in knowing what OS you're using (Ubuntu, Mac, etc along with version) perhaps I can use this detail to come up with a more generic version of the script.
Good luck, let me know how you get on.
ko_taka said:
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
Click to expand...
Click to collapse
I'd also try changing the value of the variable: REPO_SYNC_THREADS in the script to something lower (more suitable to your internet bandwidth / performance), try 2 or 4 and build up from there. ie: REPO_SYNC_THREADS=2
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/slimrom7/packages/services/Telephony: No such file or directory
6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): Y
prepare device specific code...
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/samsung/kminilte/vendorsetup.sh
build/envsetup.sh: line 1716: vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
build/envsetup.sh: line 624: vendor/slim/build/tools/roomservice.py: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
** Don't have a product spec for: 'slim_kminilte'
** Do you have the right repo manifest?
running croot...
mka clean/clobber needed...
./build_slimrom7_kminilte.sh: line 257: mka: command not found
7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): Y
running mka bacon...
./build_slimrom7_kminilte.sh: line 273: mka: command not found
Click to expand...
Click to collapse
ko_taka said:
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
Click to expand...
Click to collapse
Thanks for the feedback. At first glance it looks to me like your issue is less to do with the script and more to do with not having all the source locally. Seeing commands such as running ./apply.sh (puled down with the source) error reporting "file not found" is the smoking gun.
Right now I'd be tempted to say ensure you've successfully pulled the primary SlimRom7 source locally. It may be easier to do this outside of the script by running the following:
Code:
$ cd /home/ferran/android/slimrom7/
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Keep an eye out of timeouts / 404 while it's syncing the repo's (the third of the three commands above). If you get errors just keep rerunning the "repo sync" command given above while in the correct directory until it completes without error. Once you have that done successfully, change the the build_scripts directory and re-run the script. If you see timeouts / 404 in the script output then you might have to manually run the "git clone" commands to see which one is causing the issue(s).
why does need that much space?
I was executing
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Click to expand...
Click to collapse
I am getting the message "out of space"
80GB full of source code and even need more space??
ko_taka said:
why does need that much space?
I was executing
I am getting the message "out of space"
80GB full of source code and even need more space??
Click to expand...
Click to collapse
Use a disk usage analysis tool to find out whether earlier failed attempts pulled source down to multiple locations (when the script was failing).. I mentioned in an earlier post the size of the repo, look back 5 or 6 posts. Don't forget the bulk of the source will be contained in a hidden folder named /.repo/ check this folder doesn't exist outside of the build folder (/slimrom7/)...looking at earlier attempts I'd fist check your /build_scripts/ folder for the hidden .repo folder and if there delete it. Good luck
i cant see any samsung devices in lunch
my device that i want to build for is dreamlte
and i want to build my own ROM based on Havoc (cus it seems stable)
Bash:
$ mkdir HavocOS
$ cd HavocOS
HavocOS$ repo init -u https://github.com/Havoc-OS/android_manifest.git -b eleven
HavocOS$ mkdir .repo/local_manifests
HavocOS$ curl https://raw.githubusercontent.com/diepquynh/local_manifests/lineage-17.1-8895/default.xml > .repo/local_manifests/default.xml
HavocOS$ repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
HavocOS$ patches/apply_patches patches
Bash:
HavocOS$ . build/envsetup
HavocOS$ add_lunch_combo havoc-dreamlte-userdebug
:14: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
HavocOS$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_x86-eng
4. aosp_x86_64-eng
5. arm_krait-eng
6. arm_v7_v8-eng
7. armv8-eng
8. armv8_kryo385-eng
9. silvermont-eng
Which would you like? [aosp_arm-eng]
have i done something wrong?
i tried adding
Code:
COMMON_LUNCH_CHOICES := \
lineage_dreamlte-eng \
lineage_dreamlte-user \
lineage_dreamlte-userdebug \
to
Code:
device/samsung/dreamlte/AndroidProducts.mk
but i get
Code:
HavocOS$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_x86-eng
4. aosp_x86_64-eng
5. arm_krait-eng
6. arm_v7_v8-eng
7. armv8-eng
8. armv8_kryo385-eng
9. lineage_dreamlte-eng
10. lineage_dreamlte-user
11. lineage_dreamlte-userdebug
12. silvermont-eng
Which would you like? [aosp_arm-eng] 9
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
vendor/samsung/dreamlte/dreamlte-vendor.mk:20: error: _nic.PRODUCTS.[[device/samsung/dreamlte/lineage_dreamlte.mk]]: "vendor/lineage/config/common_full_phone.mk" does not exist.
13:28:50 dumpvars failed with: exit status 1
Device dreamlte not found. Attempting to retrieve device repository from Havoc-OS Github (http://github.com/Havoc-Devices).
Repository for dreamlte not found in the Havoc-Devices Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
vendor/samsung/dreamlte/dreamlte-vendor.mk:20: error: _nic.PRODUCTS.[[device/samsung/dreamlte/lineage_dreamlte.mk]]: "vendor/lineage/config/common_full_phone.mk" does not exist.
13:28:52 dumpvars failed with: exit status 1
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
vendor/samsung/dreamlte/dreamlte-vendor.mk:20: error: _nic.PRODUCTS.[[device/samsung/dreamlte/lineage_dreamlte.mk]]: "vendor/lineage/config/common_full_phone.mk" does not exist.
13:28:53 dumpvars failed with: exit status 1
** Don't have a product spec for: 'lineage_dreamlte'
** Do you have the right repo manifest?
Code:
HavocOS$ ls vendor
codeaurora gapps havoc nxp qcom samsung support