Add RCM payload support for Raspberry Pi

See #57
This commit is contained in:
Dmitry Isaenko 2020-07-23 18:07:50 +03:00
parent 3bfc37a24e
commit 45247d6d8c
7 changed files with 52 additions and 3 deletions

View file

@ -29,6 +29,13 @@ $ javac -h . RcmSmash.java
$ cd 'NS-USBloader/JNI sources/linux'
$ make install clean
```
**Build for Raspberry Pi (Raspberry Pi host):**
```
$ cd 'NS-USBloader/JNI sources/linux'
$ mv Makefile_rapsberry Makefile
$ make install clean
```
**Build for Windows (on x86_64 host):**
[ This part should be updated ]

View file

@ -0,0 +1,31 @@
# Compiler
CC=arm-linux-gnueabihf-gcc
# Flags
CFLAGS=-O2
MKDIR_P = mkdir -p
APP_NAME = smashlib.so
ifeq ($(JAVA_HOME),)
JAVA_LIB_PATH := "/usr/lib/jvm/default-java/include"
JAVA_LIB_PATH_LINUX := "/usr/lib/jvm/default-java/include/linux"
else
JAVA_LIB_PATH = ${JAVA_HOME}/include
JAVA_LIB_PATH_LINUX = ${JAVA_HOME}/include/linux
endif
all: arm
arm:
test $(JAVA_LIB_PATH)
$(MKDIR_P) ./arm
$(CC) -c -fPIC -I$(JAVA_LIB_PATH) -I"$(JAVA_LIB_PATH_LINUX)" smashlib.c -o smashlib_arm.o
$(CC) ${CFLAGS} -shared -fPIC -o ./arm/${APP_NAME} smashlib_arm.o -lc
clean:
rm -rf smashlib_arm.o ./arm
install: arm
install ./arm/${APP_NAME} ../../src/main/resources/native/linux/arm/
uninstall:
rm ../../src/main/resources/native/linux/arm/${APP_NAME}

View file

@ -7,7 +7,7 @@
NS-USBloader is:
* A PC-side installer for **[Adubbz/TinFoil (v0.2.1)](https://github.com/Adubbz/Tinfoil/)**, **[Huntereb/Awoo-Installer](https://github.com/Huntereb/Awoo-Installer)** (USB and Network supported) and **[XorTroll/GoldLeaf](https://github.com/XorTroll/Goldleaf)** (USB) NSP installer.
Replacement for default **usb_install_pc.py**, **remote_install_pc.py**, **GoldTree**/**Quark**.
* This application also could be used as RCM payload on Windows, MacOS and Linux (supported arch: x86, x86_64).
* This application also could be used as RCM payload on Windows, MacOS and Linux (supported arch: x86, x86_64 and Raspberry Pi).
* And of course it's a tool for split files!
* And also for merging split-files into one :)
@ -90,6 +90,14 @@ root # udevadm control --reload-rules && udevadm trigger
Please note: you may have to change 'plugdev' group from example above to the different one. It's depends on you linux distro.
##### Raspberry Pi
1. Install JDK: `sudo apt install default-jdk`
2. For UI install JavaFX:
3. See steps 3 and 4 from 'Linux' section to update 'udev'.
##### macOS
Double-click on downloaded .jar file. Follow instructions. Or see 'Linux' section.

View file

@ -8,7 +8,7 @@
<name>NS-USBloader</name>
<artifactId>ns-usbloader</artifactId>
<version>4.0-SNAPSHOT</version>
<version>4.1-SNAPSHOT</version>
<url>https://github.com/developersu/ns-usbloader/</url>
<description>

View file

@ -32,7 +32,7 @@ import java.util.ResourceBundle;
public class NSLMain extends Application {
public static final String appVersion = "v4.0";
public static final String appVersion = "v4.1";
public static boolean isCli;
@Override

View file

@ -43,6 +43,9 @@ public class JNIRcmLoader {
case "amd64":
osArch = "amd64";
break;
case "arm":
osArch = "arm";
break;
default:
return false;
}

Binary file not shown.