Bucket Guild | FUBU BH Forums

I Has a Bucket: Preventing bucket theft on Bleeding Hollow | FUBU: A better BH Forum
It is currently Thu Jul 10, 2025 3:28 pm



Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 4:32 pm  
User avatar

Querulous Quidnunc
Joined: Wed May 12, 2010 8:41 am
Posts: 4695
Offline

Windows 7 is a nice OS.


Azelma

Image
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 4:51 pm  
Malodorous Moron
Joined: Wed Jan 05, 2011 5:59 pm
Posts: 736
Location: Montreal, QC
Offline

Azelma wrote:
Windows 7 is a nice OS.


base64 -di <(Tm8gdXNlIGZvciBpdCBhbmQgSSByZXF1aXJlIHVuaXggZm9yIHNwZWNpZmljIHByb2dyYW1zLiBXaG8gd2FudHMgdGhlIGZyZWUgd2luNyBrZXkgdW5kZXIgbXkgbGFwdG9wPw==)
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 6:04 pm  
User avatar

Stupid Schlemiel
Joined: Mon Jul 23, 2007 10:39 pm
Posts: 1942
Location: California
Offline

What do you bros know about android?
I wanna learn to build my own kernels and roms for my phone. I don't like relying on others so much :(

Sent from my SPH-D700 using Tapatalk


A man chooses, a slave obeys.
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 6:36 pm  
User avatar

Querulous Quidnunc
Joined: Fri May 14, 2010 6:59 pm
Posts: 2569
Location: In your dreams.
Offline

Joklem wrote:
Switched back to fedora, built the mainline kernel and I'm actually using gnome shell.

I fucking hate rpmbuild. Does anyone else fucking hate rpmbuild?
P.S. I fucking hate rpmbuild.
P.S. bunch of patches Signed-off-by: Stephen Smalley <[email protected]>

I know you're listening


RPM was horrible back in RH4.0 days. The more things change, the more they stay the same.
Joklem wrote:
Azelma wrote:
Windows 7 is a nice OS.


base64 -di <(Tm8gdXNlIGZvciBpdCBhbmQgSSByZXF1aXJlIHVuaXggZm9yIHNwZWNpZmljIHByb2dyYW1zLiBXaG8gd2FudHMgdGhlIGZyZWUgd2luNyBrZXkgdW5kZXIgbXkgbGFwdG9wPw==)


no, thank you.


Image
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 7:26 pm  
Malodorous Moron
Joined: Wed Jan 05, 2011 5:59 pm
Posts: 736
Location: Montreal, QC
Offline

Lucinth wrote:
What do you bros know about android?
I wanna learn to build my own kernels and roms for my phone. I don't like relying on others so much :(

Sent from my SPH-D700 using Tapatalk


Install either a linux distribution or run one inside of a VM (IMO ubuntu/debian (or mint) are way easier to get the environment up and running, in part because that's what the manuals are written for and the AOSP devs probably all use either one of those). If you don't understand a thing in here then a quick google shall provide an answer -- especially if you're using ubuntu.

It needs to be x86_64, even though android is x86, it has to be built on a 64bit machine.

Get familiar with apt-get/aptitude, now you must make an environment. You'll need: python 2.4-2.7 (and not higher unless that changed recently), sun JDK 6 (if you want to build 2.3+), or the open-jdk equivalent. Enable the 'partner' repositories, update and grab the JDK first.

EDIT2: you'll need about 12gb of free space on the partition you're building for android.

Grab a bunch of dependencies:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev


This also wouldn't hurt:
Code:
sudo apt-get build-dep linux-meta


Or do it the Joklem way:
Code:
sudo apt-get install lib*dev


Grab the repo binary, imo it's less cruel than git:
Code:
sudo curl http://android.git.kernel.org/repo > /usr/bin/repo
sudo chmod +x /usr/bin/repo


Now make your working directory, for the record ~ in unix always refers to "/home/username", so ~/blah points to /home/username/blah, cd changes directories.
Code:
mkdir ~/src/android
cd ~/src/android


Initialize the repo:
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git

You can also specify -b gingerbread to only get that branch, or get a specific branch that you want.

Download the sourcecode:
Code:
repo sync

This might take an hour or three. Once it's done, and don't skip this step, import the android GNUPG key so that you can be sure that what you got is exactly the same shit as how it is on the repository, type:
Code:
gpg --import

You'll be on an empty line, paste this: (verify it there too http://source.android.com/source/downloading.html)
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----

then, CTRL+D to signify EOF (end-of-file)

You now have an environment and the entire android sourcecode, but more importantly you have the toolchain required to build it and the kernel. That's the GNU compiler collection, to build android obviously the x86_64 to ARM cross-compiler is used. Look around on the xda-developers forums for ROMs and kernels that interest you, read a few on general build howtos and get used to the Unix environment by experimenting and fixing whatever errors pop up.

When building you'll need the toolchain in your PATH:
export PATH=$PATH:~/src/android/prebuilt/linux-x86/toolchain/arm-eabi-<version>/bin
this sets a variable the environment to look into that directory for the compiler binaries, otherwise you will get a command not found error.
to specify that you want to cross compile for ARM:
export ARCH=arm
this is "architecture = ARM"
export CROSS_COMPILE:arm-eabi-
where 'arm-eabi-' is the 'prefix' of the binaries in the above folder, i.e. they would be named arm-eabi-c or something. That's the default though.

Some other influential variables, especially when building the kernel, are CFLAGS and CXXFLAGS, those are the GCC optimization arguments.

For practice, build stock Android 2.3.3
prepare:
Code:
cd ~/src/android
. build/envsetup.sh
## only for the nexus one and nexus S, don't install any of those on other phones
lunch
## choose your target, probably full-engineering


If all went well so far:
Code:
make -j##

where ## is the number of cores (and threads) in your machine or number of cores+1, so if you're on a core i7, make -j9 to max out your cpu

That'll take a while and it will likely heat up your room and the adjacent room(edit3: if you have overheating issues, then run less threads, seriously, a thermal shutdown in the middle of a build sucks and 100% usage for nearly an hour will push it there if you've had overheating issues before, here's my global warming: http://i.imgur.com/vIBQS.jpg). When you're done, you can run it in an emulator - I forgot about that so google it mmkay?

As for building the kernel, you need to download an android kernel source code (the GNU GPL ensures that any dev that you see on xda-developers has to publish his full source code, so it won't be hard to find one), do the same but read up on kernel configuration and building instead of android. Use the same toolchain (all the export shit we did)

I wish many errors upon you because that's how terminal-fu is developed.

EDIT:
Once you're more comfortable from building other people's shit, you could start experimenting step by step. First with the kernel configuration/CFLAGS optimizations, then start merging interesting patches into kernel source trees, then maybe add a few lines of C code to the source. Fuck around, read some source files, try to understand some shit and piece it all together in a mental map, etc.

If you flash a kernel on your phone that panics or is a total dickwad, don't panic and just boot into recovery then restore your NAND, or better yet have a .zip package of the original kernel on your SDCard and just flash that then reboot. You can wipe your ROM/kernel partitions clean if you wished and as long as the bootloader and recovery partitions are intact, you can install from the SDCard or restore a backup, if you happened to forget then pop the SDCard in a PC and transfer the zips over. Easy as that.
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 11:03 pm  
User avatar

Stupid Schlemiel
Joined: Mon Jul 23, 2007 10:39 pm
Posts: 1942
Location: California
Offline

I keep reading about NAND but what is it exactly?


A man chooses, a slave obeys.
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Fri May 27, 2011 11:53 pm  
Malodorous Moron
Joined: Wed Jan 05, 2011 5:59 pm
Posts: 736
Location: Montreal, QC
Offline

Lucinth wrote:
I keep reading about NAND but what is it exactly?


flash memory, that 512mb or whatever it's size internal memory in your phone. the backup function in clockworkmod backs up the entire thing (beyond the recovery partition) on the SD card. works like system restore in windows
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Sat May 28, 2011 10:14 am  
Malodorous Moron
Joined: Wed Jan 05, 2011 5:59 pm
Posts: 736
Location: Montreal, QC
Offline

Lucinth wrote:
I keep reading about NAND but what is it exactly?


Oh and I forgot, before delving into android you might want to get some fu by compiling desktop linux shit. The kernel is relatively easy, just get the build dependencies, go to kernel.org, grab a sauce and some patches and configure a frankenkernel. Install and look at the dmesg (boot) log. Don't build packages and instead install it with Tehra's method. Hint: you need to make and put something else in the boot partition and also point grub to that or your system won't boot with that kernel. I suggest the "bfs patch" by Con Kolivas, succesfully build with it then start a huge load on your system (e.g. make the kernel with make -j64) then open up beefy programs, notice how smooth everything stays and realize how much power of customization you can have with one 260.4kb patch in the form of a text file :P

Chromium is also pretty beefy and can be a challenge in troubleshooting. You're likely to get errors saying that your packages are too new to build it. Get the source of the older versions, build, install and then you need to tell the OS to use those instead, of course a temporary solution is warranted. :D

Another would be to build GCC, the standard linux build tools.

Don't delve into program code heavily much (that's what programmers are for), instead start by understanding the overall architecture. What goes in, into what, and what comes out. The most basic (in terms of what makes this shit work) would be the unix pipe

http://pastebin.com/t2gw4W7X

The anatomy of a command and how it relates to the pipe, e.g.:

http://pastebin.com/MBFPjnzz

It's all basically a large collection of lego blocks and you can build whatever the fuck you want provided you have a plan.

Oh and understand why exactly this little guy is going to fuck your system through the ears and force you to reboot:

Code:
:(){ :|: & };:

"function : shall spawn : and be piped through : and sent to the background, while true, do :"

Lego blocks example: so you have a stupid idea like wanting to download a dynamic image from the internet every minute and a half, extract two strings of text from it and write them into text files so that other programs or scripts can use the information? No problem:
Code:
#  Vars
#---------------------------------------------------------#
CERNURL="http://vistar-capture.web.cern.ch/vistar-capture/lhc1.png"
PNG="/home/mbouffard/scripts/lhc.png"
MODEPNG="/home/mbouffard/scripts/mode.png"
MODETIFF="/home/mbouffard/scripts/mode.tif"
FILLEPNG="/home/mbouffard/scripts/fill_energy.png"
FILLETIFF="/home/mbouffard/scripts/fill_energy.tif"
OUT1="/home/mbouffard/scripts/lhc1"
OUT2="/home/mbouffard/scripts/lhc2"

# Infinite loop of magic
#--------------------------------------------------------#
while :; do
   curl -o $PNG $CERNURL && sleep 2
   convert $PNG +repage -crop 760x50+190+35 -resize 1000x -threshold 39000 $MODEPNG
   sleep 2 && convert -monochrome $MODEPNG $MODETIFF
   convert $PNG +repage -crop 600x30+210+1 -resize 1000x -threshold 39000 $FILLEPNG
   sleep 2 && convert -monochrome $FILLEPNG $FILLETIFF
   sleep 2 && tesseract $MODETIFF $OUT1
   sleep 2 && tesseract $FILLETIFF $OUT2
   sleep 90
done
exit


But with great power, you need to learn to be careful about what you type in, and not to accidentally hit the enter key at a really bad moment:

Code:
(/root/.bash_history)
df
cd /home/mbouffard/src/
logout
rm -rf System.map-2.6.39-rc7-git13
rm -rf vmlinuz-2.6.39-rc7-git13
ls -l /boot
nano /boot/grub/grub.cfg
ls -l /boot
rm -rf /boot
cd /
ls -l
ls -l boot
ls -l /boot
cd boot
ls -l
cd ..
cd ~
echo well damn.
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Sat May 28, 2011 2:28 pm  
Malodorous Moron
Joined: Wed Jan 05, 2011 5:59 pm
Posts: 736
Location: Montreal, QC
Offline

Henq wrote:
Ebtables and nfqueue == I run fedora everyday at work

At home == vista

Sent from my SCH-I500 using Tapatalk


Remembered the sticker under my laptop then remembered this post. PM me if you want to upgrade to 7 :P
Top
 Profile  
 
 Post subject: Re: @ Linux
PostPosted: Sat May 28, 2011 3:14 pm  
User avatar

Querulous Quidnunc
Joined: Fri May 14, 2010 9:34 pm
Posts: 2369
Offline

Joklem wrote:
Henq wrote:
Ebtables and nfqueue == I run fedora everyday at work

At home == vista

Sent from my SCH-I500 using Tapatalk


Remembered the sticker under my laptop then remembered this post. PM me if you want to upgrade to 7 :P



Meowth wrote:
@Henq: Why not use this?


Druid: Meowth
« Steam »« Xfire »
Glorious Death Metal Music
Image
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

World of Warcraft phpBB template "WoWMoonclaw" created by MAËVAH (ex-MOONCLAW) (v3.0.8.0) - wowcr.net : World of Warcraft styles & videos
© World of Warcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. wowcr.net is in no way associated with Blizzard Entertainment.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group