This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |