Skip to content

Commit 43d8a9b

Browse files
committed
Add first stab at sdk binaries.
More complex stuff won't run with musl without bloating things up.
1 parent bbc11d9 commit 43d8a9b

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

Jailbreak.app

0 Bytes
Binary file not shown.

Makefile

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ iptables=iptables-1.8.3
1212
samba=samba-3.6.25
1313
rsync=rsync-3.1.3
1414

15-
common_configure=./configure --disable-ipv6 --localstatedir=/var/run --sharedstatedir=/var --host=arm-linux-gnueabi CC=arm-buildroot-linux-musleabihf-gcc --prefix=/mnt/secure --enable-static --disable-shared LDFLAGS="--static -Wl,-gc-sections" CFLAGS="-D__mempcpy=mempcpy -ffunction-sections -fdata-sections" --prefix=/mnt/secure --sbindir=/mnt/secure/bin --datarootdir=/mnt/secure
15+
# TODO
16+
lftp=lftp-4.8.4
17+
powertop=powertop-v2.10
18+
htop=htop-2.2.0
19+
20+
common_configure=./configure --disable-ipv6 --localstatedir=/var/run --sharedstatedir=/var --host=arm-linux-gnueabi CC=$(cc) --prefix=/mnt/secure --enable-static --disable-shared LDFLAGS="--static -Wl,-gc-sections" CFLAGS="-D__mempcpy=mempcpy -ffunction-sections -fdata-sections" --prefix=/mnt/secure --sbindir=/mnt/secure/bin --datarootdir=/mnt/secure
21+
common_configure5=./configure --disable-ipv6 --localstatedir=/var/run --sharedstatedir=/var --host=arm-linux-gnueabi CC=$(cc5) --prefix=/mnt/secure --enable-static --disable-shared --prefix=/mnt/secure --sbindir=/mnt/secure/bin --datarootdir=/mnt/secure --disable-unicode
1622

1723
SSH_CONFIG_OPTIONS=--disable-pam --disable-syslog --disable-shadow --disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx --disable-loginfunc --disable-pututline --disable-pututxline --disable-zlib
1824

@@ -108,7 +114,7 @@ Services.app: FORCE svc
108114
svc: $(svcbins)
109115
echo Cross-compiled service binaries
110116

111-
# Retrieve source codes
117+
# Retrieve source codes for binaries we compile statically with musl (smaller / more portable)
112118
$(proftpd):
113119
wget -c ftp://ftp.proftpd.org/distrib/source/$(proftpd).tar.gz
114120
tar -xvzf $(proftpd).tar.gz
@@ -123,6 +129,17 @@ $(rsync):
123129
wget -c https://download.samba.org/pub/rsync/$(rsync).tar.gz
124130
tar -xvzf $(rsync).tar.gz
125131

132+
# These depend on cc5 sdk, as they need ncurses or openssl (static musl would become too big)
133+
$(htop):
134+
wget -c https://hisham.hm/htop/releases/2.2.0/$(htop).tar.gz
135+
tar -xvzf $(htop).tar.gz
136+
$(powertop):
137+
wget -c https://01.org/sites/default/files/downloads/$(powertop).tar.gz
138+
tar -xvzf $(powrtop).tar.gz
139+
$(lftp):
140+
wget -c http://lftp.yar.ru/ftp/$(lftp).tar.gz
141+
tar -xvzf $(lftp).tar.gz
142+
126143
# each of svcbin
127144
svc/bin/iptables: $(iptables)
128145
(cd $(iptables) && $(common_configure) --disable-devel --disable-nftables --with-xt-lock-name=/var/run/xtables.lock)
@@ -152,6 +169,10 @@ svc/bin/rsync: $(rsync)
152169

153170
svc/bin/ntlmhash: ntlmhash.c
154171
$(cc) -static -s $< -o $@
172+
173+
svc/bin/htop: $(htop)
174+
(cd $(htop) && $(common_configure5))
175+
make -C $(htop)
155176
FORCE:
156177

157178

svc/init.d/00-setpass.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/mnt/secure/su /bin/sh
2+
export TZ=
23
nopw="password=(keep unchanged)"
34
if [ ! -e /mnt/secure/etc/passwd ] || [ -n "$(find -L /mnt/ext1/rootpassword.txt -prune -newer /mnt/secure/etc/passwd)" ]; then
45
if [ ! -e /mnt/ext1/rootpassword.txt ] || [ "$(cat /mnt/ext1/rootpassword.txt)" == "$nopw" ]; then

0 commit comments

Comments
 (0)