summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorTing Liu <ting.liu@nxp.com>2020-04-11 22:34:04 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2020-04-20 16:17:28 -0300
commit5585fe750fb7abee285ead429567b715f4806b1e (patch)
tree39e10ffa71f0b611be787617357b1803a3b162d2 /recipes-bsp
parentaf4311972f3bcaa760cc58142fb8b65a38dbabf2 (diff)
downloadmeta-freescale-5585fe750fb7abee285ead429567b715f4806b1e.tar.gz
change-file-endianess: rm as no pkg need it now
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/change-file-endianess/change-file-endianess.bb19
-rwxr-xr-xrecipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl40
2 files changed, 0 insertions, 59 deletions
diff --git a/recipes-bsp/change-file-endianess/change-file-endianess.bb b/recipes-bsp/change-file-endianess/change-file-endianess.bb
deleted file mode 100644
index 570ee3f6..00000000
--- a/recipes-bsp/change-file-endianess/change-file-endianess.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1DESCRIPTION = "provides the tcl script for endian swap"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5SRC_URI = "file://byte_swap.tcl"
6
7S = "${WORKDIR}"
8
9do_configure[noexec] = "1"
10do_compile[noexec] = "1"
11
12do_install () {
13 install -d ${D}/${bindir}
14 install -m 755 ${WORKDIR}/byte_swap.tcl ${D}/${bindir}
15}
16
17RDEPENDS_${PN} += "tcl"
18
19BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl b/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl
deleted file mode 100755
index c6222022..00000000
--- a/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl
+++ /dev/null
@@ -1,40 +0,0 @@
1puts $argv
2set i_file [lindex $argv 0]
3set o_file [lindex $argv 1]
4set num_b [lindex $argv 2]
5puts ""
6
7set fileid_i [open $i_file "r"]
8set fileid_o [open $o_file "w+"]
9fconfigure $fileid_i -translation {binary binary}
10fconfigure $fileid_o -translation {binary binary}
11
12set old_bin [read $fileid_i]
13set new_bin {}
14set old_length [string length $old_bin]
15set old_rem [expr $old_length % $num_b]
16if {$old_rem != 0} {
17 for {set i 0} {$i< [expr $num_b - $old_rem]} {incr i 1} {
18 append old_bin y
19 }
20}
21for {set i 0} {$i<[expr $old_length-8]} {incr i $num_b} {
22 for {set j $num_b} {$j>0} {incr j -1} {
23 append new_bin [string index $old_bin [expr $i+($j-1)]]
24 }
25}
26
27for {set j 0} {$j<8} {incr j 1} {
28 append new_bin [string index $old_bin [expr $i+$j]]
29}
30
31for {set i 0} {$i<[string length $old_bin]} {incr i $num_b} {
32 set binValue [string range $old_bin [expr $i+0] [expr $i+($num_b-1)]]
33 binary scan $binValue H[expr $num_b*2] hexValue
34
35 set binValue [string range $new_bin [expr $i+0] [expr $i+($num_b-1)]]
36 binary scan $binValue H[expr $num_b*2] hexValue
37}
38
39puts -nonewline $fileid_o $new_bin
40close $fileid_o