UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    error while building halium-boot Samsung device

    Scheduled Pinned Locked Moved Unsolved Porting
    1 Posts 1 Posters 1.4k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • F Offline
        Fray_Tormenta
        last edited by

        Hello community!

        I try porting the device Samsung Tab S2 (gts210vewifi).
        HOST MACHINE:
        Ubuntu 20.04.6 LTS
        Kernel: 20.04.6 LTS

        Target device:
        Samsung S2 9" (gts210vewifi)
        Lineage OS 16

        Build
        halium9
        Ubuntu Touch OS 16

        In the Build step when run "mka halium-boot" got the above error.

        ============================================
        PLATFORM_VERSION_CODENAME=REL
        PLATFORM_VERSION=9
        LINEAGE_VERSION=16.0-20231014-UNOFFICIAL-gts210vewifi
        TARGET_PRODUCT=lineage_gts210vewifi
        TARGET_BUILD_VARIANT=userdebug
        TARGET_BUILD_TYPE=release
        TARGET_ARCH=arm64
        TARGET_ARCH_VARIANT=armv8-a
        TARGET_CPU_VARIANT=generic
        TARGET_2ND_ARCH=arm
        TARGET_2ND_ARCH_VARIANT=armv8-a
        TARGET_2ND_CPU_VARIANT=generic
        HOST_ARCH=x86_64
        HOST_2ND_ARCH=x86
        HOST_OS=linux
        HOST_OS_EXTRA=Linux-5.15.0-86-generic-x86_64-Ubuntu-20.04.6-LTS
        HOST_CROSS_OS=windows
        HOST_CROSS_ARCH=x86
        HOST_CROSS_2ND_ARCH=x86_64
        HOST_BUILD_TYPE=release
        BUILD_ID=PQ3A.190801.002
        OUT_DIR=/home/ubuntu/halium9/out
        PRODUCT_SOONG_NAMESPACES=device/samsung/msm8976-common hardware/qcom/audio-caf/msm8952 hardware/qcom/display-caf/msm8952 hardware/qcom/media-caf/msm8952
        ============================================
        ninja: no work to do.
        ninja: no work to do.
        No need to regenerate ninja file
        No need to regenerate ninja file
        [ 25% 2/8] Building Kernel Config
        make: se entra en el directorio '/home/ubuntu/halium9/kernel/samsung/msm8976'
        
        In file included from /home/ubuntu/halium9/kernel/samsung/msm8976/include/linux/sched.h:52:0,
                         from /home/ubuntu/halium9/kernel/samsung/msm8976/arch/arm64/include/asm/compat.h:25,
                         from /home/ubuntu/halium9/kernel/samsung/msm8976/arch/arm64/include/asm/stat.h:23,
                         from /home/ubuntu/halium9/kernel/samsung/msm8976/include/linux/stat.h:5,
                         from /home/ubuntu/halium9/kernel/samsung/msm8976/include/linux/fs.h:10,
                         from /home/ubuntu/halium9/kernel/samsung/msm8976/fs/ext4/namei.c:27:
        /home/ubuntu/halium9/kernel/samsung/msm8976/fs/ext4/namei.c: In function 'ext4_unlink':
        /home/ubuntu/halium9/kernel/samsung/msm8976/include/linux/cred.h:341:24: error: used struct type value where scalar is required
         #define current_uid()  (current_cred_xxx(uid))
                                ^
        /home/ubuntu/halium9/kernel/samsung/msm8976/fs/ext4/namei.c:2818:5: note: in expansion of macro 'current_uid'
          if(current_uid()) {
             ^
        /home/ubuntu/halium9/kernel/samsung/msm8976/fs/ext4/namei.c:2819:3: error: aggregate value used where an integer was expected
           inode->i_version |= (u64)current_uid() << 32;
           ^
        make[3]: *** [/home/ubuntu/halium9/kernel/samsung/msm8976/scripts/Makefile.build:308: fs/ext4/namei.o] Error 1
        make[2]: *** [/home/ubuntu/halium9/kernel/samsung/msm8976/scripts/Makefile.build:455: fs/ext4] Error 2
        make[1]: *** [/home/ubuntu/halium9/kernel/samsung/msm8976/Makefile:836: fs] Error 2
        make[1]: *** Se espera a que terminen otras tareas....
          ...
        /home/ubuntu/halium9/kernel/samsung/msm8976/kernel/cgroup.c: In function 'subsys_cgroup_allow_attach':
        /home/ubuntu/halium9/kernel/samsung/msm8976/kernel/cgroup.c:2138:37: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
           if (current != task && cred->euid != tcred->uid &&
                                             ^
        /home/ubuntu/halium9/kernel/samsung/msm8976/kernel/cgroup.c:2139:18: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
               cred->euid != tcred->suid)
                          ^
        make[2]: *** [/home/ubuntu/halium9/kernel/samsung/msm8976/scripts/Makefile.build:308: kernel/cgroup.o] Error 1
        make[2]: *** Se espera a que terminen otras tareas....
        /home/ubuntu/halium9/kernel/samsung/msm8976/kernel/cpuset.c: In function 'cpuset_allow_attach':
        /home/ubuntu/halium9/kernel/samsung/msm8976/kernel/cpuset.c:1433:18: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
               cred->euid != tcred->uid && cred->euid != tcred->suid)
                          ^
        /home/ubuntu/halium9/kernel/samsung/msm8976/kernel/cpuset.c:1433:46: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
               cred->euid != tcred->uid && cred->euid != tcred->suid)
                                                      ^
        make[2]: *** [/home/ubuntu/halium9/kernel/samsung/msm8976/scripts/Makefile.build:308: kernel/cpuset.o] Error 1
        make[1]: *** [/home/ubuntu/halium9/kernel/samsung/msm8976/Makefile:836: kernel] Error 2
        make: *** [Makefile:130: sub-make] Error 2
        make: se sale del directorio '/home/ubuntu/halium9/kernel/samsung/msm8976'
        ninja: build stopped: subcommand failed.
        22:07:50 ninja failed with: exit status 1
        
        #### failed to build some targets (02:01 (mm:ss)) ####
        
        
        

        In this line have the first error

        /home/ubuntu/halium9/kernel/samsung/msm8976/include/linux/cred.h:341:24: error: used struct type value where scalar is required
         #define current_uid()  (current_cred_xxx(uid))
        

        And well when run the cat command at these file "cred.h" got this.
        I applied a grep filter for the "uid"

        cat kernel/samsung/msm8976/include/linux/cred.h | grep -n "uid"
        20:#include <linux/uidgid.h>
        113:	kuid_t		uid;		/* real UID of the task */
        115:	kuid_t		suid;		/* saved UID of the task */
        117:	kuid_t		euid;		/* effective UID of the task */
        119:	kuid_t		fsuid;		/* UID for VFS ops */
        140:	struct group_info *group_info;	/* supplementary groups for euid/fsgid */
        305:	__u = get_uid(__cred->user);			\
        333:#define task_uid(task)		(task_cred_xxx((task), uid))
        334:#define task_euid(task)		(task_cred_xxx((task), euid))
        341:#define current_uid()		(current_cred_xxx(uid))
        343:#define current_euid()		(current_cred_xxx(euid))
        345:#define current_suid()		(current_cred_xxx(suid))
        347:#define current_fsuid() 	(current_cred_xxx(fsuid))
        364:#define current_uid_gid(_uid, _gid)		\
        368:	*(_uid) = __cred->uid;			\
        372:#define current_euid_egid(_euid, _egid)		\
        376:	*(_euid) = __cred->euid;		\
        380:#define current_fsuid_fsgid(_fsuid, _fsgid)	\
        384:	*(_fsuid) = __cred->fsuid;		\
        

        I can more or less understand the syntax but I can't recognize how to resolve the errors.
        This guy have the similar error: https://forums.ubports.com/topic/8701/error-in-mka-halium-boot

        I hope your help, thanks in advance.

        1 Reply Last reply Reply Quote 0
        • F Fray_Tormenta referenced this topic on
        • First post
          Last post