=== Guest74361 is now known as Martyn [05:08] hi i'm trying to work out what arm v i have and if it is supported by ubuntu. [05:09] what's the best way to work it out [05:14] well [05:14] What hardware are you running? [05:15] If you know that, you're halfway there. [05:15] ports has an entire tree compiled for v5, and that runs on just about everything [06:31] damn he left [06:32] its an arm9 [06:45] d1b: You'll need to provide your kernel, but you can use the userspace apps [06:55] lool: oh ? won't i hit problems ? [06:58] d1b: problems can never happen [06:58] its running debian lenny atm. not sure what optimisations / compile options are vs ubuntus (armel) (+ its running a 2.6.28.8 kernel) [07:16] d1b: lenny is armv4t, jaunty is armv5t [09:38] lool, my initramfs fis partition is called "initramfs" indeed :) [10:07] ogra: Could you try the new version of the script I pushed to p.u.c? [10:07] It should fallback on "initramfs" === mcasadevall is now known as NCommander [12:36] bug #328167 [12:36] Launchpad bug 328167 in gnome-keyring "gnome-keyring-daemon eating 100% CPU at login in Jaunty" [High,Triaged] https://launchpad.net/bugs/328167 === Guest74361 is now known as Martyn [14:21] morning [14:43] ogra : Awake? [15:00] Martyn: found the ramdisk issue this morning [15:01] kernel config was too small [15:03] lool, so i create an image with dd [15:03] run fdisk on it [15:04] Disk ./imx51-armel.img: 0 MB, 0 bytes [15:04] thats what i get from "p" [15:04] though the image is 800M full of zeroes [15:04] ogra: Can you create an empty disk label on it though? [15:04] ogra: "o" [15:05] You must set cylinders. [15:05] You can do this from the extra functions menu. [15:05] Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) [15:05] oh, wait [15:05] ogra: it works for me [15:05] yeah [15:05] Building a new DOS disklabel with disk identifier 0xfbc883b4 [15:05] dd if=/dev/zero of=hda.img bs=1024 count=10240 [15:05] fdisk -l ./hda.img [15:05] i looked to far down [15:05] Disque ./hda.img: 0 Mo, 0 octets [15:05] 255 têtes, 63 secteurs/piste, 0 cylindres [15:05] Unités = cylindres de 16065 * 512 = 8225280 octets [15:06] Disque ./hda.img: 0 Mo, 0 octets [15:06] 255 têtes, 63 secteurs/piste, 0 cylindres [15:06] that's ok [15:06] well, i somehow need to compute the free space at the beginning [15:06] ogra: You will miss the total cyl count but you can compute it [15:06] It's always going to be 255/63 anyway [15:07] right [15:07] but fdisk doesnt know the total size [15:08] ogra: Ups, even when setting the cylinder in the advanced settings, it wasn't picked up [15:08] That's a problem [15:09] right [15:09] i wanted to use kpartx since thats been recommended by the server team [15:09] but that requires loop devices [15:09] and i dont want to run as root [15:09] so cant mount loop [15:10] fdisk would likely work as well with loop and offsets [15:10] ogra: So no choice but parted I think [15:10] i did that before [15:10] Yes, I think fdisk on loop would work [15:10] It's how I built my image actually [15:10] And I used kpartx for the parts [15:12] right, but i want to get around using root [15:12] ogra: understood which is why I say parted [15:13] albeit I can't figure whether it requires root or not [15:13] yeah [15:13] well, gparted does (works fine btw) [15:13] not sure about parted [15:13] ogra: it works here [15:13] parted ./hda.img mklabel msdos [15:13] some warnings, but seems ok [15:14] parted ./hda.img print [15:14] Disque /home/lool/fdisk/hda.img : 103MB [15:14] Taille des secteurs (logique/physique) : 512o/512o [15:14] Table de partitions : msdos [15:14] yep [15:14] You want parted -s all the time [15:15] -m is nice too, but hard to read :) [15:15] Disk identifier: 0x000e11c2 [15:15] Device Boot Start End Blocks Id System [15:15] ./imx51-armel.img1 321 12800 798720 b W95 FAT32 [15:15] then do some mkpart [15:15] ok, gparted works for partitioning, but formatting fails [15:15] you don't need that, do you? [15:16] i suspect i'll see the same with parted [15:16] sure i do [15:16] Why so? [15:16] i need to copy the livefs content to the partition [15:16] ogra: Hmm I see; I guess you just need to copy the recipe for usb keys from cdimage [15:16] so preferably i want a vfat partion so that i can mcopy from one image to another [15:17] no, the usb keys dont use partitioning [15:17] Yes [15:17] ogra: they use a vfat partition [15:17] well, not more than a single partition [15:17] ogra: You can tell parted to create a part without fs, that's mkpart above [15:17] accessing the second partition is the prob [15:18] Just compute its offset? [15:18] creating partitions is easy [15:18] anyway, let me poke a bit [15:18] ogra: you could also try parted 'cp' [15:19] if parted could see the second partition [15:20] which i doubt it can for a non block device [15:20] * ogra goes to play with it [15:21] I don't think cp will help [15:21] It can't read from non-partitioned devices [15:21] or files [15:33] ok, that looks good [15:35] good morning all [15:35] morning [15:36] Ogra, lool, did you manage to find out what fs'es are supported/supportable in Redboot? [15:36] nope [15:36] * ogra is working on general image creation atm [15:36] Okay. [15:37] sigh, and parted needs a size for the partition ending [15:37] I had some strange lockups last night, running the -11 kernel you made [15:37] no friendly oops'es either, the board just locks up and even trying to break in with sysreq doesn't do diddly. [15:37] Martyn: 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 IMO [15:39] so now how do i create the redboot part [15:42] ogra: With type non-FS data [15:42] ogra: size of your choice to hold all we need [15:43] For instance 32 M [15:43] no, fond something better :) [15:43] fis init actually works fine [15:43] I 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 default [15:43] ogra: i'll probably leave 'early' today. Let me know on irc if the increased RAMDISK size solves your problem. [15:43] no, you have to giove size in bytes [15:44] amitk, i had no problem [15:44] we just discovered its limited [15:44] ogra: I'm saying 32M as a guidance [15:44] lool, well, my spare space is 20M atm [15:44] ogra: you'll use something better for what? non-FS data? [15:45] ogra: spare on what? [15:45] for fis init i gave 10M [15:45] spare space on the image [15:45] the first partition starts at 20M [15:45] the space before that is yet empty [15:46] fis -s 10000000 -d ./imx51-armel.img init should then create a ~10M fis setup where i can copy redboot in [15:46] I thought you were asking about the msdos partition size [15:46] no [15:46] I would use round hexa numbers in fis values [15:46] Because flash data needs to be aligned on flash boundaries [15:46] i'm just playing atm [15:46] So we might run into problems if you don't make that a multiple of 0x20000 [15:47] and the fis help says it needs to be the value in bytes [15:47] It takes hex in the other places [15:47] if it works as i think it does, the only open is fconfig [15:47] -s size specify size of directory in bytes [15:47] size = str_to_int_maybe_hex(argv[i]); [15:47] So it takes hex [15:48] See, source beats --help :-P [15:48] bah [15:48] I think it's "in bytes" by opposition to "sectors"; it didn't say "in decimal" [15:48] like in offset you mean [15:48] ogra: for fconfig, just copy static data from you SD for now [15:49] well, first i need to see if what i expect actually does what i expect [15:50] ogra: 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 that [15:50] But then you need an offset [15:50] / Parse a string containing a number. If it starts with 0x, parse the rest as hex. [15:50] / !!! NOTE: also parses octal constants that start with '0' !!! [15:50] static unsigned int str_to_int_maybe_hex(const char* s) [15:50] btw :) [15:50] Yeah? [15:50] it only converts if needed, else it will assume bytes [15:51] in dec [15:51] Well, yes, that's kind of obvious [15:53] ah, damned [15:54] fis wipes the partition table in the image [15:55] so i need to do the fis stuff before using parted [15:56] ogra: it does not [15:56] ogra: It's because you didn't use an offset... [15:56] i dont use an offset when creating SD cards with the fsl tool either [15:56] offset is 0x40000 [15:57] ogra: Different tools? [15:57] not really, since the same thing is happening [15:57] you have to create the partition after dd'ing the babbage_init.bin [15:57] else the same happens [15:57] just forgot about it [15:58] Yes, but for different reasons [15:58] babbage_init.bin contains a partition table [15:58] anyway, just pass correct offset and size and it will work, even on the resulting SD image [15:59] besides, the partition table is wholly in the first sector [15:59] 0xA00000 for 10M, right ? [15:59] A00000 yes [15:59] In fact, you -should- reserve the first 63 bytes [15:59] er, 32 bytes [16:01] The network driver in 2.6.28 is really a pain [16:01] local scp: linux-image-2.6.28-11-imx51_2.6.28-11.36_arme 27% 2208KB 5.5KB/s - stalled - [16:02] yeah, use a USB NIC [16:02] doesnt your CB come with one ? [16:04] It does, good idea [16:05] hrm, but looking at my SD redboot starts at 0x00000000 with a lenght of 0x00040000 [16:05] how do i still keep my part table with that ? [16:07] ogra: it's lying [16:07] ogra: it starts at 0x400 [16:07] ah, k [16:08] ogra: Note that "fis init" + romupdate from redboot might give you a redboot on 0x0 which doesn't boot [16:08] Never tried it, but I wouldn't be surprized [16:09] well, i dont have a redboot yet [16:09] only an empty fis table [16:09] ogra: I'm just commenting on how we reached the point where the fis list says 0x0 for redboot offset [16:09] yup [16:10] I think it correctly reflects 0x400 with images created with the fsl tool, but not after fis init [16:13] dd if= of= bs=1024 seek=1 should now get me a booting image, right ? [16:15] Yes, I think that's correct [16:16] make sure you use the non-padded redboot [16:16] it's also best if you fis create redboot [16:16] with -c that .bin [16:16] to reserve the space and make fis list happy [16:16] do you know the offsets/sizes from the top of your head ? [16:17] RedBoot 0x00000000 0x00000000 0x00040000 0x00000000 [16:17] FIS directory 0x00080000 0x00080000 0x0001F000 0x00000000 [16:17] RedBoot config 0x0009F000 0x0009F000 0x00001000 0x00000000 [16:17] -o 0x400 ? [16:17] careful it's not -o for the fis offset; only for the fis dir [16:17] oh, right [16:17] e.g. for the kernel I'm using: [16:17] sudo "$FIS" -d "$SD_DEV" -o $FIS_OFFSET -s $FIS_SIZE create kernel -f 0x00060000 -l 0x00400000 -e 0x00100000 -r 0x00100000 -c "$KERNEL_IMG" [16:18] 0x00060000 is the offset of the kernel in flash [16:18] So you want 0x400 for redboot offset (-f) and 0x4000 for fis dir offset (-o) [16:18] The first three should remain constant [16:19] i really think i like dd more :P [16:20] i dont see the FSL tool do anything to the fis tables [16:20] usb 2-1.3: new high speed USB device using fsl-ehci and address 5 [16:21] > I don't get any module loaded [16:21] ogra: You need *both* dd and fis [16:21] lool, oh, old kernel i guess [16:21] Well from yesterday yes [16:21] mcasadevall, is our redboot unpadded in the binary ? [16:21] I guess I'll take the SD card out and update the kernel manually, sigh :-( [16:22] ogra, its unpadded, but I can dd if= it [16:22] no, thats what i want, thanks [16:22] i want my script to wget and dpkg -x our package [16:34] [42949379.640000] RAMDISK: Compressed image found at block 0 [16:34] [42949380.210000] RAMDISK: incomplete write (-28 != 32768) 8388608 [16:35] ah, good [16:35] amitk, ^^^ [16:38] BTW 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] hmm [16:39] so much for leaving 'early' [16:40] also failed with exec -s 0x00600000 -r 0x1000000 -c "console=ttymxc0,115200 root=/dev/mm [16:40] cblk0p2 rootdelay=2 initrd=0x91000000,6M mem=200M@0x90000000 ro debug" [16:40] Probably it's an unpack sized issue [16:42] Same command without initrd and mem doesn't work either [16:45] I see the USB interface with the new kernel, but it doesn't manage to DHCP [16:45] lool: that is an asix chip, right? [16:49] amitk: What the RAM? [16:50] 512 MB mDDR 4 banks (each bank is 128 MB) [16:50] Micron MT46H64M16LFCK-6LIT [16:50] Hynix H5MS1G62MFP-J3M [16:50] lool: no, your usb interface [16:51] Oh, I don't know; it's the one I had with CB; it's a SMC [16:51] amitk: yes, asix is loaded [16:53] amitk: Ok, it was my bad: I was setting the mac address and that doesn't work [16:53] Without setting it it works [17:08] I tried padding to 0xff to no luck; I thought that would have worked :-/ [17:11] hmm, dd if= of= bs=1024 seek=1 trashes my part table [17:12] mcasadevall, are you 100% positive our redboot is unpadded ? [17:12] ogra,I didn't pad it, but the build system might have [17:13] sudo dd if=mx51_babbage_redboot-no-padding.bin of="$SD_DEV" bs="1024" seek=1 [17:13] that worked for me [17:13] With the 2.6.28 redboot from the wiki page [17:14] right [17:14] i suspect ours is padded [17:15] ogra: it seems so indeed [17:16] 00003e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ [17:16] 00003f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ [17:16] 0000400: 2806 f0af b100 0000 0000 0000 1404 f0af (............... [17:16] 0000410: 0000 0000 1c04 f0af 0000 f0af e919 72b1 ..............r. [17:16] meh [17:16] it clearly starts at 0x400; albeit I don't see why there are a couple of bytes at the beginning isntead of zeroes [17:16] ogra: Just skip=1 as well [17:16] dd if= of= bs=1024 seek=1 skip=1 [17:17] yep. trying [17:18] nope [17:18] partition table is gone [17:18] ours is also quite big compared to FSLs [17:19] -rw-r--r-- 1 ogra ogra 161688 2009-01-23 20:54 /home/ogra/Desktop/arm/babbage/mx51_babbage_redboot.bin [17:19] even with padding theirs is smaller [17:19] -rwxr-xr-x 1 ogra ogra 172844 2009-03-20 18:14 redboot.bin [17:19] partition table *can't* be gone if you're skipping over it [17:19] Are you speaking of the fis directory or the msdos table? [17:19] its trashed at least [17:19] msdos table [17:20] with seek=1 it shouldn't be, it's in the first 1k [17:20] yeah, thats strange [17:21] * ogra wonders if the order matters, probably i should run fis init afterwards [17:22] HMm [17:22] hmm, now i end up with 18M [17:23] No, fis init only overwrites the directory [17:23] (visible space in gparted) [17:23] int num_entries = size/sizeof(struct fis_image_desc); [17:23] write_blank_entries(fd,num_entries); [17:23] weird [17:24] so after fis init i still see a proper part table in gparted on the image ... [17:24] if i run the dd after fis init gparted only sees a 128M big empty space [17:25] Can I see your script? [17:25] if i run it before it sees an 18M big empty space [17:25] http://paste.ubuntu.com/134317/ [17:25] not very big yet [17:27] ogra: size=800 + bs=1M + count=size => size=800M bs=$size count=1 [17:28] I hope that's not abusing too much :-) [17:28] do you think that helpos the particular prob ? [17:28] *helps [17:28] No [17:28] right :) [17:28] * ogra changes [17:28] I hope that doesn't use 800M of memory, but I don't think so [17:29] ogra: err revert that, sorry [17:29] * lool whistles lalala [17:30] heh [17:30] ogra: mktable? [17:30] parted -s $IMAGENAME mktable msdos [17:30] parted -s $IMAGENAME mklabel msdos [17:30] yeah [17:31] I don't see that command in the parted doc [17:31] well man page [17:31] creates the initial part table [17:31] and mklabel? [17:31] I think it's the same thing [17:31] creates a dos label for the device [17:31] oh, right [17:31] mklabel label-type [17:31] Create a new disklabel (partition table) of label-type. [17:32] * ogra drops mktable [17:32] ogra: fis offset is 0x4000 not 0x40000 [17:32] # initialize redboot fis dir and create redboot partitions [17:32] fis -o 0x40000 -s 0x1200000 -d $IMAGENAME init [17:32] And size is way too large [17:32] 18M [17:33] i kept 20M spare space at the beginning [17:33] It's the size of the directory [17:33] oh, not dir+contents ? [17:33] You should always always always call fis with the same fixed offset and size: offset of dir and size of dir [17:34] FIS_OFFSET=0x40000 FIS_SIZE=0x1F000 [17:34] you mean the same as flash-kernel will use ? [17:34] ok [17:34] Uh there's is an inconsistency between my fis sizes [17:34] right [17:35] We have a d-i port for imx51 that (mostly) works :-) [17:35] 0x40000 not 0x4000 [17:35] ogra: yes, sorry [17:35] ogra: and 0x80000 with the first redboot we had! [17:35] how stupid :-( [17:35] mcasadevall: excellent news [17:35] mcasadevall: So netboot? [17:36] lool, netboot AND cdrom :-) [17:36] mcasadevall: How do you use the cdrom image? [17:36] lool, SD card with redboot+kernel+initramfs+rootfs [17:36] Install to USB stick [17:36] Or [17:36] SD card with the first three, and the alt CD on something else. [17:36] excellent [17:36] I need to talk to Steve and colin on how we're going to handle image creation [17:37] mcasadevall: So next step there is creating a SD card image with first three? [17:37] I could spin a handmade image like that if that's what you want [17:37] great, i will try to write my script in a way that we can either build live or alternate from it [17:37] I don't think we want to create a CD sized image; a way to slash it into SD would be nice though [17:37] lool, I hven't tested the netinstall image though [17:37] mcasadevall: No, I think we will get it from ogra's script [17:37] right [17:37] ogra: cool [17:37] The current kernel has quite a few annoyance w.r.t. to network performance [17:38] I'm going to say it probably works, but your millage may vary [17:38] for the cdrom i only need to make the second part etx2 (symlinks in pool) and use an initramfs from d-i [17:38] lool, 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:39] * lool calls it a day; I started at 7:30 and am tired [17:39] * ogra will to that too soon [17:39] ogra: I suggest you put a cleanup handler instead of having rm -rf at various places [17:39] lool, yeah, in the end [17:39] * mcasadevall won't, the final battlestar galatica is on tonight [17:39] its still a young script :) [17:40] though i expect it to be able to run on chinstrap if we cant get build server approval in time :) [17:40] avoiding root is really helpful ;) [17:42] hmm, no matter what i do, the dd trashes my partitioning [17:42] i'll try to unpad our redboot first tomorrow [17:43] lets see if that changes anything [17:44] * ogra calls it a day and goes relaxing [18:45] re [19:17] * mcasadevall dances like a madman === mcasadevall is now known as NCommander