From 88f735abbde89bac2a624e218e89c1a0f7ac78d3 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 3 Mar 2019 13:21:45 +0000 Subject: [PATCH] added howto for building --- Makefile | 1 + debug/README.md | 12 ++++++++++++ patches/busybox-1.26.2.patch | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 patches/busybox-1.26.2.patch diff --git a/Makefile b/Makefile index aa526157e..82319e348 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/debug/README.md b/debug/README.md index fb04e3f28..8b82480ba 100644 --- a/debug/README.md +++ b/debug/README.md @@ -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' diff --git a/patches/busybox-1.26.2.patch b/patches/busybox-1.26.2.patch new file mode 100644 index 000000000..b55bd3b4f --- /dev/null +++ b/patches/busybox-1.26.2.patch @@ -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 ++#include ++#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')))