diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/memtest86+ |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/memtest86+')
24 files changed, 1098 insertions, 0 deletions
diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest new file mode 100644 index 000000000000..5ac3a7aa210a --- /dev/null +++ b/sys-apps/memtest86+/Manifest @@ -0,0 +1,29 @@ +AUX 39_memtest86+ 1610 SHA256 f25141a2bac29deebbd2cf00423cbdcc3741abcf4df090b1b02c5342f8630b9f SHA512 49ff9ff7dccf92a2d287191b6e4c91d418f064f6018d19081d1086b18a2a61ee043ccf93077f129189b8da6598dec3af4f738ab992d9cddb1f7f39cd8b6e71ad WHIRLPOOL 3f652651dbbca4af2e6282d180b9a5f7cb686b429cc14b3c291372fdfef0b6c1d44c8836e7dd0510ad3fff30911c6f528bec3be94c4651ea11d2f19931137716 +AUX 39_memtest86+-r1 1702 SHA256 b0c0ec336e6e3a8b6bde2a76aa5d773507374312928ad0843637d3d6cc021a33 SHA512 ef2d86bd902f44905921880c630a85d3c9763bea3b79211f64346f1f55a5f31ed0b20a80f9f0c3914de1f33b7bd7d3471762f17065183ced185de52d34f2068f WHIRLPOOL 43777ed9ef4414574f8620a09ab024c5d77125022d7f3fb3b7387c10abf0f8883209af5275692a18c6a65d29c8b7e987e36208890cc9d40aa74512d172a30329 +AUX make-memtest86+-boot-floppy 2499 SHA256 88d8768592abdd224b9cd041152c78ef50eedeef3620f0d00f51c0eaeef8158a SHA512 28649d630c4624573a5cf4279f6207cf44707978d8a18f2c614997f641038f2da731bb5c3b26066812a5c02d926c40020e74820b1a4eb2b4732a76686c52c260 WHIRLPOOL c2600dd87a20aa8ab595e1af74a353bd2c4e8ae8b2e4738967503007ad242ff53d23525d6e3692e5990909aafc2456a5f4f8d7e4c23063bebbcf9331c4031438 +AUX make-memtest86+-boot-floppy.1 1165 SHA256 240c921fe2cbb4d70b5e06fc06d798c6018ece8a238fdeebf3ad02a6043ed5d7 SHA512 8b5b6397e50cf4d48aeda31de4c1f72493e97db52ff45966716df8f9b0fbbd8d4ed71e289c0113ef53fa52a7ea6df4c107c63ca70f90c951dd085c05b64db147 WHIRLPOOL bd7d87c7cd4b16c0bcec083d9c73a8ef8dc627699058318407a20b103014cb03fe34389f2e85f3e16e88521971983e50d9f3e1dd45b7471356e0797544e8a4d5 +AUX memtest86+-1.70-gnu_hash.patch 485 SHA256 07bb65affa496910f0c91457c5c21e31a0e523e0c360ebf602b47296748f4bac SHA512 3988daa31cefe88a207aaa56afcb9e1f70a7bccbf9c943e992084e43507497f20bcf72b06f6768ce436c36306b773ba4271d247bef17ab5ab529666d036823b8 WHIRLPOOL 96a44e3132aa97bdc26de8ada35dcb2a012f021d854967b07cdb1a098a65aa5700b10ae97bae098b2b204c2afc360a8db119862013f9122385d66ee24ced26bb +AUX memtest86+-2.01-hardcoded_cc.patch 1209 SHA256 79de7846fc10bb70f018bda0daad82082600a5a7bc35d7715b25294018e47d97 SHA512 2295e2049e439471ae2d5700c92e0142060c6a0f6fa9c3814c0fe0d6153f575a4530b5effe6f2b17ece2589ec360f69d79eff396149d9c0a4658847acb588c2c WHIRLPOOL 6d12d33cc71044348f634b0cd31bf08fae9ac79ac478a2b5e88cc10586747d53acbc54497fbd0356fa225b0c326941642b1164abc8231c2832fc0ac75100a347 +AUX memtest86+-4.00-hardcoded_cc.patch 1217 SHA256 1e3df89afe8734cea0fdc90131b9daf3f93d8d96451d38771e5225fde2ba1c4f SHA512 d362b4f57209d6437c48f079b5820449badd88ee5efee3e83417cdfdf249804d17ccea6cb5ac7b4047e95466bbb50ad1c6725b3d0e51845ea3a32309965ac1a8 WHIRLPOOL d95b9845099e044a4d8384d849144ade4239ce6a69f6e0c678ce98873c21615d420ba3f20e6bddb740efa889103e8c22c1d020f81e920d2117b1022880fada29 +AUX memtest86+-4.20-hardcoded_cc.patch 1222 SHA256 fa8d1a7ac3b15975941aa562ec48700a671e951321713b3481e93758759c3f92 SHA512 ae15a6505af65ed176464f30f3beeb78a62799fb4f945e2003598fdbfcf54b75cd859afd868e9a1e9e4cab729411f072bf0a40bd296b9d770f6de140de14c7f1 WHIRLPOOL 8c8de61054cb32b4c192285ed6295ef991e72af7ac3f37fbd80d310a989f2c4999cdf42fc6b43cb43d11caecd82df2eb3c9e82b9dc26882ba2b2887a038ede73 +AUX memtest86+-5.01-gcc-473.patch 1308 SHA256 2b1e28c10afc766134154cf6419a8a7321eb43157573b9fe175a22a65a9a06cd SHA512 94427ae0b78c9e24a8f4db6285a04ec468d17b6b4bb26550abb006a9fa37b52c871cb4cfb0fb2489e373b0ea9748106938f7fb4ad0f31968e151e37294199a55 WHIRLPOOL 333307fac7c7ea7b7173cca6abcf6c9457845b4d9757400b6abc99de8d3083e4249f611312b52d596d892f33d4a149c08a0ccaf89d5cf0f161326ac5ead585a2 +AUX memtest86+-5.01-hardcoded_cc.patch 484 SHA256 883354dabd02201b95ce2c1948b2d1e4ce65bdefb81ff21e5c2ba673c0e3c245 SHA512 a7008dcc1136283cdfc0dd5e17b0c4c5816d2799d50fa7c63e14b258f0ce34031ec782e199b826a0cc909464ab1f5aaf651ede6681ddac7d5ca416b8412106be WHIRLPOOL d9d28af1793d946e842cb4f8bfe4923c0f4e3e6b432a1bcfec8d5de4e9cd280542486abe2615f069eb41bb9d2f331c1c26ddf4ab991c51684239346fe5bd58e8 +AUX memtest86+-5.01-io-extern-inline.patch 1183 SHA256 81df3823f115510155077047aa006428e1c868e3cbabb0760f75680de37683ed SHA512 c307d268d2e3fc0c4517f627eea0c53679cb6f76cba06bb822beb2b6121e0ce0bdbe59539ff5fe716f0fd0083fa987d8a44d2999b888ccc05f8d3d9d693ded0b WHIRLPOOL 17d28410ca6c8fb6c8f80f6cc899e2f5246d1e6a18cac5822bcd5e584de7089af9f3a5dec83ac6e7f147dd7796936f87f449bf065dfb3259bd2c3a5d5351258a +AUX memtest86+-5.01-no-C-headers.patch 1078 SHA256 0108f8e7788d9d59121cb5d3ce0a445df3c3520a754583578e1075bd0de7cea0 SHA512 8720da16f03e7ea511b1b26ff19f105737e698f9604cd87256b5a3703a7347b0334c1e0ec9ef3b7aafa2a8bca1de6d6deeb865a1de343cc5c3ccd13663fa796e WHIRLPOOL 47870d020ed9daeae00779387f8fff267d26e7bc80f950ad71dd8c8d3be43eb32a57f79dcf94d439c3c36c05188142b9618727b44b97e6e09df6196f1d0fad2a +AUX memtest86+-5.01-no-clean.patch 603 SHA256 1e7b306b219af4214dea3c706961c7f26af4613df678cada750f5a6768b8788f SHA512 39b86324428be68192f66a767d33b53e15cffb0f96857dfb4b0e96f0ba2e52953cfd2079a6891a31e73d529e33632122c40e03f227d2203a6ff25dc03f23a056 WHIRLPOOL c1cb1733f0ffc5cafbd4e1c82f6ce86709d02cf3be0eb7632382814641cfb20951a6dcf8f8f09fb00f29efb3f8b8620b94ad5fc15fd40d0e2be7857025628fa6 +AUX memtest86+-5.01-no-scp.patch 388 SHA256 9aa74285a2115f2b5c5ff403a6030cc93272989bea94aba06740e61f78e351cf SHA512 4b14e16fbe8e69a4d532e8327486fd2434798613a784aca24b381f1fb5ae39839344281494c32dfd0fe8a8a46b744abdaac7884be4a95a87b635e0baea63731a WHIRLPOOL 1dabef74285f5e6561c838d7c987b9a36285f2f91e9a73d1e022e84ca6f674b33694f46a26833338d1c358c683c4098df3d77e612ba00a80aaac536c19e30021 +AUX memtest86+-5.01-reboot-def.patch 326 SHA256 258696c3540a0be5cc87e390e4b92a0642490e801ba887170e6d55152356b32b SHA512 2309da17ae7bfd32137b02c0533a9d4f30c95d70dea309a009219457f07f36e0b9192e1ac55485513a23d6364247476886a4720ffe83d33a2c493124a82797a1 WHIRLPOOL 28b0bab567a7f4af588b730477a28800d552c6ed2bd206e7539c03f5183b127f79950c2a2479e6ee82d92f59b159efef7d573f76c7f38bb72d5fdb9c50bde8d2 +AUX memtest86+-5.01-test-random-cflags.patch 679 SHA256 53f50ee7b803c21159731fb5920e524b1dd7884d60eeeb51851020754400baa4 SHA512 a000cf28d69396b0707519bb995f086457f8fa5283299164d969dbf02abea86b566016d71fac7e887c6089bc39c58be9e5c885cfb5f8e7eb815ea1741e097bb6 WHIRLPOOL a083e078774310ff2aaff02d9c7a8695f29a838cdb18ac4346add029f9b8de6269e39020f62b95223a950912824e69d7f6bfb74bc18fac943a0d6791dd9fc290 +DIST memtest86+-2.01.tar.gz 165984 SHA256 35ad452f4fd12f07756abccccf1bce70d42596c2c5e9c29247ffc8e0b76bd1ae SHA512 fb8fd8f7e3f597701a031189c18bd95247fe1fc936838359411a32a24fb8845a0012ebd2e02bb399fad1fab0f493dbe475a3e646c272d10e6343af4646d8347b WHIRLPOOL ef08df9cd56f7f868c5dbe2740762ff804e2b7e0163e7ff89716bfdc038de7c5e7bd949a94eb7df3caf699b997e261ee96c0e488d3c3543215689e08732b35a9 +DIST memtest86+-4.00.tar.gz 270327 SHA256 6ec42f549da81b715bfc5c55b93b74774fb5c35f7578c7eecebab3ca37866ca4 SHA512 3d2075ec5fe18ce356f75bf473aa189ba6153269c63be263f13e7d553f468a57f147f1e62dad16ad9ec4fb57724e1c67c69eeffb33db3e1f6300357f26b586ba WHIRLPOOL c084f64ed1c658312ed8fe28e1366eb112acfb220f2cc516e9f35df6965fb280d7205b0786febc5bb402b41fee236d9aea6b629f20db09f8345d58a0d0777a71 +DIST memtest86+-4.20.tar.gz 206044 SHA256 5630ce978d0e6b671891df4253fc5c54659764d0cdfc7515ac0df3d8dd9e8737 SHA512 2213a64cd3036f840dd816dd49b62b0f082e1fbfe64e02f52370f04e39857f042dc8bc0044c1a88ba678e72c1eb8629aa706fabfd3c052e41c29c073f4e8c441 WHIRLPOOL 16b2f0a447516b24e4e29cf526ffc2ba03406105473c1d0cff44d737473b81db0482131385f2a39a5d202b3ccd52300f2c7109adf1b64b8bdb0a5244cb32d2cb +DIST memtest86+-5.01.tar.gz 214877 SHA256 142127b7953fbd829b1057fb64a78d3340c2b771484230a7347e94530a0d9039 SHA512 d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7 WHIRLPOOL c8e240c8420990c93156fcd407a4b00d350392bbf8e974398b4d51fa219d33012b4e0d60f58cb2dff59c06e36e322467031bc0231d77d4e773d97e30939d3c8f +EBUILD memtest86+-2.01.ebuild 1274 SHA256 78f7c2d83735752efc1d3ebb396c24bb0894b41059e58c92e643bfd3ecec11f0 SHA512 655c83fac387e581f37a3e7e8971df20070f98c683eedc9e23d5aa9c0d6fbd769079b03085e1d7883026ad82cb5cebbf07ecd7be72cc64f36cf4335652401a54 WHIRLPOOL 4764032039e3da3cd25863d94abd505b5bceda9eabe7c3081cd54a87ddf86f44de88861c5d63cb00f866e9e5d70d51a0958c4ef952b424ba60feb9992509dc41 +EBUILD memtest86+-4.00.ebuild 1924 SHA256 70e86537974c3db74e77f72b9ee6cc721e9941995662a9c3636c0644970e0b8c SHA512 f8227e6fa3356670da2b6619aa5f3a2256e65727d6a030c625f9318c25938bceff3944c3f954fcdc5dd3e1f7cfc7deebb02266fe5a16c5c801804dc36b826c76 WHIRLPOOL 533ba6ab11154f1a14013eb02ba4290d83845a319e8f8f5375886ddfc9fc3caba1a1c4295fd5de4b9418c4ce63eeaaef6547516fafceb527c6f04fc6f56de949 +EBUILD memtest86+-4.20-r1.ebuild 1950 SHA256 9bf51887179808e669ab771450b1ce78c070b69bf06e5964988b1779b312fd5c SHA512 5bff802747e652f95f2b8bd7c4d73efaf581c5008f1bb6c17aa492335939012b9ef661a2986447a0e6f9493c522ea9cbd93f4ca3e6164f7142543b8a05adf2c4 WHIRLPOOL c03603846ca7198bf3e807a8a5531c56ec2da8d78bacbf8390c74538800a7b5eb08ab2120df23d1909d5cacf00ff2212d43ce4c74cf5ecb4d305911c90ad5a5b +EBUILD memtest86+-4.20-r3.ebuild 1756 SHA256 3fc21de7456c7f625596a923cb3b18e3b4bf592f5765305b25bf4f6e38c6b53b SHA512 3cc41d0ccd74282b5ed2929359829f4377478605b06c868728e9446f3b1df8a5f38166d793f0c800428b17b724118e0eafdfb44791ef577c8bef87d614d422e2 WHIRLPOOL 9f2dbf8b8398607c8635263aeeda91a413cd6277e81eac048ee4f231603fcd2bfcadb2ce565c57335dff18287d4c7e4deec22f73d01659469e15896b5b7a5bcd +EBUILD memtest86+-5.01-r2.ebuild 2384 SHA256 18048986af013056134c2f2a3b904203ce615e4dbf1c17ab12088ecbfdf544fe SHA512 a2912927e8d490829a187959711c85438649a912e440af637f1a9d401a574dcaf368203337123f5c9168897e5bdca0658170c2b07861bc4b10b40e53693820f4 WHIRLPOOL 47620812240b8573e38e97f2625ab1147cc76368115d79b7121c5cd9c0ca1cf3d31462f17c14236719100dfbf8bcfbf185c565a60ddcce2d1c498fe6c0966f23 +EBUILD memtest86+-5.01-r3.ebuild 2408 SHA256 7b1fa7072ccce8124e2a57c5be25824416fbb7260acc065267f327556c73d062 SHA512 8bd022e82a78e0832a97700499ad2842a6c1d9b4816a0a86418e443ddabfd231c35a9e4bb8fcdbc2b5f768dd2add1bc37f15c1aadc1f93a2dbb87c4e5200faf9 WHIRLPOOL ea0f09a6eaad6f7c7c9d61c843a4e5b39759577d93f6d5b7df2de6db32b5ca6ee298fbe64d55b98b3e0a6cf89d8632b2884e940dc4d97c1bc92c93efcd686e4c +MISC ChangeLog 5555 SHA256 37a595591a6d71066d1ad9fb8924c84d0510cd4a0665e68c03a2fabb34f74a82 SHA512 e0d15acdb37cbe054aa67690545548769137581d173b3805d151897d1c605cf7f24def17652e3957742914b0509d97981875657c10eeecec652e9e4324a4312c WHIRLPOOL 2086cf3d2261280618621d2a04a6d2145dc63d7df92b9d103b5aab5a55ff30a56e7d10fe8db37a687546e059d05cf3a0022484891d2e3ac8115f73145fd198d6 +MISC ChangeLog-2015 12311 SHA256 25e201153484770fc7c6777e035d25ea82fe7b49cbbee171a84ef9f14bf43940 SHA512 43b5c903ea1f9ad582cef28eb0b432f4f5d8db4b515c9ce18278e88d0fe2478182178586a23af0a44b9ff543f80eab8de47ac0cab1b88ff26c7c4357fbe72fb4 WHIRLPOOL 874d3c8216c682e7cb23bd00a540ae73c041770858d9b201e2f7e4f292997e200bcee46c6213646ec4b8a754c5ff81d821faae2d8b694df8f918367838033de3 +MISC metadata.xml 476 SHA256 e062008b6d40cbe240c193e9af25b703e9d6ce03fc7fa28fbe3d97e3fa487a1e SHA512 2db5664e0ed634a23de2a1b03cec34a7ffb262730b2f561890ba1ff135296ce493cb13f83b4ef7b72b36ecd72f58d68905ddc408b02c3a152281e93086e11e1e WHIRLPOOL bf300cdfd5efb074369718ee5cd7e93d65d3bd4586c775a70cd3f4b0c7e1b6ffb739104543c35039bf4e9d922042f0cdbe4866066f2df129f61f6bb98dde32a2 diff --git a/sys-apps/memtest86+/files/39_memtest86+ b/sys-apps/memtest86+/files/39_memtest86+ new file mode 100644 index 000000000000..9c9067a5e736 --- /dev/null +++ b/sys-apps/memtest86+/files/39_memtest86+ @@ -0,0 +1,67 @@ +#!/bin/sh + +. /usr/share/grub/grub-mkconfig_lib + +memtest=/boot/memtest86plus/memtest + +memtestbsd=/boot/memtest86plus/memtest.netbsd + +if [ -f "${memtest}" ] && [ -f "${memtestbsd}" ]; then + multiple_memtest=true +fi + +submenu_indentation="" +if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then + submenu_indentation="${grub_tab}" + cat <<EOF +submenu 'Memtest86+' { +EOF +fi + +if [ -f "${memtest}" ]; then + gettext_printf "Found memtest image: %s\n" "${memtest}" >&2 + + device="$("${grub_probe}" --target=device "${memtest}")" + path="$(make_system_path_relative_to_its_root "${memtest}")" + cat <<EOF +${submenu_indentation}menuentry 'Memtest86+' { +EOF + + if [ -n "{submenu_indentation}" ]; then + prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab + else + prepare_grub_to_access_device "${device}" | grub_add_tab + fi + + cat <<EOF + ${submenu_indentation}linux16 "${path}" +${submenu_indentation}} +EOF +fi + +if [ -f "${memtestbsd}" ]; then + gettext_printf "Found memtest image: %s\n" "${memtestbsd}" >&2 + + device="$("${grub_probe}" --target=device "${memtestbsd}")" + path="$(make_system_path_relative_to_its_root "${memtestbsd}")" + cat <<EOF +${submenu_indentation}menuentry 'Memtest86+ (netbsd)' { +EOF + + if [ -n "${submenu_indentation}" ]; then + prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab + else + prepare_grub_to_access_device "${device}" | grub_add_tab + fi + + cat <<EOF + ${submenu_indentation}knetbsd "${path}" +${submenu_indentation}} +EOF +fi + +if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then + cat <<EOF +} +EOF +fi diff --git a/sys-apps/memtest86+/files/39_memtest86+-r1 b/sys-apps/memtest86+/files/39_memtest86+-r1 new file mode 100644 index 000000000000..20422b74d65a --- /dev/null +++ b/sys-apps/memtest86+/files/39_memtest86+-r1 @@ -0,0 +1,69 @@ +#!/bin/sh + +. /usr/share/grub/grub-mkconfig_lib + +memtest=/boot/memtest86plus/memtest.bin + +memtestelf=/boot/memtest86plus/memtest + +if [ -f "${memtest}" ] && [ -f "${memtestelf}" ]; then + multiple_memtest=true +fi + +submenu_indentation="" +if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then + submenu_indentation="${grub_tab}" + cat <<EOF +submenu 'Memtest86+' { +EOF +fi + +if [ -f "${memtest}" ]; then + gettext_printf "Found memtest image: %s\n" "${memtest}" >&2 + + device="$("${grub_probe}" --target=device "${memtest}")" + path="$(make_system_path_relative_to_its_root "${memtest}")" + cat <<EOF +${submenu_indentation}menuentry 'Memtest86+' { +EOF + + if [ -n "{submenu_indentation}" ]; then + prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab + else + prepare_grub_to_access_device "${device}" | grub_add_tab + fi + + cat <<EOF + ${submenu_indentation}linux16 "${path}" +${submenu_indentation}} +EOF +fi + +if [ -f "${memtestelf}" ]; then + gettext_printf "Found memtest image: %s\n" "${memtestelf}" >&2 + + device="$("${grub_probe}" --target=device "${memtestelf}")" + path="$(make_system_path_relative_to_its_root "${memtestelf}")" + cat <<EOF +${submenu_indentation}menuentry 'Memtest86+ (ELF)' { +EOF + + if [ -n "${submenu_indentation}" ]; then + prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab + else + prepare_grub_to_access_device "${device}" | grub_add_tab + fi + + # We use knetbsd as a lazy way of booting an ELF. + # It's not actually related to NetBSD at all. + cat <<EOF + ${submenu_indentation}knetbsd "${path}" +${submenu_indentation}} +EOF +fi + +if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then + cat <<EOF +} +EOF +fi diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy new file mode 100644 index 000000000000..9c225c740bf4 --- /dev/null +++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Script for making a memtest86 boot floppy using GRUB as bootloader +# + +# (c) 2003 Peter Loje Hansen <pl@2m.dk> +# - original version +# (c) 2004 Yann Dirson <dirson@debian.org> +# - added parameters +# - ability to work on a floppy image instead of a real floppy +# - adapted patches from Martin Koeppe <martin@koeppe-net.de>, to use +# mtools and install full grub + +# TODO: +# - add a flag to generate a default boot entry for (hd0) + +set -e + +MEMTEST=/boot/memtest86plus/memtest.bin +FLOPPYIMAGE=/dev/fd0 +GRUBBIN=/sbin/grub +GRUBLIB=/lib/grub +MFORMAT=/usr/bin/mformat + +arch=$(uname -m) + +case "$arch" in + i386|i486|i686) GRUBARCH=i386-pc;; + x86_64) GRUBARCH=x86_64-pc;; + *) error "Unsupported architecture: $arch";; +esac + +error() +{ + echo >&2 "$0: $*" + exit 1 +} + +needsarg() +{ + [ $1 -ge 2 ] || error "syntax error" +} + +[ -d $GRUBLIB ] || error "Can't find $GRUBLIB - did you install a recent grub package (0.95+cvs20040624 or later) ?" +[ -x $MFORMAT ] || error "Can't find mformat - did you install the mtools package ?" + +while [ $# -gt 0 ] +do + case "$1" in + --help) echo "$0 [--memtest $MEMTEST] [--floppyimage $FLOPPYIMAGE]"; exit 0 ;; + --memtest) needsarg $#; MEMTEST="$2"; shift ;; + --floppyimage) needsarg $#; FLOPPYIMAGE="$2"; shift ;; + *) error "syntax error" ;; + esac + shift +done + +MOUNTPOINT=$(mktemp -d) + +if [ -b "$FLOPPYIMAGE" ] +then + FINALDEV="$FLOPPYIMAGE" + FLOPPYIMAGE="$(mktemp)" +else + FINALDEV="" +fi + +echo "* Creating msdos file system" +echo +if [ ! -s "$FLOPPYIMAGE" ]; then + # unless a non-empty image exists, create a blank one first + dd bs=1024 count=1440 if=/dev/zero of="$FLOPPYIMAGE" +fi +# FIXME: "-f 1440" should probably be dropped +mformat -i $FLOPPYIMAGE -f 1440 :: + +mmd -i $FLOPPYIMAGE ::/boot +mmd -i $FLOPPYIMAGE ::/boot/grub + +echo +echo "* Installing GRUB files" +mcopy -v -i "$FLOPPYIMAGE" - ::/boot/grub/menu.lst <<EOF +color green/black light-green/black +default 0 +timeout 10 +title memtest +kernel (fd0)/boot/memtest.bin +EOF +mcopy -v -i "$FLOPPYIMAGE" $GRUBLIB/$GRUBARCH/* ::/boot/grub + +echo +echo "* Installing $MEMTEST" +mcopy -v -i "$FLOPPYIMAGE" "$MEMTEST" ::/boot/memtest.bin + +echo +echo -n "* Installing GRUB" +$GRUBBIN --batch --device-map=/dev/null <<EOF +device (fd0) $FLOPPYIMAGE +root (fd0) +setup (fd0) +quit +EOF + +if [ -n "$FINALDEV" ]; then + echo + echo "Insert a writable floppy for $FINALDEV and press enter" + read FOO + + dd bs=1024 if="$FLOPPYIMAGE" of="$FINALDEV" + rm "$FLOPPYIMAGE" +fi diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 new file mode 100644 index 000000000000..e1283e5efc8f --- /dev/null +++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 @@ -0,0 +1,39 @@ +.\" Man page for make-memtest86+-boot-floppy + +.TH make-memtest86+-boot-floppy 1 + +.SH NAME +make-memtest86+-boot-floppy \- create a memtest86+ boot-floppy using GRUB. + +.SH SYNOPSIS + +.B make-memtest86+-boot-floppy [ \-\-memtest +.I <path to memtest86+-image> +.B ] [ \-\-floppyimage +.I <path to floppyimage/device> +.B ] + +.SH DESCRIPTION +.B make-memtest86+-boot-floppy +can create a memtest86+ boot floppy using GRUB as the bootloader. + +.SH OPTIONS + +.IP "\-\-memtest <path to the memtest-image>" +Path to the memtest86+-image, default is /boot/memtest86+.bin. + +.IP "\-\-floppyimage <path to the floppyimage or device>" +File or device where the boot-image should be written to, default is /dev/fd0. + +.IP "\-\-help" +Display a short message about the options of the tool. + +.SH AUTHOR +This man-page has been written by Thomas Schmidt <thomas@thsnet.de> +.PP +Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU General Public License, Version 2 any +later version published by the Free Software Foundation. +.PP +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common\-licenses/GPL. diff --git a/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch b/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch new file mode 100644 index 000000000000..5a9e06dc06d7 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch @@ -0,0 +1,11 @@ +diff -Naurp memtest86+-1.70-orig/memtest_shared.lds memtest86+-1.70/memtest_shared.lds +--- memtest86+-1.70-orig/memtest_shared.lds 2007-01-27 13:34:16.000000000 +0100 ++++ memtest86+-1.70/memtest_shared.lds 2007-01-27 13:41:30.000000000 +0100 +@@ -18,6 +18,7 @@ SECTIONS {
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ .dynamic : { *(.dynamic) }
+
+ .rel.text : { *(.rel.text .rel.text.*) }
diff --git a/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch new file mode 100644 index 000000000000..3b07731daadd --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch @@ -0,0 +1,30 @@ +diff -Naurp memtest86+-2.01-orig/Makefile memtest86+-2.01/Makefile +--- memtest86+-2.01-orig/Makefile 2008-03-11 21:04:28.000000000 +0100 ++++ memtest86+-2.01/Makefile 2008-03-11 21:05:25.000000000 +0100 +@@ -8,10 +8,9 @@ + # + FDISK=/dev/fd0 + +-AS=as -32 +-CC=gcc +- +-CFLAGS=-Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC ++CPPFLAGS=-m32 ++CFLAGS=-Wall -m32 -march=i486 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector ++ASFLAGS=-32 + + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ + config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o \ +@@ -47,10 +46,10 @@ memtest.bin: memtest_shared.bin bootsect + memtest_shared.bin -o memtest.bin + + reloc.o: reloc.c +- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c ++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c + + test.o: test.c +- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c ++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie -nopie test.c + + clean: + rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin diff --git a/sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch new file mode 100644 index 000000000000..f2950b64e807 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch @@ -0,0 +1,30 @@ +diff -Nuar --exclude '*.orig' --exclude '*rej' --exclude '*~' memtest86+-4.00.orig/Makefile memtest86+-4.00/Makefile +--- memtest86+-4.00.orig/Makefile 2009-09-21 17:35:46.000000000 -0700 ++++ memtest86+-4.00/Makefile 2009-09-25 09:04:23.000000000 -0700 +@@ -8,10 +8,9 @@ + # + FDISK=/dev/fd0 + +-AS=as -32 +-CC=gcc +- +-CFLAGS= -Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC ++CPPFLAGS=-m32 ++CFLAGS=-Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector ++ASFLAGS=-32 + + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ + config.o linuxbios.o memsize.o pci.o controller.o random.o spd.o \ +@@ -47,10 +46,10 @@ + memtest_shared.bin -o memtest.bin + + reloc.o: reloc.c +- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c ++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c + + test.o: test.c +- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c ++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie -nopie test.c + + clean: + rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin diff --git a/sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch new file mode 100644 index 000000000000..2eb750c8dd93 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch @@ -0,0 +1,30 @@ +diff -Naurp memtest86+-4.10-orig/Makefile memtest86+-4.10/Makefile +--- memtest86+-4.10-orig/Makefile 2010-06-24 00:27:22.864634431 +0200 ++++ memtest86+-4.10/Makefile 2010-06-24 00:28:42.402478590 +0200 +@@ -8,10 +8,9 @@ + # + FDISK=/dev/fd0 + +-AS=as -32 +-CC=gcc +- +-CFLAGS= -Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector ++CFLAGS=-Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector ++CPPFLAGS=-m32 ++ASFLAGS=-32 + + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ + config.o linuxbios.o memsize.o pci.o controller.o random.o spd.o \ +@@ -47,10 +46,10 @@ memtest.bin: memtest_shared.bin bootsect + memtest_shared.bin -o memtest.bin + + reloc.o: reloc.c +- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c ++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c + + test.o: test.c +- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c ++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie test.c + + clean: + rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch new file mode 100644 index 000000000000..af011d67c705 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch @@ -0,0 +1,33 @@ +http://forum.canardpc.com/threads/110950-fix-controller-loop-error + +--- memtest86+-5.01/controller.c ++++ memtest86+-5.01/controller.c +@@ -292,7 +292,7 @@ static void setup_nhm(void) + + /* First, locate the PCI bus where the MCH is located */ + +- for(i = 0; i < sizeof(possible_nhm_bus); i++) { ++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) { + pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); + pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); + vid &= 0xFFFF; +@@ -327,7 +327,7 @@ static void setup_nhm32(void) + ctrl.mode = ECC_NONE; + + /* First, locate the PCI bus where the MCH is located */ +- for(i = 0; i < sizeof(possible_nhm_bus); i++) { ++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) { + pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); + pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); + vid &= 0xFFFF; +--- memtest86+-5.01/Makefile ++++ memtest86+-5.01/Makefile +@@ -12,7 +12,7 @@ FDISK=/dev/fd0 + AS=as -32 + CC=gcc + +-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ ++CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ + -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector + + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch new file mode 100644 index 000000000000..f140a7fc6605 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch @@ -0,0 +1,16 @@ +--- Makefile.orig 2015-02-01 01:08:33.000000000 +0300 ++++ Makefile 2015-02-01 01:10:17.624757244 +0300 +@@ -9,11 +9,10 @@ + # + FDISK=/dev/fd0 + +-AS=as -32 +-CC=gcc +- + CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ + -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector ++CPPFLAGS= -m32 ++ASFLAGS= -32 + + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ + config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o \ diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch new file mode 100644 index 000000000000..682dd5d01a1e --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch @@ -0,0 +1,31 @@ +http://forum.canardpc.com/threads/110951-fix-build-with-newer-gcc-versions + +the meaning of extern inline changed between standards. use static inline +for these tiny I/O functions everywhere to keep things simple. + +--- a/io.h ++++ b/io.h +@@ -31,6 +31,6 @@ + */ + + #define __OUT1(s,x) \ +-extern inline void __out##s(unsigned x value, unsigned short port) { ++static inline void __out##s(unsigned x value, unsigned short port) { + + #define __OUT2(s,s1,s2) \ +@@ -43,6 +43,6 @@ + __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } + + #define __IN1(s) \ +-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; ++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; + + #define __IN2(s,s1,s2) \ +@@ -55,6 +55,6 @@ + __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } + + #define __OUTS(s) \ +-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ ++static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ + { __asm__ __volatile__ ("cld ; rep ; outs" #s \ + : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch new file mode 100644 index 000000000000..ce7f906a19d5 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch @@ -0,0 +1,49 @@ +http://forum.canardpc.com/threads/110955-PATCH-don-t-pull-in-system-headers + +avoid using C library headers as it'd mean we'd need 32-bit glibc files available + +https://bugs.gentoo.org/592638 + +--- a/dmi.c ++++ b/dmi.c +@@ -10,7 +10,7 @@ + + + #include "test.h" +-#include <stdint.h> ++#include "stdint.h" + + + #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1)) +--- a/test.c ++++ b/test.c +@@ -14,7 +14,28 @@ + #include "stdint.h" + #include "cpuid.h" + #include "smp.h" +-#include <sys/io.h> ++ ++static inline unsigned char ++inb_p (unsigned short int __port) ++{ ++ unsigned char _v; ++ ++ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); ++ return _v; ++} ++ ++static inline void ++outb (unsigned char __value, unsigned short int __port) ++{ ++ __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port)); ++} ++ ++static inline void ++outb_p (unsigned char __value, unsigned short int __port) ++{ ++ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value), ++ "Nd" (__port)); ++} + + extern struct cpu_ident cpu_id; + extern volatile int mstr_cpu; diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch new file mode 100644 index 000000000000..e9cbf10399c3 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch @@ -0,0 +1,19 @@ +http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues + + +don't run the clean target when building all as we run into parallel races: + - memtest kicks off building of a bunch of .o files + - clean runs in parallel which runs `rm` and deletes some of the new .o + - memtest goes to link and fails because objects are missing + +--- a/Makefile ++++ b/Makefile +@@ -19,7 +19,7 @@ + smp.o vmem.o random.o + + +-all: clean memtest.bin memtest ++all: memtest.bin memtest + + # Link it statically once so I know I don't have undefined + # symbols and then link it dynamically so I have full diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch new file mode 100644 index 000000000000..8d830e297ec2 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch @@ -0,0 +1,14 @@ +http://forum.canardpc.com/threads/110953-PATCH-don-t-try-to-scp-after-building + +this makes no sense in a sane build world + +--- a/Makefile ++++ b/Makefile +@@ -21,7 +21,6 @@ + + + all: clean memtest.bin memtest +- scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus + + # Link it statically once so I know I don't have undefined + # symbols and then link it dynamically so I have full diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch new file mode 100644 index 000000000000..f4b42feb5fb3 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch @@ -0,0 +1,15 @@ +http://forum.canardpc.com/threads/110952-fix-build-due-to-missing-reboot-symbol + +the reboot func is used elsewhere, so don't mark it inline + +--- a/lib.c ++++ b/lib.c +@@ -33,7 +33,7 @@ struct ascii_map_str { + int keycode; + }; + +-inline void reboot(void) ++void reboot(void) + { + + /* tell the BIOS to do a cold start */ diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch new file mode 100644 index 000000000000..dcdccb8c6e97 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch @@ -0,0 +1,21 @@ +make sure we re-use the existing CFLAGS settings so that we get all the right +flags (like -fno-stack-protector). just append the few changes we want (the +optimization levels). + +https://bugs.gentoo.org/590974 + +--- a/Makefile ++++ b/Makefile +@@ -52,10 +52,10 @@ reloc.o: reloc.c + $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c + + test.o: test.c +- $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c ++test.o: CFLAGS += -O0 -fno-PIC + + random.o: random.c +- $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c ++random.o: CFLAGS += -O3 -fno-PIC + + # rule for build number generation + build_number: diff --git a/sys-apps/memtest86+/memtest86+-2.01.ebuild b/sys-apps/memtest86+/memtest86+-2.01.ebuild new file mode 100644 index 000000000000..4eaf769135dc --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-2.01.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit mount-boot eutils + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="serial" +RESTRICT="test" + +DEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-2.01-hardcoded_cc.patch + epatch "${FILESDIR}"/${PN}-1.70-gnu_hash.patch + + if use serial ; then + sed -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' -i config.h + fi +} + +src_compile() { + emake || die +} + +src_install() { + insinto /boot/memtest86plus + doins memtest.bin || die + dodoc README README.build-process +} + +pkg_postinst() { + einfo + einfo "memtest.bin has been installed in /boot/memtest86plus/" + einfo "You may wish to update your bootloader configs" + einfo "by adding these lines:" + + einfo " - For grub: (replace '?' with correct numbers for your boot partition)" + einfo " > title=Memtest86Plus" + einfo " > root (hd?,?)" + einfo " > kernel /boot/memtest86plus/memtest.bin" + + einfo " - For lilo:" + einfo " > image = /boot/memtest86plus/memtest.bin" + einfo " > label = Memtest86Plus" + einfo +} diff --git a/sys-apps/memtest86+/memtest86+-4.00.ebuild b/sys-apps/memtest86+/memtest86+-4.00.ebuild new file mode 100644 index 000000000000..4f8aed6b61c9 --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-4.00.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +QA_PRESTRIPPED=/boot/memtest86plus/memtest + +inherit mount-boot eutils + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="floppy serial" +RESTRICT="test" + +RDEPEND="floppy? ( >=sys-boot/grub-0.95 sys-fs/mtools )" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-4.00-hardcoded_cc.patch + + # Merged upstream + #epatch "${FILESDIR}"/${PN}-1.70-gnu_hash.patch + + sed -i -e's/$(LD) -s /$(LD) /' Makefile + sed -i -e's,0x10000,0x100000,' memtest.lds + + if use serial ; then + sed -i -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' config.h + fi +} + +src_compile() { + emake || die +} + +src_install() { + insinto /boot/memtest86plus + newins memtest.bin memtest || die + newins memtest memtest.netbsd || die + dosym memtest /boot/memtest86plus/memtest.bin + dodoc README README.build-process + + if use floppy ; then + dobin "${FILESDIR}"/make-memtest86+-boot-floppy + doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 + fi +} + +pkg_postinst() { + mount-boot_pkg_postinst + einfo + einfo "memtest has been installed in /boot/memtest86plus/" + einfo "You may wish to update your bootloader configs" + einfo "by adding these lines:" + einfo " - For grub: (replace '?' with correct numbers for your boot partition)" + einfo " > title=Memtest86Plus" + einfo " > root (hd?,?)" + einfo " > kernel /boot/memtest86plus/memtest" + einfo " or try this if you get grub error 28:" + einfo " > title=Memtest86Plus" + einfo " > root (hd?,?)" + einfo " > kernel --type=netbsd /boot/memtest86plus/memtest.netbsd" + einfo + einfo " - For lilo:" + einfo " > image = /boot/memtest86plus/memtest" + einfo " > label = Memtest86Plus" + einfo +} diff --git a/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild b/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild new file mode 100644 index 000000000000..b7a2c8ac38b3 --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit mount-boot eutils toolchain-funcs + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="floppy serial" + +BOOTDIR=/boot/memtest86plus +QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd" + +RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )" +DEPEND="" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.20-hardcoded_cc.patch + + sed -i -e 's,0x10000,0x100000,' memtest.lds || die + + if use serial ; then + sed -i \ + -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \ + config.h \ + || die "sed failed" + fi + + cat - > "${T}"/39_${PN} <<EOF +#!/bin/sh +exec tail -n +3 \$0 + +menuentry "${PN} ${PV}" { + linux16 ${BOOTDIR}/memtest +} + +menuentry "${PN} ${PV} (netbsd)" { + insmod bsd + knetbsd ${BOOTDIR}/memtest.netbsd +} +EOF + + tc-export AS CC LD +} + +src_test() { :; } + +src_install() { + insinto ${BOOTDIR} + newins memtest.bin memtest + newins memtest memtest.netbsd + dosym memtest ${BOOTDIR}/memtest.bin + + exeinto /etc/grub.d + doexe "${T}"/39_${PN} + + dodoc README README.build-process FAQ changelog + + if use floppy ; then + dobin "${FILESDIR}"/make-memtest86+-boot-floppy + doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 + fi +} + +pkg_postinst() { + mount-boot_pkg_postinst + elog + elog "memtest has been installed in ${BOOTDIR}/" + elog "You may wish to update your bootloader configs" + elog "by adding these lines:" + elog " - For grub2 just run grub-mkconfig, a configuration file is installed" + elog " as /etc/grub.d/39_${PN}" + elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)" + elog " > title=${PN}" + elog " > root (hd?,?)" + elog " > kernel ${BOOTDIR}/memtest" + elog " - For lilo:" + elog " > image = ${BOOTDIR}/memtest" + elog " > label = ${PN}" + elog +} diff --git a/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild new file mode 100644 index 000000000000..6c1705fa9a2d --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit mount-boot eutils toolchain-funcs + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="floppy serial" + +BOOTDIR=/boot/memtest86plus +QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd" + +RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )" +DEPEND="" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.20-hardcoded_cc.patch + + sed -i -e 's,0x10000,0x100000,' memtest.lds || die + + if use serial ; then + sed -i \ + -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \ + config.h \ + || die "sed failed" + fi + + tc-export AS CC LD +} + +src_test() { :; } + +src_install() { + insinto ${BOOTDIR} + newins memtest.bin memtest + newins memtest memtest.netbsd + dosym memtest ${BOOTDIR}/memtest.bin + + exeinto /etc/grub.d + doexe "${FILESDIR}"/39_memtest86+ + + dodoc README README.build-process FAQ changelog + + if use floppy ; then + dobin "${FILESDIR}"/make-memtest86+-boot-floppy + doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 + fi +} + +pkg_postinst() { + mount-boot_pkg_postinst + elog + elog "memtest has been installed in ${BOOTDIR}/" + elog "You may wish to update your bootloader configs" + elog "by adding these lines:" + elog " - For grub2 just run grub-mkconfig, a configuration file is installed" + elog " as /etc/grub.d/39_${PN}" + elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)" + elog " > title=${PN}" + elog " > root (hd?,?)" + elog " > kernel ${BOOTDIR}/memtest" + elog " - For lilo:" + elog " > image = ${BOOTDIR}/memtest" + elog " > label = ${PN}" + elog +} diff --git a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild new file mode 100644 index 000000000000..70ce682ffff9 --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit mount-boot eutils toolchain-funcs + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="floppy iso serial" + +BOOTDIR=/boot/memtest86plus +QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd" +QA_FLAGS_IGNORED="${BOOTDIR}/memtest.netbsd" + +RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )" +DEPEND="iso? ( app-cdr/cdrtools )" + +src_prepare() { + sed -i -e 's,0x10000,0x100000,' memtest.lds || die + epatch "${FILESDIR}/${P}-gcc-473.patch" \ + "${FILESDIR}/${P}-hardcoded_cc.patch" + epatch "${FILESDIR}"/${P}-no-scp.patch + epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312 + epatch "${FILESDIR}"/${P}-reboot-def.patch #548312 + epatch "${FILESDIR}"/${P}-no-clean.patch #557890 + epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638 + epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974 + + sed -i 's:genisoimage:mkisofs:' makeiso.sh || die + if use serial ; then + sed -i \ + -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \ + config.h \ + || die "sed failed" + fi +} + +src_configure() { + tc-ld-disable-gold #580212 + tc-export AS CC LD +} + +src_compile() { + emake + if use iso ; then + ./makeiso.sh || die + fi +} + +src_test() { :; } + +src_install() { + insinto ${BOOTDIR} + use iso && newins mt*.iso memtest.iso + newins memtest.bin memtest + newins memtest memtest.netbsd + dosym memtest ${BOOTDIR}/memtest.bin + + exeinto /etc/grub.d + doexe "${FILESDIR}"/39_memtest86+ + + dodoc README README.build-process FAQ changelog + + if use floppy ; then + dobin "${FILESDIR}"/make-memtest86+-boot-floppy + doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 + fi +} + +pkg_postinst() { + mount-boot_pkg_postinst + elog + elog "memtest has been installed in ${BOOTDIR}/" + elog "You may wish to update your bootloader configs" + elog "by adding these lines:" + elog " - For grub2 just run grub-mkconfig, a configuration file is installed" + elog " as /etc/grub.d/39_${PN}" + elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)" + elog " > title=${PN}" + elog " > root (hd?,?)" + elog " > kernel ${BOOTDIR}/memtest" + elog " - For lilo:" + elog " > image = ${BOOTDIR}/memtest" + elog " > label = ${PN}" + elog +} diff --git a/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild new file mode 100644 index 000000000000..54b1ab6e21dc --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit mount-boot eutils toolchain-funcs + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="floppy iso serial" + +BOOTDIR="/boot/memtest86plus" +QA_PRESTRIPPED="${BOOTDIR}/memtest" +QA_FLAGS_IGNORED="${BOOTDIR}/memtest" + +RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )" +DEPEND="iso? ( app-cdr/cdrtools )" + +src_prepare() { + sed -i -e 's,0x10000,0x100000,' memtest.lds || die + epatch "${FILESDIR}/${P}-gcc-473.patch" \ + "${FILESDIR}/${P}-hardcoded_cc.patch" + epatch "${FILESDIR}"/${P}-no-scp.patch + epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312 + epatch "${FILESDIR}"/${P}-reboot-def.patch #548312 + epatch "${FILESDIR}"/${P}-no-clean.patch #557890 + epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638 + epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974 + + sed -i 's:genisoimage:mkisofs:' makeiso.sh || die + if use serial ; then + sed -i \ + -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \ + config.h \ + || die "sed failed" + fi +} + +src_configure() { + tc-ld-disable-gold #580212 + tc-export AS CC LD +} + +src_compile() { + emake + if use iso ; then + ./makeiso.sh || die + fi +} + +src_test() { :; } + +src_install() { + insinto "${BOOTDIR}" + use iso && newins mt*.iso memtest.iso + doins memtest memtest.bin + + exeinto /etc/grub.d + newexe "${FILESDIR}"/39_${PN}-r1 39_${PN} + + dodoc README README.build-process FAQ changelog + + if use floppy ; then + dobin "${FILESDIR}"/make-memtest86+-boot-floppy + doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 + fi +} + +pkg_postinst() { + mount-boot_pkg_postinst + + elog "memtest86+ has been installed in ${BOOTDIR}/" + elog "You may wish to update your bootloader configs by adding these lines:" + elog " - For grub2 just run grub-mkconfig, a configuration file is installed" + elog " as /etc/grub.d/39_${PN}" + elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)" + elog " > title=${PN}" + elog " > root (hd?,?)" + elog " > kernel ${BOOTDIR}/memtest.bin" + elog " - For lilo:" + elog " > image = ${BOOTDIR}/memtest.bin" + elog " > label = ${PN}" + elog "" + elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'." +} diff --git a/sys-apps/memtest86+/metadata.xml b/sys-apps/memtest86+/metadata.xml new file mode 100644 index 000000000000..fc17238d1174 --- /dev/null +++ b/sys-apps/memtest86+/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +<use> + <flag name="serial">Compile with serial console support</flag> + <flag name="floppy">Install a script to create floppy disks containing memtest86+ binaries.</flag> + <flag name="iso">Compile an ISO image</flag> +</use> +</pkgmetadata> |