1 # Targets specifically for the AVATT payload
3 $(OUTPUT_DIR)/initrd.uncompressed: $(PAYLOAD-y)
4 @ cp -af $(SKELETON_DIR)/* $(INITRD_DIR)
5 @ chmod 0755 $(INITRD_DIR)/linuxrc
6 @ sed -i 's/%%AVATT_PAUSE%%/$(CONFIG_AVATT_PAUSE)/' $(INITRD_DIR)/linuxrc
8 @ echo "Cleaning up shared libraries..."
10 find $(INITRD_DIR) -type f -perm +100 -exec file -rNF '' {} \; | \
11 awk ' /executable.*dynamically/ { print $$1}' > $(INITRD_DIR)/.list
13 (cd $(INITRD_DIR); export CFLAGS="$(CROSS_CFLAGS)"; \
14 python $(BIN_DIR)/mklibs.py \
15 --root $(STAGING_DIR) -d ./ `cat $(INITRD_DIR)/.list` > /dev/null)
16 rm -f $(INITRD_DIR)/.list
18 echo "BUILDROM AVATT $(ROM_VERSION)" > $(INITRD_DIR)/buildrom-version
19 echo -n "Build timestamp: " >> $(INITRD_DIR)/buildrom-version
20 date "+%Y%m%d %H:%M:%S" >> $(INITRD_DIR)/buildrom-version
22 echo "Building the initrd..."
23 install -d $(OUTPUT_DIR)
24 cd $(INITRD_DIR); find . | cpio -o -H newc 2> /dev/null > $@
26 $(OUTPUT_DIR)/initrd: $(OUTPUT_DIR)/initrd.uncompressed
27 @ gzip -9 -c -n $< > $@
29 $(OUTPUT_DIR)/avatt-payload-uncompressed.elf: $(OUTPUT_DIR)/initrd.uncompressed
30 @ echo "Building the uncompressed ELF payload..."
32 @ $(STAGING_DIR)/sbin/mkelfImage --command-line="$(COMMAND_LINE)" \
33 --ramdisk=$(OUTPUT_DIR)/initrd.uncompressed \
34 $(OUTPUT_DIR)/vmlinux $@
37 $(OUTPUT_DIR)/avatt-payload.elf: $(OUTPUT_DIR)/initrd
38 @ echo "Building the ELF payload..."
40 @ $(STAGING_DIR)/sbin/mkelfImage --command-line="$(COMMAND_LINE)" \
41 --ramdisk=$(OUTPUT_DIR)/initrd $(OUTPUT_DIR)/vmlinux $@
43 @ $(BIN_DIR)/checkrom.sh $@
45 $(OUTPUT_DIR)/avatt-payload.elf.lzma: $(OUTPUT_DIR)/avatt-payload-uncompressed.elf
46 @ echo "Compressing the ELF payload with lzma..."
47 @ $(STAGING_DIR)/bin/lzma e $< 2> /dev/null $@
48 @ $(BIN_DIR)/checkrom.sh $@