wok-next diff linld/stuff/load.u @ rev 17446

linld: add linux 2.0-2.4 support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 14 01:53:01 2014 +0100 (2014-12-14)
parents
children df58e6c974a3
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linld/stuff/load.u	Sun Dec 14 01:53:01 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +--- LINLD097/LOAD.CPP
     1.5 ++++ LINLD097/LOAD.CPP
     1.6 +@@ -400,10 +400,8 @@
     1.7 + 
     1.8 +     if(first1k->boot_flag != 0xAA55)
     1.9 +         die("No boot signature (55,AA). It's not a kernel");
    1.10 +-    if(first1k->header != HdrS)
    1.11 ++    if(first1k->header != HdrS) // starting linux 1.3.73
    1.12 +         die("No 'HdrS' signature (kernel is too old)");
    1.13 +-    if(first1k->version < 0x202)
    1.14 +-        die("Loader protocol version is less than 2.02 (kernel is too old)");
    1.15 +     if(!(first1k->loadflags & 0x01))
    1.16 +         die("I can't load bzImages low");
    1.17 + 
    1.18 +@@ -414,7 +412,13 @@
    1.19 +     // Tell rm loader some info
    1.20 + 
    1.21 +     first1k->vid_mode = vid_mode;
    1.22 +-    first1k->cmd_line_ptr = 0x98000;
    1.23 ++    if(first1k->version >= 0x202) { // starting linux 2.4.0-test3-pre3
    1.24 ++        first1k->cmd_line_ptr = 0x98000;
    1.25 ++    }
    1.26 ++    else {
    1.27 ++        first1k->cl_magic = 0xA33F;
    1.28 ++        first1k->cl_ofs   = 0x8000;
    1.29 ++    }
    1.30 +     first1k->type_of_loader = 0xff; // kernel do not know us (yet :-)
    1.31 +     // * will be called just before rm -> pm
    1.32 +     first1k->realmode_switch_ofs = ofs(last_ditch);