diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-freescale/recipes-bsp/change-file-endianess | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'bsp/meta-freescale/recipes-bsp/change-file-endianess')
-rw-r--r-- | bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb | 19 | ||||
-rwxr-xr-x | bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl | 40 |
2 files changed, 0 insertions, 59 deletions
diff --git a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb b/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb deleted file mode 100644 index 570ee3f6..00000000 --- a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "provides the tcl script for endian swap" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -SRC_URI = "file://byte_swap.tcl" - -S = "${WORKDIR}" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install () { - install -d ${D}/${bindir} - install -m 755 ${WORKDIR}/byte_swap.tcl ${D}/${bindir} -} - -RDEPENDS_${PN} += "tcl" - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl b/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl deleted file mode 100755 index c6222022..00000000 --- a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl +++ /dev/null @@ -1,40 +0,0 @@ -puts $argv -set i_file [lindex $argv 0] -set o_file [lindex $argv 1] -set num_b [lindex $argv 2] -puts "" - -set fileid_i [open $i_file "r"] -set fileid_o [open $o_file "w+"] -fconfigure $fileid_i -translation {binary binary} -fconfigure $fileid_o -translation {binary binary} - -set old_bin [read $fileid_i] -set new_bin {} -set old_length [string length $old_bin] -set old_rem [expr $old_length % $num_b] -if {$old_rem != 0} { - for {set i 0} {$i< [expr $num_b - $old_rem]} {incr i 1} { - append old_bin y - } -} -for {set i 0} {$i<[expr $old_length-8]} {incr i $num_b} { - for {set j $num_b} {$j>0} {incr j -1} { - append new_bin [string index $old_bin [expr $i+($j-1)]] - } -} - -for {set j 0} {$j<8} {incr j 1} { - append new_bin [string index $old_bin [expr $i+$j]] -} - -for {set i 0} {$i<[string length $old_bin]} {incr i $num_b} { - set binValue [string range $old_bin [expr $i+0] [expr $i+($num_b-1)]] - binary scan $binValue H[expr $num_b*2] hexValue - - set binValue [string range $new_bin [expr $i+0] [expr $i+($num_b-1)]] - binary scan $binValue H[expr $num_b*2] hexValue -} - -puts -nonewline $fileid_o $new_bin -close $fileid_o |