wok annotate linld/stuff/load.u @ rev 18801

syslinux: auto unlzma needs size to work
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jan 11 17:54:50 2016 +0100 (2016-01-11)
parents ab69381ebbcc
children df186455938f
rev   line source
pascal@17446 1 --- LINLD097/LOAD.CPP
pascal@17446 2 +++ LINLD097/LOAD.CPP
pascal@17446 3 @@ -400,10 +400,8 @@
pascal@17446 4
pascal@17446 5 if(first1k->boot_flag != 0xAA55)
pascal@17446 6 die("No boot signature (55,AA). It's not a kernel");
pascal@17446 7 - if(first1k->header != HdrS)
pascal@17446 8 + if(first1k->header != HdrS) // starting linux 1.3.73
pascal@18228 9 - die("No 'HdrS' signature (kernel is too old)");
pascal@18228 10 + die("No 'HdrS' signature (kernel is too old, try /usr/bin/tobzimage)");
pascal@17446 11 - if(first1k->version < 0x202)
pascal@17446 12 - die("Loader protocol version is less than 2.02 (kernel is too old)");
pascal@17446 13 if(!(first1k->loadflags & 0x01))
pascal@17446 14 die("I can't load bzImages low");
pascal@17446 15
pascal@17446 16 @@ -414,7 +412,13 @@
pascal@17446 17 // Tell rm loader some info
pascal@17446 18
pascal@17446 19 first1k->vid_mode = vid_mode;
pascal@17446 20 - first1k->cmd_line_ptr = 0x98000;
pascal@17446 21 + if(first1k->version >= 0x202) { // starting linux 2.4.0-test3-pre3
pascal@17446 22 + first1k->cmd_line_ptr = 0x98000;
pascal@17446 23 + }
pascal@17446 24 + else {
pascal@17446 25 + first1k->cl_magic = 0xA33F;
pascal@17446 26 + first1k->cl_ofs = 0x8000;
pascal@17446 27 + }
pascal@17446 28 first1k->type_of_loader = 0xff; // kernel do not know us (yet :-)
pascal@17446 29 // * will be called just before rm -> pm
pascal@17446 30 first1k->realmode_switch_ofs = ofs(last_ditch);