Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 735794 - sys-boot/grub - add GRUB_ALL_PLATFORMS+=( pc_emu )
Summary: sys-boot/grub - add GRUB_ALL_PLATFORMS+=( pc_emu )
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-03 16:49 UTC by Michael Lawrence
Modified: 2020-08-11 04:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Lawrence 2020-08-03 16:49:11 UTC
platform "pc_emu" add emulated/support for pc disks for some tools wanting it.
ie woeusb. some point of faking it for some keys. 


Reproducible: Always

Steps to Reproduce:
1.GRUB_PLATFORMS="+pc"
2.wousb requires it , local machine make sdcard for windows 10 on x64/arm64

Actual Results:  
configure: error: platform "pc" is not supported for target CPU "arm64"
Comment 1 Mike Gilbert gentoo-dev 2020-08-06 14:20:23 UTC
Adding "pc_emu" to to GRUB_ALL_PLATFORMS would result in "--with-platform=pc_emu" being passed to configure. That causes an error:

configure: error: platform "pc_emu" is not supported for target CPU "i386"

Please more fully describe what you are trying to accomplish.
Comment 2 Michael Lawrence 2020-08-06 16:03:26 UTC
building  few apps on arm64 

 platform pc , ie is required for , sys-boot/woeful.. sys-boot/ventoy

(https://github.com/ventoy/Ventoy)

not that I care to directly use it for ARM-64 other than apps asking for it or use grub on mounted usb. (mostly uboot/grub-uefi) but... 

I was curious if thier'd be a "pc-platform-emu"  for USB or etc. 

pc platform for any mounted disks of the external variety ..

normally not used , but esp on arm , but could Emulate and make pc boot sectors on USB media etc.. 


IE util calls for platform pc in grub , ie "fake-pc" do disk build /mnt/usb 

done.. ? 
or is this a "plug-in" upstream would need to add.. 

more of a nice to have , in DR types of situations.
Comment 3 Mike Gilbert gentoo-dev 2020-08-06 20:14:57 UTC
I'm sorry, but I still cannot comprehend what you are requesting.
Comment 4 Michael Lawrence 2020-08-11 03:41:06 UTC
https://github.com/slacka/WoeUSB/issues/336

needs pc-grub to build , 

however "platform fake pc "

GRUB Platform pc as a plugin ? loadable module if some tool tool asks load else no load.. was curious if that was a doable if not.. as patch

 or else ask the 
USB "toymakers"  ie WOEUSB/rufus/etc ies python anyhow if thier was a way to build grub without being hard coded to GRUB[plaform-pc] yet emulate this by other means..  ie scripts

/usr/local/share/"fake-a-grub-pc/" boot.img , pc-uefi-grub.img , gurb-x86/amd64/etc likewise or stream them from the 'interwebs'... 

feed tools like woe usb , or a pc rescue "floppy" etc grub bits to make a rescue or usb key for pc .. if using an arch64 tablet pc ...
lays down boot stubs , adds iso bits as required vola' 

on paper this seems simple ? 


more or less rpi4 make a windows 10 test key etc test grub os/prober and a usb key n grub..  
(using rpi4 to hopeflly make a dual mode rpi/rock64pro/pinebook -etc GPT-uefi-image... eventually)

(but after having a server hit and even iso transformer zap by a direct hit to the pole during a storm , some years back.. having to go grovel for pc to img repair usb key at the public lib so not fun.. ) 


however it might be best to ask upstrem , to be able to just get a amd-64grub or etc from online for target usb key , laydown windows/linux as needed. 

(ie Gentoo on arm64 table/convertible pc in the end.. for now rpi4 with screen case etc.. )
(woeusb + gentoo on aa nice to have for potable admin tasks ie not having to drag ASUS ROG 8 pond gorilla of a laptop for diagnosing pc's work , leave the laptop atop on the desk..  ) 

(much as LILI USB dose , one windows/or/wine to make Linux keys 
bonus is it makes a db.key file to clean it , so I never format it if possible to keep scripts or REfind-Gentoo tarball to fix my loader. )
Comment 5 Mike Gilbert gentoo-dev 2020-08-11 04:15:19 UTC
Sorry, but I cannot understand you.
Comment 6 Michael Lawrence 2020-08-11 04:30:59 UTC
EAPI=7
DESCRIPTION="Creates windows installer on usb media from an iso image"
HOMEPAGE="https://github.com/slacka/WoeUSB"

RDEPEND="sys-boot/grub:2[grub_platforms_pc]"

 if one force builds for arm64 it dies. 
 
 door #1 enquire if  grub:2[grub_platforms_pc] can be emulated... ie load as module on arrch64 grub if called. 
 
 door # 2 see if woeusb guy can just use scripts and stream down pc-grub , ie www > /tmp  /mnt/my-usbkey 
 
 else just make arm64 windows sticks less asked for. ie on rareity mke a amd64 windows stick using a Pinebookpro or ARM64-netbook , to any amd64/x86 generic pc. usb .

looks like door #2..