All times are UTC-06:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jan 01, 2011 10:52 am 
Offline

Joined: Thu Nov 25, 2010 6:29 am
Posts: 15
Hi !

I was wondering if among the developers there are some home-grown scripts to ease the process of releasing new kernels/images for Efika devices.

I'm referring to a "build_all.sh" or even up-to-date documentation that would:

1) Cross-compile the kernel with appropiate flags.
2) Install the accompanying configs, initrd, boot.scr, etc... under a separate directory.
3) Build a SD card image such as "maverick-install.img.xz" using directory in step "2)" and fixing other stuff.

That way I could accelerate the testing of new releases and testing... Not to mention easing the path for newcomers (such as me :-S).

Any kind of snippet would be of great help to me !

Thanks in advance !
Roman


Top
   
PostPosted: Tue Jan 04, 2011 7:28 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Hi !

I was wondering if among the developers there are some home-grown scripts to ease the process of releasing new kernels/images for Efika devices.

I'm referring to a "build_all.sh" or even up-to-date documentation that would:

1) Cross-compile the kernel with appropiate flags.
2) Install the accompanying configs, initrd, boot.scr, etc... under a separate directory.
3) Build a SD card image such as "maverick-install.img.xz" using directory in step "2)" and fixing other stuff.

That way I could accelerate the testing of new releases and testing... Not to mention easing the path for newcomers (such as me :-S).

Any kind of snippet would be of great help to me !

Thanks in advance !
Roman
I have my scripts. We're prepping a new release of the Maverick image along with accelerated graphics drivers and I'll endeavor to put as much of this in as possible.

Unfortunately I do a lot of it by hand. Automating tasks in one script means error checking a hell of a lot, and it is easier to just keep a text file of commands to paste into a shell, and a little collection of scripts and aliases. The kernel build is handled by make-kpkg from Debian. I just paste this and change the revision (or the target to "binary")
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- mx51_efikamx_devtmpfs_defconfig && fakeroot make-kpkg --arch armel --subarch efikamx --initrd --jobs 2 --us --uc --cross-compile arm-linux-gnueabi- --revision 9999999 kernel_image
SD card building is a directory of files (Maverick Minimal + some extra things) which isn't so much "built" as every time I make an installer card I take a backup to work from. I have a script which partitions a card, and rsyncs the filesystem to it.
Code:
#!/bin/bash -x
DISK=$1
PARTED="parted /dev/${DISK} -aoptimal -s "

dcfldd if=/dev/zero of=/dev/${DISK} bs=1M count=9 status=on statusinterval=1
dcfldd if=/dev/zero of=/dev/${DISK} bs=1M seek=1670 status=on statusinterval=1
sync
${PARTED} mklabel msdos
${PARTED} mkpart primary ext2 0% 128M
${PARTED} mkpart primary ext2 128M 1670M
sync
mkfs.ext2 /dev/${DISK}1
mkfs.ext4 -Linstaller /dev/${DISK}2
sync
mount /dev/${DISK}2 /mnt
mkdir -p /mnt/boot
mount /dev/${DISK}1 /mnt/boot
sync
rsync -W -a --progress --numeric-ids $2/* /mnt
sync
dcfldd if=/dev/zero of=/mnt/zero status=on statusinterval=1
sync
rm -f /mnt/zero
sync
dcfldd if=/dev/zero of=/mnt/boot/zero status=on statusinterval=1
sync
rm -f /mnt/boot/zero
sync
umount /mnt/boot /mnt
Making an image from this card:
Code:
#!/bin/bash
dcfldd if=/dev/$1 bs=1M count=1800 status=on statusinterval=1 | xz -z -T3 -c -e >$2
The installer card works in a weird way to make kernel updates on the card easier, so it's not very friendly if you've not been working on it for months without knowing all the quirks, that said it does include some handy helper scripts that make a few of the steps less hassle to employ (making boot.scr and uImages manually). All that information is hanging around the internet and is dealt with in U-Boot documentation and Wiki pages such as the Debian one

Putting a lot of this stuff online is kind of a waste of space and time to download in the first place. People have so many different requirements and we can't solve them all with prebuilt scripts: they serve my purpose of building what we release, but they're not much good for anyone else. Not a great deal of it is anything someone reasonable couldn't achieve in about 10 minutes of hacking (hence the quality of the scripts above, I only spent 5 :)

_________________
Matt Sealey


Top
   
PostPosted: Mon Jan 17, 2011 12:08 pm 
Offline

Joined: Thu Nov 25, 2010 6:29 am
Posts: 15
Thanks a lot for the feedback Matt :)

Since I want to get involved with this, I would like to further ask you some details:

1) Regarding the rsync step, you basically use a copy a previously released image (well, it's filesystem contents), am I right ?

If it's so, all I should do must be:
Code:
losetup /dev/loop0 maverick-installer.img
kpartx -av /dev/loop0
mount /dev/mapper/loop0p2 /mnt/old_img
mount /dev/mapper/loop0p1 /mnt/old_img/boot
And then fire the rsync to /mnt (were the newly created SD card is mounted), right ?

The point with this question is whether you include another file/hack on the mix before or afterwards.

2) After compiling uImage's & initrd's, I can just copy them to the boot partition, right ? Any other manual fix/hack ?

Thanks in advance !


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group