Ignore:
Timestamp:
Jun 25, 2013, 3:49:28 PM (6 years ago)
Author:
matthijs
Message:

build-system: Fix building with TARGET_ROOTFS_INITRAMFS=y.

This allows a booting the image through TFTP instead of having to flash
the image onto the Fonera. This needs serial access to tell the
bootloader to boot from TFTP instead of internal flash, though.

This patch was tested only on 2.0n.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/target/linux/fonera2n/Makefile

    r2239 r2296  
    126126endef
    127127
     128ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
     129  define Kernel/SetInitramfs/Extra
     130        cp $(LINUX_DIR)/.config $(LINUX_DIR)/.config.tmp
     131        grep -v -e CONFIG_RT2880_ROOTFS_IN_RAM -e CONFIG_RT2880_ROOTFS_IN_FLASH $(LINUX_DIR)/.config.tmp > $(LINUX_DIR)/.config
     132        echo 'CONFIG_RT2880_ROOTFS_IN_RAM=y' >> $(LINUX_DIR)/.config
     133        echo '# CONFIG_RT2880_ROOTFS_IN_FLASH is not set' >> $(LINUX_DIR)/.config
     134        echo 'CONFIG_BLK_DEV_RAM_SIZE=8192' >> $(LINUX_DIR)/.config
     135        echo 'CONFIG_INITRAMFS_LZMA=n' >> $(LINUX_DIR)/.config
     136        echo 'CONFIG_BLK_DEV_RAM_COUNT=16' >> $(LINUX_DIR)/.config
     137        echo 'CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024' >> $(LINUX_DIR)/.config
     138  endef
     139else
     140  define Kernel/SetInitramfs/Extra
     141        cp $(LINUX_DIR)/.config $(LINUX_DIR)/.config.tmp
     142        grep -v -e CONFIG_RT2880_ROOTFS_IN_RAM -e CONFIG_RT2880_ROOTFS_IN_FLASH $(LINUX_DIR)/.config.tmp > $(LINUX_DIR)/.config
     143        echo 'CONFIG_RT2880_ROOTFS_IN_FLASH=y' >> $(LINUX_DIR)/.config
     144        echo '# CONFIG_RT2880_ROOTFS_IN_RAM is not set' >> $(LINUX_DIR)/.config
     145  endef
     146endif
     147
    128148$(eval $(call BuildTarget))
Note: See TracChangeset for help on using the changeset viewer.