yashsingh1/xdaforums huggingface dataset:
[JASJAR, XDA Exec, MDA Pro General] peteredworthy:
kernel kompile

hi,

could someone help spot what I'm doing wrong.

using arm linux v41 cross tool chain.

I've added /usr/local/arm/3.4.1/bin to the path

checked out the cvs src, done

make htcuniversal_defconfig

make

which produces vmlinux

copied vmlinux onto an sd card with harlet, an initrc and a text file containing

set KERNEL vmlinux

set MTYPE 855

set INITRD rd

set CMDLINE "root=/dev/ram0 init=/linuxrc ramdisk_size=14336 keepinitrd console=tty0 mem=63M"

boot2

run harlet, run the script. I get a blue bar and then it fills in red, but nothing else and I have to reset.

I think the mistake is in the make section as the kernel comes out at 2.7 meg.

thanks in advance
[JASJAR, XDA Exec, MDA Pro General] goxboxlive:
Re: kernel kompile

It's not the vmlinux you should look for, it's the zImage'.

It's located here after the compiling: 'your cvs'/arch/arm/boot/zImage

Copy it to your fat partiton and change your startup.txt ( or rename your zImage to vmlinux, your choice).
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Yes, thats right. You should use the zImage File.
[JASJAR, XDA Exec, MDA Pro General] peteredworthy:
thanks,

that looks more sensible, although I can't try it for a day or two as I'm out of country and doing all this through pocket putty on my home server, via the universal of cause :-)

update: i've downloaded an ftp prog in cab form and so have got to try it....

AND IT WORKS (insert happy dance here)
[JASJAR, XDA Exec, MDA Pro General] madkat:
'k peeps, where the heck am I going wrong?

On my SDCard, should I have one primary partition as Ext3, or should I have the entire disk as Ext3 (no partitions)?

fdisk, then mke2fs /dev/sda1

or

mke2fs /dev/sda

?

I assume root=/dev/mem0 is still correct?
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Make one ext3 partition as primary. The rest of the Files, you can store in your normal wince FS on your universal.

NO DON'T DO THAT!!!

Your new root is the partition you have created. You can get more details in the history of this thread.
[JASJAR, XDA Exec, MDA Pro General] madkat:
I spent a few hours messing with SDCards and partitions - to make the SDCard work again as FAT, I had to "mkdosfs -I /dev/sda" and the card now works fine in cameras & cardreader & Exec. "mke2fs /dev/sda" does ask if you're sure - and you can mount it and use it.

BTW, Knoppix is a pain in the rear. Good thing I've got at least a little experience with Linux and managed to get everything mounted as rw. Still had to use bash as root - and had hideous problems with *something* accessing the disk when I wanted to umount it.

I backtracked through the thread page by page, checking each page for the text "root=" and only found /dev/ram0 (sorry, previous is wrong) on page 12.

A 2nd search reveals that I should be able to partition the SDCard on the Universal itself as /dev/mmc/blk0/disc - so I assume that's what I need in my startup script as the root?
[JASJAR, XDA Exec, MDA Pro General] vve:
No, you should use the real partition name there, i.e. /dev/mmc/blk0/part1 if your EXT partition is first, /dev/mmc/blk0/part2 if it's second and so on.
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thankyou :-)
[JASJAR, XDA Exec, MDA Pro General] madkat:
Just a thought for making this end-user-able... (Distant future stuff!)

If the SDCard can be partitioned & formatted from the Universal, maybe this should be a preliminary stage in the Startup, so it goes something like:

Check SDCard for Ext2-3FS partition;
If SDCard Has Ext2-3FS
{
Use root=First Ext2-3FS;
goto continueboot;
}
else
{
Prompt User: "Format this card & set-up for Linux?";
If Yes
{
fdisk /dev/mmc/blk0/...;
mke2fs /dev/mmc/blk0/...;
mount /dev/mmc/blk0/...;
decompress stuff glued to the end of the kernel image;
unmount;
Use root=/dev/mmc/blk0/...;
goto continueboot;
}
else
{
Reset device;
}
}
continueboot:
...

The stuff glued to the end of the kernel should probably be very lightweight, but enable the user to copy additional packages to the device, like the 16Mb altered BlueAngel 'image' currently available, and unpack them.

So - instead of manually partitioning & formatting a disk, then copying a 16Mb OPIE 'image' to it, the user simply puts a 4-5Mb executable on their Universal with the Kernel & Glued-on data built in, and drag-drops the next piece to the new drive which appears on their PC/Mac (regardless of the host operating system)
[JASJAR, XDA Exec, MDA Pro General] madkat:
OK peeps, I'm going to have to ask how I can partition & format my SDCard using the Universal :-)
[JASJAR, XDA Exec, MDA Pro General] vve:
I've described the general steps above:http://xdaforums.com/viewtopic.php?p=253753#253753

Below are more details for step 3 (let's imagine you are going to have 2 partitions on your card - first one for wince, second for Linux):

a) fdisk /dev/mmc/blk0/disc

b) Create 2 partitions here ('n' command), say, 1st - 31M, 2nd - remaining space.

c) Change the type of 1st partition to FAT16 ('t' command, type=6)

d) Save the partition table ('w' command)

e) Make filesystem for wince: mkdosfs /dev/mmc/blk0/part1

f) Make filesystem for Linux: mke2fs /dev/mmc/blk0/part2

g) Reboot Universal

If you like to transfer some files to Linux partition:

h) In wince, copy files you need to 1st partition (Storage Card)

i) Boot Linux again

j) Prepare second mount point: mkdir /mnt1

k) Mount 1st partition: mount -t vfat /dev/mmc/blk0/part1 /mnt

l) Mount 2nd partition: mount /dev/mmc/blk0/part2 /mnt1

m) Copy files: cp /mnt/* /mnt1
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thankyou for your help :D

Actually I knew most of step 3 (but thankyou for putting it in such detail!), it's steps 1 & 2 that I need help with. Let me explain:

I have Haret, zi061203, default.txt

I don't know how to configure default.txt to boot the kernel without mounting a root. It seems to automatically look for /dev/mmc/blk0/something and then complains if there is no "root=" entry. "root=/dev/ram0" didn't work.

(The bit I have problems with is getting to a command prompt to run fdisk :-))
[JASJAR, XDA Exec, MDA Pro General] vve:
Milanvot's zi060312 kernel doesn't work without root partition on SD.

Try to use cr2's zi kernel instead.
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Do you have a ramdisk image "rd" also in place?
[JASJAR, XDA Exec, MDA Pro General] madkat:
Default.txt:

set KERNEL zi
set MTYPE 855
set INITRD rd
set CMDLINE "root=/dev/ram0 ramdisk_size=1024 init=/linuxrc console=tty0 mem=63M fbcon=rotate:1"
boot2

I know fbcon=rotate:1 will do nothing with this kernel - I'm leaving it there so I don't forget it!

Trying with zi from ftp://......./Universal/Linux (there is no /Uploads/Universal/Linux) I get:

TCP bind hash ......
TCP: Hash tables configured ......
NET: Registered protocol family 1
NET: Registered protocol family 17
platform_device_register asic3_mmc
mmc_rescan
mmcblk0: mmc0:cdef SD01G 994304KiB
/dev/mmc/blk0: p1 < p5 >
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[JASJAR, XDA Exec, MDA Pro General] vve:
First, why do you try to specify such a small ramdisk? The recommended value for "ramdisk_size" is 14336, as far as I remember.

I don't know what ftp server are you talking about but I recommend you to get a kernel and rd image here: http://jornada820.sourceforge.net/files/uni/ .
[JASJAR, XDA Exec, MDA Pro General] madkat:
The FTP I was referring to was (as I hoped you would naturally assume) ftp.xda-developers.com, since that's where the posts earlier in this thread say to get cr2's kernel from. Which is what you suggested.

I plan to update the Wiki when I've done all this - so that all the information is kept together and is understandable, so others don't need to wade through the whole thread or ask what may seem to be silly questions.

OK, so on the device I have:

gnuharet-200603042123.exe

default.txt

zi. (from jornada820.sourceforge.net)

rd. (from jornada820.sourceforge.net)

rd is ~5.25Mb, but is compressed, so ramdisk size is now set to 14336 to accomodate the decompressed data.

Everything starts up reasonably cleanly, and I have:

familiar login:

No keyboard. I cannot type. Therefore I cannot login.
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Why don't you read the hole thread again? Then, you don't need to reinvent the wheel!

We already have keyborad support. Ok, there are some minor problems with some keymappings. But, we have it.

Walk throw this thread step by step and you will get much more experience on this project.
[JASJAR, XDA Exec, MDA Pro General] madkat:
I think maybe you missed what I'm trying to do.

I simply want to login to a basic kernel which does not try to access the SDCard, so that I can partition & format the SDCard from the Universal itself. (Because Knoppix will not recognise my card reader, and using digital cameras as SDCard readers brings me only more problems!)

After I've partitioned & formatted the card, I can copy the OPIE "image" to the FAT partition, decompress it to the Ext2 partition and boot normally.

So, all I need right now is a kernel which:

DOES NOT try to use the SDCard

DOES have keyboard support

This combination of functionality is essential. I now have 3 kernels. 2 of these try to do something to the SDCard and complain because it has no Ext2 partition. The other has no keyboard support.
[JASJAR, XDA Exec, MDA Pro General] madkat:
Because I use manuals as references, not instructions. I am not interested in reading a story, I am interested in individual facts.

18+ pages are a lot to get through, and most of the information is irrelevant to my current aim: format & partition the SDCard. (FYI, the kernel I require should be in ftp.xda-developers.com/uploads/universal/linux but this folder does not exist)

Once I have formatted & partitioned the SDCard, I should be able to use the correct (latest) kernel.
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
In the old kernel from cr2, there is no Keyboard support. So you have to login over USBNet from your computer running linux.
[JASJAR, XDA Exec, MDA Pro General] madkat:
The zi.root from http://jornada820.sourceforge.net/files/uni/ also tries to mount root on the SDCard.

The zmag file from the same location gives an awesome light show on the screen, but that's all.
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
http://jornada820.sf.net/files/uni

Use this location as a source. Use the rd as Ramdisk, zi as Kernel and startup.txt as startupfile.

If you get to the login screen, connect over usbnet into your universal.

Maybe this kernel will only use the half of your screen.

[UPDATE]

You can also try this one http://www.kwik.cz/universal/
[JASJAR, XDA Exec, MDA Pro General] madkat:
So really, the card has never been partitioned and formatted from the Universal only.

OK - so if anyone has the same level of PC expertise as me... I've re-plugged the USB after booting with the zi & rd from http://jornada820.sourceforge.net/files/uni/ and the device has been recognised as an "RNDIS/Ethernet Gadget."

Going back to page 4 of this thread, there is a driver which won't install.

That's because this device is USB2\VID_0525&PID_a4a2 and the Belcarra driver recognises only USB2\VID_0525&PID_a4a1. Solution: Edit the .inf file!

All I did was find every instance of a4a1, copy the line and, in the new line, change the 1 to a 2. Now, it installs.

(It wants me to restart my PC... wish me luck...)
[JASJAR, XDA Exec, MDA Pro General] madkat:
OK, driver installed successfully against this device... but Windows says "This device cannot start. (Code 10)"

Gumstix-related .inf file found at http://www.davehylands.com/linux/gumstix/usbnet/ which relates to this PID & uses builtin Windows drivers.
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Use Linux
[JASJAR, XDA Exec, MDA Pro General] madkat:
Oh, of course. What a simple solution. Silly me. I'm amazed I didn't think of it earlier. :?

BTW, the driver does something but the kernel panics.

I'll try this with Knoppix tonight. Failing that, I'll try a Kubuntu Live CD.
[JASJAR, XDA Exec, MDA Pro General] madkat:
One question - because I can't find the answer in the rest of the thread - what address should I SSH to when I have the device plugged into a machine running Linux?! Is the address displayed on the screen of the device?
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
I have used 192.168.0.205 for my pcs usb0 device.

The Universal i can reach with 192.168.0.202
[JASJAR, XDA Exec, MDA Pro General] madkat:
thankyou :D
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Hello cr2,

are you on hollidays or only very busy at the moment. Would love to hear more about your progress.

Otherwise, have a great time :`)
[JASJAR, XDA Exec, MDA Pro General] madkat:
AAAARGH!!

OK, SSH'd into the Exec through Ubuntu, but no sign of /dev/mmc

also tried removing SDCard until the blue bar turned red
[JASJAR, XDA Exec, MDA Pro General] vve:
Sorry, this is incorrect. This kernel will refuse to load if you don't have a card inserted at all. At least, with a new card (with preformatted FAT partition on it) everyting works fine...

Here's my default.txt (tested just 5 minutes ago):

set KERNEL zi060312
set MTYPE 855
set INITRD rd
set CMDLINE "root=/dev/ram0 init=/linuxrc ramdisk_size=14336 keepinitrd console=tty0 mem=63M fbcon=rotate:1"
boot2
[JASJAR, XDA Exec, MDA Pro General] madkat:
I will try booting this kernel again! thanks for the info :-)

Aaaah cooool got it, just repartitioned & formatted the SDCard using the Universal on its own, without having to SSH. Very happy, thankyou! :D
[JASJAR, XDA Exec, MDA Pro General] madkat:
Extensive Linux-Free HowTo now in The Wiki Page
[JASJAR, XDA Exec, MDA Pro General] goxboxlive:
Great work Madkat, but i have some comment.

You doesn't have to aply the patch, in this Opie release Milanvot has allready aplied it.

With the 'tar' command also aply 'p'. This is because the 'p' will remain the owner of the files.

So the correct commando should be:

tar xjvpf 'where the file is' 'where you want the extracted files'
[JASJAR, XDA Exec, MDA Pro General] milanvot:
Perfect! :-)
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thanks =) Couldn't have done it without the valuable input from EotS & vve!

Just booted Linux with haret, kernel, script in the 31Mb FAT16 partition. So now Linux is entirely self-contained on an SDCard - I can take it out, put it in another Universal, and I have my own Linux.

BTW - can you clarify on the patch? Since it was put to the page after the main .tar.bz2 I assume it's a patch on top of that?
[JASJAR, XDA Exec, MDA Pro General] madkat:
There is an Edit button at the bottom of the page :P (Have asked Milanvot to clarify about the patch - see previous post)
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Hey Milanvot,

is there something new from your side?
[JASJAR, XDA Exec, MDA Pro General] milanvot:
The patch should be applied on top of the cr2's opie root image. The universal_rootfs_060312.tar.bz2 image has the patch already applied.
[JASJAR, XDA Exec, MDA Pro General] milanvot:
I was little bit busy the last few weeks. Now I'm trying to play with the wifi driver for Universal. But it's over my skills probably. We have to wait for cr2 to have the job done :-)
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Ok, i understand. Whats up with cr2? Don't see him online a long time.
[JASJAR, XDA Exec, MDA Pro General] peteredworthy:
opie/linux from sd card

Thanks Madkat,

The howto has helped me get opie booting on my universal so I can start playing with my kernel in ernest.

Yep, I've updated the page with the sugestions from the list and my experiance running through the howto.
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Re: opie/linux from sd card

Thanks, I saw your work in the wiki changelog
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thanks :-)

So next time someone says "I can't make it work" or "How can I partition & format my SDCard?" we just point them to the Wiki... which, of course, can be updated when things change. Saves re-reading old news :-)

FWIW I used a particularly "unclean" SDCard which had been repartitioned & reformatted & screwed up many times - it actually had a Win95 Extended Partition on it (and nothing more) before I used it for this - so the presence of /dev/mmc/blk0 is enough.
[JASJAR, XDA Exec, MDA Pro General] madkat:
General Linux question here...

Is the PIM data standard? That is to say, if I copied my entire addressbook & calendar into the default PIM tools in OPIE, then loaded a new set of PIM tools, would I still be able to access the same data? Could I copy the data onto a desktop machine and use it in other apps, for example email?
[JASJAR, XDA Exec, MDA Pro General] EyeOfTheStorm:
Hi,

i am not realy sure. Maybe you can find your answers on the OPIE website.

http://opie.handhelds.org/cgi-bin/moin.cgi/OpieAddressbook

On the screenshots, i can see "import vCard" and "export vCard" ... this is a stand, that also Outlook and Win Mobile supports.
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thanks, I took a quick look into it and it seems Linux has no centralised standardised PIM store, but rather many independant non-standards :cry: although KDE are working on Platform-Independant tools 8) here
[JASJAR, XDA Exec, MDA Pro General] peteredworthy:
PIM

LDAP is a standard method to share pim type information across an orginisation. It could also be used for just one person though, as it is used in large companies there is lots of support under nearly all environments, windows, linux, palm, opie (via multisync) etc...

MultiSync also supports a number of other PIM programes for syncing.

http://multisync.sourceforge.net/news.php
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thanks! So if I have an organisation of, say, 60 users, and they each run their own preference of distro & environment, they will most likely each have the capability of connecting to an LDAP source?

What about calendars & tasks?
[JASJAR, XDA Exec, MDA Pro General] peteredworthy:
Yep

iCal seems to be the standard for cross-patform calendars.

I don't know of anything for tasks, I use email like a task list.
[JASJAR, XDA Exec, MDA Pro General] madkat:
Thankyou :-)

I had a look at the stuff for LDAP and couldn't tell just how much it could deal with. It looks like OPIE supports the same stuff as Windows Mobile for both Contacts and Calendar - which is really the extent to which I'm looking for synchronisation (some people use the more obscure fields, like Spouse, Children, Assistant, Dog's Father's Mate's Bloodtype...)
[JASJAR, XDA Exec, MDA Pro General] cr2:
I was at a conference in Vienna this week. Now i need to relax :)
[JASJAR, XDA Exec, MDA Pro General] cr2:
A really great piece of work! I have some minor comments:

1. ext2 vs. ext3 ; mke2fs vs. mke2fs -j

2. We need to compile 3 zimages: "standalone", "installation" and the "root on sd".

3. The latest haret does not need the MTYPE setting,

because it autodetects the known (registered) MTYPEs

4. Make a standalone bootloader, where the zimage and/or ramdisk are linked as wince "resources". This one will

not need the "default.txt" at all.
[JASJAR, XDA Exec, MDA Pro General] cr2:
It is not a "recommended" value :) You should put the _actual_

decompressed ramdisk size in K here (or more, but not much more), otherwise

bad things will happen.
[JASJAR, XDA Exec, MDA Pro General] goxboxlive:
It's good to see you back Cr2. I was afraid that M$ had locked you in a basement or sent you to a lost place or something to prevent another Linux port.

Looking forward to see some progress in the CVS tree.
[JASJAR, XDA Exec, MDA Pro General] madkat:
This becomes clear if you read my various bits & pieces :-) (and know what's what)

Thanks =) Various bits lifted from various posts on this forum, then added to.

This is why I used "mount -t ext2"

I decided to stick with ext2 for any speed & diskspace advantage it may give.

I imagine "standalone" may be akin to a "live CD"? Would it therefore also mount the SDCard's FAT16 for file storage & volatile user data? An install util could be added to Standalone which generates the root-on-CD data.

OK =)

Very easy way to do this: A simple "Run Linux" stub, at the end of which you attach the files and a file index. The stub can have the base load-and-run functionality from HaRET, but can be used for launching the "root-on-SD" or "standalone" or "installation" configurations. However, this does require that you have three copies of the kernel which is nearly 1Mb and makes experimentation & upgrade more difficult.

It may be better to have either a launcher which lists the names of the (pre-written) config files and asks which to execute (allowing for very quick & simple extras)

On the other hand, if the Standalone also caters for Install, it could simply be entirely managed by a single stub executable which gets changed by code running in Linux.
[JASJAR, XDA Exec, MDA Pro General] cr2:
I have already added some test code to haret.

It only needs its own dialog and a push button.

HRSRC zim=FindResource(hInst, (const WCHAR*)1001, RT_RCDATA);
int zimsiz=SizeofResource(NULL,zim);

void *kernel2= (void *)LoadResource(NULL,zim);

if (kernel2)
Output(L"RCDATA=0x%8.8x siz=%d",kernel2,zimsiz);
else
Output(L"kernel2 RCDATA load failed");

1001 RCDATA "zi"
[JASJAR, XDA Exec, MDA Pro General] Jackar:
Hi guys.

I just wanted to drop a line that I really admire you for your hard work and enthusiasm. You`re doing it for free, in your free time and that`s the most important. And that`s why the community will love you forever :)

Anyway, I would like to ask you a little stupid question (for you). As this is a Linux port, will it be able to run all Linux programs that can run on normal PC ? ( I`m not very familiar with Linux, I`m using it very sporadicaly in work, but I`d like to try it as many ppl say it`s much more better then Windows... )

So, do generic Lin apps run on your port ? Thx a lot and keep up your good work ;).
[JASJAR, XDA Exec, MDA Pro General] RyanZA:
Any linux program that you have the source for (or someone with the source can compile an ARM version of). In general, this is around 95% of linux programs. :D
[JASJAR, XDA Exec, MDA Pro General] madkat:
That's debatable, I think. IMO people who say it's much better than Windows should probably give Windows another look, since it has changed rather a lot in the past 10 years. But at the end of the day it depends on what you want to do with your PC, and some people really enjoy getting their hands dirty. I guess it's the difference between having a lawn and a flower bed: The lawn is always there, you just have to trim it occasionally. The flower bed looks really nice, but there's plenty of things you can't do on it and you have to tend to it in much more detail.

My personal opinion is that Windows is the clear winner on the desktop, and many previous Linux users I know have been switching over. However, I think Linux will be a viable and strong competitor to Windows Mobile if it's given enough attention while simultaneously being made easy to use & configure.
[JASJAR, XDA Exec, MDA Pro General] cr2:
We should separate windows and linux as an OS and as a "complete" system.

windows ce as an operating

system is an ultimate piece of ****.

With the crap like DRM you will have hard time doing

anything useful without paying for "one click", "double click", etc. Real Soon Now.

Once we will overcome the barrier of entry given by

zero hardware documentation, there is no reason why

linux applications should be visually less attractive than the windows apps.

It is possible to partially port wine and run the

native wince apps on linux, but i prefer people

writing and running native linux apps.

With the m$ per unit license fees Linux will win also

on the economical merits, even Motorola understands

that.