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
# Enter this in u-boot. | |
# Downloads SPL and u-boot into RAM and then writes it to sdcard | |
# network configuration | |
setenv ipaddr 192.168.0.2 | |
setenv serverip 192.168.0.1 | |
# update commands | |
setenv tftp_to_fat "tftp ${loadaddr} '${file}'; fatwrite mmc 0:1 ${loadaddr} '${file}' '${filesize}'" | |
setenv u "for file in MLO u-boot.img; do run tftp_to_fat; done; reset" |
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
mkdir /usr/local/bin/ccache | |
ln -s /usr/bin/ccache /usr/local/bin/ccache/arm-none-eabi-gcc | |
ln -s /usr/bin/ccache /usr/local/bin/ccache/arm-none-eabi-g++ | |
ln -s /usr/bin/ccache /usr/local/bin/ccache/arm-none-eabi-cpp | |
ln -s /usr/bin/ccache /usr/local/bin/ccache/arm-none-eabi-c++ | |
export PATH="/usr/local/bin/ccache:$PATH" | |
# now cross compile as usuas, eg wih | |
# CROSS_COMPILE=arm-none-eabi- |
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
# assume, gzipped static html with embedded CSS and JS named html.gz | |
# note: browser can unzip it when header is correct! save space! | |
# make binary object from data | |
arm-none-eabi-ld -r -b binary -o html.o html.gz | |
# put in read only section | |
arm-none-eabi-objcopy.exe --rename-section .data=.rodata,alloc,load,readonly,data,contents html.o html.o | |
# print symbols, just FYI | |
arm-none-eabi-objdump.exe -t html.o |
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
############# on host | |
# set fixed IP (rpi-net) | |
NetworkManager / systemd-networkd ... | |
# enable IPv4 forwarding | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/ipforward.conf | |
# enable NAT in iptables (rpi-net is target interface) |
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 sh | |
# settings | |
DEVICE=sdj | |
IP=192.168.0.2 | |
########################################################## | |
function main(){ | |
# if we have an IP, check if target is there |
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 sh | |
# settings | |
USECCACHE=1 | |
CROSS_COMPILE=arm-none-eabi- | |
ARCH=arm | |
MAKEPARAM="all" | |
############################################# |
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
/dts-v1/; | |
/ { | |
description = "Simple image with single Linux kernel"; | |
images { | |
#address-cells = <1>; | |
#size-cells = <0>; | |
kernel@0 { | |
#address-cells = <1>; | |
#size-cells = <0>; |