Building cm-13. for g7102 - cyanogenmod

I started for building cm13
but have issue
make[1]: Entering directory `/home/sam/cm/kernel/samsung/ms013g'
/home/sam/cm/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/sam/cm/out/target/product/ms013g/obj/ETC/sepolicy_intermediates/policy.conf
libsepol.report_failure: neverallow on line 454 of external/sepolicy/system_server.te (or line 12271 of policy.conf) violated by allow system_server dex2oat_exec:file { execute execute_no_trans };
libsepol.report_failure: neverallow on line 399 of external/sepolicy/domain.te (or line 5661 of policy.conf) violated by allow init su_exec:file { execute };
libsepol.report_failure: neverallow on line 399 of external/sepolicy/domain.te (or line 5661 of policy.conf) violated by allow untrusted_app su_exec:file { execute execute_no_trans };
libsepol.report_failure: neverallow on line 399 of external/sepolicy/domain.te (or line 5661 of policy.conf) violated by allow sudaemon su_exec:file { execute };
libsepol.report_failure: neverallow on line 360 of external/sepolicy/domain.te (or line 5622 of policy.conf) violated by allow system_server dalvikcache_data_file:file { write };
libsepol.check_assertions: 5 neverallow failures occurred
Error while expanding policy
make: *** [/home/sam/cm/out/target/product/ms013g/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....

I got similar experience with 2 devices like S2 plus and wiko rainbow, the better way is commenting out with # the error's lines appear in the .te files in external/sepolicy, i guess the source still fresh and buggy.

Related

ADSError 857212673: Can't read variable values through name (pyads)

I've been having a problem lately where I can't access the value of any variable through their name. It's not a connection problem since I can read the value from the read() function just fine. However whenever I use the read_by_name function there's always the same error pyads.pyads_ex.ADSError: ADSError: Unknown Error (857212673).
Because it's an unknown error I haven't been able to find documentation on it. I'm using a BC9120 as a PLC and TwinCat 2. Does anyone know what might be causing this?
Code:
if self.plc.is_open == False:
self.plc.open()
print(self.plc.read(pyads.INDEXGROUP_MEMORYBIT, 0*8 + 0, pyads.PLCTYPE_BOOL))
print(self.plc.read_by_name("Test.M0", pyads.PLCTYPE_BOOL))
Logs:
False
Traceback (most recent call last):
File "c:\Users\MAP9AV\Documents\Banca\Modelo Preditivo\Thread_Sup.py", line 50, in run
print(self.plc.read_by_name("Test.M0", pyads.PLCTYPE_BOOL))
File "C:\Users\MAP9AV\AppData\Local\Programs\Python\Python39\lib\site-packages\pyads\connection.py", line 540, in read_by_name
return adsSyncReadByNameEx(
File "C:\Users\MAP9AV\AppData\Local\Programs\Python\Python39\lib\site-packages\pyads\pyads_ex.py", line 1154, in adsSyncReadByNameEx
handle = adsGetHandle(port, address, data_name)
File "C:\Users\MAP9AV\AppData\Local\Programs\Python\Python39\lib\site-packages\pyads\pyads_ex.py", line 890, in adsGetHandle
handle = adsSyncReadWriteReqEx2(
File "C:\Users\MAP9AV\AppData\Local\Programs\Python\Python39\lib\site-packages\pyads\pyads_ex.py", line 774, in adsSyncReadWriteReqEx2
raise ADSError(err_code)
pyads.pyads_ex.ADSError: ADSError: Unknown Error (857212673).

Yocto - failed to buid hddimg. Error: do_bootimg

I am working on yocto,dunfell, am trying to build .hddimg image for a genericx86-64 machine. I inherit image-live, add hhdimg to IMAGE_FSTYPES and everything works fine with iso, wic and ... But when I add hddimg I get this error:
ERROR: test-image-1.0-r0 do_bootimg: /path/build/tmp/work/genericx86_64-poky-linux/test-image/1.0-r0/test-image-1.0/hddimg/rootfs.img rootfs size is greather than or equal to 4GB,
ERROR: test-image-1.0-r0 do_bootimg: and this doesn't work on a FAT filesystem. You can either:
ERROR: test-image-1.0-r0 do_bootimg: 1) Reduce the size of rootfs.img, or,
ERROR: test-image-1.0-r0 do_bootimg: 2) Use wic, vmdk or vdi instead of hddimg
ERROR: test-image-1.0-r0 do_bootimg: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_bootimg(d)
0003:
File: '/path/layers/poky/meta/classes/image-live.bbclass', lineno: 257, function: do_bootimg
0253: if d.getVar("PCBIOS") == "1":
0254: bb.build.exec_func('build_syslinux_cfg', d)
0255: if d.getVar("EFI") == "1":
0256: bb.build.exec_func('build_efi_cfg', d)
*** 0257: bb.build.exec_func('build_hddimg', d)
0258: bb.build.exec_func('build_iso', d)
0259: bb.build.exec_func('create_symlinks', d)
0260:}
0261:do_bootimg[subimages] = "hddimg iso"
File: '/path/layers/poky/bitbake/lib/bb/build.py', lineno: 251, function: exec_func
0247: with bb.utils.fileslocked(lockfiles):
0248: if ispython:
0249: exec_func_python(func, d, runfile, cwd=adir)
0250: else:
*** 0251: exec_func_shell(func, d, runfile, cwd=adir)
0252:
0253: try:
0254: curcwd = os.getcwd()
0255: except:
File: '/path/layers/poky/bitbake/lib/bb/build.py', lineno: 452, function: exec_func_shell
0448: with open(fifopath, 'r+b', buffering=0) as fifo:
0449: try:
0450: bb.debug(2, "Executing shell function %s" % func)
0451: with open(os.devnull, 'r+') as stdin, logfile:
*** 0452: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0453: finally:
0454: os.unlink(fifopath)
0455:
0456: bb.debug(2, "Shell function %s finished" % func)
File: '/path/layers/poky/bitbake/lib/bb/process.py', lineno: 182, function: run
0178: if not stderr is None:
0179: stderr = stderr.decode("utf-8")
0180:
0181: if pipe.returncode != 0:
*** 0182: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0183: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/path/build/tmp/work/genericx86_64-poky-linux/test-image/1.0-r0/temp/run.build_hddimg.18514' failed with exit code 1:
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /path/build/tmp/work/genericx86_64-poky-linux/test-image/1.0-r0/temp/log.do_bootimg.18514
ERROR: Task (/path/layers/meta-ammsc2/recipes-core/images/test-image.bb:do_bootimg) failed with exit code '1'```
Your rootfs for test-image is larger than 4GB, which is the maximum filesystem size for FAT partitions (the default used by the .hddimg image type).
The error already contains two solutions:
Reduce the image size, by removing packages
Use the wic format (vmdk and vdi are for virtual machine engines)
To use the wic format, simply add wic to IMAGE_FSTYPES and Yocto will build a .wic image and place it in the deploy/images directory. You can flash this to your disk using dd or bmaptool, and boot it.
These images are built from a template specified by WKS_FILE, which defaults to genericx86.wks.in for the the genericx86-64 machine. This default template creates a partition table and installs an EFI bootloader (Grub).
If you'd like to manually generate the wic images or modify the templates, check out the documentation for Creating Partitioned Images Using Wic.

Compile Issue under ProCOBOL due to SQLBEX

Have been trying to compile an existing Pro*COBOL program after making few changes, have verified the syntax and Non-Printable character which may cause issue for compilation.
But at the end, compilation for Pro*COBOL failing due one of .(dot) appearing under CALL to SQLBEX for the embedded SQL (Line Number 18106 under the listing).
See below code for more details, code snippet has been taken from Pro*COBOL code and the listing generated during compilation.
For other instances where SQLBEX is being called, the .(dot) doesn't appear. Would really appreciate any help.
Code under the listing:
18085 IF SQLCODE IN SQLCA = WS-DEADLOCK-WAIT-FOR-RESRC 26825000
18086 SET DEADLOCK TO TRUE 26826000
18087
18088* EXEC SQL 26827000
18089* COMMIT 26828000
18090* END-EXEC
18091 MOVE 1 TO SQL-ITERS
18092 MOVE 2914 TO SQL-OFFSET
* Micro Focus COBOL for UNIX V4.0 revision 004 18-Jan-17 07:31 Page 313
* cmcomc23.cob
18093 MOVE 0 TO SQL-OCCURS
18094 CALL "SQLADR" USING
18095 SQLCUD
18096 SQL-CUD
18097 CALL "SQLADR" USING
18098 SQLCA
18099 SQL-SQLEST
18100 MOVE 256 TO SQL-SQLETY
18101
18102 CALL "SQLBEX" USING
18103 SQLCTX
18104 SQLEXD
18105 SQLFPN
18106 .
18107 26829000
18108 DISPLAY 'DEAD LOCK OCCURED ' 26829100
18109 GO TO 9000-EXIT 26829200
18110 ELSE 26829300
* 562-S****************************************************************( 308)**
** An "ELSE" phrase did not have a matching IF and was discarded.
18111 SET NO-DEADLOCK TO TRUE 26829400
18112 END-IF. 26829500
* 564-S********** ( 313)**
** A scope-delimiter did not have a matching verb and was discarded.
Original Code under Program:
268210******************************************************************26821000
268221 9000-SQL-ERROR SECTION. 26822100
268230******************************************************************26823000
268250 EXEC SQL 26824000
268250 WHENEVER SQLERROR CONTINUE 26824000
268250 END-EXEC. 26824000
268240 26824000
268250 IF SQLCODE IN SQLCA = WS-DEADLOCK-WAIT-FOR-RESRC 26825000
268260 SET DEADLOCK TO TRUE 26826000
268270 EXEC SQL 26827000
268280 COMMIT 26828000
268290 END-EXEC 26829000
268291 DISPLAY 'DEAD LOCK OCCURED ' 26829100
268292 GO TO 9000-EXIT 26829200
268293 ELSE 26829300
268294 SET NO-DEADLOCK TO TRUE 26829400
268295 END-IF. 26829500
268296 26829600
268297 MOVE 'E' TO WS-ERR-SEVERITY-CD. 26829700

error when compiling kernel with some new features

I am trying to compile kernel version 4.1 with some patches (adding some features to the GRO). I come from a hardware background and relatively new to network stack. I wish to know how to solve this problem or at least pointers to understand why it occurs.
This is what I did
# my temp location
mdkir kern
cd kern
# cloned the juggler and linux 4.1 tree
git clone https://github.com/gengyl08/juggler.git
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.tar.gz
tar -xvf linux-4.1.tar.gz
# copied just the essential files that were diffferent
cp juggler/linux-4.1/include/linux/netdevice.h linux-4.1/include/linux/netdevice.h
cp juggler/linux-4.1/include/linux/skbuff.h linux-4.1/include/linux/skbuff.h
cp juggler/linux-4.1/net/core/dev.c linux-4.1/net/core/dev.c
cp juggler/linux-4.1/net/core/net-sysfs.c linux-4.1/net/core/net-sysfs.c
cp juggler/linux-4.1/net/core/skbuff.c linux-4.1/net/core/skbuff.c
cp juggler/linux-4.1/net/ipv4/af_inet.c linux-4.1/net/ipv4/af_inet.c
cp juggler/linux-4.1/net/ipv4/tcp_offload.c linux-4.1/net/ipv4/tcp_offload.c
cd linux-4.1
make menuconfig # generated the default .config file
# building the kernel
time make
When I try to compile them, I get the following error
drivers/net/ethernet/agere/et131x.c: In function ‘nic_send_packet.constprop.43’:
include/linux/compiler.h:412:20: error: call to ‘__compiletime_assert_2439’ declared with attribute error: BUILD_BUG
prefix ## suffix(); \
^
include/linux/compiler.h:417:2: note: in expansion of macro ‘__compiletime_assert’
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler.h:429:2: note: in expansion of macro ‘_compiletime_assert’
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/bug.h:50:37: note: in expansion of macro ‘compiletime_assert’
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/bug.h:74:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
drivers/net/ethernet/agere/et131x.c:2439:2: note: in expansion of macro ‘BUILD_BUG_ON’
BUILD_BUG_ON(MAX_SKB_FRAGS + 1 > 23);
^
make[4]: *** [drivers/net/ethernet/agere/et131x.o] Error 1
make[3]: *** [drivers/net/ethernet/agere] Error 2
make[2]: *** [drivers/net/ethernet] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
real 22m3.067s
user 21m4.028s
sys 1m6.724s
It looks like MAX_SKB_FRAGS is too big and ethernet driver doesn't like it.
From drivers/net/ethernet/agere/et131x.c:
/* Part of the optimizations of this send routine restrict us to
* sending 24 fragments at a pass. In practice we should never see
* more than 5 fragments.
*/
/* nr_frags should be no more than 18. */
BUILD_BUG_ON(MAX_SKB_FRAGS + 1 > 23);
From the patches you're using:
linux-3.18.5/include/linux/skbuff.h:
#if (65536/PAGE_SIZE + 1) < 16
#define MAX_SKB_FRAGS 16UL
#else
#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 1)
#endif
linux-4.1/include/linux/skbuff.h:
#if (65536/PAGE_SIZE + 1) < 45
#define MAX_SKB_FRAGS 45UL
#else
#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 1)
#endif
Note the difference.
I haven't analyzed this code, but from a very first look I see some inconsistency there.
Replacing 45 back to 16 should do the trick. Of course, there might be a reason why the patch author picked a higher value.

Facing issues in compilation of idl files using tao_idl in rhel7 machine

i am facing issues in compilation of idl file. i have tried with different options with -Cw, -GI and -o all are giving the below errors
tao_idl: "El_file.idl", line 201: error in lookup of symbols File::File1_operationFailed
tao_idl: "El_file.idl", line 204: error in lookup of symbols File::File1_operationFailed
tao_idl: "El_file.idl", line 208: error in lookup of symbols File::File1_operationFailed
tao_idl: El_file.idl: found 744 errors
Fatal Error - Aborting
Thanks for response john.
line 9 : statement cannot be parsed
line 201: error in lookup of symbol: ptype
line 9 :module Mgr{
interface intf1;
interface intf2;
interface intf3;
....
..
...
...
..
}
enum ptype{
Profile1,
Profile2,
...
...
}
line 201 :struct pstruct{
ptype P1;
}
Your IDL is not legal, you should close the module, enum, and struct with }; and not just }

Resources