Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added howto for building #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ minisatip-package: dist/packages/minisatip-$(VERSION).tar.gz
apps/$(BUSYBOX)/Makefile:
$(call WGET,http://busybox.net/downloads/$(BUSYBOX).tar.bz2,apps/$(BUSYBOX).tar.bz2)
tar -C apps -xjf apps/$(BUSYBOX).tar.bz2
patch -p0 < patches/busybox-1.26.2.patch

apps/$(BUSYBOX)/busybox: apps/$(BUSYBOX)/Makefile
make -C apps/$(BUSYBOX) CROSS_COMPILE=$(TOOLCHAIN)/bin/sh4-linux- defconfig
Expand Down
12 changes: 12 additions & 0 deletions debug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ A notes for developers (might be outdated):
Requirements:

- git, python
- distro with yum
- STLinux 2.4 (all-sh4-glibc) - http://www.stlinux.com - installed to /opt/STM/STLinux-2.4/
- fakeroot package/tools

Preparing build env:
- Install a clean distro with yum package manager (CentOS 7 confirmed to work)
- Install STLinux toolchain:
- download http://archive.stlinux.com/stlinux/2.4/iso/STLinux-2.4-sh4-20141119.iso
- mount it somewhere and cd to that dir
- ./install all-sh4-glibc
- this will create /opt/STM/STLinux-2.4/
- yum install epel-release
- yum install gcc git python wget tar bzip2 uboot-tools patch fakeroot svn file
- cd ~ ; git clone https://github.com/perexg/satip-axe ; cd satip-axe

Compilation:

- just type 'make'
Expand Down
25 changes: 25 additions & 0 deletions patches/busybox-1.26.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- apps/busybox-1.26.2/util-linux/blkdiscard.c 2016-12-10 17:46:36.000000000 +0000
+++ apps/busybox-1.26.2/util-linux/blkdiscard.c 2019-03-03 12:56:57.041509277 +0000
@@ -68,7 +68,7 @@
range[0] = offset;
range[1] = length;
ioctl_or_perror_and_die(fd,
- (opts & OPT_SECURE) ? BLKSECDISCARD : BLKDISCARD,
+ (opts & OPT_SECURE) ? BLKDISCARD : BLKDISCARD,
&range,
"%s: %s failed",
argv[0],
--- apps/busybox-1.26.2/miscutils/nandwrite.c 2016-09-27 16:53:50.000000000 +0000
+++ apps/busybox-1.26.2/miscutils/nandwrite.c 2019-03-03 12:56:27.520549923 +0000
@@ -53,6 +53,11 @@

#include "libbb.h"
#include <mtd/mtd-user.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+# define MTD_FILE_MODE_NORMAL MTD_MODE_NORMAL
+# define MTD_FILE_MODE_RAW MTD_MODE_RAW
+#endif

#define IS_NANDDUMP (ENABLE_NANDDUMP && (!ENABLE_NANDWRITE || (applet_name[4] == 'd')))
#define IS_NANDWRITE (ENABLE_NANDWRITE && (!ENABLE_NANDDUMP || (applet_name[4] != 'd')))