有趣的u-boot移植教程

深夜看到u-boot的README里的移植教程,甘拜下风!
城会玩。

int main(int argc, char *argv[])
{
    sighandler_t no_more_time;

    signal(SIGALRM, no_more_time);
    alarm(PROJECT_DEADLINE - toSec (3 * WEEK));

    if (available_money > available_manpower) {
        Pay consultant to port U-Boot;
        return 0;
    }

    Download latest U-Boot source;

    Subscribe to u-boot mailing list;

    if (clueless)
        email("Hi, I am new to U-Boot, how do I get started?");

    while (learning) {
        Read the README file in the top level directory;
        Read http://www.denx.de/twiki/bin/view/DULG/Manual;
        Read applicable doc/*.README;
        Read the source, Luke;
        /* find . -name "*.[chS]" | xargs grep -i <keyword> */
    }

    if (available_money > toLocalCurrency ($2500))
        Buy a BDI3000;
    else
        Add a lot of aggravation and time;

    if (a similar board exists) {   /* hopefully... */
        cp -a board/<similar> board/<myboard>
        cp include/configs/<similar>.h include/configs/<myboard>.h
    } else {
        Create your own board support subdirectory;
        Create your own board include/configs/<myboard>.h file;
    }
    Edit new board/<myboard> files
    Edit new include/configs/<myboard>.h

    while (!accepted) {
        while (!running) {
            do {
                Add / modify source code;
            } until (compiles);
            Debug;
            if (clueless)
                email("Hi, I am having problems...");
        }
        Send patch file to the U-Boot email list;
        if (reasonable critiques)
            Incorporate improvements from email list code review;
        else
            Defend code as written;
    }

    return 0;
}

void no_more_time (int sig)
{
      hire_a_guru();
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值