yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] gazzaaa87:
When I run depmod -a I get the following (as I did when doing this process the first time):

WARNING: Couldn't open directory /lib/modules/2.6.29-01117-g4bc62c2: No such file or directory
FATAL: Could not open /lib/modules/2.6.29-01117-g4bc62c2/modules.dep.temp for writing: No such file or directory

Is it supposed to be that folder name that it uses? If not has anyone else had the same issue and did you find a reason/solution?

Thanks,

Dan
[Nexus One Android Development] gazzaaa87:
When editing the inittab file, you say to comment out getty, which I did as follows:

# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

I assume that is what you meant..? I am not using a serial cable.

-Dan
[Nexus One Android Development] Bombenbach:
Nevermind, our bcm4329 works fine now :D
[Nexus One Android Development] Austin021296:
Anyone know where i could find a video on how to boot this?
[Nexus One Android Development] gazzaaa87:
Perhaps you could post your solution in case anyone else has the same issue?
[Nexus One Android Development] Bombenbach:
Well, it's not really Nexus One specific, because you don't change the kernel and just load the bcm4329 driver from the original firmware.

The solution is that phh has updated the driver in his kernel branch

http://glemsom.anapnea.net/android/htc-msm-android/#

But that kernel is not for Nexus One anyway.
[Nexus One Android Development] gazzaaa87:
I also get the error 'cannot bind tcp:5037' when I run adbd and have re-run 'update-rc.d ssh defaults', which gives the following output:

update-rc.d: using dependency based boot sequencing
update-rc.d: warning: ssh stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)

Is that the output I should be getting? I think this is why adbd isn't working and therefore why adb can't see the phone after booting into Debian.

Any help much appreciated.

-Dan
[Nexus One Android Development] biggerbigboy:
Is it possible too boot meego or moblin ? Meego works on the Nokia n900
[Nexus One Android Development] joelinux:
n00b question...

I've been using linux for awhile, but I'm new to phone modding...

In step 6, you run "adb shell", then are asked to mount the sd card.

When I try in the adb shell, it tells me "operation not permitted"

It would appear that you need to root the phone. Am I correct in that assumption?

And if so, is there a basic how-to I could follow to make sure I don't screw that up too?

Thanks.
[Nexus One Android Development] gazzaaa87:
Yes

http://theunlockr.com/2010/01/02/how-to-root-the-nexus-one/

I have rooted, installed Debian but I can't get it to start up properly. Get up to where I am and then maybe you can see where I am going wrong based on my previous posts. I don't have much experience with Linux you see.

-Dan
[Nexus One Android Development] joelinux:
Two steps forward...

Ok, I unlocked the phone, and I put the "insecure shell" for ERD79 as found on the modaco.com website

Now, on step 6, when I try to "chroot", it says "command not found"

What am I missing?
[Nexus One Android Development] gazzaaa87:
As it says in the original post under requirements:

Download Busybox, install somewhere and then push chroot onto your phone somewhere. On the N1 I pushed to /system/bin. When you have done that take a look at my post on page 20 @ 7th April 2010, 02:12 PM

-Dan
[Nexus One Android Development] joelinux:
Ok, next issue...

I got the kernel, bcm4329 driver, bcm4329.ko driver, and chrooted into the phone, but now, I can't get it online in order to start downloading the packages.

the line I'm stuck on is "# apt-get install wpasupplicant wireless-tools udev ssh"

How are we supposed to get the phone online to get the packages? I suspect there might be an a step that is assumed, but I am not aware of.

Thanks,

Joe
[Nexus One Android Development] gazzaaa87:
The phone should be on during this process. Go to Settings -> Wireless... and connect to a wireless network. The phone will use that as the source of data.

-Dan
[Nexus One Android Development] St.Jimmy!:
Sorry if this has already been asked. I looked a bit through the post and couldn't easily find it.

I read the instructions and I'm concerned about 2 things:

1. You can only boot into debian vía fastboot ( => 2)

2. You're loading kernel via fastboot from your PC.

If I'm wrong please correct me. If I'm not, then there's no way of booting up debian without a computer. Is that true? I was thinking about (with a greater capacity SD card) putting the linux kernel into the sd card so I can boot debian whenever I wanted to. If I did that, could I boot it without a computer somehow?

Thanks.
[Nexus One Android Development] joelinux:
Compatibility

I'm surprised...I didn't think the TCP/IP stacks would be compatible between Android and Linux.

Hopefully there won't be any more bleedingly obvious problems.
[Nexus One Android Development] gazzaaa87:
I agree, it surprised me too.

If you do, check over my posts (page 19 onwards). It's likely I either had the same problem and fixed it or I am still unable to find a solution.

-Dan
[Nexus One Android Development] jairuncaloth:
This guide relies on a PC to boot debian. You could make a boot.img and flash it over your recovery or hell even your system partition if you wanted to, but that would be compromising normal android abilities.

At this point all we really need is someone who knows C to mod a recovery image to allow booting into debian from it.
[Nexus One Android Development] joelinux:
I got an idea...

What about making it a stock linux system? Use grub on these phones? LILO? Use it somewhat normally? I mean, they are really just miniature tablet PCs...it could conceivably be used like one.
[Nexus One Android Development] joelinux:
FINALLY...

I finally booted into linux (yay me!)

However, there is this annoying quirk: when logged in through adb, whenever I press the arrow key "up" or "down", even if I am in the middle of a text editor, it keep placing the previous shell commands wherever my cursor is at. I've had to be very creative in editing files (and it obviously worked...sort of.)

Anyone else have this problem?
[Nexus One Android Development] gazzaaa87:
As someone who is yet to get it working, would you mind looking through my posts to see if you notice anything I'm doing wrong? My first post is on page 19.

Any help much appreciated!
[Nexus One Android Development] St.Jimmy!:
Thanks for your reply!
[Nexus One Android Development] joelinux:
Certainly..

Sure...where are you currently stuck? It appears you have tried a bunch of stuff so far...where are you currently at?

Joe
[Nexus One Android Development] bobtentpeg:
Any news on that installer script?
[Nexus One Android Development] gazzaaa87:
Thanks. Ok so I've installed everything and I think it boots into Debian fine. My only issue is that I can't access the phone via ADB for some reason. I don't have a serial cable so can't follow the boot process.

Some of my comments in other posts are areas of the process where I have either guessed at the right way of doing it or questioned whether the return value from a command is what it should be.

Any ideas?
[Nexus One Android Development] neoobs:
did you make sure you added adbd to the right file? Maybe go back and edit /etc/rc.local and add /sbin/adbd & above the exit 0

also symlinnk bin/bash to system/bin/bash

I also have an issue further down. I can't run startxfce4, everytime I get the error xf86PciVideoInfo is not set the log is below

sh-3.2# startxfce4
/usr/bin/startxfce4: Starting X server

X: warning; process set to priority -1 instead of requested priority 0

X.Org X Server 1.4.2
Release Date: 11 June 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux Debian (xorg-server 2:1.4.2-10.lenny2)
Current Operating System: Linux Droid-Debain 2.6.29-droid-debian #11 PREEMPT Mon Feb 8 01:02:44 EST 2010 armv7l
Build Date: 11 June 2009 11:50:58AM

Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Apr 21 16:36:58 2010
(==) Using config file: "/etc/X11/xorg.conf"
xf86PciVideoInfo is not set
Could not get primary PCI info

Backtrace:
0: /usr/bin/X11/X(xf86SigHandler+0x70) [0x75f50]

Fatal server error:
Caught signal 11. Server aborting

waiting for X server to begin accepting connections
giving up.
xinit: Connection reset by peer (errno 104): unable to connect to X server
xinit: No such process (errno 3): Server error.
[Nexus One Android Development] joelinux:
I'd try...

Neoobs (Neo boobs?) brings up a good point. Try that, then tell me how you do.

Frankly, I got fed up with having to deal with debian, so I'm following the instructions loosely bit and trying to install gentoo. I figure the phone itself can compile any damn thing it wants, I don't have to deal with cross-compiling cr*p, and I know how to work it.

Once I'm done, I might tarball the whole deal, release it, and let all you people take a crack at it.
[Nexus One Android Development] St.Jimmy!:
I'm having trouble in this step:

I'm getting the following error when executing this command on adb shell:

If I try to create this directory manually I just keep getting a Read-only file system error. I haven't skipped any step and I haven't seen anyone have the same problem. What's wrong?
[Nexus One Android Development] bahkyp:
Worked for me.

Sorry wrong forum.

Michael
[Nexus One Android Development] St.Jimmy!:
Please can someone help me? I really want to get this working!

I'd appreciate absolutely any help.
[Nexus One Android Development] joelinux:
Did you follow all the rules? Did you execute the bootstrap the first time around?
[Nexus One Android Development] neoobs:
I noticed that this happened when I tried to get the squeeze version. I reverted to lenny and now it works fine.
[Nexus One Android Development] mcp2009:
im trying to use these steps on windows 7 but it doesn't seem like this guide is for windows is that right?
[Nexus One Android Development] jairuncaloth:
Correct, this guide was written for linux. Debootstrap is the main tool for getting debian installed on the SD card. As far as I know there isn't a windows version of this tool. Not saying that it would be impossible to do from windows, but since I have mostly quit using windows I'm not familiar with the tools required to make it work.

One possible avenue could be using the linux installer app from the market. I haven't had a chance to test the app out yet, but it would handle the part that debootstrap does.

Once you have debian on the SD card, it would be simply a matter of setting up the config files.
[Nexus One Android Development] jairuncaloth:
Sounds like the SD card isn't mounted at /data/local/mnt

or if it is, then there is nothing on it.
[Nexus One Android Development] jairuncaloth:
I'm getting this on squeeze now too :(

Looking closer shows that debootstrap didn't complete properly for me.

/debootstrap/debootstrap.log

I reformatted the SD card and re ran debootstrap. All is well now.
[Nexus One Android Development] nehctuk:
how are we doing

so have we gotten much further than when you first ported it or? good work just wondering :D
[Nexus One Android Development] joelinux:
.config

I could go for an updated kernel .config... ;)
[Nexus One Android Development] justntime:
ubuntu

Heya,

I had some success with this technique applied to Ubuntu (tried to get netbook-remix version running)

It booted into X on the first try, but lots doesn't work.. none of the inputs (buttons, touch screen) are recognized. Also I can't access the device with adb once Android is loaded.

Just made and uploaded a video: but xda-dev wont let me share the link until I'm verified.. hmm youtube : kV2NZT6RGPs

I used: sudo debootstrap --arch=armel --foreign --verbose --include=ubuntu-netbook lucid /media/rootfs

Also, I had some confusing using apt-get with the chroot.. it recognized when packages were already installed, but wasn't so great when trying to install new packages.

Thanks for the great tutorial, I would have never even made it this far before, and seeing the limited success in the first boot attempt gave me a sense that I had leveled up in the hacking world.. truth be told, I'm just getting better at following howtos :p
[Nexus One Android Development] Rafase282:
I have a question, can I use this kernel instead of the one provided with the guide? and a newer wifi module? I want to use this: kernel & wifi
[Nexus One Android Development] jairuncaloth:
Don't see why not. :)
[Nexus One Android Development] Rafase282:
Well so far I will have to follow the guide step by step without changing anything. It was all fine until i realized I booted to android with the kernel from my pc =[. Has anyone worked into make a recovery menu that will allow us to boot into debian without a pc?

Update: I started over and followed the steps and used the files from the guide. A few minutes and still waiting for it to boot off, still on the 4 color X symbol. It complained about a folder missing, it seems to be for the kernel my phone is using which is different from the one the guided used. I used a regular kernel on my first attempt, the on from the previous link and it booted to android not debian or a console for that matter. Can someone tell me what to do or use the kernel i tried and build it for this? I don't know how to build or configure a kernel for that matter. The linux install app works fine on my g1 but didnt work for my nexus one.
[Nexus One Android Development] joelinux:
One step forward, two steps back...

Ok, so, I compiled 2.6.32 from android.git.kernel.org/kernel/msm.git added the android-msm-2.6.32 branch, used the mahimahi_defconfig with the exception of the ext3 (not using it), ipv6 (also not using it), and vfp (was erroring out when trying to cross-compile).

It *will* boot, however, it reboots after ~60 seconds, and does not load the sdcard as a root partition.

This is the command I use to load it into memory:

./fastboot-linux -c "root=/dev/block/mmcblk0p3 rw rootfs=ext2 init=/sbin/init rootwait noinitrd" boot gentoo/msm/arch/arm/boot/zImage

(my root partition is on the 3rd partition on the sdcard)

Here are some choice quotes from /proc/last_kmsg:

[ 0.000000] Kernel command line: board_mahimahi.disable_uart3=0 board_mahimahi.usb_h2w_sw=0 board_mahimahi.disable_sdcard=0 diag.enabled=0 board_mahimahi.debug_uart=0 smisize=0 androidboot.baseband=4.02.02.14 androidboot.cid=GOOGL001 androidboot.carrier=GOOGLE androidboot.mid=PB9910000 androidboot.keycaps=qwerty androidboot.mode=normal androidboot.serialno=HT9CXP809540 androidboot.bootloader=0.33.0012 root=/dev/block/mmcblk0p3 rw rootfs=ext2 init=/sbin/init rootwait noinitrd

So it *is* getting the command line options, it is just choosing to ignore them for some reason, and loads a ramdisk anyway.

At the end, here is what happens right before it reboots:

[ 38.319519] binder: 281: binder_alloc_buf, no vma

[ 38.319549] binder: 154:154 transaction failed 29201, size 4-0

[ 38.319549] binder: send failed reply for transaction 2778 to 281:281

[ 38.685058] pcm_out: open

[ 38.685333] acdb: load 'default.acdb'

[ 38.685424] misc msm_audio_ctl: firmware: requesting default.acdb

[ 38.778106] init: untracked pid 316 exited

[ 38.778320] acdb: 588 bytes for device 607, rate 48000.

[ 43.723297] pcm_out: release

[ 45.026397] Kernel panic - not syncing: Attempted to kill init!

[ 45.026519] Rebooting in 5 seconds..

[ 50.008270] Restarting Linux version 2.6.32.9-27223-g248970b (jlcarnes@bunbun) (gcc version 4.3.4 (Gentoo 4.3.4 p1.1, pie-10.1.5) ) #3 PREEMPT Sat May 22 16:00:31 PDT 2010

Any help?
[Nexus One Android Development] Rafase282:
Can someone help me out? My phone wont boot to debian.
[Nexus One Android Development] twoboxen:
starting image

does anyone have a functional, configured debian rootfs image that could aid us newbs in quickly trying out debian on the N1?
[Nexus One Android Development] joelinux:
rootfs

Is your problem lack of wifi internet connection?

'cause pulling from the debian repository onto the sdcard worked for me. It puts down a viable rootfs.
[Nexus One Android Development] sonic74:
Because I suck at it, too :o I just tried to compile it on the Nexus One like I successfully did with the DisplayLink driver. But unfortunately the problem isn't the cross compiling, but the driver not fitting to the Nexus One kernel. That's a real pitty with Android, Google has a kernel tree, Codeaurora has one, the vendors another one :(

Bummer, would have been nice for mplayer and receiving digital terrestrial TV...

Btw., There's also an ALSA driver in the codeaurora tree that I don't get to work.
[Nexus One Android Development] jairuncaloth:
Yeah, I tried that too and ran into the same thing. We need a kernel hacker to port codeaurora's stuff over to the android kernel. Either that or make the codeaurora kernel work, which I have had zero success with. Half the time it fails to build, and when I do get it to build I can't get it to boot on the N1. I did put in a package request with debian to provide the x11 driver, but it hasn't been touched since I opened the request. I don't have a whole lot of hope for it.
[Nexus One Android Development] Rafase282:
Has anyone managed to update this whole thing? I'm not good at configuring and building kernels so is there an updated one we could use? the previous one here didnt work for me.
[Nexus One Android Development] jairuncaloth:
While working on the installer script I ran across a problem with the guide. Before you can chroot /data/local/mnt /debootstrap/debootstrap --second-stage you have to set a sane PATH.

I have update the guide to reflect this.

Also, installer script is coming along. I know it's been a while, but it's almost ready.
[Nexus One Android Development] Rafase282:
Im glad to hear that. I suppose it will be compatible with any custom room? most people are using froyo now.
[Nexus One Android Development] jairuncaloth:
Testing with CM 6 currently. Though any rom with busybox should be fine.
[Nexus One Android Development] Rafase282:
Well I use kang-o-rama froyo version. If you like I can test it also, I have a spare sdcard and can do a nandroid backup.
[Nexus One Android Development] jairuncaloth:
Cool, hopefully it will be ready for testing next week :)
[Nexus One Android Development] sdotk:
This is very cool but im confused the beginning of the how to has me scratching my head. What would i use to resize and format the sd card for ext2 (im using windows 7)? Where are you running the commands for debootstrap...from adb shell? :confused::confused::confused:
[Nexus One Android Development] Rafase282:
You need llinux installed to do this.
[Nexus One Android Development] jairuncaloth:
Yeah, I don't think win 7 has any support for Ext at this point. Technically you could use another FS like FAT but it's not generally recommended. If dual booting isn't an option for you, I would recommend using a linux live cd/usb.
[Nexus One Android Development] tordne:
Actually I made several new zImage's. The one coming from jairuncaloth only gives about 210Mb of memory, and I use the same as android ~400Mb. I'm still improving the kernel, and afterwards I'll give an updated version.

But I had a question, I included in the kernel V4L and the camera module from Samsung s5k3e2fx, but when I start up Linux I don't find video0 in dev.

Does somebody have a solution for this? Or any idea...

Also one little problem I have to solve, with the kernel from jairuncaloth Wifi worked, with this one he find the module, but he doesn't seem to find or connect to the AP.

I probably have the solution for this...

But now I want to know if somebody can confirm that fastboot has a Max size for the boot images.

Cause when I want to fastboot my new kernel he givesme an on-flash ramdisk error.

I had the same a few days ago.

If so we'll have to use a few more modules instead of only bcm4329.ko
[Nexus One Android Development] Rafase282:
I think kernels cannot be bigger than 5 mb, trying to get some back up on this
[Nexus One Android Development] jairuncaloth:
Nice. I've got a newer kernel build, but I forgot to build in support for a couple of things. The old image I put up was based on the android 2.6.29 kernel which didn't have highmem support in yet.

I honestly have no idea how big a kernel can be.
[Nexus One Android Development] tordne:
I started building the kernel from cyannogen mod. 2.6.34. The config file is a bit messed up since it couldn't compile your standard config. So I try to take the best from yours and android.

As far as I tried out I think the zImage can't be bigger than 2'400'000 cause everytime it got bigger it gave an on-flash ramdisk error.

Weird in the new kernels he makes eth0 he even has several KB of Tx and Rx but he doesn't get an IP address, iwconfig shows me eth0 everything seems fine except that it's not associated.

I still got to try a few more compiles and I've got to try to keep the zImage small
[Nexus One Android Development] tordne:
It seems that it doesn't matter how I compile this wireless driver, it just doesn't work. I was wondering if your wireless works with your new zImage and which kernel you used to build it.

I thought it was a good idea to use cyanogens kernel, but I'm running out of ideas.

I shrank my zImage to 2222020 bytes, I'm making a new one now trying again with v4l.

It just bothers me that I can't use SSH, adb shell is ridiculous, even for small things as using your arrow keys.

anyway....

If you have an idea about the /dev/video0 tell me
[Nexus One Android Development] jairuncaloth:
Are you pulling the wifi kernel module from the kernel you built or are you using a module you downloaded?

You can find the module at <kernelroot>/drivers/net/wireless/bcm4329/bcm4329.ko

after you build, where <kernelroot> is the base directory of the kernel source.

This is the one you want to push to your phone.

I have no idea about the v4l stuff at all.
[Nexus One Android Development] tordne:
Of course I took the one that I made with compiling the new kernel.

But does yours work and which kernel did you download?
[Nexus One Android Development] jairuncaloth:
The last one I was using was the android-2.6.29 kernel and it was working fine.
[Nexus One Android Development] tordne:
I made a mix between your config file and that of cyanogen, I took yours because it booted in debian and modified it with all the goodies from cyanogen, and leaving some things out what we don't need (as swordfish,...).

I tried about 100 times with the kernel from cyanogen, but as I said my wifi didn't connect. As I'm writing this I'm trying with the kernel 2.6.33.9 from android msm. Fingers crossed that it works, cause before he gave me an error on vfp.

Only thing I didn't include in my config is Bluetooth, just to keep the zImage smaller.

If it works (wifi,...) I'll send you a copy.

But we're gonna have to find a way to do it, I just use Lynx on my laptop, which doesn't support https and as far as I know android doesn't allow me to give attachments to my messages.
[Nexus One Android Development] tordne:
Mate...

I'm trying and trying, and still my wifi doesn't connect unless I use your zImage.

One question what did you do with rf switch subsystem support... cause when you don't include the rfkill_pm and rfkill_input he gives a compile errorand exits prematurely. Or you exclude RF switch subsystem support?

So for your new zImage you used the android-msm(-2.6.29( || -donut || -nexusone) || -2.6.32)

If I'm in debian and I do iwlist he finds all the different access point, so it works kind of.

I also installed wicd and again your zImage is the only one that connects.

I need a bit of advice on these few questions.