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 :)