Changeset 2157

Show
Ignore:
Timestamp:
03/13/07 20:55:38 (5 years ago)
Author:
tg
Message:

add an option to make an “fwcf killer” image

AND NO, YOU CANNOT DO THIS IN A WAY THAT KILLS FWCF ONLY ON
FIRST BOOT, because you cannot write to squashfs, and THIS
MUST BE EXECUTED BEFORE the overlay filesystem is initialised.

Yes, this means you'll have to flash twice. But this is better
than nothing if you can't use failsafe, right?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/Config.in

    r2156 r2157  
    435435          This option is only to prefix the _cross_compile calls with ccache. 
    436436 
     437config FWRT_KILL_FWCF 
     438        bool "Make an image that kills fwcf on *every* boot" 
     439        default n 
     440        depends on FWRT_PACKAGE_FWCF 
     441        help 
     442          This will create an image that, once booted, will erase the fwcf 
     443          filesystem. After booting, you must replace it with an image built 
     444          without this option to be able to use the device normally again. 
     445 
    437446source "package/Config.in.runtime" 
    438447 
  • trunk/freewrt/target/image/common.mk

    r1941 r2157  
    1717install-prepare-mi-post: 
    1818        mkdir -p $(KDIR)/root/tmp 
     19ifneq ($(strip ${FWRT_KILL_FWCF}),) 
     20        -chmod 755 ${KDIR}/root/etc/preinit.arch >/dev/null 2>&1 
     21        echo fwcf erase >>${KDIR}/root/etc/preinit.arch 
     22        -chmod 755 ${KDIR}/root/etc/preinit.arch >/dev/null 2>&1 
     23endif 
    1924        rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \ 
    2025            dd if=$$rng bs=512 count=1 >>${KDIR}/root/etc/.rnd; \