-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_pop2
executable file
·120 lines (87 loc) · 2.11 KB
/
build_pop2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh
# setup local directory tree for poplog root
# may be a symbolic link to something else
poplogroot=`pwd`
usepop=$poplogroot
popcom=$usepop/pop/com
# set the poplocal variables
poplocal=$poplogroot
local=$poplocal/local
# Run the initialisation files to set up additional environment
# variables, extend $PATH, etc.
. $usepop/pop/com/poplog.sh
export poplocal poplib poplogroot local usepop
# export POP__as='/usr/bin/arm-none-eabi-as'
POP__as=/usr/bin/as
export POP__as
POP_arch=x86_64
if true ; then
cd pop/src
pwd
echo "rebuilding system images"
../../mk_cross -d -a=$POP_arch popc poplibr poplink
cd ../pop
ls -l *.psv
ln -s corepop popc
ln -s corepop poplibr
ln -s corepop poplink
fi
if true ; then
cd $popexternlib
pwd
# echo "mklibpop"
./mklibpop
cd $popcom
pwd
echo "mkXpw"
./mkXpw -I/usr/include/X11
fi
if true ; then
cd $usepop/pop/obj
pwd
echo 'saving library files in old'
mkdir old
ls -l
mv *.* old
echo 'Recompiling base system'
cd $usepop/pop/src
pwd
echo 'popc'
popc -c -nosys $POP_arch/*.[ps] *.p
echo 'poplibr'
# pglibr -c ../obj/src.wlb *.w
poplibr -c ../obj/src.wlb *.w
# rm *.[ow]
echo 'After system recompilation'
# exit 0
cd $usepop/pop/ved/src/
pwd
echo 'popc'
popc -c -nosys -wlib \( ../../src/ \) *.p
echo 'poplibr'
poplibr -c ../../obj/vedsrc.wlb *.w
# rm *.[ow]
echo 'After ved recompilation'
cd $usepop/pop/x/src/
pwd
echo 'popc'
popc -c -nosys -wlib \( ../../src/ \) *.p
echo 'poplibr'
poplibr -c ../../obj/xsrc.wlb *.w
# rm *.[ow]
echo 'After X recompilation'
fi
# link a complete system into a newpop11 image, using pglink
echo " -----------------------------------------------"
echo "link a complete system into a newpop11 image, using pglink"
echo " -----------------------------------------------"
cd $popsys
# pglink -core
./corepop %nort ../lib/lib/mkimage.p -entrymain ./newpop.psv ../lib/lib/newpop.p
# exit
ls -l
# $usepop/pop/src/newpop -link -nox -norsv
# $usepop/pop/src/newpop -link -x=-xm -norsv
$usepop/pop/src/newpop -link -x=-xt -norsv
# export POPNEWPOP=
# gdb corepop