CRUX PPC
A lightweight GNU/Linux distribution for PowerPC!
Subversion Repository
Parent Directory
|
Revision Log
Revision 9 -
(show annotations)
Sun Oct 4 17:28:49 2009 UTC (3 years, 7 months ago) by cjg
File size: 16304 byte(s)
Sun Oct 4 17:28:49 2009 UTC (3 years, 7 months ago) by cjg
File size: 16304 byte(s)
using zImage.chrp for efika and pegasos2
| 1 | # |
| 2 | # Makefile for CRUX PPC, based on Makefile for CRUX |
| 3 | # Copyright (c) 2003-2004 Per Liden <per@fukt.bth.se> |
| 4 | # Copyright (c) 2004 Giulivo Navigante <giulivo@linuxmail.org> |
| 5 | # Copyright (c) 2005-2008 The CRUX PPC Team - http://cruxppc.sunsite.dk |
| 6 | # |
| 7 | # $Id: 14/01/2008 05:02:13 acrux *0.10* $ |
| 8 | # CRUX PPC 2.4 |
| 9 | # release codename is: _Mafarka _le _futuriste |
| 10 | # |
| 11 | |
| 12 | COLLECTIONS = core opt xorg |
| 13 | KERNEL_MIRROR = ftp://ftp.eu.kernel.org |
| 14 | KERNEL_VERSION = 2.6.27 |
| 15 | KERNEL_PATCHES = cruxppc-logo.diff |
| 16 | FAKE_ROOT_DIR = $(PWD)/tmp/fake_root |
| 17 | ISO_ROOT_DIR = $(PWD)/tmp/iso_root |
| 18 | ISO_FILENAME = $(PWD)/crux-ppc-2.4rc4.iso |
| 19 | ISO_PACKAGES = filesystem bash coreutils bzip2 e2fsprogs jfsutils xfsprogs \ |
| 20 | reiserfsprogs patch findutils glibc grep gzip kbd module-init-tools \ |
| 21 | less yaboot gawk ncurses net-tools pkgutils procps readline sed shadow \ |
| 22 | mktemp sysklogd sysvinit tar util-linux-ng vim which dialog nano mdadm \ |
| 23 | parted mac-fdisk hfsutils nvsetenv yaboot glib mc \ |
| 24 | pciutils libusb usbutils hotplug sysfsutils udev iproute2 memtester zlib |
| 25 | |
| 26 | PORTS_core = $(shell /bin/ls -I README ports/core) |
| 27 | PORTS_opt = yaboot run-parts pbbuttonsd parted nvsetenv ncftp memtester mac-fdisk \ |
| 28 | rp-pppoe elinks eject b43-fwcutter nano dialog mdadm wireless-tools \ |
| 29 | libpng glib mc glitz libjpeg hicolor-icon-theme atk wpa_supplicant \ |
| 30 | freetype cairo libtiff fontconfig pango gtk libidl firefox \ |
| 31 | cdrtools sudo imlib2 fluxbox fetchmail procmail \ |
| 32 | libxml2 libxslt libdrm mutt xterm p5-xml-parser \ |
| 33 | python sqlite3 nspr dbus nss dbus-glib xulrunner parthenope \ |
| 34 | intltool |
| 35 | PORTS_xorg = $(shell /bin/ls -I README ports/xorg) |
| 36 | |
| 37 | ifeq ($(FORCE),yes) |
| 38 | PKGMK_FORCE=-f |
| 39 | else |
| 40 | PKGMK_FORCE= |
| 41 | endif |
| 42 | |
| 43 | .PHONY: help check-root check-log $(COLLECTIONS) all all-chroot bootstrap kernel kernel-clean clean iso |
| 44 | |
| 45 | help: |
| 46 | @echo "CRUX PPC Makefile" |
| 47 | @echo "Targets:" |
| 48 | @echo " <collection> build single collection" |
| 49 | @echo " all build all collections" |
| 50 | @echo " bootstrap bootstrap all collections" |
| 51 | @echo " kernel download and build kernel" |
| 52 | @echo " iso create iso image" |
| 53 | @echo "Collections:" |
| 54 | @echo " $(COLLECTIONS)" |
| 55 | |
| 56 | check-root: |
| 57 | @if [ "$$UID" != "0" ]; then \ |
| 58 | echo "You need to be root to do this."; \ |
| 59 | exit 1; \ |
| 60 | fi |
| 61 | |
| 62 | check-log: |
| 63 | @grep "^=======> ERROR:"; \ |
| 64 | if [ "$$?" = "0" ]; then \ |
| 65 | echo "(see log file for details)"; \ |
| 66 | exit 1; \ |
| 67 | else \ |
| 68 | exit 0; \ |
| 69 | fi |
| 70 | |
| 71 | kernel/linux-$(KERNEL_VERSION).tar.bz2: |
| 72 | cd kernel && wget --passive-ftp $(KERNEL_MIRROR)/pub/linux/kernel/v2.6/linux-$(KERNEL_VERSION).tar.bz2 |
| 73 | |
| 74 | kernel/linux-$(KERNEL_VERSION): kernel/linux-$(KERNEL_VERSION).tar.bz2 |
| 75 | tar -C kernel -xjmf kernel/linux-$(KERNEL_VERSION).tar.bz2 |
| 76 | for FILE in $(KERNEL_PATCHES); do \ |
| 77 | cd kernel/linux-$(KERNEL_VERSION) && patch -p1 < ../$$FILE && cd ../..; \ |
| 78 | done |
| 79 | cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-64bit |
| 80 | cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-Sam440ep |
| 81 | #patch -p1 -d kernel/linux-$(KERNEL_VERSION)-Sam440ep < kernel/linux-$(KERNEL_VERSION)-Sam440ep.patch |
| 82 | cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-Efika |
| 83 | cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-Pegasos2 |
| 84 | #cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-Chrp32 |
| 85 | #cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-Apple64 |
| 86 | #cp -a kernel/linux-$(KERNEL_VERSION) kernel/linux-$(KERNEL_VERSION)-pSeries |
| 87 | |
| 88 | kernel/linux-$(KERNEL_VERSION)/vmlinux: kernel/linux-$(KERNEL_VERSION) |
| 89 | make -C kernel/linux-$(KERNEL_VERSION) mrproper |
| 90 | cp -f kernel/linux-$(KERNEL_VERSION).config kernel/linux-$(KERNEL_VERSION)/.config |
| 91 | make -C kernel/linux-$(KERNEL_VERSION) oldconfig |
| 92 | make -j16 -C kernel/linux-$(KERNEL_VERSION) all |
| 93 | touch kernel/linux-$(KERNEL_VERSION)/arch/powerpc/boot/zImage.pmac |
| 94 | |
| 95 | CC="gcc -m64" make -C kernel/linux-$(KERNEL_VERSION)-64bit mrproper |
| 96 | cp -f kernel/linux-$(KERNEL_VERSION)-64bit.config kernel/linux-$(KERNEL_VERSION)-64bit/.config |
| 97 | CC="gcc -m64" make -C kernel/linux-$(KERNEL_VERSION)-64bit oldconfig |
| 98 | CC="gcc -m64" make -j16 -C kernel/linux-$(KERNEL_VERSION)-64bit all |
| 99 | touch kernel/linux-$(KERNEL_VERSION)-64bit/vmlinux |
| 100 | |
| 101 | make -C kernel/linux-$(KERNEL_VERSION)-Sam440ep mrproper |
| 102 | cp -f kernel/linux-$(KERNEL_VERSION)-Sam440ep.config kernel/linux-$(KERNEL_VERSION)-Sam440ep/.config |
| 103 | make -C kernel/linux-$(KERNEL_VERSION)-Sam440ep oldconfig |
| 104 | make -j16 -C kernel/linux-$(KERNEL_VERSION)-Sam440ep all |
| 105 | touch kernel/linux-$(KERNEL_VERSION)-Sam440ep/vmlinux |
| 106 | |
| 107 | make -C kernel/linux-$(KERNEL_VERSION)-Efika mrproper |
| 108 | cp -f kernel/linux-$(KERNEL_VERSION)-Efika.config kernel/linux-$(KERNEL_VERSION)-Efika/.config |
| 109 | make -C kernel/linux-$(KERNEL_VERSION)-Efika oldconfig |
| 110 | make -j16 -C kernel/linux-$(KERNEL_VERSION)-Efika all |
| 111 | touch kernel/linux-$(KERNEL_VERSION)-Efika/arch/powerpc/boot/zImage.chrp |
| 112 | make -C kernel/linux-$(KERNEL_VERSION)-Pegasos2 mrproper |
| 113 | cp -f kernel/linux-$(KERNEL_VERSION)-Pegasos2.config kernel/linux-$(KERNEL_VERSION)-Pegasos2/.config |
| 114 | make -C kernel/linux-$(KERNEL_VERSION)-Pegasos2 oldconfig |
| 115 | make -j16 -C kernel/linux-$(KERNEL_VERSION)-Pegasos2 all |
| 116 | touch kernel/linux-$(KERNEL_VERSION)-Pegasos2/arch/powerpc/boot/zImage.chrp |
| 117 | |
| 118 | #make -C kernel/linux-$(KERNEL_VERSION)-Chrp32 mrproper |
| 119 | #cp -f kernel/linux-$(KERNEL_VERSION)-Chrp32.config kernel/linux-$(KERNEL_VERSION)-Chrp32/.config |
| 120 | #make -C kernel/linux-$(KERNEL_VERSION)-Chrp32 oldconfig |
| 121 | #make -C kernel/linux-$(KERNEL_VERSION)-Chrp32 all |
| 122 | #touch kernel/linux-$(KERNEL_VERSION)-Chrp32/vmlinux |
| 123 | |
| 124 | #PATH=$(PATH):/usr/ppc64-unknown-linux-gnu/bin/ make -C kernel/linux-$(KERNEL_VERSION)-Apple64 mrproper ARCH=powerpc CROSS_COMPILE=ppc64-unknown-linux-gnu- |
| 125 | #cp -f kernel/linux-$(KERNEL_VERSION)-Apple64.config kernel/linux-$(KERNEL_VERSION)-Apple64/.config |
| 126 | #PATH=$(PATH):/usr/ppc64-unknown-linux-gnu/bin/ make -C kernel/linux-$(KERNEL_VERSION)-Apple64 oldconfig ARCH=powerpc CROSS_COMPILE=ppc64-unknown-linux-gnu- |
| 127 | #PATH=$(PATH):/usr/ppc64-unknown-linux-gnu/bin/ make -C kernel/linux-$(KERNEL_VERSION)-Apple64 all ARCH=powerpc CROSS_COMPILE=ppc64-unknown-linux-gnu- |
| 128 | #touch kernel/linux-$(KERNEL_VERSION)-Apple64/vmlinux |
| 129 | |
| 130 | #PATH=$(PATH):/usr/ppc64-unknown-linux-gnu/bin/ make -C kernel/linux-$(KERNEL_VERSION)-pSeries mrproper ARCH=powerpc CROSS_COMPILE=ppc64-unknown-linux-gnu- |
| 131 | #cp -f kernel/linux-$(KERNEL_VERSION)-pSeries.config kernel/linux-$(KERNEL_VERSION)-pSeries/.config |
| 132 | #PATH=$(PATH):/usr/ppc64-unknown-linux-gnu/bin/ make -C kernel/linux-$(KERNEL_VERSION)-pSeries oldconfig ARCH=powerpc CROSS_COMPILE=ppc64-unknown-linux-gnu- |
| 133 | #PATH=$(PATH):/usr/ppc64-unknown-linux-gnu/bin/ make -C kernel/linux-$(KERNEL_VERSION)-pSeries all ARCH=powerpc CROSS_COMPILE=ppc64-unknown-linux-gnu- |
| 134 | #touch kernel/linux-$(KERNEL_VERSION)-pSeries/vmlinux |
| 135 | |
| 136 | kernel: kernel/linux-$(KERNEL_VERSION)/vmlinux |
| 137 | |
| 138 | kernel-clean: |
| 139 | if [ -e kernel/linux-$(KERNEL_VERSION) ]; then rm -rf kernel/linux-$(KERNEL_VERSION); fi |
| 140 | if [ -e kernel/linux-$(KERNEL_VERSION)-64bit ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-64bit; fi |
| 141 | if [ -e kernel/linux-$(KERNEL_VERSION)-Sam440ep ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-Sam440ep; fi |
| 142 | if [ -e kernel/linux-$(KERNEL_VERSION)-Efika ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-Efika; fi |
| 143 | if [ -e kernel/linux-$(KERNEL_VERSION)-Pegasos2 ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-Pegasos2; fi |
| 144 | #if [ -e kernel/linux-$(KERNEL_VERSION)-Apple64 ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-Apple64; fi |
| 145 | #if [ -e kernel/linux-$(KERNEL_VERSION)-Chrp32 ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-Chrp32; fi |
| 146 | #if [ -e kernel/linux-$(KERNEL_VERSION)-pSeries ]; then rm -rf kernel/linux-$(KERNEL_VERSION)-pSeries; fi |
| 147 | |
| 148 | clean: kernel-clean |
| 149 | |
| 150 | $(COLLECTIONS): check-root |
| 151 | @for p in $(PORTS_$(@)); do \ |
| 152 | echo "p: $$p"; \ |
| 153 | (cd ports/$@/$$p && if [ -e pre-install ]; then sh pre-install; fi; pkgmk -d $(PKGMK_FORCE)); \ |
| 154 | done |
| 155 | |
| 156 | all: $(COLLECTIONS) |
| 157 | |
| 158 | all-chroot: check-root |
| 159 | @echo "Creating chroot environment" |
| 160 | @if [ -e $(FAKE_ROOT_DIR) ]; then \ |
| 161 | umount $(FAKE_ROOT_DIR)/src; \ |
| 162 | umount $(FAKE_ROOT_DIR)/proc; \ |
| 163 | umount $(FAKE_ROOT_DIR)/dev; \ |
| 164 | rm -rf $(FAKE_ROOT_DIR); \ |
| 165 | fi |
| 166 | @mkdir -p $(FAKE_ROOT_DIR) |
| 167 | @echo "Installing packages" |
| 168 | @mkdir -p $(FAKE_ROOT_DIR)/var/lib/pkg |
| 169 | @touch $(FAKE_ROOT_DIR)/var/lib/pkg/db |
| 170 | @for COLL in $(COLLECTIONS); do \ |
| 171 | for PACKAGE in ports/$$COLL/*/*.pkg.tar.gz; do \ |
| 172 | echo " $$PACKAGE"; \ |
| 173 | pkgadd -r $(FAKE_ROOT_DIR) $$PACKAGE; \ |
| 174 | done; \ |
| 175 | done |
| 176 | @echo "Mounting /dev on $(FAKE_ROOT_DIR)/dev" |
| 177 | @mount --bind /dev $(FAKE_ROOT_DIR)/dev |
| 178 | @echo "Mounting /proc on $(FAKE_ROOT_DIR)/proc" |
| 179 | @mount --bind /proc $(FAKE_ROOT_DIR)/proc |
| 180 | @echo "Mouting $$PWD on $(FAKE_ROOT_DIR)/src" |
| 181 | @mkdir $(FAKE_ROOT_DIR)/src |
| 182 | @mount --bind $$PWD $(FAKE_ROOT_DIR)/src |
| 183 | @cp /etc/pkgmk.conf $(FAKE_ROOT_DIR)/etc |
| 184 | @echo "Entering chroot enrivonment" |
| 185 | @chroot $(FAKE_ROOT_DIR) /bin/bash --login -c "cd /src && $(MAKE) FORCE=yes all" |
| 186 | @echo "Exiting chroot enrivonment" |
| 187 | @echo "Unmounting $(FAKE_ROOT_DIR)/src" |
| 188 | @umount $(FAKE_ROOT_DIR)/src |
| 189 | @rmdir $(FAKE_ROOT_DIR)/src |
| 190 | @echo "Unmounting $(FAKE_ROOT_DIR)/proc" |
| 191 | @umount $(FAKE_ROOT_DIR)/proc |
| 192 | @echo "Unmounting $(FAKE_ROOT_DIR)/dev" |
| 193 | @umount $(FAKE_ROOT_DIR)/dev |
| 194 | @echo "Removing chroot environment" |
| 195 | @rm -rf $(FAKE_ROOT_DIR) |
| 196 | |
| 197 | bootstrap: check-root |
| 198 | @echo "Bootstrap started (`date +'%F %T'`)" |
| 199 | @echo "- Stage 0 (`date +'%F %T'`)" |
| 200 | @find ports/ -name ".footprint" -exec rm {} \; |
| 201 | @$(MAKE) all &> log.stage0 |
| 202 | @$(MAKE) check-log < log.stage0 |
| 203 | @echo "- Stage 1 (`date +'%F %T'`)" |
| 204 | @find ports/ -name ".footprint" -exec rm {} \; |
| 205 | @$(MAKE) all-chroot &> log.stage1 |
| 206 | @$(MAKE) check-log < log.stage1 |
| 207 | @echo "- Stage 2 (`date +'%F %T'`)" |
| 208 | @$(MAKE) all-chroot &> log.stage2 |
| 209 | @$(MAKE) check-log < log.stage2 |
| 210 | @echo "Bootstrap completed (`date +'%F %T'`)" |
| 211 | |
| 212 | iso: check-root |
| 213 | #kernel |
| 214 | @echo "Creating ISO image ($(ISO_FILENAME))" |
| 215 | @if [ -e $(ISO_ROOT_DIR) ]; then rm -rf $(ISO_ROOT_DIR); fi |
| 216 | @mkdir -p $(ISO_ROOT_DIR) |
| 217 | @echo "- Installing packages" |
| 218 | @for PACKAGE in $(ISO_PACKAGES); do \ |
| 219 | tar -C $(ISO_ROOT_DIR) -xzpf ports/*/$$PACKAGE/$$PACKAGE\#*.pkg.tar.gz; \ |
| 220 | done |
| 221 | @echo "- Copying ISO specific files" |
| 222 | @mkdir -p $(ISO_ROOT_DIR)/etc $(ISO_ROOT_DIR)/ppc/{chrp,efika,mac,pegasos2,ppc32,ppc64,sam440ep} |
| 223 | @cp iso/ppc/bootinfo.txt $(ISO_ROOT_DIR)/ppc |
| 224 | @cp iso/ppc/chrp/yaboot $(ISO_ROOT_DIR)/ppc/chrp |
| 225 | @cp iso/ppc/mac/{ofboot.b,yaboot} $(ISO_ROOT_DIR)/ppc/mac |
| 226 | @cp iso/ppc/ppc32/yaboot.conf $(ISO_ROOT_DIR)/ppc/ppc32 |
| 227 | @cp iso/ppc/ppc64/yaboot.conf $(ISO_ROOT_DIR)/ppc/ppc64 |
| 228 | @cp iso/ppc/sam440ep/{Parthenope,menu.lst} $(ISO_ROOT_DIR)/ppc/sam440ep |
| 229 | @cp iso/ppc/sam440ep/menu.lst $(ISO_ROOT_DIR) |
| 230 | @cp iso/etc/{fstab,hosts,inittab,issue,motd,ld.so.conf,protocols,rc,rc.shutdown,rc.single,services,yaboot.conf} $(ISO_ROOT_DIR)/etc |
| 231 | @echo "- Installing kernel" |
| 232 | @cp kernel/linux-$(KERNEL_VERSION)/System.map $(ISO_ROOT_DIR)/ppc/ppc32 |
| 233 | @cp kernel/linux-$(KERNEL_VERSION)/vmlinux $(ISO_ROOT_DIR)/ppc/ppc32 |
| 234 | @cp kernel/linux-$(KERNEL_VERSION)-64bit/System.map $(ISO_ROOT_DIR)/ppc/ppc64 |
| 235 | @cp kernel/linux-$(KERNEL_VERSION)-64bit/vmlinux $(ISO_ROOT_DIR)/ppc/ppc64 |
| 236 | @cp kernel/linux-$(KERNEL_VERSION)-Sam440ep/System.map $(ISO_ROOT_DIR)/ppc/sam440ep |
| 237 | @cp kernel/linux-$(KERNEL_VERSION)-Sam440ep/arch/powerpc/boot/cuImage.sam440ep $(ISO_ROOT_DIR)/ppc/sam440ep/uImage |
| 238 | @cp kernel/linux-$(KERNEL_VERSION)-Efika/System.map $(ISO_ROOT_DIR)/ppc/efika |
| 239 | @cp kernel/linux-$(KERNEL_VERSION)-Efika/arch/powerpc/boot/zImage.chrp $(ISO_ROOT_DIR)/ppc/efika |
| 240 | @cp kernel/linux-$(KERNEL_VERSION)-Pegasos2/System.map $(ISO_ROOT_DIR)/ppc/pegasos2 |
| 241 | @cp kernel/linux-$(KERNEL_VERSION)-Pegasos2/arch/powerpc/boot/zImage.chrp $(ISO_ROOT_DIR)/ppc/pegasos2 |
| 242 | #@cp kernel/linux-$(KERNEL_VERSION)-Chrp32/System.map $(ISO_ROOT_DIR)/boot/System.map-Chrp32 |
| 243 | #@cp kernel/linux-$(KERNEL_VERSION)-Chrp32/vmlinux $(ISO_ROOT_DIR)/boot/vmlinux-Chrp32 |
| 244 | #@cp kernel/linux-$(KERNEL_VERSION)-Apple64/System.map $(ISO_ROOT_DIR)/boot/System.map-Apple64 |
| 245 | #@cp kernel/linux-$(KERNEL_VERSION)-Apple64/vmlinux $(ISO_ROOT_DIR)/boot/vmlinux-Apple64 |
| 246 | #@cp kernel/linux-$(KERNEL_VERSION)-pSeries/System.map $(ISO_ROOT_DIR)/boot/System.map-pSeries |
| 247 | #@cp kernel/linux-$(KERNEL_VERSION)-pSeries/vmlinux $(ISO_ROOT_DIR)/boot/vmlinux-pSeries |
| 248 | @echo "- Installing kernel modules (see modules_install.log)" |
| 249 | @make -C kernel/linux-$(KERNEL_VERSION) INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log |
| 250 | @make -C kernel/linux-$(KERNEL_VERSION)-64bit INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log-64bit |
| 251 | @make -C kernel/linux-$(KERNEL_VERSION)-Sam440ep INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log-Sam440ep |
| 252 | @make -C kernel/linux-$(KERNEL_VERSION)-Efika INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log-Efika |
| 253 | @make -C kernel/linux-$(KERNEL_VERSION)-Pegasos2 INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log-Pegasos2 |
| 254 | #@make -C kernel/linux-$(KERNEL_VERSION)-Chrp32 INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log-Chrp32 |
| 255 | #@make -C kernel/linux-$(KERNEL_VERSION)-pSeries INSTALL_MOD_PATH=$(ISO_ROOT_DIR) modules_install &> modules_install.log-pSeries |
| 256 | @echo "- Deleting superfluous files" |
| 257 | @cd $(ISO_ROOT_DIR) && rm -rf var opt home |
| 258 | @cd $(ISO_ROOT_DIR)/usr && rm -rf man include lib/*.a lib/*.o lib/gconv lib/locale src |
| 259 | @cd $(ISO_ROOT_DIR)/usr/share && mkdir l v; cp terminfo/l/linux l; cp terminfo/v/vt100 v; rm -rf terminfo/*; mv l v terminfo |
| 260 | @cd $(ISO_ROOT_DIR)/usr/share && rm -rf et ss vim i18n zoneinfo |
| 261 | @cd $(ISO_ROOT_DIR)/usr/bin && rm cal locale localedef rpcgen compile_et mk_cmds |
| 262 | @cd $(ISO_ROOT_DIR)/usr/sbin && rm group{add,del,mod} user{add,del,mod} grpck pwck iconvconfig rpcinfo zic zdump |
| 263 | @cd $(ISO_ROOT_DIR)/etc && rm -rf rc.d cron {resolv,sysctl,pkgadd,pkgmk}.conf securetty |
| 264 | @cd $(ISO_ROOT_DIR)/usr/lib && rm -rf pkgconfig/* |
| 265 | @cd $(ISO_ROOT_DIR)/lib/modules/$(KERNEL_VERSION) && rm -f build |
| 266 | @echo "- Creating symlinks" |
| 267 | @ln -sf /tmp/var $(ISO_ROOT_DIR)/var |
| 268 | @ln -sf /proc/mounts $(ISO_ROOT_DIR)/etc/mtab |
| 269 | @echo "- Updating library links and cache" |
| 270 | @ldconfig -r $(ISO_ROOT_DIR) |
| 271 | @echo "- Copying CRUX PPC packages" |
| 272 | @mkdir -p $(ISO_ROOT_DIR)/crux |
| 273 | @cp doc/handbook/handbook.txt $(ISO_ROOT_DIR)/crux |
| 274 | @cp iso/setup.dependencies $(ISO_ROOT_DIR)/crux |
| 275 | @cp doc/gpl.txt $(ISO_ROOT_DIR)/crux |
| 276 | @cp iso/bin/{setup,setup-helper,setup-chroot,serial_console} $(ISO_ROOT_DIR)/usr/bin |
| 277 | @mkdir -p $(ISO_ROOT_DIR)/crux/kernel |
| 278 | @cp kernel/linux-$(KERNEL_VERSION).tar.bz2 $(ISO_ROOT_DIR)/crux/kernel |
| 279 | @cp kernel/linux-$(KERNEL_VERSION).config $(ISO_ROOT_DIR)/crux/kernel |
| 280 | @cp kernel/linux-$(KERNEL_VERSION)-64bit.config $(ISO_ROOT_DIR)/crux/kernel |
| 281 | @cp kernel/linux-$(KERNEL_VERSION)-Sam440ep.config $(ISO_ROOT_DIR)/crux/kernel |
| 282 | #@cp kernel/linux-$(KERNEL_VERSION)-Sam440ep.patch $(ISO_ROOT_DIR)/crux/kernel |
| 283 | @cp kernel/linux-$(KERNEL_VERSION)-Efika.config $(ISO_ROOT_DIR)/crux/kernel |
| 284 | @cp kernel/linux-$(KERNEL_VERSION)-Pegasos2.config $(ISO_ROOT_DIR)/crux/kernel |
| 285 | #@cp kernel/linux-$(KERNEL_VERSION)-Chrp32.config $(ISO_ROOT_DIR)/crux/kernel |
| 286 | #@cp kernel/linux-$(KERNEL_VERSION)-pSeries.config $(ISO_ROOT_DIR)/crux/kernel |
| 287 | @for FILE in $(KERNEL_PATCHES); do \ |
| 288 | cp kernel/$$FILE $(ISO_ROOT_DIR)/crux/kernel; \ |
| 289 | done |
| 290 | @for COLL in $(COLLECTIONS); do \ |
| 291 | mkdir -p $(ISO_ROOT_DIR)/crux/$$COLL; \ |
| 292 | cp ports/$$COLL/*/*.pkg.tar.gz $(ISO_ROOT_DIR)/crux/$$COLL; \ |
| 293 | (cd ports/$$COLL; \ |
| 294 | for i in `find -name "pre-install"`; do \ |
| 295 | cp $$i $(ISO_ROOT_DIR)/crux/$$COLL/`echo $$i | sed -e 's|\.\/||' -e 's|\/|\.|g'`; \ |
| 296 | done; \ |
| 297 | for i in `find -name "post-install"`; do \ |
| 298 | cp $$i $(ISO_ROOT_DIR)/crux/$$COLL/`echo $$i | sed -e 's|\.\/||' -e 's|\/|\.|g'`; \ |
| 299 | done; \ |
| 300 | ); \ |
| 301 | done |
| 302 | @echo "- Starting mkisofs" |
| 303 | @if [ -f $(ISO_FILENAME) ]; then rm -f $(ISO_FILENAME); fi |
| 304 | @mkisofs -r -V CRUX-PPC -U -chrp-boot -hfs -part -probe -no-desktop \ |
| 305 | -hfs-bless $(ISO_ROOT_DIR)/ppc/mac -map iso/boot/map.hfs \ |
| 306 | -b ppc/sam440ep/Parthenope -no-emul-boot \ |
| 307 | -hide-rr-moved -o $(ISO_FILENAME) $(ISO_ROOT_DIR) |
| 308 | @rm -rf $(ISO_ROOT_DIR) |
| 309 | @md5sum $(ISO_FILENAME) > $(ISO_FILENAME).md5 |
| 310 | @echo "Done" |
| 311 | |
| 312 | iso/setup.dependencies: |
| 313 | @for PORT in $(foreach c,$(COLLECTIONS),$(PORTS_$(c))); do \ |
| 314 | echo -n $$PORT": "; \ |
| 315 | prt-get quickdep $$PORT; \ |
| 316 | done > $@ |
| 317 | |
| 318 | # End of file |