From 80dba8710d13a843122554a50baa219091313b11 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 13 May 2010 10:18:33 +0200 Subject: update perl to 5.13.0 started to add syslinux as boot loader, grub is 32-bit, grub2 is a little bit unstable --- Makefile | 96 +++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index e8568ab..3f0d87f 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,13 @@ help: .PHONY: help run all step1 step2 step3 step4 step5 mount-disk umount-disk mount-root umount-root # software versions -GRUB_VERSION=1.97.2 +SYSLINUX_VERSION=3.86 KERNEL_VERSION=2.6.33.3 UCLIBC_VERSION=0.9.31 BUSYBOX_VERSION=1.16.1 ACPID_VERSION=1.0.10 GPM_VERSION=1.20.6 -PERL_VERSION=5.12.0 +PERL_VERSION=5.13.0 PARALLEL=-j12 @@ -52,7 +52,7 @@ step1: step2: disk-image mount-root directory-layout initial-devices # step3: boot loader -step3: grub grub-loader +step3: syslinux syslinux-loader # step4: kernel, uclibc C-library, busybox, basic tools, ACPI daemon step4: kernel busybox acpid @@ -66,7 +66,7 @@ step5: gpm perl directory-layout: cd target && mkdir bin boot dev etc home lib mnt root sbin tmp usr var proc sys - cd target/boot && mkdir grub + cd target/boot && mkdir syslinux cd target/var && mkdir lock log run spool cd target/usr && mkdir bin include lib local sbin share src cd target/usr/share && mkdir man @@ -94,55 +94,57 @@ initial-devices: mknod target/dev/psaux c 10 1 disk-image: - qemu-img create minilinux.img 16065 + qemu-img create minilinux.img 16450560 chmod 666 minilinux.img /sbin/losetup /dev/loop0 minilinux.img - dd if=/dev/zero of=/dev/loop0 bs=1024 count=2048 + dd if=/dev/zero of=/dev/loop0 bs=512 count=32130 dd if=mbr of=/dev/loop0 bs=512 count=1 echo ',2,L' | /sbin/sfdisk -H 255 -S 63 -C 2 --no-reread /dev/loop0 + sync && sleep 1 /sbin/losetup -d /dev/loop0 /sbin/losetup -o 512 /dev/loop0 minilinux.img /sbin/mke2fs /dev/loop0 + sync && sleep 1 losetup -d /dev/loop0 mkdir target -# grub boot loeader - -grub: - tar zxf tarballs/grub-$(GRUB_VERSION).tar.gz - mkdir grub-build && cd grub-build && ../grub-$(GRUB_VERSION)/configure --prefix=`pwd` - cd grub-build && make $(PARALLEL) - cd grub-build && make install - cp grub-build/boot.img target/boot/grub/ - cp grub.cfg target/boot/grub - -grub-loader: - -umount target - -mknod /dev/loop0 b 7 0 - -mknod /dev/loop1 b 7 0 - -/sbin/losetup -d /dev/loop0 - -/sbin/losetup -d /dev/loop1 - /sbin/losetup -o 512 /dev/loop1 minilinux.img - mount /dev/loop1 target - ln -s /dev/loop1 /dev/loop0p1 - /sbin/losetup /dev/loop0 minilinux.img - grub-build/bin/grub-mkimage -o core.img -v - cp core.img /boot/grub - cp core.img target/boot/grub - grub-build/sbin/grub-setup -v \ - -b ../../`pwd`/grub-build/boot.img \ - -r '(hd0,1)' -m devices.map '(hd0)' --force - umount target - /sbin/losetup -d /dev/loop0 - /sbin/losetup -d /dev/loop1 - rm -f /dev/loop0p1 - rm -f /boot/grub/core.img - /sbin/losetup -o 512 /dev/loop0 minilinux.img - mount /dev/loop0 target - -grub-clean: - -rm -rf grub-build - -rm -rf grub-$(GRUB_VERSION) +# syslinux boot loeader + +syslinux: + tar jxf tarballs/syslinux-$(SYSLINUX_VERSION).tar.gz +# mkdir grub-build && cd grub-build && ../grub-$(GRUB_VERSION)/configure --prefix=`pwd` +# cd grub-build && make $(PARALLEL) +# cd grub-build && make install +# cp grub-build/boot.img target/boot/grub/ +# cp grub.cfg target/boot/grub + +syslinux-loader: +# -umount target +# -mknod /dev/loop0 b 7 0 +# -mknod /dev/loop1 b 7 0 +# -/sbin/losetup -d /dev/loop0 +# -/sbin/losetup -d /dev/loop1 +# /sbin/losetup -o 512 /dev/loop1 minilinux.img +# mount /dev/loop1 target +# ln -s /dev/loop1 /dev/loop0p1 +# /sbin/losetup /dev/loop0 minilinux.img +# grub-build/bin/grub-mkimage -o core.img -v +# cp core.img /boot/grub +# cp core.img target/boot/grub +# grub-build/sbin/grub-setup -v \ +# -b ../../`pwd`/grub-build/boot.img \ +# -r '(hd0,1)' -m devices.map '(hd0)' --force +# umount target +# /sbin/losetup -d /dev/loop0 +# /sbin/losetup -d /dev/loop1 +# rm -f /dev/loop0p1 +# rm -f /boot/grub/core.img +# /sbin/losetup -o 512 /dev/loop0 minilinux.img +# mount /dev/loop0 target + +syslinux-clean: + -rm -rf syslinux-build + -rm -rf syslinux-$(SYSLINUX_VERSION) # Linux kernel @@ -242,7 +244,7 @@ umount-root: # global clean -clean: grub-clean uclibc-clean kernel-clean busybox-clean acpid-clean gpm-clean perl-clean +clean: syslinux-clean uclibc-clean kernel-clean busybox-clean acpid-clean gpm-clean perl-clean -umount target -/sbin/losetup -d /dev/loop0 -rm minilinux.img @@ -254,9 +256,9 @@ clean: grub-clean uclibc-clean kernel-clean busybox-clean acpid-clean gpm-clean source: -test -d tarballs || mkdir tarballs - -test -r tarballs/grub-$(GRUB_VERSION).tar.gz || \ - wget -O tarballs/grub-$(GRUB_VERSION).tar.gz \ - ftp://alpha.gnu.org/gnu/grub/grub-$(GRUB_VERSION).tar.gz + -test -r tarballs/syslinux-$(SYSLINUX_VERSION).tar.gz || \ + wget -O tarballs/syslinux-$(SYSLINUX_VERSION).tar.gz \ + http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-$(SYSLINUX_VERSION).tar.bz2 -test -r tarballs/linux-$(KERNEL_VERSION).tar.bz2 || \ wget -O tarballs/linux-$(KERNEL_VERSION).tar.bz2 \ http://www.kernel.org/pub/linux/kernel/v2.6/linux-$(KERNEL_VERSION).tar.bz2 -- cgit v1.2.3-54-g00ecf