-
Notifications
You must be signed in to change notification settings - Fork 9
/
README
103 lines (71 loc) · 3.67 KB
/
README
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
2ndboot-ng – this is a bootloader, which can boot custom boot image (including custom kernel + initrd) from any place/file.
It consists from:
- small kernel module, for creating device for booting/controlling boot
- small userspace program, which give for module boot image and flags
- universal bootloader, which can uses many places for booting: boot image file from nand flash, boot image from SD card, USB booting, and network booting
!!! FIRST YOU NEED THIS !!!
OMAP3430 Reference Manual http://www.xvilka.org/files/SWPU117D_FinalEPDF_02_18_2010.pdf
Linux Kernel Programming Book http://www.xvilka.org/files/ldd3_pdf.tar.bz2
For creating this program we need read thease resorses:
http://wiki.davincidsp.com/index.php/Secondary_Bootloaders_on_OMAP-L1x
http://wiki.omap.com/index.php/Main_Page
https://gforge.ti.com/gf/project/omapzoom/wiki/?pagename=FAQ-7%3A+Zoom-II+Android+NAND+booting
http://elinux.org/Kernel_XIP_Instructions_For_OMAP
http://lists.infradead.org/pipermail/barebox/2009-December/000162.html
http://209.85.135.132/search?q=cache:etUMZlUjOZkJ:not.freedsoftware.org/lemote-misc/git-mirror/linux_loongson.git/arch/arm/plat-mxc/include/mach/mx31.h+L2CC_BASE_ADDR&cd=5&hl=ru&ct=clnk&gl=ru
http://omappedia.org/wiki/Main_Page
http://omappedia.org/wiki/Bootloader_Project
http://elinux.org/OMAP_Power_Management
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:example_on-chip_sram
http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:porting
http://omappedia.org/wiki/Linux_OMAP_Kernel_Project
http://omappedia.org/wiki/Linux_Getting_Started
http://git.openinkpot.org/contrib/reloaded-2.6.git/tree/
-----------------------------------BUILDING 2NDBOOT-NG------------------------
This is small reaceipts how you can build 2ndboot-ng
1. Download your device kernel, unpack this and create configs and headers:
make mapphone_defconfig
make headers_install ARCH=arm INSTALL_HDR_PATH=~/build/kern_h/
We have Motorola Milestone - so processor chip is TI OMAP3430 - ARM Cortex a8 (armv7-a arch)
(http://en.wikipedia.org/wiki/ARM_architecture). So you need use configs with -omap3430 suffix.
Set enviroment variable for building options:
export _XXCFLAGS=" -march=armv7-a -mtune=cortex-a8 -mfpu=neon"
2. Download crosstool-ng (http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool),
Unpack, build (you need for: make,install,bash,cut,sed,grep,gcc,awk,bison,flex,automake,libtool,stat,
wget,cvs,patch,tar,gzip,bzip2,lzma,readlink,ncurses, mpfr-dev, gmp-dev)
.configure
make
make install
3. Create dir toolchain-android, cd to it and copy files:
XVilka-crosstool-<suffix>.config in .config
XVilka-uClibc-<suffix>.config in uClibc.config
and then run:
ct-ng menuconfig
change anything, if you need, and save to .config
then exec:
ct-ng build
4. Done! We have toolchain in build/x-tools.
All tools have this triplet: arm-android-linux-uclibsgnueabi-*
just add them in PATH
export PATH=$HOME/build/x-tools/arm-android-linux-uclibcgnueabi/bin:$PATH
export CROSS_COMPILE=arm-android-linux-uclibcgnueabi-
export KERNEL_CROSS_COMPILE=arm-android-linux-uclibcgnueabi-
export CFLAGS=" -march=armv7-a -mtune=cortex-a8 -mfpu=neon"
So we can run:
arm-android-linux-uclibcgnueabi-gcc
Also we have system root directory in:
$HOME/build/x-tools/arm-android-linux-uclibcgnueabi/arm-android-linux-uclibcgnueabi/sys-root
For some reasons we just copy it in $HOME/build/cross/sys-root
chmod +w sys-root
chmod +w sys-root/usr
chmod +w sys-root/usr/lib
6. Build kernel
make mapphone_defconfig
make
7. Building module
In directory hbootmod run:
make -C $HOME/build/kernel M=`pwd` modules
or simply "make"
You can clean directory by command:
make -C $HOME/build/kernel M=`pwd` clean
or simply "make clean"