Gentoo Archives: gentoo-embedded

From: Natanael Copa <mlists@××××××.org>
To:
Cc: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] dynamic linked init and initrd
Date: Wed, 04 Aug 2004 16:36:52
Message-Id: 41111078.7030700@tanael.org
In Reply to: Re: [gentoo-embedded] dynamic linked init and initrd by Mike Frysinger
1 Mike Frysinger wrote:
2
3 >On Wednesday 04 August 2004 12:25 pm, Natanael Copa wrote:
4 >
5 >
6 >>BB_FILES = bin/busybox bin/sh $(shell ldd $(LIVE)/bin/busybox | awk
7 >>'{print $$3}' | sed 's:^/::')
8 >>
9 >>to grab the files so it grabbed only the links.
10 >>
11 >>
12 >
13 >but how did you copy them ?
14 >`cp -a` would copy the symlink, `cp <symlink>` should copy the file like you
15 >want
16 >
17 >
18
19 initrd.gz: $(addprefix $(LIVE)/, $(INITRD_FILES))
20 @echo "Making initrd.gz ===>" ;\
21 mkdir -p $(INITRD_TMP) ;\
22 dd if=/dev/zero of=initrd bs=1024 count=$(INITRD_SIZE) ;\
23 $(INITRD_MKFS) initrd ;\
24 mount -o loop initrd $(INITRD_TMP) ;\
25 tar -C $(LIVE) -c $(INITRD_FILES) | tar -C $(INITRD_TMP) -xpv ;\
26 umount $(INITRD_TMP) ;\
27 rmdir $(INITRD_TMP)
28 ;\
29 gzip -f -9 initrd ;\
30 echo -e "<=== initrd.gz done.\n"
31
32 I'm using tar so I get the dirs also. I'd like to keep the links, just
33 add the files the links are pointing to.
34
35 btw it works!!! I got my cd running with busybox/uclibc! (I just added
36 the files manually temprarly to get going)
37
38 --
39 Natanael Copa
40
41 --
42 gentoo-embedded@g.o mailing list

Replies