Skip to content

Instantly share code, notes, and snippets.

Mutti muttiopenbts

Block or report user

Report or block muttiopenbts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@muttiopenbts
muttiopenbts / 6x_bootscript.txt
Created Sep 2, 2019
Original 6x_bootscript taken from sdcard
View 6x_bootscript.txt
setenv bootargs ''
setenv initrd_high 0xffffffff
m4=''
a_base=0x10000000
if itest.s x51 == "x${cpu}" ; then
a_base=0x90000000
elif itest.s x53 == "x${cpu}"; then
a_base=0x70000000
elif itest.s x6SX == "x${cpu}" || itest.s x7D == "x${cpu}"; then
@muttiopenbts
muttiopenbts / 6x_bootscript.txt
Created Sep 2, 2019
Boundary device's 6x_bootscript which I used for learning and testing my hab images for imx6
View 6x_bootscript.txt
setenv bootargs ''
# setenv kernel_img_name zImage
setenv kernel_img_name zImage_signed_10800000
setenv initrd_high 0xffffffff
m4=''
a_base=0x10000000
if itest.s x51 == "x${cpu}" ; then
a_base=0x90000000
@muttiopenbts
muttiopenbts / imx6_uboot_script.txt
Last active Sep 2, 2019
This is a stripped down version of Boundary device's 6x_bootscript for hab signed kernel
View imx6_uboot_script.txt
# This is a stripped down version of Boundary device's 6x_bootscript
# which I used for learning and testing my hab images for imx6
# Prepare uboot script command
#u-boot-imx6$ ./tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "my boot script" -d imx6_uboot_script.txt /tftpboot/imx6_uboot_script
setenv dtype mmc
setenv disk 0
setenv active_partition 1
# setenv kernel_img_name zImage
@muttiopenbts
muttiopenbts / gen_ivt.py
Created Aug 19, 2019
Generate ivt binary for use when running an imx6 SoC in HAB mode. Helper towards signing kernel images.
View gen_ivt.py
def gen_ivt(loadaddr, image_file):
'''Generate imx SoC ivt
Args:
loadaddr int. Hex representing load address in ram for uboot.
Can be obtained from your u-boot.cfg build file.
image_file string. filename and path to binary image. If
generating ivt for signing kernel image, ensure kernel
image file is pre-padded.
returns:
View Python PyCrypto: Sign Data Example.py
'''
pip uninstall crypto
pip install pycrypto
Tested using python 3
'''
def sign_data(private_key_loc, data, pass_phrase=None):
'''
param: private_key_loc Path to your private key
param: data, plain text data to be signed
param: pass_phrase if private key is protected
View modbus_rtu_test.py
'''
Test script for interacting with device over modbus-rtc.
Need to improve received strings to output correctly after decoding.
'''
import pymodbus
import serial
from pymodbus.constants import Endian
from pymodbus.pdu import ModbusRequest
from pymodbus.client.sync import ModbusSerialClient as ModbusClient #initialize a serial RTU client instance
@muttiopenbts
muttiopenbts / ftpserver.py
Last active Jan 5, 2017 — forked from scturtle/ftpserver.py
simple ftp server by python
View ftpserver.py
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
import sys
#import traceback
allow_delete = False
local_ip = sys.argv[1]
local_port = 21
You can’t perform that action at this time.