Skip to content

Commit 8333f0c

Browse files
committed
Small updates
1 parent 7f4e2a6 commit 8333f0c

File tree

2 files changed

+271
-0
lines changed

2 files changed

+271
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# setup_hadoop
2+
#~ make this script executable by using chmod +x setup_hadoop.sh
3+
#~ description/about :This script helps to configure hadoop, in Debian & its derivaties
4+
#~ Motivation: wanted to experiment with bash and to help my friends to setup hadoop #~ easily
5+
#~ feel free to change and adjust to your liking.
6+
#~ The author is not responsible for the damage that has been
7+
#~ inflicted due to any misconfiguration or other mishaps
8+
#~ in short if it breaks you are on your own.. Sorry about that
9+
#~ Please do help to correct the mishaps in script

radxa_rock_builder.sh

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
#!/bin/bash
2+
#~
3+
#~ ----------------------------------------------------------------------------------------------------------------
4+
#~ -------------------------------DEFAULT PATHS--------------------------------------------------------------------
5+
# Update.img "/home/$USER/home/romsource_Folder/rockdev/update.img"
6+
#~Kernel.img "/home/$USER/home/romsource_Folder/kernel/"
7+
#~Flash_tool_Utility "/home/$USER/home/romsource_Folder/RKTools/linux/Linux_Upgrade_Tool_v1.16/"
8+
#~ -------------------------------DEFAULT PATHS--------------------------------------------------------------------
9+
#~
10+
#~
11+
#~
12+
MASTER_PATH=$(dirname $(readlink -f $0) )
13+
ROM_PATH=$MASTER_PATH;
14+
KERNEL_PATH=$MASTER_PATH/kernel
15+
RKTOOLS_PATH=$MASTER_PATH/RKTools/linux/Linux_Upgrade_Tool_v1.16
16+
IMG_PATH=$MASTER_PATH/rockdev;
17+
18+
filechecker()
19+
{
20+
if [ ! -d "$KERNEL_PATH" -o ! -d "$IMG_PATH" ] ;then
21+
if [ ! -d "$RKTOOLS" ] ; then
22+
23+
echo "ERROR:Path To Kernel not Found";
24+
echo "ERROR:PATH To Image Not Found";
25+
echo "ERROR:Path To Flash Tools Not Found";
26+
exit;
27+
fi
28+
fi
29+
}
30+
31+
#~ ##<<<<Kernel section>>>>##
32+
33+
34+
ker ()
35+
{
36+
37+
cd $KERNEL_PATH;
38+
echo "we are going to make a kernel!!"
39+
40+
while :
41+
do
42+
43+
echo "whats happening??"
44+
echo "1. make mr.proper"
45+
echo "2. make clean"
46+
echo "3. build the android 4.2 jb image for radxa rock "
47+
echo "4. build the android 4.4 kk image for radxa rock"
48+
echo "5. build the android 4.4 kk image for radxa rock pro[hdmi]"
49+
echo "6. build the android 4.4 kk image for radxa rock pro[lvds]"
50+
echo "7. make menucongig"
51+
echo "8. make xconfig"
52+
echo "9. make kenel"
53+
echo "10. Go Back"
54+
echo -n "please enter option [1 - 10]"
55+
read opt
56+
case $opt in
57+
1) echo "make mr.proper";
58+
make mrproper;;
59+
2) echo "make clean";
60+
make clean;;
61+
3) echo "building jelly rock kernel";
62+
make rk3188_radxa_rock_defconfig;;
63+
4) echo "building rock kernel";
64+
make rk3188_radxa_rock_kitkat_defconfig;;
65+
5) echo "building rock pro[hdmi] kernel";
66+
make rk3188_box_radxa_rock_pro_hdmi_defconfig;;
67+
6) echo "building rock pro[lvds] kernel";
68+
rk3188_box_radxa_rock_pro_lvds_defconfig;;
69+
7) echo "loading menucongig";
70+
make menuconfig;;
71+
8) echo "preparing xconfig";
72+
make xconfig;;
73+
9) echo "making kenel";
74+
make kernel.img;;
75+
10) echo "kudos";
76+
main
77+
;;
78+
*) echo "$opt is an invaild option. please select option between 1-4 only";
79+
echo "press [enter] key to continue. . .";
80+
read enterkey;;
81+
esac
82+
done
83+
84+
}
85+
86+
##<<<<Rom section>>>>##
87+
88+
rom ()
89+
{ cd $ROM_PATH
90+
while :
91+
do
92+
93+
source $ROM_PATH/build/envsetup.sh
94+
echo $ROM_PATH/build/envsetup.sh
95+
echo "NOTE:PLEASE BUILD KERNEL FIRST[IGNORE IF DONE]"
96+
echo "1. Make Clobber"
97+
echo "2. Make Clean"
98+
echo "3. Build the android 4.4.2 radxa rock "
99+
echo "4. Build the android 4.4.2 KK image for radxa rock pro"
100+
echo "5. Make -j4"
101+
echo "6. convert the files to Image"
102+
echo "7. Go Back to Main Menu"
103+
echo -n "Please enter option [1 - 7]"
104+
read opt
105+
case $opt in
106+
1) echo "Clobbering....";
107+
make clobber;;
108+
2) echo "Cleaning";
109+
make clean;;
110+
3) echo "Building Rock";
111+
lunch radxa_rock-eng;
112+
echo "Building Finished..................";;
113+
4) echo "Building Rock pro...";
114+
lunch radxa_rock_pro-eng;
115+
echo "Building Finished..................";;
116+
5) echo "Let the fun Begin..";
117+
make -j4;;
118+
6) echo "I see.. U like the Update.img.. wait a bit mate!!!";
119+
./mkimage.sh ota;;
120+
7) echo "I see.. U like the Update.img.. wait a bit mate!!!";
121+
main
122+
;;
123+
*) echo "$opt is an invaild option. Please select option between 1-4 only";
124+
echo "Press [enter] key to continue. . .";
125+
read enterKey;;
126+
esac
127+
done
128+
129+
}
130+
131+
##<<<<Rom Flashing>>>>##
132+
flash ()
133+
{
134+
cd $RKTOOLS_PATH;
135+
136+
while :
137+
do
138+
139+
echo "What will it be??"
140+
echo "1. Low Level Format"
141+
echo "2. Flash the Fresh Brew [Update.img]??"
142+
echo "3. Flash Something Else [Drag and Drop that Image] "
143+
echo "4. Back "
144+
145+
echo
146+
read -p "Please enter option [1 - 4] " opt
147+
case $opt in
148+
1) echo "Let it go, Let it die";
149+
sudo ./upgrade_tool lf ;
150+
;;
151+
2) echo "Push Damn It!!PUSH";
152+
sudo ./upgrade_tool uf $IMG_PATH/update.img;
153+
;;
154+
3) echo "Drag and drop the relevant img file";
155+
read custom;
156+
sudo ./upgrade_tool uf "${custom//\'}" ;
157+
;;
158+
4) echo "Kudos";
159+
main
160+
;;
161+
*) echo "$opt is an invaild option. Please select option between 1-4 only";
162+
echo "Press [enter] key to continue. . .";
163+
read enterKey;;
164+
esac
165+
done
166+
167+
}
168+
169+
##<<<<Utilities section >>>>##
170+
utils()
171+
{
172+
while :
173+
do
174+
175+
echo "1. Install JDK 1.6"
176+
echo "2. Configure default Java Compiler"
177+
echo "3. Install ADB && FastBoot "
178+
echo "4. Required Packages for Ubuntu 12.xx"
179+
echo "5. Required Packages for Ubuntu 13.xx && 14.xx"
180+
echo "6. ARM Toolchain"
181+
echo "7. Install Some Supporting Libraries"
182+
echo "8.Go Back"
183+
echo -n "Please enter option [1 - 8]"
184+
read opt
185+
case $opt in
186+
1) echo "JDK";
187+
sudo add-apt-repository ppa:webupd8team/java &&
188+
sudo apt-get update &&
189+
sudo apt-get install oracle-java6-installer
190+
;;
191+
2) echo "Configure Java";
192+
sudo update-alternatives --config javac;;
193+
194+
3) echo "Install ADB And Fastboot";
195+
sudo apt-get install android-tools-adb android-tools-fastboot;;
196+
4) echo "Packages for Ubuntu 12.xx";
197+
sudo apt-get install git gnupg flex bison gperf build-essential \
198+
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
199+
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
200+
g++-multilib mingw32 tofrodos gcc-multilib ia32-libs\
201+
python-markdown libxml2-utils xsltproc zlib1g-dev:i386;;
202+
5) echo "Required Packages for Ubuntu 13.xx && 14.xx";
203+
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev\
204+
libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl\
205+
libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils\
206+
xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev\
207+
lib32readline-gplv2-dev gcc-multilib libswitch-perl;;
208+
6) echo "ARM Toolchain";
209+
sudo apt-get install gcc-arm-linux-gnueabihf &&
210+
sudo apt-get install lzop libncurses5-dev;;
211+
7) echo "Supporting Libraries";
212+
sudo apt-get install libssl1.0.0 libssl-dev;;
213+
8) echo "Ba Bye";
214+
main
215+
;;
216+
*) echo "$opt is an invaild option. please select option between 1-4 only";
217+
echo "press [enter] key to continue. . .";
218+
read enterkey;;
219+
esac
220+
done
221+
}
222+
main()
223+
{
224+
cd $MASTER_PATH;
225+
filechecker
226+
while :
227+
do
228+
clear
229+
echo "What will it be??"
230+
echo "1. Build Kernel"
231+
echo "2. Build Rom"
232+
echo "3. Flash the Rom(update.img)"
233+
echo "4. Utilities"
234+
echo "5. Exit"
235+
echo -n "Please enter option [1 - 5]"
236+
read opt
237+
case $opt in
238+
239+
1) echo "kernel";
240+
ker
241+
;;
242+
2) echo "Rom";
243+
rom
244+
;;
245+
3) echo "Flashing";
246+
flash
247+
;;
248+
4) echo "Opening Back-Door"
249+
utils
250+
;;
251+
252+
5) echo "Kudos";
253+
exit;;
254+
*) echo "$opt is an invaild option. Please select option between 1-4 only";
255+
echo "Press [enter] key to continue. . .";
256+
read enterKey;;
257+
esac
258+
done;
259+
260+
}
261+
main;
262+

0 commit comments

Comments
 (0)