View Single Post
Old 10-16-2012, 03:46 PM   #700
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,023
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post

@knc1: The u-boot running on the kindle does not have access to environment variables on the host PC, where MfgTool was running when it pushed the hacked u-boot to the kindle. I was planning to try appending a text config file to the u-boot image file though (and adjusting the flash header length to compensate, so it all gets sent over USB). I hope the CRC check does not use the flash header length...
No, I am not that much of a beginner -
The **U-Boot Environment Variables** in the **U-Boot** build!
As in:
Code:
#define CONFIG_EXTRA_ENV_SETTINGS                                       \
        CFG_BOOTFILE                                                    \
        CFG_ROOTPATH                                                    \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
        "addip=setenv bootargs ${bootargs} "                            \
                "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
                ":${hostname}:${netdev}:off panic=1\0"                  \
        "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
        "flash_nfs=run nfsargs addip addtty;"                           \
                "bootm ${kernel_addr}\0"                                \
        "flash_self=run ramargs addip addtty;"                          \
                "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
        "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;"     \
                "bootm\0"                                               \
- - - -
And yes, you have to either patch the checksum or do it the "lab126 way" and no-op the checksum tests.

Which is how they get away with bspatching the u-boot and uImage files and still be able to load them.
If you use the various mkimage tools, you will find that the patched images fail the checksum tests but load and run anyway.
knc1 is offline   Reply With Quote