/srv/irclogs.ubuntu.com/2009/03/20/#ubuntu-arm.txt

=== Guest74361 is now known as Martyn
d1bhi i'm trying to work out what arm v i have and if it is supported by ubuntu.05:08
d1bwhat's the best way to work it out05:09
Martynwell05:14
MartynWhat hardware are you running?05:14
MartynIf you know that, you're halfway there.05:15
Martynports has an entire tree compiled for v5, and that runs on just about everything05:15
d1bdamn he left06:31
d1bits an arm906:32
loold1b: You'll need to provide your kernel, but you can use the userspace apps06:45
d1blool: oh ? won't i hit problems ?06:55
loold1b: problems can never happen06:58
d1bits running debian lenny atm. not sure what optimisations / compile options are vs ubuntus (armel) (+ its running a 2.6.28.8 kernel)06:58
loold1b: lenny is armv4t, jaunty is armv5t07:16
ogralool, my initramfs fis partition is called "initramfs" indeed :)09:38
loologra: Could you try the new version of the script I pushed to p.u.c?10:07
loolIt should fallback on "initramfs"10:07
=== mcasadevall is now known as NCommander
ograbug #32816712:36
ubot4Launchpad bug 328167 in gnome-keyring "gnome-keyring-daemon eating 100% CPU at login in Jaunty" [High,Triaged] https://launchpad.net/bugs/32816712:36
=== Guest74361 is now known as Martyn
Martynmorning14:21
Martynogra : Awake?14:43
loolMartyn: found the ramdisk issue this morning15:00
loolkernel config was too small15:01
ogralool, so i create an image with dd15:03
ograrun fdisk on it15:03
ograDisk ./imx51-armel.img: 0 MB, 0 bytes15:04
ograthats what i get from "p"15:04
ograthough the image is 800M full of zeroes15:04
loologra: Can you create an empty disk label on it though?15:04
loologra: "o"15:04
ograYou must set cylinders.15:05
ograYou can do this from the extra functions menu.15:05
ograWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)15:05
ograoh, wait15:05
loologra: it works for me15:05
ograyeah15:05
ograBuilding a new DOS disklabel with disk identifier 0xfbc883b415:05
looldd if=/dev/zero of=hda.img bs=1024 count=1024015:05
loolfdisk -l ./hda.img15:05
ograi looked to far down15:05
loolDisque ./hda.img: 0 Mo, 0 octets15:05
lool255 têtes, 63 secteurs/piste, 0 cylindres15:05
loolUnités = cylindres de 16065 * 512 = 8225280 octets15:05
ogra<lool> Disque ./hda.img: 0 Mo, 0 octets15:06
ogra<lool> 255 têtes, 63 secteurs/piste, 0 cylindres15:06
loolthat's ok15:06
ograwell, i somehow need to compute the free space at the beginning15:06
loologra: You will miss the total cyl count but you can compute it15:06
loolIt's always going to be 255/63 anyway15:06
ograright15:07
ograbut fdisk doesnt know the total size15:07
loologra: Ups, even when setting the cylinder in the advanced settings, it wasn't picked up15:08
loolThat's a problem15:08
ograright15:09
ograi wanted to use kpartx since thats been recommended by the server team15:09
ograbut that requires loop devices15:09
ograand i dont want to run as root15:09
ograso cant mount loop15:09
ografdisk would likely work as well with loop and offsets15:10
loologra: So no choice but parted I think15:10
ograi did that before15:10
loolYes, I think fdisk on loop would work15:10
loolIt's how I built my image actually15:10
loolAnd I used kpartx for the parts15:10
ograright, but i want to get around using root15:12
loologra: understood which is why I say parted15:12
loolalbeit I can't figure whether it requires root or not15:13
ograyeah15:13
ograwell, gparted does (works fine btw)15:13
ogranot sure about parted15:13
loologra: it works here15:13
loolparted  ./hda.img  mklabel msdos15:13
loolsome warnings, but seems ok15:13
loolparted  ./hda.img  print15:14
loolDisque /home/lool/fdisk/hda.img : 103MB15:14
loolTaille des secteurs (logique/physique) : 512o/512o15:14
loolTable de partitions : msdos15:14
ograyep15:14
loolYou want parted -s all the time15:14
lool-m is nice too, but hard to read :)15:15
ograDisk identifier: 0x000e11c215:15
ogra            Device Boot      Start         End      Blocks   Id  System15:15
ogra./imx51-armel.img1             321       12800      798720    b  W95 FAT3215:15
loolthen do some mkpart15:15
ograok, gparted works for partitioning, but formatting fails15:15
loolyou don't need that, do you?15:15
ograi suspect i'll see the same with parted15:16
ograsure i do15:16
loolWhy so?15:16
ograi need to copy the livefs content to the partition15:16
loologra: Hmm I see; I guess you just need to copy the recipe for usb keys from cdimage15:16
ograso preferably i want a vfat partion so that i can mcopy from one image to another15:16
ograno, the usb keys dont use partitioning15:17
loolYes15:17
loologra: they use a vfat partition15:17
ograwell, not more than a single partition15:17
loologra: You can tell parted to create a part without fs, that's mkpart above15:17
ograaccessing the second partition is the prob15:17
loolJust compute its offset?15:18
ogracreating partitions is easy15:18
ograanyway, let me poke a bit15:18
loologra: you could also try parted 'cp'15:18
ograif parted could see the second partition15:19
ograwhich i doubt it can for a non block device15:20
* ogra goes to play with it15:20
loolI don't think cp will help15:21
loolIt can't read from non-partitioned devices15:21
loolor files15:21
ograok, that looks good15:33
Martyngood morning all15:35
amitkmorning15:35
MartynOgra, lool, did you manage to find out what fs'es are supported/supportable in Redboot?15:36
ogranope15:36
* ogra is working on general image creation atm15:36
MartynOkay.15:36
ograsigh, and parted needs a size for the partition ending15:37
MartynI had some strange lockups last night, running the -11 kernel you made15:37
Martynno friendly oops'es either, the board just locks up and even trying to break in with sysreq doesn't do diddly.15:37
loolMartyn: in theory perhaps e2fs, but we lack time to look into this for this cycle, it needs redboot expertise and someone looking into that should start by forward porting to latest redboot IMO15:37
ograso now how do i create the redboot part15:39
loologra: With type non-FS data15:42
loologra: size of your choice to hold all we need15:42
loolFor instance 32 M15:43
ograno, fond something better :)15:43
ografis init actually works fine15:43
loolI don't think there's any assumption on the end of it; redboot will just create default partitions for rb, fis dir, and perhaps kernel by default15:43
amitkogra: i'll probably leave 'early' today. Let me know on irc if the increased RAMDISK size solves your problem.15:43
ograno, you have to giove size in bytes15:43
ograamitk, i had no problem15:44
ograwe just discovered its limited15:44
loologra: I'm saying 32M as a guidance15:44
ogralool, well, my spare space is 20M atm15:44
loologra: you'll use something better for what?  non-FS data?15:44
loologra: spare on what?15:45
ografor fis init i gave 10M15:45
ograspare space on the image15:45
ograthe first partition starts at 20M15:45
ograthe space before that is yet empty15:45
ografis -s 10000000 -d ./imx51-armel.img init should then create a ~10M fis setup where i can copy redboot in15:46
loolI thought you were asking about the msdos partition size15:46
ograno15:46
loolI would use round hexa numbers in fis values15:46
loolBecause flash data needs to be aligned on flash boundaries15:46
ograi'm just playing atm15:46
loolSo we might run into problems if you don't make that a multiple of 0x2000015:46
ograand the fis help says it needs to be the value in bytes15:47
loolIt takes hex in the other places15:47
ograif it works as i think it does, the only open is fconfig15:47
ogra  -s size      specify size of directory in bytes15:47
lool        size = str_to_int_maybe_hex(argv[i]);15:47
loolSo it takes hex15:47
loolSee, source beats --help  :-P15:48
ograbah15:48
loolI think it's "in bytes" by opposition to "sectors"; it didn't say "in decimal"15:48
ogralike in offset you mean15:48
loologra: for fconfig, just copy static data from you SD for now15:48
ograwell, first i need to see if what i expect actually does what i expect15:49
loologra: there are two approaches, either you prepare the redboot stuff in its file, then use the size of this file as a basis to create the msdos part; or you create the msdos part and create the fis straight into that15:50
loolBut then you need an offset15:50
ogra/ Parse a string containing a number.  If it starts with 0x, parse the rest as hex.15:50
ogra/ !!! NOTE: also parses octal constants that start with '0' !!!15:50
ograstatic unsigned int str_to_int_maybe_hex(const char* s)15:50
ograbtw :)15:50
loolYeah?15:50
ograit only converts if needed, else it will assume bytes15:50
ograin dec15:51
loolWell, yes, that's kind of obvious15:51
ograah, damned15:53
ografis wipes the partition table in the image15:54
ograso i need to do the fis stuff before using parted15:55
loologra: it does not15:56
loologra: It's because you didn't use an offset...15:56
ograi dont use an offset when creating SD cards with the fsl tool either15:56
looloffset is 0x4000015:56
loologra: Different tools?15:57
ogranot really, since the same thing is happening15:57
ograyou have to create the partition after dd'ing the babbage_init.bin15:57
ograelse the same happens15:57
ograjust forgot about it15:57
loolYes, but for different reasons15:58
loolbabbage_init.bin contains a partition table15:58
loolanyway, just pass correct offset and size and it will work, even on the resulting SD image15:58
Martynbesides, the partition table is wholly in the first sector15:59
ogra0xA00000 for 10M, right ?15:59
loolA00000 yes15:59
MartynIn fact, you -should- reserve the first 63 bytes15:59
Martyner, 32 bytes15:59
loolThe network driver in 2.6.28 is really a pain16:01
loollocal scp: linux-image-2.6.28-11-imx51_2.6.28-11.36_arme  27% 2208KB   5.5KB/s - stalled -16:01
ograyeah, use a USB NIC16:02
ogradoesnt your CB come with one ?16:02
loolIt does, good idea16:04
ograhrm, but looking at my SD redboot starts at 0x00000000 with a lenght of 0x0004000016:05
ograhow do i still keep my part table with that ?16:05
loologra: it's lying16:07
loologra: it starts at 0x40016:07
ograah, k16:07
loologra: Note that "fis init" + romupdate from redboot might give you a redboot on 0x0 which doesn't boot16:08
loolNever tried it, but I wouldn't be surprized16:08
ograwell, i dont have a redboot yet16:09
ograonly an empty fis table16:09
loologra: I'm just commenting on how we reached the point where the fis list says 0x0 for redboot offset16:09
ograyup16:09
loolI think it correctly reflects 0x400 with images created with the fsl tool, but not after fis init16:10
ogradd if=<redboot.bin> of=<image> bs=1024 seek=1 should now get me a booting image, right ?16:13
loolYes, I think that's correct16:15
loolmake sure you use the non-padded redboot16:16
loolit's also best if you fis create redboot16:16
loolwith -c that .bin16:16
loolto reserve the space and make fis list happy16:16
ogrado you know the offsets/sizes from the top of your head ?16:16
loolRedBoot           0x00000000  0x00000000  0x00040000  0x0000000016:17
loolFIS directory     0x00080000  0x00080000  0x0001F000  0x0000000016:17
loolRedBoot config    0x0009F000  0x0009F000  0x00001000  0x0000000016:17
ogra-o 0x400 ?16:17
loolcareful it's not -o for the fis offset; only for the fis dir16:17
ograoh, right16:17
loole.g. for the kernel I'm using:16:17
loolsudo "$FIS" -d "$SD_DEV" -o $FIS_OFFSET -s $FIS_SIZE create kernel -f 0x00060000 -l 0x00400000 -e 0x00100000 -r 0x00100000 -c "$KERNEL_IMG"16:17
lool0x00060000 is the offset of the kernel in flash16:18
loolSo you want 0x400 for redboot offset (-f) and 0x4000 for fis dir offset (-o)16:18
loolThe first three should remain constant16:18
ograi really think i like dd more :P16:19
ograi dont see the FSL tool do anything to the fis tables16:20
loolusb 2-1.3: new high speed USB device using fsl-ehci and address 516:20
lool> I don't get any module loaded16:21
loologra: You need *both* dd and fis16:21
ogralool, oh, old kernel i guess16:21
loolWell from yesterday yes16:21
ogramcasadevall, is our redboot unpadded in the binary ?16:21
loolI guess I'll take the SD card out and update the kernel manually, sigh  :-(16:21
mcasadevallogra, its unpadded, but I can dd if= it16:22
ograno, thats what i want, thanks16:22
ograi want my script to wget and dpkg -x our package16:22
lool[42949379.640000] RAMDISK: Compressed image found at block 016:34
lool[42949380.210000] RAMDISK: incomplete write (-28 != 32768) 838860816:34
ograah, good16:35
ograamitk, ^^^16:35
loolBTW that's with exec -s 0x00800000 -r 0x1000000 -c "console=ttymxc0,115200 root=/dev/mmcblk0p2 rootdelay=2 initrd=0x91000000,8M mem=200M@0x90000000 ro debug"16:38
amitkhmm16:38
amitkso much for leaving 'early'16:39
loolalso failed with exec -s 0x00600000 -r 0x1000000 -c "console=ttymxc0,115200 root=/dev/mm16:40
loolcblk0p2 rootdelay=2 initrd=0x91000000,6M mem=200M@0x90000000 ro debug"16:40
loolProbably it's an unpack sized issue16:40
loolSame command without initrd and mem doesn't work either16:42
loolI see the USB interface with the new kernel, but it doesn't manage to DHCP16:45
amitklool: that is an asix chip, right?16:45
loolamitk: What the RAM?16:49
lool 512 MB mDDR 4 banks (each bank is 128 MB)16:50
loolMicron MT46H64M16LFCK-6LIT16:50
loolHynix H5MS1G62MFP-J3M16:50
amitklool: no, your usb interface16:50
loolOh, I don't know; it's the one I had with CB; it's a SMC16:51
loolamitk: yes, asix is loaded16:51
loolamitk: Ok, it was my bad: I was setting the mac address and that doesn't work16:53
loolWithout setting it it works16:53
loolI tried padding to 0xff to no luck; I thought that would have worked  :-/17:08
ograhmm, dd if=<redboot.bin> of=<image> bs=1024 seek=1 trashes my part table17:11
ogramcasadevall, are you 100% positive our redboot is unpadded ?17:12
mcasadevallogra,I didn't pad it, but the build system might have17:12
loolsudo dd if=mx51_babbage_redboot-no-padding.bin of="$SD_DEV" bs="1024" seek=117:13
loolthat worked for me17:13
loolWith the 2.6.28 redboot from the wiki page17:13
ograright17:14
ograi suspect ours is padded17:14
loologra: it seems so indeed17:15
lool00003e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................17:16
lool00003f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................17:16
lool0000400: 2806 f0af b100 0000 0000 0000 1404 f0af  (...............17:16
lool0000410: 0000 0000 1c04 f0af 0000 f0af e919 72b1  ..............r.17:16
ogrameh17:16
loolit clearly starts at 0x400; albeit I don't see why there are a couple of bytes at the beginning isntead of zeroes17:16
loologra: Just skip=1 as well17:16
looldd if=<redboot.bin> of=<image> bs=1024 seek=1 skip=117:16
ograyep. trying17:17
ogranope17:18
ograpartition table is gone17:18
ograours is also quite big compared to FSLs17:18
ogra-rw-r--r-- 1 ogra ogra 161688 2009-01-23 20:54 /home/ogra/Desktop/arm/babbage/mx51_babbage_redboot.bin17:19
ograeven with padding theirs is smaller17:19
ogra-rwxr-xr-x 1 ogra ogra 172844 2009-03-20 18:14 redboot.bin17:19
loolpartition table *can't* be gone if you're skipping over it17:19
loolAre you speaking of the fis directory or the msdos table?17:19
ograits trashed at least17:19
ogramsdos table17:19
loolwith seek=1 it shouldn't be, it's in the first 1k17:20
ograyeah, thats strange17:20
* ogra wonders if the order matters, probably i should run fis init afterwards17:21
loolHMm17:22
ograhmm, now i end up with 18M17:22
loolNo, fis init only overwrites the directory17:23
ogra(visible space in gparted)17:23
lool  int num_entries = size/sizeof(struct fis_image_desc);17:23
lool  write_blank_entries(fd,num_entries);17:23
ograweird17:23
ograso after fis init i still see a proper part table in gparted on the image ...17:24
ograif i run the dd after fis init gparted only sees a 128M big empty space17:24
loolCan I see your script?17:25
ograif i run it before it sees an 18M big empty space17:25
ograhttp://paste.ubuntu.com/134317/17:25
ogranot very big yet17:25
loologra: size=800 + bs=1M + count=size => size=800M bs=$size count=117:27
loolI hope that's not abusing too much  :-)17:28
ogrado you think that helpos the particular prob ?17:28
ogra*helps17:28
loolNo17:28
ograright :)17:28
* ogra changes 17:28
loolI hope that doesn't use 800M of memory, but I don't think so17:28
loologra: err revert that, sorry17:29
* lool whistles lalala17:29
ograheh17:30
loologra: mktable?17:30
loolparted -s $IMAGENAME mktable msdos17:30
loolparted -s $IMAGENAME mklabel msdos17:30
ograyeah17:30
loolI don't see that command in the parted doc17:31
loolwell man page17:31
ogracreates the initial part table17:31
looland mklabel?17:31
loolI think it's the same thing17:31
ogracreates a dos label for the device17:31
ograoh, right17:31
lool              mklabel label-type17:31
lool                     Create  a  new disklabel (partition table) of label-type.17:31
* ogra drops mktable17:32
loologra: fis offset is 0x4000 not 0x4000017:32
lool# initialize redboot fis dir and create redboot partitions17:32
loolfis -o 0x40000 -s 0x1200000 -d $IMAGENAME init17:32
loolAnd size is way too large17:32
ogra18M17:32
ograi kept 20M spare space at the beginning17:33
loolIt's the size of the directory17:33
ograoh, not dir+contents ?17:33
loolYou should always always always call fis with the same fixed offset and size: offset of dir and size of dir17:33
loolFIS_OFFSET=0x40000 FIS_SIZE=0x1F00017:34
ograyou mean the same as flash-kernel will use ?17:34
ograok17:34
loolUh there's is an inconsistency between my fis sizes17:34
ograright17:34
mcasadevallWe have a d-i port for imx51 that (mostly) works :-)17:35
ogra0x40000 not 0x400017:35
loologra: yes, sorry17:35
loologra: and 0x80000 with the first redboot we had!17:35
loolhow stupid  :-(17:35
loolmcasadevall: excellent news17:35
loolmcasadevall: So netboot?17:35
mcasadevalllool, netboot AND cdrom :-)17:36
loolmcasadevall: How do you use the cdrom image?17:36
mcasadevalllool, SD card with redboot+kernel+initramfs+rootfs17:36
mcasadevallInstall to USB stick17:36
mcasadevallOr17:36
mcasadevallSD card with the first three, and the alt CD on something else.17:36
loolexcellent17:36
mcasadevallI need to talk to Steve and colin on how we're going to handle image creation17:36
loolmcasadevall: So next step there is creating a SD card image with first three?17:37
mcasadevallI could spin a handmade image like that if that's what you want17:37
ogragreat, i will try to write my script in a way that we can either build live or alternate from it17:37
loolI don't think we want to create a CD sized image; a way to slash it into SD would be nice though17:37
mcasadevalllool, I hven't tested the netinstall image though17:37
loolmcasadevall: No, I think we will get it from ogra's script17:37
ograright17:37
loologra: cool17:37
mcasadevallThe current kernel has quite a few annoyance w.r.t. to network performance17:37
mcasadevallI'm going to say it probably works, but your millage may vary17:38
ografor the cdrom i only need to make the second part etx2 (symlinks in pool) and use an initramfs from d-i17:38
mcasadevalllool, base-installer also has a nice set of patches to handle kernel installation, if the kernel post-install does the right thing, then touching d-i again is likely unnecessary :-)17:38
* lool calls it a day; I started at 7:30 and am tired17:39
* ogra will to that too soon17:39
loologra: I suggest you put a cleanup handler instead of having rm -rf at various places17:39
ogralool, yeah, in the end17:39
* mcasadevall won't, the final battlestar galatica is on tonight17:39
ograits still a young script :)17:39
ograthough i expect it to be able to run on chinstrap if we cant get build server approval in time :)17:40
ograavoiding root is really helpful ;)17:40
ograhmm, no matter what i do, the dd trashes my partitioning17:42
ograi'll try to unpad our redboot first tomorrow17:42
ogralets see if that changes anything17:43
* ogra calls it a day and goes relaxing17:44
Martynre18:45
* mcasadevall dances like a madman19:17
=== mcasadevall is now known as NCommander

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!