yashsingh1/xdaforums huggingface dataset:
[JASJAR, XDA Exec, MDA Pro General] domi007:
IMG size problems

Hi!

First of all IIZIIm: Thank you very much, your solution works very good, but

the qtopia installer makes a 100 MB big image file, and my debian image has an untarred size of 600MB. So, the installer fails (not enough space on the destination disk). How can I change the size of the image? Do I have to edit the installer Qtopia-linux.exe, that it schould create a bigger image? Or can I only increase the size of this half-ready image? If so, how?

Thank You for your help, I know, that I'm very near now.

DOMy
[JASJAR, XDA Exec, MDA Pro General] domi007:
News

Hi,

I have some news:

First, I tried to resize the img file-with success, but then the installer doesn't work anymore: it tries to boot from the empty 700MB big img file, and doesn't finish the unpack process.

Second, I've tried my img file, that I did from the tar.bz2, but it is also an unsuccess...

So, there must be something between the image, which i did, and the image, which has been done by the installer.

I have to edit the installer, so it should make a bigger partition, OR I have to make a good image (perhaps, I can follow the method of the installer on my desktop PC).

DOMy
[JASJAR, XDA Exec, MDA Pro General] domi007:
Please, someone can help me?

DOMy
[JASJAR, XDA Exec, MDA Pro General] domi007:
GOT IT!

Hi everybody,

Finally, I did it: the TitchyMobile (full-arm debian for HTCUniversal) runs now from an image file.

Here is the tutorial how I did it:

TUTORIAL: HOWTO Run A Linux From Image File, Which Requires A Partition with Ext2 FileSystem, Without Make Two Partitions On Your SD Card-Using Only The Native FAT32 System:

1. Download the rootfs archive from the distro, that you need (this is the file, that should be untarred on the ext2 partition of your SD card)

2. Boot up a Linux on your PC: You can either use a Virtual Machine/Native Installation, BUT we need hard disk space: the rootfs.tar.bz2 size+untarred size+the ready-to-boot image size-it should be so big as the untarred size, but if you want to install many programs, download files, etc. in Linux on your Uni, you can choose a bigger size

!ATTENTION!

If you want to use TitchyMobile, don't forget that there are some rootfs files (for example the shikomura-file), which requires an ext2 file system, because of special file permissions. If you have such an archive, please don't try to extract it to a FAT partition, because you will get errors. So, in that case you have to use an ext2 partition for everything you do.

3. log in as root in linux, and untar the archive to a folder, for example:

mkdir /root/rootfs
cd /root/rootfs
tar -xjf <your-rootfs.tar.bz2>

If you have your rootfs on an USB stick, don't forget to mount it

mkdir /mnt/usb
mount /dev/sdb1 /mnt/usb ->/dev/sdb1 is not always your USB, check it before you mount!

4. Now, you need and image file, do so:

dd if=/dev/zero of=rootfs.img bs=1k count=800000 (that command makes an img, with the size 800 MiB)

5. Make a file system on your image (i prefer ext2, but you can choose ext3 also):

mkfs.ext2 -c rootfs.img
y

6. Now, it's time to mount our image:

mkdir /mnt/image
mount -o loop rootfs.img /mnt/image

7. Copy all the files onto the image:

cp -av /root/rootfs/* /mnt/image/

You can have a break, (have a kitkat ;), and wait: it takes a little bit time.

8. Unmount your image

umount /mnt/image

9. And copy it to your SD card (or whatever you like):

mkdir /media/sd_card
mount /dev/sdc1 /media/sd_card ->/dev/sdc1: it is not always your sd card, check it before mounting!
cp /root/rootfs.img /media/sd_card

10. Now, if you want to boot it on your universal, you need a boot loader. You can get the Qtopia bootloader from here!.

11. Now copy the exe and the img file in the root of your SD card.

12. You must rename your image file, otherwise the bootloader cannot find it, so for qtopia bootloader, your image file should called qtopia.linux.img

13. You are now finished: hit the Qtopia-htcuniversal.exe, and enjoy your linux!

If you get some errors, ask for the solution here.

I know already 1 error message:

The installer says, that the filesystem should be checked, because it is very old (especially 4095 days old). After that check linux is unable to boot and restarts himself automatically.

Solution: hit the exe again, and it won't check the file system anymore, but it boots normally.

Thank you for your ideas, and for Google!

DOMy
[JASJAR, XDA Exec, MDA Pro General] goxboxlive:
Great work.
[JASJAR, XDA Exec, MDA Pro General] kitor:
Where can I find rootfs?
[JASJAR, XDA Exec, MDA Pro General] kitor:
Ok, last question won't exist. Now question about angstrorm x11/gpe rootfs:

what do i need to install to get wlan and audio working? I know that WiFi driver is unstable (tested it on titchy) but what's with audio?
[JASJAR, XDA Exec, MDA Pro General] wendenerp:
Audio worked, when i started opie i got sounds.
[JASJAR, XDA Exec, MDA Pro General] kitor:
Ok, i launched OPIE image and... no sound ;/ alsamixer says "function snd_ctl_open failse for default: No such device"
[JASJAR, XDA Exec, MDA Pro General] domi007:
Here is a normal, console-based rootfs:

http://wiki.neilandtheresa.co.uk/Titchy_Mobile/Installing_Debian

And here is one with icewm window-manager:

http://shiroikuma.com/uni/shiroikum...z2?PHPSESSID=1cfae2511c2f1c3ca9962cfea3003c7d

DOMy
[JASJAR, XDA Exec, MDA Pro General] kitor:
Ok, thanks :)
[JASJAR, XDA Exec, MDA Pro General] kitor:
Ok, I tested IceWM image and all is ok but... where is WiFi driver?
[JASJAR, XDA Exec, MDA Pro General] aes512:
modprobe acx
[JASJAR, XDA Exec, MDA Pro General] kitor:
it says nothing

ifup wlan0 says:

Error for wireless reqest "Set ESSID" (8B1A) :

Set failed on device wlan0 ; No such device

Internet Systrems Consorcium DHCP Client V3.1.0

(...)

SIOSDIFADDR: No such device

wlan0: ERROR while getting interface flags: No such device

wlan0: ERROR while getting interface flags: No such device

Bind socket to interface: No such device

Failde to bring up wlan0.
[JASJAR, XDA Exec, MDA Pro General] aes512:
acx.ko and htcuniversalacx.ko should both be in /lib/modules/2.6.21-hh20/kernel/drivers/net/wireless/acx/
[JASJAR, XDA Exec, MDA Pro General] kitor:
They are there...
[JASJAR, XDA Exec, MDA Pro General] kitor:
Ok, Wlan card in icewm image is wlan1, not wlan0 :) Now everything works :)
[JASJAR, XDA Exec, MDA Pro General] nontrivial:
Flashing Linux ROM?

I was wonder now that there are some viable Linux solutions for the Universal, if anybody was working on flashing it with a Linux based ROM. I upgraded my WM5 ROM to a WM6 ROM and it got me thinking about a Linux ROM. Has anybody putting together a WM ROM with a ext2 image and Haret or something?

James
[JASJAR, XDA Exec, MDA Pro General] datathief:
Reset the radio?

Does anyone here know if there's a way to reset the radio when it crashes (DEBUGMSG 99)? Which GPIOs to jiggle, etc.?
[JASJAR, XDA Exec, MDA Pro General] iruam:
what about android on universal?

I'm the onlyone thinkint about?
[JASJAR, XDA Exec, MDA Pro General] cr2:
Close the serial port, and reopen it. For GPIOs you can look at linux/kernel26/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
[JASJAR, XDA Exec, MDA Pro General] cr2:
Unless you are paid by google, there are more interesting (GPL) projects.
[JASJAR, XDA Exec, MDA Pro General] bratuadrian:
Can i get linux to work on my universal?

I am trying to install linux for almost 2 weeks and i cant get it to work...

please help me...
[JASJAR, XDA Exec, MDA Pro General] fgarpe:
Development stoped?

Hello,

Cr2, Is the development status stoped?

Thank you.
[JASJAR, XDA Exec, MDA Pro General] mickey_jaw:
Edit - ignore the below - was using a **** SD reader that kept corrupting the filesystem - all is well now

------------------------------------------------------------------------------------------------------

Hi, was wondering if anyone could help me with trying to get titch up and running?

I have previously setup & used Angstrom previously with few problems.

Today I tried to install/setup titchy according to the instructions on wiki.neilandtheresa.co.uk, by formatting a whole 1gb SD as ext2, using jidgdo-lite to build a rootfs, then untar the rootfs onto the card etc. Everything seems fine and my uni can mount the card and list the contents when i boot into a ramdisk-based console image, but when i try to boot titchy with the the kernel root= set to the sd card, the boot process stops right after the card is mounted - no errors, nothing.Last 2 lines on uni's screen are:

VFS: Mounted root (ext2 filesystem)

Freeing init memory: 96K

then it just stops!:confused:

seems to me the rootfs isn't being generated properly maybe? the /etc folder looks v. sparse, lacking all rc.* apart from rc.5.d - is this how it is supposed to look?

Thanks
[JASJAR, XDA Exec, MDA Pro General] domi007:
Hey Guys,

No, no and no!

The development isn't stopped, but it has became a slower process, cause the most important things are working now.

You should check this thread to get more information:

http://www.oesf.org/forum/index.php?showtopic=25666

Here is the link to the last page:

http://www.oesf.org/forum/index.php?showtopic=25666&st=555&start=555

DOMy
[JASJAR, XDA Exec, MDA Pro General] ALoGeNo:
Hi all you guys, the first thank you all for all you effort and work, the second sorry for my poor english.

I have runnig Debian (armel) in my HTC universal with the rootFS in a *.img file 800MB by the moment and is a little tiny (that will be more bigger, but i have no more space in the SD), that runs very faster and like if you are in a laptop or normal pc, we have some bugs and isues but this is working.

Anyones knows how turn on the backligth beyboard? please thank you all.

PD:"solved" that line turn on us keyboards ligth: echo 50 > /sys/class/leds/htcuniversal:kbdbac/brightness

tnx to BabelO from #htc-linux

HEY!! SPECIAL THANKS TO domi007 great work with the tuto :D

And VERY VERY VERY VERY MUCH thanks you ShiroiKuma.. without your blog i cant be doit!

regards. ;)
[JASJAR, XDA Exec, MDA Pro General] fire_z:
Problem Locating *.tar.gz2

I recently got a Uni and became interested in installing linux without any knowledge of it

I have succesfully installed Openmoko angd Qtopia in the device using the quick easy method without creating a linux file system

The thing was i want to try Opie and i read that to install it,one must bear with creating linux file system on the sd card,unmounting it and booting it with a installed cab file...

I have succesfully created a partition an
[JASJAR, XDA Exec, MDA Pro General] fire_z:
Problem Locating *.tar.gz2

I recently got a Uni and became interested in installing linux without any knowledge of it

I have succesfully installed Openmoko angd Qtopia in the device using the quick easy method without creating a linux file system

The thing was i want to try Opie and i read that to install it,one must bear with creating linux file system on the sd card,unmounting it and booting it with a installed cab file...

I have succesfully created a partition and the linux file system(vfat & ext3)

and followed the steps (from the how to site) and transferred the *.tar.gz2 file in the vfat portion (via card reader)

The i succesfully mounted the two partions

The problem was when im tried the command:

cp /mnt/vfat/"The *.tar.bz2 file" /mnt/ext3/

it replied: Unable to open file or directory (or something like this)

and tried other commands like the renaming command:

mv *.tar.tar *.tar.bz2

but still it replied: Unable to open file or directory

I have checked my syntax many times..it was right

Checked if the file was in the vfat portion....it was there

Checked if the file name im submitting is correct....yup

It seems it cannot locate the *.tar.bz2 file in the vfat and i dont know why

And im so stuck:(

Browsed and searched the thread for answers (so many eye-straining hours:eek:)but i still can't find a solution...

anyone has an idea? Pls. help...Thanks in Advance

And is there an easy installer for Opie like Qtopia and OpenMoko yet?

or other easy way to mount the file?

(by the way im running the latest official T-Mobile Rom wm5)

Ps.

Another minor concern is that i cant partition my 4gb micro sd (with adapter)

but dont have any problems making partitions

and linux file system with my 2gb ang 1gb cards..why is that?
[JASJAR, XDA Exec, MDA Pro General] ALoGeNo:
Fire_z, if you want can do the same process for install opie in image file, just do that..

Rename file opie*whatever.tar.bz2 to qtopia.linux.rootfs.tar.bz2

later, get the Qtopia-htcuniversal.exe and the OPIE image renamed and put both in root of memory card, run Qtopia-htcuniversal.exe, and it create the img file for you with opie.

If you have the openmoko-linux.exe rename te tar.bz2 to openmoko.linux.rootfs.tar.bz2 and do the same process

excused my poor english

Regards
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
Suspend on a 128MB Universal

Anyone using Linux on a Universal after a 128MB memory upgrade? I got the upgrade and Linux runs fine, however if you suspend, there is no way to bring the device out of suspend. I've seen some mention of what has to be modified, so that Linux can suspend under 128MB on the Universal, somewhere here on xda-developers, but can't find the reference.

Anyone knows how to fix this?
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
Suspend on a 128MB Universal

I've just found the reference in a post by cr2 in http://xdaforums.com/showpost.php?p=1613823&postcount=95

It reads:The only problem will pop up at resume, because the

HTC IPL sets the PXA memory controller as if there were 64MB RAM.

But it can be easily fixed by resetting them in the CPU resume function.

How can I do this?
[JASJAR, XDA Exec, MDA Pro General] cr2:
You should compare these with a 64MB device, and consult the PXA27x manual

about bit meanings.
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
Could someone please post the result of dump pxa27x here, as I don't have access to a 64MB Universal, so that I can compare the two outputs?

If you do not know how to log the dump of this command, I've posted easy instructions here: http://sumoudou.org/index.php?cmd=相...directly on the phone without a PC connection
[JASJAR, XDA Exec, MDA Pro General] scholbert:
Hi ShiroiKuma,

i know it's a bit of topic but maybe this maybe helpful too.

Also used haret for local debugging and just started a thread here:

http://xdaforums.com/showthread.php?t=428569

I really appreciate what you guys did, to make linux work nice on the universal.

Good luck for your further experiments!

scholbert
[JASJAR, XDA Exec, MDA Pro General] Batuss:
Full dump from 64mb Universal part 1
[JASJAR, XDA Exec, MDA Pro General] Batuss:
Full dump from 64mb Universal part 2
[JASJAR, XDA Exec, MDA Pro General] cr2:
Ok, so the only difference is a bit 1 set in MDCNFG

MDCNFG : 0x0ac80acb = 00001010 11001000 00001010 11001011
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
So that's the "SDRAM Enable for Partition 1" bit that is set in a 128MB Universal, and not set in a 64MB Universal.

I'm reviewing the kernel source, but haven't identified what needs to be modified to account for this difference as related to suspend/resume. What are the changes necessary? I'll go ahead and recompile the kernel then.
[JASJAR, XDA Exec, MDA Pro General] cr2:
The 64MB IPL sets

0x0ac80ac8|1

so you should set the bit1 somewhere very early in the cpu resume process.

The best solution would be to patch the IPL, but you really need to know what you are doing.

And a jtag adapter somwhere close :)
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
Isn't the problem rather / or also with suspend, as there is no resume after suspend when pressing the power on button. The device doesn't wake up at all...
[JASJAR, XDA Exec, MDA Pro General] cr2:
After you press the resume button, IPL code takes control over the phone and disables half of the SDRAM, which is certainly not what you'd like it to do.
[JASJAR, XDA Exec, MDA Pro General] scholbert:
Hi,

i once made a lot of investigation concerning jtag, G3 flashing, ipl function ... etc.

Have a look here:

http://xdaforums.com/showthread.php?t=353072&page=2

We started to disassemble IPL bootcode, it's easy to find the part where SDRAM controller get's initialized.

As far as i know the G3- and G4-flashes may only be programmed by the bootloader itself. By the way is there a driver for G3 already?

The problem is to rewrite the bootloader without getting a brick (obviously :rolleyes:).

You may use the disassembly files to find the right place to modify.

If you manage to flash the tweaked IPL, it's solved :p.

Regards,

scholbert
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
I think the risk of bricking the Universal by messing with the IPL is too high, unless one really knows what he's doing.

So it seems, patching the kernel to set the SDRAM 1 bit to on should be the way to go.
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
I think to fix the issue, it is nessesary to do in htcuniversal_pm.c

in

static void htcuniversal_pxa_ll_pm_resume(void)

some thing like:

MDCNFG |= MDCNFG_DE1;

( I took the defines out of pxa-regs.h )

Am I right?

Am I roughly right?

Am I completely wrong?

Greetings

Thorsten
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
I'll take a look at the source, try and compile, and I'll report...
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
It seems to be something along these lines, however this doesn't work, doesn't bring the Universal out of suspend.
[JASJAR, XDA Exec, MDA Pro General] cr2:
universal/docg3.c needs to be patched for 128MB size, maybe it will work then. There are some (very minor) differences to the IPL code, so it should

be possible to make it work (in non-DMA reading mode)

The SPL is capable of flashing IPL, but you need some brave soul to actually do it :) AFAIR the SPL does not modify the MDCNFG, but it'd be verified first.
[JASJAR, XDA Exec, MDA Pro General] cr2:
There is one possible problem here: this code may be located in SDRAM which you are setting up :)

IMHO, the really clean solution is to put the resume stub into PXA SRAM,

but IPL jumps to 0xa0040000 itself ...

...
mov r3, #0x48000000
ldr r2, [r3]
orr r2, r2, #1
str r2, [r3]
...
ldr r0, =0xa0040000
mov pc, r0
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
I might be wrong, but since the kernel is loaded first, I would expect it to be located at the beginning of the memory?

What do you mean in detail? How this can be done?

greetings

Thorsten
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
Furthermore, a problem slightly associated with this. I played with recompiling the Universal kernel yesterday, and even with no changes if you compile the kernel, it has suspend messed up in a way, that after suspend titchy-phone-daemon loses connection to the GSM network, which cannot be restored afterwards.

So am not even sure you can recompile a functioning kernel, that wouldn't mess the network connection up without some patch against the current CVS system.
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
I would think, the GSM sould not sleep at all, since it should wake up the phone, if a call comes in.... ?

greetings

Thorsten
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
And that's exactly the problem. If you just compile the kernel from source, even without any modifications. Then suspend, it loses connection to GSM, and therefore obviously doesn't wake up on a call, since a call doesn't reach it.

Don't know what causes it, but that's happens.
[JASJAR, XDA Exec, MDA Pro General] wendenerp:
Maybe this one is patched?

http://wiki.neilandtheresa.co.uk/Titchy_Linux/Source
[JASJAR, XDA Exec, MDA Pro General] cr2:
Yes, that is true.

The PXA27x CPU has 256K of built-in SRAM, which is preserved during suspend. Usually this SRAM is used for pxafb, but 256K is too little for vga16.

So it stays unused on the universal/linux.

Since IPL configures SDRAM, and jumps there directly, putting the resume code into SRAM does not make much sense...
[JASJAR, XDA Exec, MDA Pro General] cr2:
Is it a problem with the chained asic3 irq config, or the FFUART/ATCMD is powered down during suspend ?
[JASJAR, XDA Exec, MDA Pro General] cr2:
If you don't pull down the MSM6250 powerdown and reset gpios, it will be powered all the time. But it's just my guess, i don't have universal's schematics :)
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
So "stub in PXA SRAM" is no option?

Do you have further hints for us?

greetings

Thorsten
[JASJAR, XDA Exec, MDA Pro General] scholbert:
Not quite sure what you mean by "stub in PXA SRAM".

But this is what i know about IPL, SPL and stuff....

It's just like cr2 said, after resume the IPL is started directly from bottom of memory (don't know the interrupt service address right now).

At these adresses the G3- or G4-NAND memory is directly mapped.

Afterwards the IPL checks who was the caller and if SPL is already located in SDRAM, if this is the case it was a wake-up call ;)

I see no way to implement the PXA's SRAM in this procedure, even if linux is used.

You'll have to hack the IPL bootcode or at least change the PXA's bootmode to use it!

Hope this helps a bit more :o

scholbert
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
That was a quote out of cr2s earlier post, he suggested to put a stub for configuring the SDRAM into that memory. But as far as I understood, he thinks thats no good idea anymore...

Hmm, yes, that was purposed before, but I have some experience in kernel programming, but none with the IPL. And since it seems to work on WM it must be possible to solve it on OS level, I think.

On the other hand many people, including me, are afraid of bricking the device while patching the IPL.

greetings

Thorsten
[JASJAR, XDA Exec, MDA Pro General] ShiroiKuma:
It indeed works on the WM side. So either it must be possible to do it this way, or the properties of suspend are different on the Linux and WM side, meaning WM doesn't put it in such a deep sleep at all, i.e. shuts off the display etc.

Certainly resuming from Linux on the Uni takes significantly longer than "resuming" on the WM side, even if you just have the console up and nothing else...
[JASJAR, XDA Exec, MDA Pro General] cr2:
An ARM CPU starts at 0x0. AFAIK only the 8086-style CPUs jump to a

different address.

If the resume bit is set, then universal's IPL jumps to 0xa0040000.

Otherwise it loads the SPL from mDoC to SDRAM.
[JASJAR, XDA Exec, MDA Pro General] cr2:
I don't have a 128MB universal, so i can't try myself.

Currently the wakeup code does

/* jump to PSPR */
*addr_a0040000 = 0xe3a00101; // mov r0, #0x40000000
*addr_a0040004 = 0xe380060f; // orr r0, r0, #0x0f000000
*addr_a0040008 = 0xe3800008; // orr r0, r0, #8
*addr_a004000c = 0xe590f000; // ldr pc, [r0]

Try to add the MDCNFG modification here (in pure machine code)

I would have done it if we had a G3/G4 device driver (even readonly).

But before we may try it, it's a good idea to boot linux off the "update" SD card image

directly (without using haret and wince)
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
Me too..

That was my idea also, but why machine code? the machine code is only in the comments...

I thought the registers are memory mapped?

It is possible to boot linux without WM? isn't it needed for a proper GSM initialisation?

What do you mean with "G3/G4 device driver"?

greetings

Thorsten
[JASJAR, XDA Exec, MDA Pro General] 3eggert:
I think thats the suspend code, isn't it?

static void htcuniversal_pxa_ll_pm_suspend(unsigned long resume_addr)
{
save_a0040000 = *addr_a0040000;
save_a0040004 = *addr_a0040004;
save_a0040008 = *addr_a0040008;
save_a004000c = *addr_a004000c;

/* jump to PSPR */
*addr_a0040000 = 0xe3a00101; // mov r0, #0x40000000
*addr_a0040004 = 0xe380060f; // orr r0, r0, #0x0f000000
*addr_a0040008 = 0xe3800008; // orr r0, r0, #8
*addr_a004000c = 0xe590f000; // ldr pc, [r0]
}

static void htcuniversal_pxa_ll_pm_resume(void)
{
*addr_a0040000 = save_a0040000;
*addr_a0040004 = save_a0040004;
*addr_a0040008 = save_a0040008;
*addr_a004000c = save_a004000c;
}

Or do I have an outdated version?