无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 4643|回复: 11
打印 上一主题 下一主题

[求助] grub4dos和grub4dos_UEFI开发环境(veketV20),求助

[复制链接]
跳转到指定楼层
1#
发表于 2021-11-21 18:44:08 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 liuzhaoyzz 于 2021-11-22 15:24 编辑

在veket论坛下载veketV20版本,http://www.lucky8k.com/thread-132496-1-1.html
https://cloud.189.cn/web/share?code=yei22q26bAF3
安装工具我是在windows下面无损安装的,ISO整体启动,或者解开启动均可,解开启动配置可以保存到sfs文件中,我用自己写的批处理安装的,略过不表https://www.lanzoui.com/b00nlwy1c
veketV20自带了谷歌中文输入法,按ctrl可以切换中英文,便于网上搜索知识。

[root@veket ~] $ veketname
内核:Linux
内核版本: 5.10.11
系统:veket
系统版本:20-x86-64
系统发行日期:2021-02-18
官方网站:http://www.lucky8k.com
veket 为Linux系统,遵循 通用公共许可证(GNU General Public License) 开发,任何人都可以永久免费安装使用,并且可以在符合 GPL 复制、散布与修改的条款与条件下发布Linux。阅读原版的GPL协议http://www.gnu.org/copyleft/gpl.html

/etc/pkg/sources,看了下源,是163和阿里云的。
buster-main|deb|Packages-debian-buster-main|http://mirrors.163.com/debian/|http://mirrors.aliyun.com/debian/|||noarch common buster buster-backports buster-contrib buster-multimedia buster-non-free dpup upup
buster|pet|Packages-puppy-buster-official|http://ftp.nluug.nl/os/Linux/dis ... et_packages-buster/|http://distro.ibiblio.org/puppylinux/pet_packages-buster/|||noarch common stretch-main buster-backports stretch-contrib buster-multimedia buster-non-free dpup upup squeeze-main squeeze-contrib wary53x quirky wary51x akita dpup exprimo

buster-contrib|deb|Packages-debian-buster-contrib|http://mirrors.aliyun.com/debian/|http://mirrors.163.com/debian/|||noarch common buster buster-main buster-backports buster-multimedia buster-non-free dpup upup akita dpup exprimo
buster-multimedia|deb|Packages-debian-buster-multimedia|http://ftp.de.debian.org/debian/|http://http.us.debian.org/debian/|||noarch common buster buster-main buster-backports buster-contrib buster-non-free dpup upup squeeze-main squeeze-contrib wary53x quirky wary51x akita dpup exprimo
buster-non-free|deb|Packages-debian-buster-non-free|http://mirrors.aliyun.com/debian/|http://mirrors.163.com/debian/|||noarch common buster buster-main buster-backports buster-contrib buster-multimedia dpup upup squeeze-main squeeze-contrib wary53x quirky wary51x akita dpup exprimo

veket支持apt-get和pkg软件包管理器,都可以用。veket默认就是root用户,可以不带sudo运行。
apt-cache search xxx与pkg s xxx命令类似,在线搜索软件包,支持模糊查询。
apt-get install xxx与pkg g xxx命令类似,在线安装软件包
pkg h或者pkg --help查看pkg命令帮助。
pkg i xxx本地安装deb、pet、sfs安装包。
pkg l xxx查看本地已安装的软件包。


参考:http://wuyou.net/forum.php?mod=viewthread&tid=425582
sudo apt-get install -y gcc-4.8 gcc-4.8-multilib nasm upx upx-ucl p7zip-full texinfo autoconf automake make patch binutils-dev liblzma-dev gawk
v20编译软件库devx20_20.0.sfs下载:http://www.lucky8k.com/thread-132553-1-1.html
双击安装devx20_20.0.sfs,安装了这个开发包之后,gcc8.3有了,g++8.3有了,nasm p7zip-full texinfo autoconf automake patch binutils-dev liblzma-dev gawk都有了,很方便。
veket20里面的apt-get install好像不支持一次性安装多个包(我不确定),要分开,应该可以放在一个脚本里面:
#!/bin/sh
sudo apt-get install gcc-8-multilib
sudo apt-get install upx
sudo apt-get make


看下gcc版本:8.3的:
[root@veket ~] $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-6)

看下g++版本:8.3的。
[root@veket ~] $ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-6)

补充gcc-8-multilib:
[root@veket ~] $ apt-get install gcc-8-multilib
Download gcc-8-multilib from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... b_8.3.0-6_amd64.deb
Downloading gcc-8-multilib_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/gcc-8-multilib_8.3.0-6_amd64.deb
Install package gcc-8-multilib_8.3.0-6_amd64:  
Installed: gcc-8-multilib_8.3.0-6_amd64
Resolving dependencies...................
Dependencies to get: gcc-7-base lib32asan4 lib32asan5 lib32atomic1 lib32cilkrts5 lib32gcc-7-dev lib32gcc-8-dev lib32gcc1 lib32gomp1 lib32itm1 lib32mpx2 lib32quadmath0 lib32stdc+++ lib32ubsan0 lib32ubsan1 libc6-dev-i386 libc6-dev-x32 libc6-x32 libstdc++++ libx32asan4 libx32asan5 libx32atomic1 libx32cilkrts5 libx32gcc-7-dev libx32gcc-8-dev libx32gcc1 libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc+++ libx32ubsan0 libx32ubsan1
Download gcc-7-base from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... e_7.4.0-6_amd64.deb
Downloading gcc-7-base_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/gcc-7-base_7.4.0-6_amd64.deb
Install package gcc-7-base_7.4.0-6_amd64:  
Installed: gcc-7-base_7.4.0-6_amd64
Download lib32asan4 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 4_7.4.0-6_amd64.deb
Downloading lib32asan4_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32asan4_7.4.0-6_amd64.deb
Install package lib32asan4_7.4.0-6_amd64:  
Installed: lib32asan4_7.4.0-6_amd64
Download lib32asan5 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 5_8.3.0-6_amd64.deb
Downloading lib32asan5_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32asan5_8.3.0-6_amd64.deb
Install package lib32asan5_8.3.0-6_amd64:  
Installed: lib32asan5_8.3.0-6_amd64
Download lib32atomic1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading lib32atomic1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32atomic1_8.3.0-6_amd64.deb
Install package lib32atomic1_8.3.0-6_amd64:  
Installed: lib32atomic1_8.3.0-6_amd64
Download lib32cilkrts5 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 5_7.4.0-6_amd64.deb
Downloading lib32cilkrts5_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32cilkrts5_7.4.0-6_amd64.deb
Install package lib32cilkrts5_7.4.0-6_amd64:  
Installed: lib32cilkrts5_7.4.0-6_amd64
Download lib32gcc-7-dev from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... v_7.4.0-6_amd64.deb
Downloading lib32gcc-7-dev_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32gcc-7-dev_7.4.0-6_amd64.deb
Install package lib32gcc-7-dev_7.4.0-6_amd64:  
Installed: lib32gcc-7-dev_7.4.0-6_amd64
Download lib32gcc-8-dev from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... v_8.3.0-6_amd64.deb
Downloading lib32gcc-8-dev_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32gcc-8-dev_8.3.0-6_amd64.deb
Install package lib32gcc-8-dev_8.3.0-6_amd64:  
Installed: lib32gcc-8-dev_8.3.0-6_amd64
Download lib32gcc1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading lib32gcc1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32gcc1_8.3.0-6_amd64.deb
Install package lib32gcc1_8.3.0-6_amd64:  
Installed: lib32gcc1_8.3.0-6_amd64
Download lib32gomp1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading lib32gomp1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32gomp1_8.3.0-6_amd64.deb
Install package lib32gomp1_8.3.0-6_amd64:  
Installed: lib32gomp1_8.3.0-6_amd64
Download lib32itm1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading lib32itm1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32itm1_8.3.0-6_amd64.deb
Install package lib32itm1_8.3.0-6_amd64:  
Installed: lib32itm1_8.3.0-6_amd64
Download lib32mpx2 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 2_8.3.0-6_amd64.deb
Downloading lib32mpx2_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32mpx2_8.3.0-6_amd64.deb
Install package lib32mpx2_8.3.0-6_amd64:  
Installed: lib32mpx2_8.3.0-6_amd64
Download lib32quadmath0 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 0_8.3.0-6_amd64.deb
Downloading lib32quadmath0_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32quadmath0_8.3.0-6_amd64.deb
Install package lib32quadmath0_8.3.0-6_amd64:  
Installed: lib32quadmath0_8.3.0-6_amd64
Download lib32ubsan0 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 0_7.4.0-6_amd64.deb
Downloading lib32ubsan0_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32ubsan0_7.4.0-6_amd64.deb
Install package lib32ubsan0_7.4.0-6_amd64:  
Installed: lib32ubsan0_7.4.0-6_amd64
Download lib32ubsan1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading lib32ubsan1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/lib32ubsan1_8.3.0-6_amd64.deb
Install package lib32ubsan1_8.3.0-6_amd64:  
Installed: lib32ubsan1_8.3.0-6_amd64
Download libc6-dev-i386 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 6_2.28-10_amd64.deb
Downloading libc6-dev-i386_2.28-10_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libc6-dev-i386_2.28-10_amd64.deb
Install package libc6-dev-i386_2.28-10_amd64:  
Installed: libc6-dev-i386_2.28-10_amd64
Download libc6-dev-x32 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 2_2.28-10_amd64.deb
Downloading libc6-dev-x32_2.28-10_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libc6-dev-x32_2.28-10_amd64.deb
Install package libc6-dev-x32_2.28-10_amd64:  
Installed: libc6-dev-x32_2.28-10_amd64
Download libc6-x32 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 2_2.28-10_amd64.deb
Downloading libc6-x32_2.28-10_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libc6-x32_2.28-10_amd64.deb
Install package libc6-x32_2.28-10_amd64:  
Installed: libc6-x32_2.28-10_amd64
Download libx32asan4 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 4_7.4.0-6_amd64.deb
Downloading libx32asan4_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32asan4_7.4.0-6_amd64.deb
Install package libx32asan4_7.4.0-6_amd64:  
Installed: libx32asan4_7.4.0-6_amd64
Download libx32asan5 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 5_8.3.0-6_amd64.deb
Downloading libx32asan5_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32asan5_8.3.0-6_amd64.deb
Install package libx32asan5_8.3.0-6_amd64:  
Installed: libx32asan5_8.3.0-6_amd64
Download libx32atomic1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading libx32atomic1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32atomic1_8.3.0-6_amd64.deb
Install package libx32atomic1_8.3.0-6_amd64:  
Installed: libx32atomic1_8.3.0-6_amd64
Download libx32cilkrts5 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 5_7.4.0-6_amd64.deb
Downloading libx32cilkrts5_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32cilkrts5_7.4.0-6_amd64.deb
Install package libx32cilkrts5_7.4.0-6_amd64:  
Installed: libx32cilkrts5_7.4.0-6_amd64
Download libx32gcc-7-dev from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... v_7.4.0-6_amd64.deb
Downloading libx32gcc-7-dev_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32gcc-7-dev_7.4.0-6_amd64.deb
Install package libx32gcc-7-dev_7.4.0-6_amd64:  
Installed: libx32gcc-7-dev_7.4.0-6_amd64
Download libx32gcc-8-dev from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... v_8.3.0-6_amd64.deb
Downloading libx32gcc-8-dev_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32gcc-8-dev_8.3.0-6_amd64.deb
Install package libx32gcc-8-dev_8.3.0-6_amd64:  
Installed: libx32gcc-8-dev_8.3.0-6_amd64
Download libx32gcc1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading libx32gcc1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32gcc1_8.3.0-6_amd64.deb
Install package libx32gcc1_8.3.0-6_amd64:  
Installed: libx32gcc1_8.3.0-6_amd64
Download libx32gomp1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading libx32gomp1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32gomp1_8.3.0-6_amd64.deb
Install package libx32gomp1_8.3.0-6_amd64:  
Installed: libx32gomp1_8.3.0-6_amd64
Download libx32itm1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading libx32itm1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32itm1_8.3.0-6_amd64.deb
Install package libx32itm1_8.3.0-6_amd64:  
Installed: libx32itm1_8.3.0-6_amd64
Download libx32quadmath0 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 0_8.3.0-6_amd64.deb
Downloading libx32quadmath0_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32quadmath0_8.3.0-6_amd64.deb
Install package libx32quadmath0_8.3.0-6_amd64:  
Installed: libx32quadmath0_8.3.0-6_amd64
Download libx32ubsan0 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 0_7.4.0-6_amd64.deb
Downloading libx32ubsan0_7.4.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32ubsan0_7.4.0-6_amd64.deb
Install package libx32ubsan0_7.4.0-6_amd64:  
Installed: libx32ubsan0_7.4.0-6_amd64
Download libx32ubsan1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 1_8.3.0-6_amd64.deb
Downloading libx32ubsan1_8.3.0-6_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libx32ubsan1_8.3.0-6_amd64.deb
Install package libx32ubsan1_8.3.0-6_amd64:  
Installed: libx32ubsan1_8.3.0-6_amd64
[root@veket ~] $

[root@veket /mnt/sda2/grub4dos] $ apt-get install nasm
Skipping nasm (already in devx)..


[root@veket /mnt/sda2/grub4dos] $ apt-get install upx
Download upx-ucl from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... cl_3.95-1_amd64.deb
Downloading upx-ucl_3.95-1_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/upx-ucl_3.95-1_amd64.deb
Install package upx-ucl_3.95-1_amd64:  
Installed: upx-ucl_3.95-1_amd64
Resolving dependencies..
Dependencies to get: libucl1
Download libucl1 from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... +repack-5_amd64.deb
Downloading libucl1_1.03+repack-5_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/libucl1_1.03+repack-5_amd64.deb
Install package libucl1_1.03+repack-5_amd64:  
Installed: libucl1_1.03+repack-5_amd64

[root@veket /mnt/sda2/grub4dos] $ apt-get install upx-ucl
Package upx-ucl already installed.


[root@veket /mnt/sda2/grub4dos] $ apt-get install p7zip-full
Skipping p7zip-full (already built-in)..


[root@veket /mnt/sda2/grub4dos] $ apt-get install texinfo
Skipping texinfo (already in devx)..

[root@veket /mnt/sda2/grub4dos] $ apt-get install autoconf
Skipping autoconf (already in devx)..

[root@veket /mnt/sda2/grub4dos] $ apt-get install automake
Skipping automake (already in devx)..

需要补充make包:
[root@veket /mnt/sda2/grub4dos] $ apt-get install make
Download makexvpics from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... .0.1-3+b1_amd64.deb
Downloading makexvpics_1.0.1-3+b1_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/makexvpics_1.0.1-3+b1_amd64.deb
Install package makexvpics_1.0.1-3+b1_amd64:  
Installed: makexvpics_1.0.1-3+b1_amd64
Resolving dependencies..
Dependencies to get: libjpeg-turbo-progs libturbojpeg0 netpbm
Download libjpeg-turbo-progs from buster-main repo:  
Download libturbojpeg0 from buster-main repo:  
Download netpbm from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 0-15.3+b2_amd64.deb
Downloading netpbm_10.0-15.3+b2_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/netpbm_10.0-15.3+b2_amd64.deb
Install package netpbm_10.0-15.3+b2_amd64:  
Installed: netpbm_10.0-15.3+b2_amd64

[root@veket /mnt/sda2/grub4dos] $ apt-get install patch
Skipping patchutils (already in devx)..

[root@veket /mnt/sda2/grub4dos] $ apt-get install binutils-dev
Skipping binutils-dev (already in devx)..

[root@veket /mnt/sda2/grub4dos] $ apt-get install liblzma-dev
Skipping liblzma-dev (already built-in)..

[root@veket /mnt/sda2/grub4dos] $ apt-get install gawk
Skipping gawk (already built-in)..

[root@veket /mnt/sda2/grub4dos] $ cd /mnt/sda2/grub4dos

下载grub4dos BIOS和UEFI版本:
根据wintoflash的提示,建议用git下载:
grub4dos-BIOS版本:git clone --depth=1 https://github.com/chenall/grub4dos.git
grub4dos-UEFI版本:git clone https://github.com/chenall/grub4dos -b efi


不推荐在widnows下面下载解压缩,可能会有权限问题:

http://grub4dos.chenall.net/categories/0-4-6a/
http://grub4dos.chenall.net/categories/for-UEFI/

git下载出错了:
[root@veket /mnt/sda2/grub4dos] $ git clone --depth=1 https://github.com/chenall/grub4dos.git
Cloning into 'grub4dos'...
fatal: unable to access 'https://github.com/chenall/grub4dos.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
[root@veket /mnt/sda2/grub4dos] $ git clone --depth=1 https://github.com/chenall/grub4dos.git
Cloning into 'grub4dos'...
error: RPC failed; curl 16 Error in the HTTP2 framing layer
fatal: the remote end hung up unexpectedly

下载不了,直接在浏览器中下载吧:
http://grub4dos.chenall.net/categories/0-4-6a/
http://grub4dos.chenall.net/categories/for-UEFI/

解压缩,进入目录:
[root@veket ~] $ cd /mnt/sda3/grub4dos/grub4dos-20211019/

把下载的grub4dos源代码放到ext4分区上面,开始编译:
[root@veket ~] $ cd /mnt/sda3/grub4dos/grub4dos-20211019/
[root@veket /mnt/sda3/grub4dos/grub4dos-20211019] $ bash ./build
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) gcc
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking dependency style of gcc... (cached) gcc3
checking for ranlib... ranlib
checking whether optimization for size works... yes
checking whether gcc has -fno-stack-protector... yes
checking whether gcc has -fno-reorder-functions... yes
checking whether -Wundef works... yes
checking whether -falign-loops works... yes
checking whether linker accepts `--build-id=none'... yes
checking for objcopy... objcopy
checking if C symbols get an underscore after compilation... no
checking whether objcopy works for absolute addresses... no
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils


checking whether we are cross compiling... no有无影响?

网上找了下:
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils 解决方法
编译grub-0.97时,执行configure后,出现如下错误:
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils
错误提示upgrade your binutils,但是系统安装是最新版本的binutils。其实,这个原因主要是由于gcc的版本引起的,解决方法如下:
方法一: 采用旧版本的gcc,如gcc-3.4
方法二:修改configure文件,将objcopy -O binary修改为objcopy -R .note.gnu.build-id -O binary

http://bbs.wuyou.net/forum.php?mod=viewthread&tid=270096
办法都试过了,没用。安裝 gcc-multilib 和/或 binutils-multiarch
[root@veket /mnt/sda3/grub4dos/grub4dos-20211019] $ apt-get install  binutils-multiarch
Download binutils-multiarch from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... 2.31.1-16_amd64.deb
Downloading binutils-multiarch_2.31.1-16_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/binutils-multiarch_2.31.1-16_amd64.deb
Install package binutils-multiarch_2.31.1-16_amd64:  
Installed: binutils-multiarch_2.31.1-16_amd64
Resolving dependencies..
Dependencies to get: binutils-common
Skipping binutils-common (already installed)..

[root@veket /mnt/sda3/grub4dos/grub4dos-20211019] $ pkg g gcc-multilib
Download gcc-multilib from buster-main repo:  
URL: http://mirrors.aliyun.com/debian ... b_8.3.0-1_amd64.deb
Downloading gcc-multilib_8.3.0-1_amd64.deb. Please wait: 100%
Downloaded: /root/pkg/gcc-multilib_8.3.0-1_amd64.deb
Install package gcc-multilib_8.3.0-1_amd64:  
Installed: gcc-multilib_8.3.0-1_amd64
Resolving dependencies...............
Dependencies to get: gcc-7-base gcc-8-multilib lib32asan4 lib32asan5 lib32atomic1 lib32cilkrts5 lib32gcc-7-dev lib32gcc-8-dev lib32gcc1 lib32gomp1 lib32itm1 lib32mpx2 lib32quadmath0 lib32stdc+++ lib32ubsan0 lib32ubsan1 libc6-dev-i386 libc6-dev-x32 libc6-x32 libstdc++++ libx32asan4 libx32asan5 libx32atomic1 libx32cilkrts5 libx32gcc-7-dev libx32gcc-8-dev libx32gcc1 libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc+++ libx32ubsan0 libx32ubsan1
Skipping gcc-7-base (already installed)..
Skipping gcc-8-multilib (already installed)..
Skipping lib32asan4 (already installed)..
Skipping lib32asan5 (already installed)..
Skipping lib32atomic1 (already installed)..
Skipping lib32cilkrts5 (already installed)..
Skipping lib32gcc-7-dev (already installed)..
Skipping lib32gcc-8-dev (already installed)..
Skipping lib32gcc1 (already installed)..
Skipping lib32gomp1 (already installed)..
Skipping lib32itm1 (already installed)..
Skipping lib32mpx2 (already installed)..
Skipping lib32quadmath0 (already installed)..
Skipping lib32ubsan0 (already installed)..
Skipping lib32ubsan1 (already installed)..
Skipping libc6-dev-i386 (already installed)..
Skipping libc6-dev-x32 (already installed)..
Skipping libc6-x32 (already installed)..
Skipping libx32asan4 (already installed)..
Skipping libx32asan5 (already installed)..
Skipping libx32atomic1 (already installed)..
Skipping libx32cilkrts5 (already installed)..
Skipping libx32gcc-7-dev (already installed)..
Skipping libx32gcc-8-dev (already installed)..
Skipping libx32gcc1 (already installed)..
Skipping libx32gomp1 (already installed)..
Skipping libx32itm1 (already installed)..
Skipping libx32quadmath0 (already installed)..
Skipping libx32ubsan0 (already installed)..
Skipping libx32ubsan1 (already installed)..

没有安装binutils-gold:
[root@veket /mnt/sda3/grub4dos/grub4dos-20211019] $ pkg l binutils
These downloaded packages match your search:
binutils-common_2.31.1-16_amd64.deb
binutils-for-build_2.31.1-16_all.deb
binutils-multiarch_2.31.1-16_amd64.deb
binutils-source_2.31.1-16_all.deb
binutils-x86-64-linux-gnux32_2.31.1-16_amd64.deb
These packages in the repos match your search:
binutils-x86-64-kfreebsd-gnu_2.31.1-16
binutils-x86-64-linux-gnu_2.31.1-16
binutils-x86-64-linux-gnux32_2.31.1-16
binutils-common_2.31.1-16
binutils-dev_2.31.1-16
binutils-doc_2.31.1-16
binutils-multiarch_2.31.1-16
binutils-source_2.31.1-16
binutils-z80_2.31.1-15+4+b14
binutils-m68hc1x_2.18-9
binutils-avr_2.26.20160125+Atmel3.6.1-4
binutils-for-build_2.31.1-16
binutils-for-host_2.31.1-16
binutils-i686-gnu_2.31.1-16
binutils-multiarch-dev_2.31.1-16
binutils-xtensa-lx106_2.31.1-14+2
binutils-mingw-w64_2.31.1-11+8.3
binutils-h8300-hms_2.16.1-10+b2
binutils-aarch64-linux-gnu_2.31.1-16
binutils-alpha-linux-gnu_2.31.1-16
binutils-arm-linux-gnueabi_2.31.1-16
binutils-arm-linux-gnueabihf_2.31.1-16
binutils-arm-none-eabi_2.31.1-12+11
binutils-hppa-linux-gnu_2.31.1-16
binutils-hppa64-linux-gnu_2.31.1-16
binutils-i686-kfreebsd-gnu_2.31.1-16
binutils-i686-linux-gnu_2.31.1-16
binutils-ia64-linux-gnu_2.31.1-16
binutils-m68k-linux-gnu_2.31.1-16
binutils-mingw-w64-i686_2.31.1-11+8.3
binutils-mingw-w64-x86-64_2.31.1-11+8.3
binutils-mips-linux-gnu_2.31.1-16
binutils-mips64-linux-gnuabi64_2.31.1-14cross3
binutils-mips64-linux-gnuabin32_2.31.1-14cross3
binutils-mips64el-linux-gnuabi64_2.31.1-16
binutils-mips64el-linux-gnuabin32_2.31.1-14cross3
binutils-mipsel-linux-gnu_2.31.1-16
binutils-mipsisa32r6-linux-gnu_2.31.1-14cross3
binutils-mipsisa32r6el-linux-gnu_2.31.1-14cross3
binutils-mipsisa64r6-linux-gnuabi64_2.31.1-14cross3
binutils-mipsisa64r6-linux-gnuabin32_2.31.1-14cross3
binutils-mipsisa64r6el-linux-gnuabi64_2.31.1-14cross3
binutils-mipsisa64r6el-linux-gnuabin32_2.31.1-14cross3
binutils-powerpc-linux-gnu_2.31.1-16
binutils-powerpc-linux-gnuspe_2.31.1-16
binutils-powerpc64-linux-gnu_2.31.1-16
binutils-powerpc64le-linux-gnu_2.31.1-16
binutils-riscv64-linux-gnu_2.31.1-16
binutils-s390x-linux-gnu_2.31.1-16
binutils-sh4-linux-gnu_2.31.1-16
binutils-sparc64-linux-gnu_2.31.1-16
binutils_2.31.1-16

binutils-dev版本是2.31的:
[root@veket /mnt/sda3/grub4dos/grub4dos-20211019] $ pkg l binutils-dev
These packages in the repos match your search:
binutils-dev_2.31.1-16

/mnt/sda3/grub4dos/grub4dos-20211019/configure.ac里面有这样一段,错误应该是这一段抛出来的:
# Defined in acinclude.m4.
grub_ASM_USCORE
grub_PROG_OBJCOPY_ABSOLUTE
if test "x$grub_cv_prog_objcopy_absolute" != xyes; then
  AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils])
fi

上面的grub_cv_prog_objcopy_absolute是在acinclude.m4里面定义的,去/mnt/sda3/grub4dos/grub4dos-20211019/acinclude.m4里面看到:
dnl Some versions of `objcopy -O binary' vary their output depending
dnl on the link address.
AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
[AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses])
AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
[cat > conftest.c <<\EOF
void
cmain (void)
{
   *((int *) 0x1000) = 2;
}
EOF

if AC_TRY_EVAL(ac_compile) && test -s conftest.o; then :
else
  AC_MSG_ERROR([${CC-cc} cannot compile C source code])
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
  if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
  else
    AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
  fi
  if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
  else
    AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
  fi
  if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]); then
    mv -f conftest conftest.old
  else
    grub_cv_prog_objcopy_absolute=no
    break
  fi
done
rm -f conftest*])
AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute])])

将-O binary修改为-R .note.gnu.build-id -O binary结果不变。
2#
 楼主| 发表于 2021-11-21 18:44:37 | 只看该作者
本帖最后由 liuzhaoyzz 于 2021-11-21 19:14 编辑

占楼2
grub4dos官方推荐的gcc版本是4.8,问题是现在主流的linux发行版gcc都是5.0以上了,所以想在gcc8.3上面尝试下。我挺喜欢veket这个发行版,所以想在veket里面尝试下。ubuntu高版本里面没有尝试。


简而言之,现在出错卡在./build,
checking whether we are cross compiling... no


checking whether objcopy works for absolute addresses... no
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils


g4d/g4e编译出错是一样的,都是上面这样子。


恳请大神们指点下。


回复

使用道具 举报

3#
 楼主| 发表于 2021-11-21 18:44:47 | 只看该作者
占楼3
回复

使用道具 举报

4#
发表于 2021-11-21 18:58:27 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

5#
发表于 2021-11-21 21:21:04 | 只看该作者
gcc >= 5.0 是编译不出来正确的 grldr 文件的,我以前试过。
Win10 上装个 WSL Ubuntu 1804 就行,没必要瞎折腾。

点评

我估计也是,官方用的最高版似乎是4.8。  详情 回复 发表于 2021-11-21 21:30
回复

使用道具 举报

6#
发表于 2021-11-21 21:22:53 来自手机 | 只看该作者
upgrade your binutils  虽然不懂编程,善用搜索

点评

这样的关键词结果我搜过了,一楼的帖子就有,不适用。  详情 回复 发表于 2021-11-21 21:38
回复

使用道具 举报

7#
 楼主| 发表于 2021-11-21 21:30:18 来自手机 | 只看该作者
本帖最后由 liuzhaoyzz 于 2021-11-21 22:17 编辑
wintoflash 发表于 2021-11-21 21:21
gcc >= 5.0 是编译不出来正确的 grldr 文件的,我以前试过。
Win10 上装个 WSL Ubuntu 1804 就行,没必要 ...


我估计也是,官方用的最高版似乎是4.8。WSL组件被我精简了,没办法补回了,我喜欢尝试单独的linux发行版。我也是瞎折腾着玩玩罢了,Just for fun,大神勿怪。

我觉得可能还是预编译那些变量设置有问题,不能适配最新的binutils-dev。  

config.log里面显示gcc -V错误,感觉脚本大小写判断有问题,应该是gcc -v。  

看了下config.log,有几个错误:
configure:3212: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3223: $? = 4
configure:3212: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
上面的错误好像不影响什么。

感觉离成功就差一步。
   
回复

使用道具 举报

8#
 楼主| 发表于 2021-11-21 21:38:54 来自手机 | 只看该作者
my9823 发表于 2021-11-21 21:22
upgrade your binutils  虽然不懂编程,善用搜索

这样的关键词结果我搜过了,一楼的帖子就有,不适用。      
回复

使用道具 举报

9#
发表于 2021-11-22 12:29:26 | 只看该作者
本帖最后由 2011whp 于 2021-11-22 13:06 编辑

wintoflsah的 GCC 8.4 (纯文本 菜单)
http://wuyou.net/forum.php?mod=redirect&goto=findpost&ptid=422652&pid=4216278&fromuid=413782


越 GCC 是 可能的 (主要是 2021-1-13 当时 没顾过来)

上面的 菜单,,选择时,没高亮显示,但  重启 和关机是 正常的,

点评

看起来还是有点复杂的。会涉及到一些问题。  详情 回复 发表于 2021-11-22 14:24
回复

使用道具 举报

10#
发表于 2021-11-22 13:05:17 | 只看该作者
文本菜单下,实体机,试了一下,功能一切正常
chainloader  *.efi
map  iso

唯一的缺点是:菜单选择,没高亮 ,没编号,没指示器
回复

使用道具 举报

11#
 楼主| 发表于 2021-11-22 14:24:16 | 只看该作者
2011whp 发表于 2021-11-22 12:29
wintoflsah的 GCC 8.4 (纯文本 菜单)
http://wuyou.net/forum.php?mod=redirect&goto=findpost&ptid=422 ...

看起来还是有点复杂的。会涉及到一些问题。
        
回复

使用道具 举报

12#
发表于 2021-11-22 19:09:29 | 只看该作者
图形模式也能,越gcc 问题不大,多了高亮
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-25 13:44

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表