Permalink
Browse files

scripts sync 2018.05

  • Loading branch information...
zyxmon committed May 12, 2018
1 parent 78447b3 commit a2a52a32aba665dbe9a66e9b16ceb60cc14e9add
Showing with 48 additions and 7 deletions.
  1. +4 −0 scripts/bundle-libraries.sh
  2. +1 −1 scripts/config/Makefile
  3. +5 −5 scripts/download.pl
  4. +1 −1 scripts/env
  5. +37 −0 scripts/flashing/eva_ramboot.py
@@ -87,7 +87,11 @@ _runas_so() {
return 0;
}
#ifdef __APPLE__
__attribute__((section("__DATA,__mod_init_func")))
#else
__attribute__((section(".init_array")))
#endif
static void *mangle_arg0_constructor = &mangle_arg0;
EOT
View
@@ -33,7 +33,7 @@ lxdialog-objs := \
clean-files := zconf.tab.c lex.zconf.c zconf.hash.c
# Remove qconf junk files
clean-files += $(qconf-cxxobjs) qconf.moc .tmp_qtcheck
clean-files += $(qconf-cxxobjs) qconf.moc .tmp_qtcheck qconf
all: conf mconf
View
@@ -191,7 +191,7 @@ sub cleanup
if ($mirror =~ /^\@SF\/(.+)$/) {
# give sourceforge a few more tries, because it redirects to different mirrors
for (1 .. 5) {
push @mirrors, "http://downloads.sourceforge.net/$1";
push @mirrors, "https://downloads.sourceforge.net/$1";
}
} elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
push @mirrors, "https://mirror.netcologne.de/apache.org/$1";
@@ -258,10 +258,10 @@ sub cleanup
}
}
#push @mirrors, 'http://mirror1.openwrt.org';
push @mirrors, 'http://sources.lede-project.org';
push @mirrors, 'http://mirror2.openwrt.org/sources';
push @mirrors, 'http://downloads.openwrt.org/sources';
#push @mirrors, 'https://mirror1.openwrt.org';
push @mirrors, 'https://sources.lede-project.org';
push @mirrors, 'https://mirror2.openwrt.org/sources';
push @mirrors, 'https://downloads.openwrt.org/sources';
push @mirrors, 'http://src.entware.net';
while (!-f "$target/$filename") {
View
@@ -104,7 +104,7 @@ env_list() {
env_diff() {
env_init
env_sync_data
git diff --cached --color
git diff --cached --color=auto
env_link_config
}
@@ -0,0 +1,37 @@
#!/usr/bin/python
from ftplib import FTP
from sys import argv
from os import stat
assert len(argv) == 3
ip = argv[1]
image = argv[2]
size = stat(image).st_size
# arbitrary size limit, to prevent the address calculations from overflows etc.
assert size < 0x2000000
# We need to align the address. A page boundary seems to be sufficient on 7362sl
# and 7412
addr = ((0x8000000 - size) & ~0xfff)
haddr = 0x80000000 + addr
img = open(image, "rb")
ftp = FTP(ip, 'adam2', 'adam2')
def adam(cmd):
print("> %s"%(cmd))
resp = ftp.sendcmd(cmd)
print("< %s"%(resp))
assert resp[0:3] == "200"
ftp.set_pasv(True)
# The following parameters allow booting the avm recovery system with this
# script.
adam('SETENV memsize 0x%08x'%(addr))
adam('SETENV kernel_args_tmp mtdram1=0x%08x,0x88000000'%(haddr))
adam('MEDIA SDRAM')
ftp.storbinary('STOR 0x%08x 0x88000000'%(haddr), img)
img.close()
ftp.close()

0 comments on commit a2a52a3

Please sign in to comment.