Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Figure 6. LINUX software architecture
Figure 6 shows the LINUX software architecture. Normally the chip solution company will provide Driver layer and Hardware layer code for user's reference. There are many open source codes that related to Middleware and Application layer in the internet, user can capture the code and compile it through some procedure. This chapter will introduce how to compile open source code and install in SP7021 platform.
User should prepare a LINUX OS base PC (OS is Ubuntu 18.04) for cross compile open source application code. Once compiling is ready, user has two ways to execute the application (APP).

...

  • sudo apt-get install gcc make libncurses5-dev openssl libssl-dev
  • sudo apt-get install build-essential pkg-config libc6-dev bisonl bison flex libelf-dev zlibc minizip libidn11-dev libidn11
  • sudo apt-get install kernel-package g++ u-boot-tools

...

b) Modify Makefile.pre.in. Modification makes reference to Python-2.7.13-xcompile.patch file. File can be downloaded from http://files.cnblogs.com/files/pengdonglin137/Python-2.7.13-xcompile.patch.tar.gz . The content of modification is below: shown as blue color words below.

PGEN= Parser/pgen$(EXE)
HOSTPGEN= $(PGEN)$(EXE)
……………….
.PHONY: regen-grammar
regen-grammar: $(PGEN)

#Regenerate Include/graminit.h and Python/graminit.c

#from Grammar/Grammar using pgen
@$(MKDIR_P) Include
#$(PGEN) $(srcdir)/Grammar/Grammar \
$(HOSTPGEN) $(srcdir)/Grammar/Grammar \
$(srcdir)/Include/graminit.h \
$(srcdir)/Python/graminit.c
………………….
#PYTHON_FOR_BUILD HOSTPYTHON 6 place
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt

...