Project

General

Profile

Version to build last Replicant version

Added by Fil Lupin about 1 month ago

Hi guys,
it's been a while.

I would like to build the last Replicant version, which is Replicant 6 from what I see on https://redmine.replicant.us/projects/replicant/wiki#Maintained-versions

I see Trisquel 9 & debian 9 are recommanded on https://redmine.replicant.us/projects/replicant/wiki/Replicant60BuildDependenciesInstallation

However, Debian 9 and Trisquel 9 are note anymore maintained.
What distribution is recommanded to build Replicant?

RegardS.


Replies (4)

RE: Version to build last Replicant version - Added by Fil Lupin about 1 month ago

While trying to build on debian 9, I did not find build-dep and llvm-defaults packages

While following instructions in repo https://download.replicant.us/build-tools/repo/07-02-2022/README.txt, downloading the GPG key fails with `gpg: keyserver receive failure: Server indicated a failure`
The key found in https://redmine.replicant.us/projects/replicant/wiki/Images is not he same
The signature should be the one of "Denis 'GNUtoo' Carliki <>"

Then,

root@replicant:/home/fillupin/repo# tar xf ./31b707cf5d179eb664df26b72f0f2976ef28f41d-tarball-pack.tar.xz -C /
root@replicant:/home/fillupin/repo# source /usr/local/bin/repo-env.sh
root@replicant:/home/fillupin/repo# repo sync
Traceback (most recent call last):
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/main.py", line 622, in <module>
    _Main(sys.argv[1:])
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/main.py", line 596, in _Main
    result = run()
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/main.py", line 589, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/main.py", line 266, in _Run
    result = cmd.Execute(copts, cargs)
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/subcmds/sync.py", line 858, in Execute
    self._UpdateManifestProject(opt, mp, manifest_name)
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/subcmds/sync.py", line 776, in _UpdateManifestProject
    success = mp.Sync_NetworkHalf(quiet=opt.quiet, verbose=opt.verbose,
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/project.py", line 1510, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet, verbose=verbose)):
  File "/gnu/store/hml9fsd8i4ayxkp5nfprs2v550hn8j42-git-repo-2.4.1/share/git-repo/project.py", line 2562, in _ApplyCloneBundle
    bundle_url = remote.url + '/clone.bundle'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

RE: Version to build last Replicant version - Added by Fil Lupin 26 days ago

Following Josh's suggestion, I took inspiration from https://github.com/publicsite/ReplicantBuilds/tree/messy-update-1 procedure.

In the following order, since I already installed a debian9, I read and ran when pertinent:
  • getDebian9.sh
  • do-6.0.sh
  • getSource-6.0.sh (it took 36h to run `repo sync` and it is stucked since 40 hours at 99%)
    `repo sync` ended with the following messages:
    Checking out projects:  99% (503/504) LineageOS-mirror/android_vendor_qcom_opensUpdating files: 100% (281/281), done.:  60% (170/281)
    Checking out projects: 100% (504/504), done.
    
    error: Unable to fully sync the tree.
    error: Downloading network changes failed.
    error: Checking out local projects failed.
    Try re-running with "-j1 --fail-fast" to exit at the first error.
    

    Access seems to be time-dependant, and after retrying several times, it succeeds after 3 days.
gpg --keyserver hkp://pgp.rediris.es --recv-key 37D2C98789D8311948394E3E41E7044E1DBA2E89

failed, I replace the keyserver by `keyserver.ubuntu.com`

gpg --keyserver keyserver.ubuntu.com --recv-key 37D2C98789D8311948394E3E41E7044E1DBA2E89

which worked.

cd replicant-6.0/device/samsung/i9305

is probably an error since line 34 put us into replicant-6.0 already,
cd device/samsung/i9300/

works.

I then ran ./vendor/replicant/build-toolchain 2>&1 | tee "${thepwd}/0.txt" which failed because makeinfo miss, so I installed texi2html, without more success:

/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/toolchain/src/binutils/binu
tils-2.25/missing: 81: /home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/toolchain/src/binutils/binutils-2.25/missing: makeinfo: not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
Makefile:440 : la recette pour la cible « bfd.info » a échouée
make[3]: *** [bfd.info] Erreur 127
make[3] : on quitte le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd/doc »
Making info in po
make[3] : on entre dans le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd/po »
make[3]: rien à faire pour « info ».   
make[3] : on quitte le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd/po »
make[3] : on entre dans le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd »
make[3]: rien à faire pour « info-am ».
make[3] : on quitte le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/repli
cant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd »
Makefile:1647 : la recette pour la cible « info-recursive » a échouée
make[2]: *** [info-recursive] Erreur 1 
make[2] : on quitte le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/repli
cant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd »
Makefile:2601 : la recette pour la cible « all-bfd » a échouée
make[1]: *** [all-bfd] Erreur 2
make[1] : on quitte le répertoire « /home/ACCOUNT/ReplicantBuilds-messy-update/repli
cant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils »
Makefile:832 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2

info-recursive is not present into ReplicantBuilds-messy-update/replicant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/binutils/bfd/Makefile

In the former error output, the suggested packages changed from texi2html to texinfo. Thanks to Josh which pointed me to this point and help me solve it.

So I launched again

make clean
./vendor/replicant/build-toolchain 2>&1 | tee "${thepwd}/0.txt" 

It works then!

Then

make -j$parallel_tasks recoveryimage 2>&1 | tee "${thepwd}/1.txt" 

failed with following error:
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
find: 'dummy': No such file or directory
build/core/base_rules.mk:559: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:559: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/root/res/images/charger/battery_fail.png'
PRODUCT_COPY_FILES device/samsung/smdk4412-common/rootdir/init.trace.rc:root/init.trace.rc ignored.
PRODUCT_COPY_FILES device/samsung/smdk4412-common/configs/audio_effects.conf:system/etc/audio_effects.conf ignored.
No private recovery resources for TARGET_DEVICE i9300
build/core/tasks/kernel.mk:166: ***************************************************************
build/core/tasks/kernel.mk:167: * Using prebuilt kernel binary instead of source              *
build/core/tasks/kernel.mk:168: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED                *
build/core/tasks/kernel.mk:169: * Please configure your device to download the kernel         *
build/core/tasks/kernel.mk:170: * source repository to kernel/samsung/smdk4412
build/core/tasks/kernel.mk:171: * See http://wiki.lineageos.org/w/Doc:_integrated_kernel_building
build/core/tasks/kernel.mk:172: * for more information                                        *
build/core/tasks/kernel.mk:173: ***************************************************************
make: *** No rule to make target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/kernel', needed by '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/recovery.img'.  Stop.

#### make failed to build some targets (01:21 (mm:ss)) ####

Note: in the script, lines 137 and 144 still have references to replicant 4.2

RE: Version to build last Replicant version - Added by Fil Lupin 21 days ago

Josh points out that ${REPLICANTDIT}/kernel/samsung/smdk4412-common perhaps do not exists.*
Indeed, ${REPLICANTDIT}/kernel/samsung/ only contains 2 directories: espresso10/ and tuna/

So I started again the process from the beginning:
  • getDebian9.sh was already followed
  • do-6.0.sh also
  • getSource-6.0.sh in which I skipped "#i9305 patches" but I noticed "#generic (scintill) replicant 6.0 patches {" I formerly did not execute, so I ran them this time
  • build-6.0.sh :
    make clean
    ./vendor/replicant/build-toolchain 2>&1 | tee "${thepwd}/0.txt" 
    

    failed with a new error:
    make[1]: Leaving directory '/home/fil/ReplicantBuilds-messy-update/replicant-6.0/toolchain/gcc/arm/arm-linux-androideabi/build/gcc'
    Makefile:846: recipe for target 'all' failed
    make: *** [all] Error 2
    

    The line 846 of the Makefile is the first line after "all:" in:
    # The target built for a native non-bootstrap build.
    .PHONY: all
    all:
            @: $(MAKE); $(unstage)
            @r=`${PWD_COMMAND}`; export r; \
            s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
              $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
            && :
    

A grep on `unstage` in `replicant-6.0` gave me the information about how is defined this variable:

find . -type f -print0 | xargs -0 grep -e "unstage[[:space:]]*=" /dev/null

gave me this output
./toolchain/src/binutils/binutils-2.25/Makefile.in:unstage = :
./toolchain/src/binutils/binutils-2.25/Makefile.in:unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
./toolchain/src/binutils/binutils-2.25/Makefile.tpl:unstage = :
./toolchain/src/binutils/binutils-2.25/Makefile.tpl:unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
./toolchain/src/gcc/gcc-4.9/Makefile.in:unstage = :
./toolchain/src/gcc/gcc-4.9/Makefile.in:unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
./toolchain/src/gcc/gcc-4.9/Makefile.tpl:unstage = :
./toolchain/src/gcc/gcc-4.9/Makefile.tpl:unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
./toolchain/src/gcc/gcc-4.8.3/Makefile.in:unstage = :
./toolchain/src/gcc/gcc-4.8.3/Makefile.in:unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
./toolchain/src/gcc/gcc-4.8.3/Makefile.tpl:unstage = :
./toolchain/src/gcc/gcc-4.8.3/Makefile.tpl:unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
./toolchain/gcc/arm/arm-linux-androideabi/build/binutils/Makefile:unstage = :
./toolchain/gcc/arm/arm-linux-androideabi/build/gcc/Makefile:unstage = :
./toolchain/gcc/host/build/binutils/Makefile:unstage = :
./toolchain/gcc/host/build/gcc/Makefile:unstage = :

I still need to understand why it fails...

RE: Version to build last Replicant version - Added by Fil Lupin 15 days ago

Rebooting and following again instructions, I noticed that line 11 of do-6.0.sh still install packages so I probably did not ran it before.

I now ran again

./vendor/replicant/build-toolchain 2>&1 | tee "${thepwd}/0.txt" 

Here is the complete output I got, it fails:

make -j$parallel_tasks recoveryimage 2>&1 | tee "${thepwd}/1.txt" 
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
REPLICANT_VERSION="replicant-6.0" 
TARGET_PRODUCT=replicant_i9300
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.9.0-13-amd64-x86_64-with-debian-9.13  
HOST_BUILD_TYPE=release
BUILD_ID=MOI10E
OUT_DIR=/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out
WITH_SU=true
============================================
"ebtables is disabled on this build" 
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h'   
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h' 
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'  
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_errno.h'
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h'   
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/mfc_interface.h' 
build/core/copy_headers.mk:15: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
build/core/copy_headers.mk:15: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/obj/include/libsecmm/SsbSipMfcApi.h'
find: ‘dummy’: No such file or directory
build/core/base_rules.mk:559: warning: overriding recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:559: warning: ignoring old recipe for target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/root/res/images/charger/battery_fail.png'
PRODUCT_COPY_FILES device/samsung/smdk4412-common/rootdir/init.trace.rc:root/init.trace.rc ignored.
PRODUCT_COPY_FILES device/samsung/smdk4412-common/configs/audio_effects.conf:system/etc/audio_effects.conf ignored.
No private recovery resources for TARGET_DEVICE i9300
build/core/tasks/kernel.mk:166: ***************************************************************
build/core/tasks/kernel.mk:167: * Using prebuilt kernel binary instead of source              *
build/core/tasks/kernel.mk:168: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED                *
build/core/tasks/kernel.mk:169: * Please configure your device to download the kernel         *
build/core/tasks/kernel.mk:170: * source repository to kernel/samsung/smdk4412
build/core/tasks/kernel.mk:171: * See http://wiki.lineageos.org/w/Doc:_integrated_kernel_building
build/core/tasks/kernel.mk:172: * for more information                                        *
build/core/tasks/kernel.mk:173: ***************************************************************
make: *** No rule to make target '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/kernel', needed by '/home/ACCOUNT/ReplicantBuilds-messy-update/replicant-6.0/out/target/product/i9300/recovery.img'.  Stop.

#### make failed to build some targets (01:13 (mm:ss)) ####

The issue was the certificates as described in https://github.com/publicsite/ReplicantBuilds/blob/049b18100a38a46e82b98f69e8d0b7eee42a5fdb/getDebian9.sh#L32 so I copied them from a debian 13 to the debian 9.

    (1-4/4)