wok 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 6a951b1d106b
children 1e80e3a3127f
files linld/receipt linld/stuff/load.u
line diff
     1.1 --- a/linld/receipt	Sat Dec 13 10:57:19 2014 +0100
     1.2 +++ b/linld/receipt	Sun Dec 14 01:53:01 2014 +0100
     1.3 @@ -11,11 +11,21 @@
     1.4  WEB_SITE="$BASE_SITE/README.txt"
     1.5  WGET_URL="$BASE_SITE/$TARBALL"
     1.6  
     1.7 +BUILD_DEPENDS="dosbox"
     1.8 +
     1.9  # Rules to configure and make the package.
    1.10  compile_rules()
    1.11  {
    1.12  	mv DIST $src 2> /dev/null
    1.13  	cd $src
    1.14 +	patch -p0 < $stuff/load.u
    1.15 +	sed -i 's/^@pause/rem &/' LINLD097/*.BAT
    1.16 +	unix2dos > MAKE.BAT <<EOT
    1.17 +d:
    1.18 +cd linld097
    1.19 +!compile.bat
    1.20 +EOT
    1.21 +	SDL_VIDEODRIVER=dummy dosbox MAKE.BAT -exit -c "mount D $src"
    1.22  }
    1.23  
    1.24  # Rules to gen a SliTaz package suitable for Tazpkg.
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/linld/stuff/load.u	Sun Dec 14 01:53:01 2014 +0100
     2.3 @@ -0,0 +1,29 @@
     2.4 +--- LINLD097/LOAD.CPP
     2.5 ++++ LINLD097/LOAD.CPP
     2.6 +@@ -400,10 +400,8 @@
     2.7 + 
     2.8 +     if(first1k->boot_flag != 0xAA55)
     2.9 +         die("No boot signature (55,AA). It's not a kernel");
    2.10 +-    if(first1k->header != HdrS)
    2.11 ++    if(first1k->header != HdrS) // starting linux 1.3.73
    2.12 +         die("No 'HdrS' signature (kernel is too old)");
    2.13 +-    if(first1k->version < 0x202)
    2.14 +-        die("Loader protocol version is less than 2.02 (kernel is too old)");
    2.15 +     if(!(first1k->loadflags & 0x01))
    2.16 +         die("I can't load bzImages low");
    2.17 + 
    2.18 +@@ -414,7 +412,13 @@
    2.19 +     // Tell rm loader some info
    2.20 + 
    2.21 +     first1k->vid_mode = vid_mode;
    2.22 +-    first1k->cmd_line_ptr = 0x98000;
    2.23 ++    if(first1k->version >= 0x202) { // starting linux 2.4.0-test3-pre3
    2.24 ++        first1k->cmd_line_ptr = 0x98000;
    2.25 ++    }
    2.26 ++    else {
    2.27 ++        first1k->cl_magic = 0xA33F;
    2.28 ++        first1k->cl_ofs   = 0x8000;
    2.29 ++    }
    2.30 +     first1k->type_of_loader = 0xff; // kernel do not know us (yet :-)
    2.31 +     // * will be called just before rm -> pm
    2.32 +     first1k->realmode_switch_ofs = ofs(last_ditch);