Permalink
Browse files

Use shell-script for kexec-wrap

The C code mainly called busybox functions, so we can just
use a shell script instead. That means we save a few lines
of code and do not need an Android cross-compiler toolchain.

As a side-effect the output to /dev/ttyO2 by the script
seems to be more stable than the one of the C code.
  • Loading branch information...
sre committed Feb 17, 2017
1 parent de0eeec commit 2b93ade8d981d65dea91ed982426de6ca998ba91
Showing with 53 additions and 428 deletions.
  1. +0 −2 .gitignore
  2. +1 −10 Makefile
  3. +0 −5 README
  4. +0 −7 src/kexec-wrap/Makefile
  5. +0 −376 src/kexec-wrap/kexec-wrap.c
  6. +52 −0 system/etc/kexec/kexec
  7. +0 −28 system/etc/kexec/kexec-wrap.conf
View
@@ -1,9 +1,7 @@
-src/kexec-wrap/kexec-wrap
system/etc/kexec/kexec.ko
system/etc/kexec/kernel
system/etc/kexec/uart.ko
system/etc/kexec/devtree
-system/etc/kexec/kexec
system/etc/kexec/arm_kexec.ko
system/etc/kexec/ramdisk.img
system/etc/kexec/kexec.static
View
@@ -1,9 +1,5 @@
TIMESTAMP=$$(date +%Y-%m-%d)
-ifndef CROSS_COMPILE
-$(error CROSS_COMPILE environment variable empty, please set it first)
-endif
-
ifeq ($(wildcard system/etc/kexec/kexec.ko),)
$(error Missing droid4-mainline-kexec-0.3 system/etc/kexec/kexec.ko)
endif
@@ -32,12 +28,7 @@ ifeq ($(wildcard system/etc/kexec/kexec.static),)
$(error Missing droid4-mainline-kexec-0.3 kexec to system/etc/kexec/kexec.static)
endif
-kexec-wrap:
- cd src/kexec-wrap && make
- cp src/kexec-wrap/kexec-wrap system/etc/kexec/kexec
- echo Done, now run make zip
-
-zip: kexec-wrap
+zip:
rm -f ../ddroid-$(TIMESTAMP).zip
zip -qr ../ddroid-$(TIMESTAMP).zip .
echo "Zipped up ../ddroid-$(TIMESTAMP).zip, now run make push"
View
5 README
@@ -24,11 +24,6 @@ this can be downloaded from:
http://muru.com/linux/d4/
-Then cd to ddroid directory and build the kexec wrapper.
-
-$ export CROSS_COMPILER=/path/to/your/arm-unknown-linux-
-$ make
-
The make will complain about several files that you need to initially
copy into place to make make happy, then you can create the bootable
SafeStrap installable image:
View
@@ -1,7 +0,0 @@
-#
-# At least gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)
-# works to create a static binary that runs on android
-#
-
-all:
- $(CROSS_COMPILE)gcc -Wall -static -o kexec-wrap kexec-wrap.c
Oops, something went wrong.

0 comments on commit 2b93ade

Please sign in to comment.