[Q] - Epic 4G Android Development

I'm building some common gnu/linux console utilities for my Android phone but so far I have only been able to build them statically, with quite a size penalty. Can someone walk me through the steps or point me to a howto for dynamic compiles using arm shared libraries?
Here's the script(s) I'm using for configuration:
Code:
./configure --host=arm-none-linux-gnueabi \
CC="arm-none-linux-gnueabi-gcc" \
CROSS_COMPILE="arm-none-linux-gnueabi-" \
CFLAGS=" -static $_XXFLAGS" \
for shared:
Code:
./configure --host=arm-none-linux-gnueabi \
CC="arm-none-linux-gnueabi-gcc" \
CROSS_COMPILE="arm-none-linux-gnueabi-" \
--enable-shared=yes --enable-static=no
Do I need to make the libs on my android phone avaiable to my cross-compiler? Google isn't helping me here.

Bump. Anyone?

Never mind on this. I learned that using the cross-compiler supplied by Google is the way to go.

Related

Opera Mini 4.2 and Write user data...

Firstly, I'm using an AT&T Fuze, stock ROM and I'd like to keep it stock.
I installed the signed version of Opera Mini 4.2 and, under permissions, it doesn't allow me to change the permission for "Write user data" as well as "Read user data". I've looked through the forums trying to find a solution that doesn't involve flashing the device.
I took a look at the selector.utf file and here's what it looked like after I installed OM (I haven't uninstalled any of the stock apps as yet):
Code:
nextroot=9
suite=Brain Challenge 2 DEMO, \
icon=/i.png, \
vendor=Gameloft SA, \
root=s0_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Divertissement Gameloft\, CA, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210061499, \
drmProtected=N, \
drmRenewable=N
midlet=Brain Challenge 2 DEMO, \
icon=/i.png, \
class=GloftMBRC
suite=Bubble Bash DEMO, \
icon=/icon.png, \
vendor=Gameloft SA, \
root=s1_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Divertissement Gameloft\, CA, \
permissions=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210096643, \
drmProtected=N, \
drmRenewable=N
midlet=Bubble Bash DEMO, \
icon=/icon.png, \
class=GloftBUBA
suite=My-Cast 5 Weather, \
icon=16_app.png, \
vendor=Digital Cyclone\, Inc., \
root=s2_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Digital Cyclone Inc\, US, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210138627, \
drmProtected=N, \
drmRenewable=N
midlet=My-Cast 5 Weather, \
icon=16_app.png, \
class=phone.MyCastMidlet
suite=WikiMobile, \
icon=/allimages/icon15x15.png, \
vendor=BonfireMedia, \
root=s3_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Bonfire Media Inc.\, US, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210177708, \
drmProtected=N, \
drmRenewable=N
midlet=WikiMobile, \
icon=/allimages/icon15x15.png, \
class=wikimobileMidlet
suite=Billboard, \
icon=icon.png, \
vendor=Hands-On Mobile\, Inc., \
root=s4_, \
num=1, \
preinstalled=N, \
domain=cingular_trusted, \
removable=Y, \
rootCertHash=2qeXj3fAwOWA4ZcvYdmTmJrCoxM=, \
signingInfo=Hands-On Mobile Inc.\, US, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210474866, \
drmProtected=N, \
drmRenewable=N
midlet=Billboard, \
icon=icon.png, \
class=Billboard
suite=Opera Mini, \
icon=/i.png, \
vendor=Opera Software ASA, \
root=s8_, \
num=1, \
preinstalled=N, \
domain=trusted, \
removable=Y, \
rootCertHash=dCwxkuYH5CTrRUlUK+G7xT5hdOI=, \
signingInfo=Opera Software ASA\, NO, \
permissions=XDDDDDXXXXXXXDDXXXXXXXXXDDDDDX, \
fg_permissions=DDDDDDDD, \
install_time=1246652430205, \
drmProtected=N, \
drmRenewable=N
midlet=Opera Mini, \
icon=/i.png, \
class=Browser
Initially, I thought I could just copy the permissions from, say, Wikimobile to the OM permissions line, but this makes no difference, the options to read and write data are still unchangeable and locked to 'Never Allow.' I also don't know what the fg_permissions is for, but removing that makes none of my applets show up in the manager.
I forgot to mention, on my Tornado (using Intent's java), I can install the unsigned version and, tho I get annoying confirmation messages, am able to save and read data from the phone. Is the esmertec manager on the Fuze just kinda broken and useless? Why do some apps have permission and others don't?
In looking through the s8_suite.utf (the one associated with Opera Mini on my device) I see a section for permissions and even listings for javax.microedition.io.Connector.file.write and read. Seeing these permissions listed would suggest (to me) they should show up under the permission list...
Sadly, I don't know enough about hex editing to tweak it. I looked at the wikimobile .utf file and it doesn't look much like the Opera one (obviously)...
I hate to bump my own thread, but I'd really like to know if anyone has gotten this to work. I really like using Opera Mini over Mobile and terribly miss the ability to save pages/images with it.
I've read through the Midlet Bible post and found nothing helpful (short of installing a different midlet manager).

Simple HOWTO building some linux apps and libraries from scratch on android

This howto is only draft! Sometimes i went upgrade this, or make page on my site and post link on it. Also we have a project for automated building, like buildroot and opkg repository for android.
All needed configs in attached file. If you have error on unpack - just rename my.zip in my.tar.bz2 and try to unpack. Please correct me, if needed.
----------------------------------------------------------------------------------------------------------------------------------
All work will be in home directory (/home/xvilka)
create dir build
mkdir build
1. Download the kernel (for android on your version for device) and unpack
make headers_install ARCH=arm INSTALL_HDR_PATH=~/build/kern_h/
For some optimisations you need know, which proccessor (SoC) in your android-system(gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/ARM-Options.html#ARM-Options)
Im have Motorola Milestone - SoC = TI OMAP3430 - ARM Cortex a8 (arch - armv7a)
(en.wikipedia.org/wiki/ARM_architecture)
So, if you have OMAP3430-processor - use the config files with -omap3430 suffix
If you have Quallcomm MSM7200A (HTC Hero) - use the config files with -msm7200a suffix
First, we need to define _XXFLAGS, which contain some optimisation options for your compiler:
export _XXCFLAGS=" -mcpu=cortex-a8 -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3 -O3 -Os" (if you have Motorola Milestone/Droid or other device with TI OMAP3430)
export _XXCFLAGS=" -march=armv6j -mtune=arm1136jf-s -O3 -Os" (if you have HTC Hero or other device with Quallcomm MSM 7200A)
............................................................................................
If you don't know which chip you have in phone use _XXCFLAGS=" -O3 -Os"
2. Download crosstool-ng (ymorin.is-a-geek.org/dokuwiki/projects/crosstool),
unpack, build (you must have make,install,bash,cut,sed,grep,gcc,awk,bison,flex,automake,libtool,stat,
wget,cvs,patch,tar,gzip,bzip2,lzma,readlink,ncurses)
.configure
make
make install
3. Create directory toolchain-android, and copy config to this
XVilka-crosstool-<suffix>.config in .config
XVilka-uClibc-<suffix>.config in uClibc-0.9.30.2.config (or later version, if available)
and then run:
ct-ng menuconfig
you may change some options, if needed!
(Also use options from XXCFLAGS:
Target options -> Target optimizations ->
Architecture-level equal -march, use armv7-a
Emit assembly for CPU equal -mcpu, use cortex-a8
Tune for cpu equal -mtune, use cortex-a8
Use specific FPU equal -mfpu, use vfpv3
Floating point use hardware, because it built-in TI OMAP3430
Target CFLAGS - use -O3 -Os
) - for the Motorola Milestone/Droid
(Also use options from _XXCFLAGS:
Target options -> Target optimizations ->
Architecture-level equal -march, use armv6j
Emit assembly for CPU equal -mcpu, use nothing
Tune for cpu equal -mtune, use arm1136jf-s
Floating point use software
Target CFLAGS - use -O3 -Os
) - for the HTC Hero
Save in .config
In file uClibs-0.9.30.2.config
edit this strings:
{
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
# UCLIBC_HAS_SOFT_FLOAT=y
UCLIBC_EXTRA_CFLAGS=" -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=vfpv3 -O3 -Os"
} - for the Motorola Milestone/Droid
{
UCLIBC_HAS_FLOATS=y
#UCLIBC_HAS_FPU=y
UCLIBC_HAS_SOFT_FLOAT=y
UCLIBC_EXTRA_CFLAGS=" -march=armv6j -mtune=arm1136jf-s -O3 -Os"
} - for the HTC Hero
and then run
ct-ng build
4. Ok, done. We have installed cross - toolchain in directory build/x-tools.
And all programs in it with names arm-android-linux-uclibsgnueabi-*
For easy using add this directory in PATH:
PATH=~/build/x-tools/arm-android-linux-uclibcgnueabi/bin:$PATH
so we can run cross-gcc by the command:
arm-android-linux-uclibcgnueabi-gcc
Root directory of target system is:
~/build/x-tools/arm-android-linux-uclibcgnueabi/arm-android-linux-uclibcgnueabi/sys-root
But for the safe - make new root dir and copy files too.
Copy files in ~/build/cross/sys-root
chmod +w sys-root
chmod +w sys-root/usr
5. Building busybox (only static build, but if we have static busybox in any problems with system problems with libs
we can easy use busybox as repair-mode tool)
copy file XVilka-busybox-<suffix>.config in .config
make menuconfig
make ARCH=arm CC="arm-android-linux-uclibcgnueabi-gcc" CROSS_COMPILE="arm-android-linux-uclibcgnueabi-" \
CFLAGS=" -static $_XXFLAGS"
make install CONFIG_PREFIX=~/build/cross/sys-root
Copy ~/build/cross/sys-root/bin/busybox in /system/bin on device
chown root /system/bin/busybox
chmod 755 /system/bin/busybox
ln -s /system/bin/busybox /system/bin/ash
Or in other directory and you can install all programs included in busybox by the command:
busybox --install
7. Building simple but powerful text editor jupp (mirbsd.org/jupp.htm)
chmod +x configure
./configure --prefix=/system/local --disable-curses --disable-termcap --disable-termidx --host=arm-android-linux-uclibcgnueabi ARCH=arm \
CC="arm-android-linux-uclibcgnueabi-gcc" CROSS_COMPILE="arm-android-linux-uclibcgnueabi-" sysconfdir=/system/usr/local/etc sysconfjoesubdir=/joe \
CFLAGS=" -static $_XXFLAGS"
make
arm-android-linux-uclibcgnueabi-strip joe
On device:
copy joe in /system/bin
copy joerc in /system/usr/local/etc/joe
copy jupprc in /system/usr/local/etc/joe
copy jmacsrc in /system/usr/local/etc/joe
copy sintax files in /system/usr/local/etc/joe/syntax
chmod 755 /system/bin/joe
ln -s /system/bin/joe /system/bin/jupp
ln -s /system/bin/joe /system/bin/jmacs
chmod 644 /system/usr/local/etc/joe/joerc
chmod 644 /system/usr/local/etc/joe/jupprc
chmod 644 /system/usr/local/etc/joe/jmacsrc
before running joe we must define TERM
export TERM=ansi
8. How to use dinamic linking and shared libraries
(if we installed programs in local directory in sys-root,
so copy lib from local)
cd ~/build/cross/sys-root
tar -jcf lib.tar.bz2 lib/
And on device:
cd /system/usr/local
busybox tar -xcf /sdcard/lib.tar.bz2
For our programs, wich uses this non-standart library path we may create this script and run your programs by it:
#!/bin/sh
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
exec /usr/bin/local/some_program $*
9. Building libFLAC in shared library, which we can use easy and copy to /system/lib,
which have nothing in NEEDED - just kernel and you, also no any libc (bionic, or uClibc) not used.
Download latest version of libFLAC from the official site, unpack and cd to dir:
./autogen.sh --host=arm --target=arm-android-linux-uclibcgnueabi CC="arm-android-linux-uclibcgnueabi-gcc" \
CXX="arm-android-linux-uclibcgnueabi-g++" STRIP="arm-android-linux-uclibcgnueabi-strip" \
AR="arm-android-linux-uclibcgnueabi-ar" AS="arm-android-linux-uclibcgnueabi-as" LD="arm-android-linux-uclibcgnueabi-ld" \
RANLIB="arm-android-linux-uclibcgnueabi-ranlib" OBJDUMP="arm-android-linux-uclibcgnueabi-objdump" \
NM="arm-android-linux-uclibcgnueabi-nm" CROSS_COMPILE="arm-android-linux-uclibcgnueabi-" \
CFLAGS=" -nodefaultlibs -nostdlib -fPIC $_XXFLAGS" \
CXXFLAGS=" -nodefaultlibs -nostdlib -fPIC $_XXFLAGS" \
LDFLAGS=" -fPIC -static -s -L$HOME/build/cross/sys-root/usr/lib -lm -lc" --prefix="$HOME/build/cross/sys-root/usr" \
--disable-ogg --disable-oggtest --disable-rpath --disable-xmms-plugin --disable-cpplibs --disable-altivec \
--disable-3dnow --disable-thorough-tests --disable-doxygen-docs
cd src/libFLAC
make
cd .libs
arm-android-linux-uclibcgnueabi-ld -shared -s -o libFLAC.so -whole-archive libFLAC.a
And now we have shared library libFLAC.so, lybrary without any dependency, and which we can just copy in /system/lib
on device and use it from any program.
For programming on libFLAC you must see header files of libFLAC
10. Building xvid in shared library, without any dependecy, same as libFLAC.
cd src/build/generic
./configure --host=arm --target=arm-android-linux-uclibcgnueabi CC="arm-android-linux-uclibcgnueabi-gcc" \
CXX="arm-android-linux-uclibcgnueabi-g++" STRIP="arm-android-linux-uclibcgnueabi-strip" \
AR="arm-android-linux-uclibcgnueabi-ar" AS="arm-android-linux-uclibcgnueabi-as" \
LD="arm-android-linux-uclibcgnueabi-ld" RANLIB="arm-android-linux-uclibcgnueabi-ranlib" \
OBJDUMP="arm-android-linux-uclibcgnueabi-objdump" NM="arm-android-linux-uclibcgnueabi-nm" \
CROSS_COMPILE="arm-android-linux-uclibcgnueabi-" \
CFLAGS=" -nodefaultlibs -nostdlib -fPIC $_XXFLAGS" \
CXXFLAGS=" -nodefaultlibs -nostdlib -fPIC $_XXFLAGS" \
LDFLAGS=" -fPIC -static -s -L$HOME/build/cross/sys-root/usr/lib -lm -lc" --prefix="$HOME/build/cross/sys-root/usr"
cd =build
rm-android-linux-uclibcgnueabi-ld -shared -s -o libxvidcore.so -whole-archive libxvidcore.a
So we have libxvidcore.so, which using very-very simple and copy-only-use too.
11. Building nmap
svn co --username guest --password "" svn://svn.insecure.org/nmap/
cd nmap
./configure --host=arm-android-linux-uclibcgnueabi CC="arm-android-linux-uclibcgnueabi-gcc" \
CROSS_COMPILE="arm-android-linux-uclibcgnueabi-" CFLAGS=" -static $_XXFLAGS" \
CXXFLAGS=" -static $_XXFLAGS" \
--prefix="$HOME/build/cross/sys-root/system/usr/local" --with-lua=included --with-pcap=included --with-pcre=included --with-dnet=included
make
make install
12. Building dropbear
./configure --host=arm-android-linux-uclibcgnueabi CC="arm-android-linux-uclibcgnueabi-gcc" \
CROSS_COMPILE="arm-android-linux-uclibcgnueabi-" \
CFLAGS=" -static $_XXFLAGS" \
--prefix="$HOME/build/cross/sys-root/system/usr/local" --disable-zlib
make
make install
copy dbclient, dropbearconvert and dropbearkey in /system/bin
copy dropbear in /system/sbin
chown root on all copied files
chmod 755 on all copied files
Hi, I've been folowing your howto in order to build busybox but when I download the my.zip file I think it's corrupted or something because it's empty and I can't extract the config files. Could you check it please? Thanks in advance
the my.zip file is compressed strangely. I was able to open it using 7-zip then opened the "my" file in there and it showed a bunch of file within it. Can the op look into his archive and see about recompressing it in a more compliant format. It isn't a zip file.
EDIT: Actually forget it. When you download it replace the .zip with .tar.bz2 or you can just append it to the filename probably if the .zip part isn't showing for you. It's a bzip2 compressed tar archive.
shinji257 said:
the my.zip file is compressed strangely. I was able to open it using 7-zip then opened the "my" file in there and it showed a bunch of file within it. Can the op look into his archive and see about recompressing it in a more compliant format. It isn't a zip file.
EDIT: Actually forget it. When you download it replace the .zip with .tar.bz2 or you can just append it to the filename probably if the .zip part isn't showing for you. It's a bzip2 compressed tar archive.
Click to expand...
Click to collapse
worked like a charm. Thanks!!
I would like to thank you for this guide. With it (and a small alteration to my own busybox .config) I was able to build 1.18.5 and 1.19.0.git with network support working finally. The files are a bit bigger for my taste but I'll go back and see if I can get a dynamic build next.
The flash* items (flashcp, flash_lock, flash_unlock, flash_eraseall) will not build unless you get the mtd-utils package from the android repo.
EDIT: It will dynamic build but I came across a roadblock. The uClibc included on my phone already is 0.9.31 and the toolchain built 0.9.30.2 so I'm changing it up a bit... Should be fine though.
Dynamic link reduces from 1.7MB to ~1.0MB
Here is russian version of manual http://wiki.androidfan.ru/Сборка_c_нуля
Also there some updates too: https://www.droid-developers.org/wiki/Toolchain
Easy way to build jupp… if you’ve got Debian, that is.
XVilka said:
7. Building simple but powerful text editor jupp (mirbsd.org/jupp.htm)
Click to expand...
Click to collapse
Thank you very much for liking jupp and publishing him here!
If you’re running Debian on an ARM system, there’s an even easier way to get jupp.
• set up the system for building packages (or login to a Debian porterbox like harris.debian.org and switch into the “sid” chroot): install the build-essential package
• install debhelper and autotools-dev
• install dietlibc-dev (or libklibc-dev, but I tested with dietlibc-dev right now as I cannot install libklibc-dev on the porterbox by myself)
• go to packages.debian.org/source/sid/jupp and figure out the download link to the .dsc file
• download that with “dget”:
Code:
dget -d http://ftp.de.debian.org/debian/pool/main/j/jupp/jupp_3.1.23-1.dsc
(of course, adjust the link; this is the version up to date at the time of this writing)
• extract the package (adjust the name as usual):
Code:
dpkg-source -x jupp_3.1.23-1.dsc
• switch into the source directory:
Code:
cd jupp-3.1.23/
• run a compilation:
Code:
env DEB_BUILD_OPTIONS=diet fakeroot debian/rules binary
(or DEB_BUILD_OPTIONS=klibc)
Now you have in the directories ./debian/jupp/ and ./debian/joe-jupp/ the full build result. Test it by running
Code:
./debian/jupp/usr/bin/jupp
(you can press ^Kq, that is Ctrl-K followed by q, to exit it immediately; remember ^J (Ctrl-J) opens the help).
Now install the following files into their final locations:
• debian/jupp/etc/jupp/* to /etc/jupp/ (including subdirectories)
• debian/jupp/usr/bin/jupp to /usr/bin/jupp
• optionally, debian/joe-jupp/etc/jupp/ to /etc/jupp/ and the symlinks from debian/joe-jupp/usr/bin/ to /usr/bin/
Strictly speaking, for running “jupp”, no other file than the executable is needed, and that can be in any path. It includes a copy of jupprc in the executable, although without syntax highlighting.
If you have to change the paths, look at the file debian/rules (--prefix, --sysconfdir, --mandir although you don’t need the mandir) and debian/jupp.install and debian/joe-jupp.install (install paths) before compiling.
JOE finds the *rc files by looking into a path that is set at compile time (if --sysconfdir=/etc it looks into /etc/joe/ but debian/rules also sets sysconfjoesubdir=/jupp at make time, so it uses /etc/jupp/ instead), a file that’s the basename of the editor command plus “rc”, so /usr/bin/jfoo will let it load jfoorc. The klingon charmap and the syntax files are expected in subdirectories of where the configs (rc files) are.
Hope that helps!
If you want, I’m in the IRC channel #MirBSD and #!/bin/mksh on Freenode IRC network, and can help (but will assume you’re either running Debian/ARM or have your cross compiler set up correctly).

ATRIX™ 2 ME865 Kernal downloads Maybe useful

This may be of use to some devs here. but I came across a few links that may be old news or maybe not...
here are the files and source
RAZR XT910 Developer Edition 698 MB
RAZR-XT910-DE_01.6.5.1-167_SPU-15-M2-1-DE .zip
http://developer.motorola.com/products/software/
kernel_omap4.tar.gz
http://sourceforge.net/projects/me865.motorola/
http://sourceforge.net/projects/me865.motorola/files/ME865/5.5.1-1_GC-109/
PHP:
1. Create a workspace containing "vanilla" gingerbread release from Google. You may need to apply the following change in build repo to prevent the build from aborting when unexpected user tag is found on some modules:
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 3c11673..ecf611d 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -99,7 +99,7 @@ ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
$(warning * PRODUCT_PACKAGES section of)
$(warning * build/target/product/core.mk)
$(warning * )
- $(error user tag detected on new module - user tags are only supported on legacy modules)
+ $(warning user tag detected on new module - user tags are only supported on legacy modules)
endif
endif
2. Overlay Motorola-provided published repos on top of original Google versions.
3. Build user space components:
cd <workspace>
. build/envsetup.sh
lunch generic-user
make BOARD_HAVE_BLUETOOTH=true TARGET_BOARD_PLATFORM=omap4 <target>
Where is something like out/target/product/generic/system/bin/bluetoothd
4. Building kernel and kernel modules.
# set this to the top of your android workspace
my_top_dir=....
# set this to where you want kernel intermediates written to
kernel_out_dir=...
# cross compiler
cross=$my_top_dir/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make -j1 -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir \
KBUILD_DEFCONFIG=mapphone_defconfig \
defconfig modules_prepare
make -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir \
INSTALL_MOD_PATH=$kernel_out_dir \
modules 2>&1
make -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir \
INSTALL_MOD_PATH=$kernel_out_dir \
modules_install
make -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir zImage
make PREFIX=$kernel_out_dir CROSS=$cross CROSS_COMPILE=$cross \
PROCFAMILY=OMAP4430 PROJROOT= HOST_PLATFORM=sdc4430 \
KRNLSRC=$my_top_dir/kernel/omap4 KERNEL_DIR=$kernel_out_dir \
-C $my_top_dir/hardware/ti/wlan/wl1283/platforms/os/linux
# newly built module in $my_top_dir/hardware/ti/wlan/wl1283/platforms/os/linux/tiwlan_drv.ko
make PREFIX=$kernel_out_dir CROSS=$cross CROSS_COMPILE=$cross \
PROCFAMILY=OMAP4430 PROJROOT= HOST_PLATFORM=sdc4430 \
KRNLSRC=$my_top_dir/kernel/omap4 KERNEL_DIR=$kernel_out_dir \
-C $my_top_dir/hardware/ti/wlan/wl1283_softAP/platforms/os/linux
# newly built module in $my_top_dir/hardware/ti/wlan/wl1283_softAP/platforms/os/linux/tiap_drv.ko
make PREFIX=$kernel_out_dir CROSS=$cross CROSS_COMPILE=$cross \
PROCFAMILY=OMAP4430 PROJROOT= HOST_PLATFORM=sdc4430 \
KRNLSRC=$my_top_dir/kernel/omap4 KERNEL_DIR=$kernel_out_dir \
-C $my_top_dir/kernel/omap4 ARCH=arm \
O=$kernel_out_dir \
M=$my_top_dir/vendor/authentec/safenet/vpndriver modules
# newly built module in $my_top_dir/vendor/authentec/safenet/vpndriver/vpnclient.ko
5. Building lbl:
make -f motorola/external/lbl/Makefile all \
LBL_OUT=out/target/product/generic/obj/PARTITIONS/lbl_intermediates HOST_PREBUILT_TAG=linux-x86

Repacked boot.img with my compiled Poco M3 kernel won't boot

I compiled the Xiaomi poco M3 kernel from
https://github.com/MiCode/Xiaomi_Kernel_OpenSource
on branch
lime-q-oss
with commands
export ARCH=arm64 && export SUBARCH=arm64
export CROSS_COMPILE=/opt/aosp_prebuilts/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export DTC_EXT=
make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- vendor/citrus-perf_defconfig
make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- EXTRA_CFLAGS="-I $PWD/techpack/display/pll/ -I $PWD/techpack/camera/drivers/cam_sensor_module/cam_cci/ -I $PWD/techpack/camera/drivers/cam_req_mgr -DSDCARDFS_VERSION= -I $PWD/" -j$(nproc --all)
I unpacked the original boot.img from the official ROM from the xiaomi's website, which is the exact ROM I have on my phone:
unpackbootimg -i boot.img -o boot_img_unpacked
Then I repacked with the new kernel:
mkbootimg --kernel "$SCRIPT_DIR/devices/$DEVICE/kernel/k/arch/arm64/boot/Image" \
--ramdisk boot.img-ramdisk \
--dtb boot.img-dtb \
--cmdline "$(< boot.img-cmdline)" \
--base "$(< boot.img-base)" \
--kernel_offset "$(< boot.img-kernel_offset)" \
--ramdisk_offset "$(< boot.img-ramdisk_offset)" \
--tags_offset "$(< boot.img-tags_offset)" \
--dtb_offset "$(< boot.img-dtb_offset)" \
--os_version "$(< boot.img-os_version)" \
--os_patch_level "$(< boot.img-os_patch_level)" \
--pagesize "$(< boot.img-pagesize)" \
--header_version "$(< boot.img-header_version)" \
--hashtype "$(< boot.img-hashtype)" \
--board "$(< boot.img-board)" \
--ramdisk_offset "$(< boot.img-ramdisk_offset)" \
-o ../boot.img
then the phone won't boot. I repacked with the official kernel from boot.img just to see if my repacking method was working, and with the original kernel, it boots. So the problem is probably on the kernel.
Do I have to update some offset? Like, is the dtb offset the same in this kernel as in the official one? I don't know why the dtb offset since the dtb is also in the ramdisk. How do I know if the dtb is being picked from inside the kernel or from the ramdisk?
One thing to notice is that my phone is on Android 11, which uses 4.19.113 while my kernel is 4.19.95 (the latest available on xiaomi's website), which I think was meant for Android 10. However, I think I should at least boot, even if with an older kernel. At least see some error.
I tried fastboot oem enable uart but this option is not supported by the Poco M3, so I guess there's no way to debug over usb like in the Pixel phones. Is there any way to know what's happening? I found some methods for debugging but they all require a kernel that at least boots, but I don't even know if mine is booting. Maybe it is but can't start any graphics?
I made a docker container that facilitates downloading, hacking the kernel and etc: https://github.com/lucaszanella/and...tree/18fbd933094f8ad6e63e65b2795ce80c377f8dc6 so if anyone wants to try, I'd be really glad. I'm working on tutorials to bring more people to kernel hacking, that's why I bought the Poco M3.

[kvm][android][windows]does anyone run windows ok on Android based on qemu + kvm

I run linux ok based on qemu + kvm.I test many Linux distribution(ubuntu、rocky、anolios、opensuse),All of them run ok。
But when I run windows(I tried many different versions of window arm64 version),it will appear BOSD before enter installation UI,I'll appreciate it if anyone can help me
below is my command to start windows
taskset f /data/data/com.termux/files/usr/bin/qemu-system-aarch64 \
-M virt \
-vnc 127.0.0.1:1 -monitor vc \
-cpu host \
-enable-kvm \
-m 10G \
-bios QEMU_EFI.fd \
-device VGA \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-mouse \
-cdrom 22478.1000.211008-1414.RS_PRERELEASE_CLIENTMULTI_A64FRE_ZH-CN.ISO \
-device usb-storage,drive=drivers \
-drive if=none,id=drivers,readonly=on,file=Drivers.vhdx \
-device virtio-blk,drive=system \
-drive if=none,id=system,format=qcow2,file=win10.qcow2 \
-boot order=cd \
-serial stdio
Click to expand...
Click to collapse
below is my bsod
KVM (Kernel Virtual Machine) on Samsung Galaxy A6 (Exynos 7870)
I have an Galaxy A6 which has the Exynos 7870 CPU. I downloaded the kernel source from the Samsung source page, and when I typed make menuconfig it has the Virtualization option. So does that mean the CPU itself support KVM? Thanks! I just...
forum.xda-developers.com
my kernel version is 4.14.186+
my chip is MTK MT6891

Categories

Resources