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