1) Patch
Because there are too many warnings when building WLAN drivers. So I turn off the -Werror command line option in the EXTRA_CFLAGS, like
EXTRA_CFLAGS += -fsigned-char
#EXTRA_CFLAGS += -fsigned-char -Werror
Modified files:
1. /opt/L27.12.1-P2/mydroid/hardware/ti/wlan/wl1283/stad/build/linux/common.inc
2. /opt/L27.12.1-P2/mydroid/hardware/ti/wlan/
2) Script used to build WLAN drivers and Android Filesystem
#!/bin/bash
MYDROID=/opt/L27.12.1-P2/mydroid
mkdir -p logs
export KERNEL_DIR=/opt/L27.12.1-P2/kernel/android-2.6.35
# Build 127x station driver
cd $MYDROID/hardware/ti/wlan/wl1283/platforms/os/linux
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- TNETW=1273
# Build 127x softAp driver
cd $MYDROID/hardware/ti/wlan/wl1283_softAP/platforms/os/linux
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- TNETW=1273
cd $MYDROID
cp -Rfp device/ti/pandaboard/buildspec.mk.default buildspec.mk
#(required for rebuild only)
make clean
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 2>&1 |tee $MYDROID/logs/android_make.out
3) Finally, build errors
host StaticLib: libunz (out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/libunz.a)
echo out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/adler32.o out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/crc32.o out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/zutil.o out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/inflate.o out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/inftrees.o out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/inffast.o | xargs ar crsP out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/libunz.a
host SharedLib: libfst (out/host/linux-x86/obj/lib/libfst.so)
host StaticLib: libtinyxml (out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/libtinyxml.a)
echo out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/tinyxml.o out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/tinyxmlparser.o out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/tinyxmlerror.o out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/tinystr.o | xargs ar crsP out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/libtinyxml.a
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
/usr/bin/ld: skipping incompatible /usr/lib/libncurses.so when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/libncurses.a when searching for -lncurses
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libESR_Portable.so] Error 1
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libfst.so] Error 1
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/mydroid$
2011年5月25日 星期三
Build linux kernel (android-2.6.35)
1) Script used to build android-2.6.35
#!/bin/bash
# build kernel image
mkdir -p ./logs
#"mkimage" is located in your u-boot/tools/ directory.
export PATH=/opt/L27.12.1-P2/u-boot/tools:$PATH
#(required for rebuild only)
make ARCH=arm distclean
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CFLAGS="-march=armv7-a+sec" panda_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage 2>&1 |tee ./logs/kernel_make.out
# build kernel modules
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules 2>&1 |tee ./logs/kernel_modules.out
2) Error
CC security/smc/omap4/scxlnx_device_mshield.o
In file included from security/smc/omap4/scxlnx_util.h:29:0,
from security/smc/omap4/scxlnx_device_mshield.c:38:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
AS security/smc/omap4/bridge_pub2sec.o
security/smc/omap4/bridge_pub2sec.S: Assembler messages:
security/smc/omap4/bridge_pub2sec.S:95: Error: selected processor does not support ARM mode `smc #0'
make[3]: *** [security/smc/omap4/bridge_pub2sec.o] Error 1
make[2]: *** [security/smc/omap4] Error 2
make[1]: *** [security/smc] Error 2
make: *** [security] Error 2
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/kernel/android-2.6.35$
3) Patch
--- security/smc/omap4/bridge_pub2sec.S.orig 2011-05-25 20:24:21.649675315 +0800
+++ security/smc/omap4/bridge_pub2sec.S 2011-05-25 20:26:39.429877396 +0800
@@ -74,6 +74,7 @@
b label_smc
label_smc:
+ .arch_extension sec
INVALIDATE_BTB
dsb
dmb
4) Audio fixes for kernel
5) EHCI fixes for kernel
6) WLAN patches
7) patch for panda_defconfig
#!/bin/bash
# build kernel image
mkdir -p ./logs
#"mkimage" is located in your u-boot/tools/ directory.
export PATH=/opt/L27.12.1-P2/u-boot/tools:$PATH
#(required for rebuild only)
make ARCH=arm distclean
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CFLAGS="-march=armv7-a+sec" panda_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage 2>&1 |tee ./logs/kernel_make.out
# build kernel modules
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules 2>&1 |tee ./logs/kernel_modules.out
2) Error
CC security/smc/omap4/scxlnx_device_mshield.o
In file included from security/smc/omap4/scxlnx_util.h:29:0,
from security/smc/omap4/scxlnx_device_mshield.c:38:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
AS security/smc/omap4/bridge_pub2sec.o
security/smc/omap4/bridge_pub2sec.S: Assembler messages:
security/smc/omap4/bridge_pub2sec.S:95: Error: selected processor does not support ARM mode `smc #0'
make[3]: *** [security/smc/omap4/bridge_pub2sec.o] Error 1
make[2]: *** [security/smc/omap4] Error 2
make[1]: *** [security/smc] Error 2
make: *** [security] Error 2
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/kernel/android-2.6.35$
3) Patch
--- security/smc/omap4/bridge_pub2sec.S.orig 2011-05-25 20:24:21.649675315 +0800
+++ security/smc/omap4/bridge_pub2sec.S 2011-05-25 20:26:39.429877396 +0800
@@ -74,6 +74,7 @@
b label_smc
label_smc:
+ .arch_extension sec
INVALIDATE_BTB
dsb
dmb
cd ${YOUR_PATH}/L27.12.1-P2/kernel/android-2.6.35
git fetch http://review.omapzoom.org/p/kernel/omap refs/changes/01/13001/2 && git cherry-pick FETCH_HEAD
git fetch http://review.omapzoom.org/p/kernel/omap refs/changes/02/13002/2 && git cherry-pick FETCH_HEAD
cd ${YOUR_PATH}/L27.12.1-P2/kernel/android-2.6.35
git fetch http://review.omapzoom.org/p/kernel/omap refs/changes/17/13617/1 && git cherry-pick FETCH_HEAD
Apply the following patches to enable wlan
cd ${YOUR_PATH}/L27.12.1-P2/kernel/android-2.6.35
git fetch http://review.omapzoom.org/p/kernel/omap refs/changes/02/12002/2 && git cherry-pick FETCH_HEAD
git fetch http://review.omapzoom.org/p/kernel/omap refs/changes/03/12003/1 && git cherry-pick FETCH_HEAD7) patch for panda_defconfig
diff --git a/arch/arm/configs/panda_defconfig b/arch/arm/configs/panda_defconfig index 2adf851..9d574e1 100644 --- a/arch/arm/configs/panda_defconfig +++ b/arch/arm/configs/panda_defconfig @@ -290,7 +290,6 @@ CONFIG_OMAP_DM_TIMER=y # CONFIG_OMAP_PM_NONE is not set # CONFIG_OMAP_PM_NOOP is not set CONFIG_OMAP_PM=y -CONFIG_OMAP_HDMI_AUDIO_WA=y # # OMAP Board Type @@ -808,6 +807,7 @@ CONFIG_KERNEL_DEBUGGER_CORE=y # CONFIG_SENSORS_TSL2550 is not set # CONFIG_SENSORS_BH1780 is not set # CONFIG_SENSORS_AK8975 is not set +# CONFIG_TWL6040_VIB is not set # CONFIG_CDC_TCXO is not set # CONFIG_DS1682 is not set # CONFIG_TI_DAC7512 is not set @@ -830,7 +830,7 @@ CONFIG_UID_STAT=y # # Texas Instruments shared transport line discipline # -CONFIG_TI_ST=m +CONFIG_TI_ST=y CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -888,7 +888,8 @@ CONFIG_KS8851=y # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y # CONFIG_USB_HSO is not set # CONFIG_USB_IPHETH is not set # CONFIG_WAN is not set @@ -1275,7 +1276,7 @@ CONFIG_SSB_POSSIBLE=y # # CONFIG_SSB is not set CONFIG_MFD_SUPPORT=y -# CONFIG_MFD_CORE is not set +CONFIG_MFD_CORE=y # CONFIG_MFD_88PM860X is not set # CONFIG_MFD_SM501 is not set # CONFIG_MFD_ASIC3 is not set @@ -1291,7 +1292,7 @@ CONFIG_TWL4030_CORE=y CONFIG_TWL6030_PWM=y CONFIG_TWL6030_POWEROFF=y CONFIG_TWL6030_GPADC=y -# CONFIG_TWL6040_CODEC is not set +CONFIG_TWL6040_CODEC=y # CONFIG_MFD_TMIO is not set # CONFIG_MFD_T7L66XB is not set # CONFIG_MFD_TC6387XB is not set @@ -1368,7 +1369,6 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y CONFIG_VIDEO_IR_I2C=y # CONFIG_VIDEO_VIVI is not set CONFIG_VIDEO_OMAP2_VOUT=y -CONFIG_VIDEO_OMAP_GFX=m # CONFIG_VIDEO_SAA5246A is not set # CONFIG_VIDEO_SAA5249 is not set # CONFIG_SOC_CAMERA is not set @@ -1553,7 +1553,49 @@ CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_SOUND is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +CONFIG_SND_ARM=y +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +# CONFIG_SND_USB_AUDIO is not set +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +CONFIG_SND_SOC=y +CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_ABE_DSP=y +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_MCPDM=y +CONFIG_SND_OMAP_SOC_ABE=y +CONFIG_SND_OMAP_SOC_VXREC=y +CONFIG_SND_OMAP_SOC_OMAP4_PANDA=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_TWL6040=y +# CONFIG_SOUND_PRIME is not set CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HIDRAW is not set @@ -1633,7 +1675,8 @@ CONFIG_USB_OTG=y # USB Host Controller Drivers # # CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_EHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y # CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_ISP1760_HCD is not set
Build x-loader
1) Script used to build x-loader
#!/bin/bash
mkdir -p ./logs
make distclean
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CFLAGS="-Wa,-march=armv7-a+sec" omap4430panda_config
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- ift 2>&1 | tee ./logs/x-loader_make.out
2) Error
arm-none-linux-gnueabi-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -c -o smc.o /opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S
/opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S: Assembler messages:
/opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S:40: Error: selected processor does not support ARM mode `smc #0'
make[1]: *** [smc.o] Error 1
make[1]: Leaving directory `/opt/L27.12.1-P2/x-loader/cpu/omap4'
make: *** [cpu/omap4/libomap4.a] Error 2
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/x-loader$
3) Patches
--- x-loader/cpu/omap4/smc.S.orig 2011-05-25 20:06:00.188059813 +0800
+++ x-loader/cpu/omap4/smc.S 2011-05-25 20:04:02.757887581 +0800
@@ -29,6 +29,7 @@
* @arg: Argument passed to ROM api (input in r1 will move to r0)
*/
.globl omap_smc_rom
+.arch_extension sec
omap_smc_rom:
push {r4-r11,lr}
mov r12, r0
4) Build successfully
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/x-loader$ ls -la
總計 288
drwxr-xr-x 13 mingfeng mingfeng 4096 2011-05-25 20:09 .
drwxr-xr-x 6 mingfeng mingfeng 4096 2011-05-25 20:12 ..
-rw-r--r-- 1 mingfeng mingfeng 908 2011-05-17 23:43 arm_config.mk
drwxr-xr-x 10 mingfeng mingfeng 4096 2011-05-17 23:43 board
-rwxr-xr-x 1 mingfeng mingfeng 242 2011-05-25 20:09 build.sh
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 common
-rw-r--r-- 1 mingfeng mingfeng 5260 2011-05-17 23:43 config.mk
drwxr-xr-x 6 mingfeng mingfeng 4096 2011-05-17 23:43 cpu
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 disk
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 drivers
drwxr-xr-x 3 mingfeng mingfeng 4096 2011-05-17 23:43 fs
drwxr-xr-x 8 mingfeng mingfeng 4096 2011-05-17 23:43 .git
-rw-r--r-- 1 mingfeng mingfeng 520 2011-05-17 23:43 .gitignore
drwxr-xr-x 5 mingfeng mingfeng 4096 2011-05-25 20:08 include
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 lib
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-18 22:17 logs
-rw-r--r-- 1 mingfeng mingfeng 7529 2011-05-17 23:43 Makefile
-rwxr-xr-x 1 mingfeng mingfeng 1122 2011-05-17 23:43 mkconfig
-rw-r--r-- 1 mingfeng mingfeng 21920 2011-05-25 20:08 MLO
-rw-r--r-- 1 mingfeng mingfeng 3935 2011-05-17 23:43 README
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-17 23:43 scripts
-rwxr-xr-x 1 mingfeng mingfeng 9642 2011-05-25 20:08 signGP
-rw-r--r-- 1 mingfeng mingfeng 3279 2011-05-25 20:08 System.map
-rwxr-xr-x 1 mingfeng mingfeng 93779 2011-05-25 20:08 x-load
-rwxr-xr-x 1 mingfeng mingfeng 21400 2011-05-25 20:08 x-load.bin
-rw-r--r-- 1 mingfeng mingfeng 21920 2011-05-25 20:08 x-load.bin.ift
-rw-r--r-- 1 mingfeng mingfeng 29031 2011-05-25 20:08 x-load.map
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/x-loader$
#!/bin/bash
mkdir -p ./logs
make distclean
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CFLAGS="-Wa,-march=armv7-a+sec" omap4430panda_config
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- ift 2>&1 | tee ./logs/x-loader_make.out
2) Error
arm-none-linux-gnueabi-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -c -o smc.o /opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S
/opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S: Assembler messages:
/opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S:40: Error: selected processor does not support ARM mode `smc #0'
make[1]: *** [smc.o] Error 1
make[1]: Leaving directory `/opt/L27.12.1-P2/x-loader/cpu/omap4'
make: *** [cpu/omap4/libomap4.a] Error 2
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/x-loader$
3) Patches
--- x-loader/cpu/omap4/smc.S.orig 2011-05-25 20:06:00.188059813 +0800
+++ x-loader/cpu/omap4/smc.S 2011-05-25 20:04:02.757887581 +0800
@@ -29,6 +29,7 @@
* @arg: Argument passed to ROM api (input in r1 will move to r0)
*/
.globl omap_smc_rom
+.arch_extension sec
omap_smc_rom:
push {r4-r11,lr}
mov r12, r0
4) Build successfully
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/x-loader$ ls -la
總計 288
drwxr-xr-x 13 mingfeng mingfeng 4096 2011-05-25 20:09 .
drwxr-xr-x 6 mingfeng mingfeng 4096 2011-05-25 20:12 ..
-rw-r--r-- 1 mingfeng mingfeng 908 2011-05-17 23:43 arm_config.mk
drwxr-xr-x 10 mingfeng mingfeng 4096 2011-05-17 23:43 board
-rwxr-xr-x 1 mingfeng mingfeng 242 2011-05-25 20:09 build.sh
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 common
-rw-r--r-- 1 mingfeng mingfeng 5260 2011-05-17 23:43 config.mk
drwxr-xr-x 6 mingfeng mingfeng 4096 2011-05-17 23:43 cpu
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 disk
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 drivers
drwxr-xr-x 3 mingfeng mingfeng 4096 2011-05-17 23:43 fs
drwxr-xr-x 8 mingfeng mingfeng 4096 2011-05-17 23:43 .git
-rw-r--r-- 1 mingfeng mingfeng 520 2011-05-17 23:43 .gitignore
drwxr-xr-x 5 mingfeng mingfeng 4096 2011-05-25 20:08 include
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-25 20:08 lib
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-18 22:17 logs
-rw-r--r-- 1 mingfeng mingfeng 7529 2011-05-17 23:43 Makefile
-rwxr-xr-x 1 mingfeng mingfeng 1122 2011-05-17 23:43 mkconfig
-rw-r--r-- 1 mingfeng mingfeng 21920 2011-05-25 20:08 MLO
-rw-r--r-- 1 mingfeng mingfeng 3935 2011-05-17 23:43 README
drwxr-xr-x 2 mingfeng mingfeng 4096 2011-05-17 23:43 scripts
-rwxr-xr-x 1 mingfeng mingfeng 9642 2011-05-25 20:08 signGP
-rw-r--r-- 1 mingfeng mingfeng 3279 2011-05-25 20:08 System.map
-rwxr-xr-x 1 mingfeng mingfeng 93779 2011-05-25 20:08 x-load
-rwxr-xr-x 1 mingfeng mingfeng 21400 2011-05-25 20:08 x-load.bin
-rw-r--r-- 1 mingfeng mingfeng 21920 2011-05-25 20:08 x-load.bin.ift
-rw-r--r-- 1 mingfeng mingfeng 29031 2011-05-25 20:08 x-load.map
mingfeng@mingfeng-desktop:/opt/L27.12.1-P2/x-loader$
2011年5月18日 星期三
Building u-boot and x-loader
Pre-requisite packages for build Android Filesystem (Note this is with reference to uBuntu 8.04)
If you are behind firewall, you will have to set-up firewall using the instructions in Support Tools
For higher versions of U-buntu please refer to Host PC COnfiguration
The following commands will install the correct packages to your server:
If you are behind firewall, you will have to set-up firewall using the instructions in Support Tools
For higher versions of U-buntu please refer to Host PC COnfiguration
The following commands will install the correct packages to your server:
sudo apt-get install git-core flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev build-essential libstdc++5 tofrodos sudo apt-get install x-dev (*** no files existing ***) sudo apt-get install libx11-dev sudo apt-get install libncurses5-dev sudo apt-get install sun-java5-jdk (*** no files existing ***)If you do not have sudo rights to your machine, contact your System Administrator for assistance. Google has issued that “sun-java6-jdk” has become unsupported: “because of incompatibilities with @Override” To uninstall “sun-java6-jdk” please type:
sudo apt-get remove sun-java6-jdk“Intrepid (8.10) users may need a newer version of libreadline:
sudo apt-get install lib32readline5-dev”
1) script used to build u-boot:
#!/bin/bash make distclean mkdir -p ./logs make ARCH=arm omap4430panda_config make 2>&1 |tee ./logs/u-boot_make.out
2) script used to build x-loader:
#!/bin/bash mkdir -p ./logs make distclean make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4430panda_config make CROSS_COMPILE=arm-none-linux-gnueabi- ift 2>&1 |tee ./logs/x-loader_make.out
Finally, I built u-boot successfully, but there is an error when I
built the x-loader.
find . -type f \
\( -name 'core' -o -name '*.bak' -o -name '*~' \
-o -name '*.o' -o -name '*.a' \) -print \
| xargs rm -f
find . -type f \
\( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
-print \
| xargs rm -f
rm -f cpu/omap4/start.o *.bak tags TAGS
rm -fr *.*~
rm -f x-load x-load.map x-load.bin System.map x-load.bin.ift signGP MLO
rm -f include/asm/proc include/asm/arch
rm -f include/config.h include/config.mk
rm -f include/config.h include/config.mk
Configuring for omap4430panda board...
echo "/* Generarated file. Do not edit */" >./include/config.h
echo "#include <configs/omap4430panda.h>" >>./include/config.h
MPU at 1GHz revision..
arm-none-linux-gnueabi-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -c -o cpu/omap4/start.o /opt/L27.12.1-P2/x-loader/cpu/omap4/start.S
make -C `dirname board/omap4430panda/libomap4430panda.a`
make[1]: Entering directory `/opt/L27.12.1-P2/x-loader/board/omap4430panda'
arm-none-linux-gnueabi-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu omap4430panda.c | \
sed -e "s/\:/\\\:/g"|sed -e "s/\\\: /\: /g"> .depend
make[1]: Leaving directory `/opt/L27.12.1-P2/x-loader/board/omap4430panda'
make[1]: Entering directory `/opt/L27.12.1-P2/x-loader/board/omap4430panda'
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o omap4430panda.o omap4430panda.c
arm-none-linux-gnueabi-ar crv libomap4430panda.a omap4430panda.o
a - omap4430panda.o
make[1]: Leaving directory `/opt/L27.12.1-P2/x-loader/board/omap4430panda'
make -C `dirname cpu/omap4/libomap4.a`
make[1]: Entering directory `/opt/L27.12.1-P2/x-loader/cpu/omap4'
arm-none-linux-gnueabi-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu platform.S smc.S cpu.c mmc.c sys_info.c clock.c sdram.c syslib.c sdram_elpida.c | \
sed -e "s/\:/\\\:/g"|sed -e "s/\\\: /\: /g"> .depend
make[1]: Leaving directory `/opt/L27.12.1-P2/x-loader/cpu/omap4'
make[1]: Entering directory `/opt/L27.12.1-P2/x-loader/cpu/omap4'
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o cpu.o cpu.c
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o mmc.o mmc.c
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o sys_info.o sys_info.c
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o clock.o clock.c
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o sdram.o sdram.c
sdram.c: In function 'emif_config':
sdram.c:116:26: warning: variable 'rev' set but not used [-Wunused-but-set-variable]
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o syslib.o syslib.c
arm-none-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o sdram_elpida.o sdram_elpida.c
arm-none-linux-gnueabi-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -c -o platform.o /opt/L27.12.1-P2/x-loader/cpu/omap4/platform.S
arm-none-linux-gnueabi-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/opt/L27.12.1-P2/x-loader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/build/arm-none-linux-gnueabi-4.6.0/lib/gcc/arm-none-linux-gnueabi/4.6.0/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -c -o smc.o /opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S
/opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S: Assembler messages:
/opt/L27.12.1-P2/x-loader/cpu/omap4/smc.S:39: Error: selected processor does not support ARM mode `smc #0'2011年5月17日 星期二
Download Android/Linux kernel/U-Boot/X-loader source
Downloading Release Software
[Reference] http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes
Installing repo
For detail information regarding repo visit: Using Repo and GitOther reference links on Git can be found in Techincal References page
Download repo to environment
$ cd $YOUR_PATH/L27.12.1-P2/mydroid $ curl http://android.git.kernel.org/repo > ./repo $ chmod a+x repo
Download Android source
cd $YOUR_PATH/L27.12.1-P2/ cd $MYDROID repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b 27.x -m RLS27.12.1-P2_Gingerbread.xml repo syncAdding Mouse and Keyboard support
cd $MYDROID/frameworks/base git remote add rowboat git://gitorious.org/rowboat/frameworks-base.git git fetch rowboat git cherry-pick 17128d44ab04c5b7cb2911e8b1c9f837aa9b36a5 git cherry-pick 174cb50436065dc092114d69fb40d5a7712e3ca0Update PandaBoard device directory Update pandaboard device directory -- TODO: clean up and remove Blaze items
cd $MYDROID/device/ti/pandaboard git fetch http://review.omapzoom.org/p/device/ti/pandaboard refs/changes/89/13489/1 && git cherry-pick FETCH_HEAD
Kernel & Driver Source
To clone kernel source from scratch do:cd $YOUR_PATH/L27.12-P2/ git clone git://git.omapzoom.org/kernel/omap.git kernel/android-2.6.35 cd kernel/android-2.6.35 git checkout ec895072ad0b686d2c130e5d80a3076a03042033If you already have kernel source cloned then just update it (and add a remote if it is the first time):
cd $YOUR_PATH/L27.12-P2/kernel/android-2.6.35 git fetch origin git checkout ec895072ad0b686d2c130e5d80a3076a03042033
U-Boot Source
cd $YOUR_PATH/L27.12-P2/ git clone git://git.omapzoom.org/repo/u-boot.git u-boot cd u-boot git checkout 601ff71c8d46b5e90e13613974a16d10f2006bb3
X-loader Source
cd $YOUR_PATH/L27.12-P2/ git clone git://git.omapzoom.org/repo/x-loader.git x-loader cd x-loader git checkout c8855fa6b85bd44073bd1b25dbffa99f02cbeeed
2011年5月15日 星期日
Android Version Control with Repo and Git
Reference:
http://source.android.com/source/version-control.html
1) Download repo:
The basic pattern of interacting with the repositories is as follows:
http://source.android.com/source/version-control.html
1) Download repo:
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo$ set path to ~/bin/repo 2) Basic Workflow- Use
repo startto start a new topic branch.
- Edit the files.
- Use
git addto stage changes.
- Use
git committo commit changes.
- Use
repo uploadto upload changes to the review server.
GCC-4.6.0 build script for arm-none-eabi
#!/bin/bash
GCC_SRC=gcc-4.6.0
#HOST=i686-pc-linux-gnu
HOST=x86_64-linux-gnu
TARGET=arm-none-eabi
PREFIX=/opt/build/arm-none-eabi-${GCC_SRC}
DEFAULT_CPU=cortex-a9
cd /opt
mkdir -p build_binutils
cd build_binutils
../binutils-2.21/configure --build=${HOST} --host=${HOST} --target=${TARGET} --with-sysroot=${PREFIX}/${TARGET} --disable-nls --enable-install-libbfd --enable-interwork --with-v4bx-interworking --enable-lto --enable-multilib --enable-shared --enable-gmp --enable-mpfr --prefix=${PREFIX}
make all install
cd /opt
mkdir -p build_gcc
cd build_gcc
#mkdir -p mpfr
#cp ../${GCC_SRC}/gmp/gmp-impl.h mpfr/
#cp ../${GCC_SRC}/gmp/longlong.h mpfr/
../${GCC_SRC}/configure --build=${HOST} --host=${HOST} --target=${TARGET} --with-pkgversion='M.F. C/C++ Compiler Release 20110423' --disable-libssp --disable-nls --disable-libgomp --disable-threads --disable-tls --enable-lto --enable-multilib --enable-gmp --enable-mpfr --enable-cloog --enable-ppl --with-v4bx-interworking --enable-languages=c,c++ --enable-long-long --enable-c99 --enable-shared --with-float=hard --enable-cxx-flags=-mhard-float --with-cpu=${DEFAULT_CPU} --with-newlib --with-ld=${PREFIX}/bin/${TARGET}-ld --prefix=${PREFIX}
make all install
rm -rf build_binutils
rm -rf build_gcc
GCC_SRC=gcc-4.6.0
#HOST=i686-pc-linux-gnu
HOST=x86_64-linux-gnu
TARGET=arm-none-eabi
PREFIX=/opt/build/arm-none-eabi-${GCC_SRC}
DEFAULT_CPU=cortex-a9
cd /opt
mkdir -p build_binutils
cd build_binutils
../binutils-2.21/configure --build=${HOST} --host=${HOST} --target=${TARGET} --with-sysroot=${PREFIX}/${TARGET} --disable-nls --enable-install-libbfd --enable-interwork --with-v4bx-interworking --enable-lto --enable-multilib --enable-shared --enable-gmp --enable-mpfr --prefix=${PREFIX}
make all install
cd /opt
mkdir -p build_gcc
cd build_gcc
#mkdir -p mpfr
#cp ../${GCC_SRC}/gmp/gmp-impl.h mpfr/
#cp ../${GCC_SRC}/gmp/longlong.h mpfr/
../${GCC_SRC}/configure --build=${HOST} --host=${HOST} --target=${TARGET} --with-pkgversion='M.F. C/C++ Compiler Release 20110423' --disable-libssp --disable-nls --disable-libgomp --disable-threads --disable-tls --enable-lto --enable-multilib --enable-gmp --enable-mpfr --enable-cloog --enable-ppl --with-v4bx-interworking --enable-languages=c,c++ --enable-long-long --enable-c99 --enable-shared --with-float=hard --enable-cxx-flags=-mhard-float --with-cpu=${DEFAULT_CPU} --with-newlib --with-ld=${PREFIX}/bin/${TARGET}-ld --prefix=${PREFIX}
make all install
rm -rf build_binutils
rm -rf build_gcc
訂閱:
文章 (Atom)