Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] How to rebuild GRUB (efi) with modifications

Linux Kernel, Network, and Services configuration.
Message
Author
User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: How to rebuild GRUB (efi) with code / target modificatio

#21 Post by llivv »

I could spend a lot of time asking all sorts of questions about your build environment you haven't talked about yet. ie what kind of emulation are you using in your grub crossbuild scenario?
That aside, you are aware the builders of the rom you show above STATE they give no guarantee of the roms effectiveness and it voids your products warranty.
That aside, the rom shown above shows other ways it can be used, one of which is a normal way of rooting a phone.
So understanding what the rom is capable of is essential, especially what disable secure boot does when selected from the roms menu, which is beyond this forums guidelines
I hope that explains fairly well what we can and can't help you with here.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: How to rebuild GRUB (efi) with code / target modificatio

#22 Post by jrobin28260 »

I sent a mail to the gruv-devel mailing list, explaining a summary of what I've done and where I'm stuck
http://lists.gnu.org/archive/html/grub- ... 00061.html

By searching for this link in order to give it here, Wow !!!
http://lists.gnu.org/archive/html/grub- ... 00056.html
23 December 2018

HP Envy X2 is the same computer.
Guys are working on it !!

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#23 Post by jrobin28260 »

Better, guys worked on it
And guess what... !

Image
First it seems that I was wrong with fPIC and fPIE, don't know why it caused troubles on UEFI-SIMPLE if it's not the cause, but anyway this is fine, if it works !

The correction was 1 addition into /include/grub/efi/memory.h, and 3 ones into util/mkimage.c
Image

But I was supposed to get an error message, instead of being stuck at "Welcome to grub!"

Correcting the 2.02 version isn't enough. Using the last version over their current Git repo (and then, apply the correction) is needed. Then, I have my grub-rescue that is working.
Image

Next step is to reconfigure grub in order to boot Debian Buster installer, or the latest Ubuntu, since both of them are having at least Linux 4.18 !

Just before I forget, llivv, in fact there is no ROM, apart maybe the UEFI firmware that is already into the computer, like your computer. Besides that, it already updated automatically trough Windows Update so it's not really a "ROM" but we can consider it is :wink:. The SSD is completely read/write as an x86_64 computer running a conventional operating system for computers. There is no rooting, no builder of anything apart from Microsoft, me with Grub, and Debian. And yes, a smartphone is a generally well locked computer with a special OS ! And this one is not, so it's pretty cool

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#24 Post by llivv »

Great work, looks like you may be one of the first few who get Debian on your novago.
Thanks for posting those results - it looks promising

Now onto the key to see if it will work out of the box with buster.

Your recent posts are giving me more ideas too.
In case you haven't seen these packages yet...
https://packages.debian.org/stretch/efibootmgr
https://packages.debian.org/stretch/efivar
[urlhttps://packages.debian.org/stretch/efi-reader][/url]


This is where I got my info on the BDS menu
https://forum.xda-developers.com/window ... s-t3745288

finding that was not easy - and I'm finding other interesting boot links while retracing my steps....
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#25 Post by jrobin28260 »

Thanks for the links !

Yes I already saw this BDS menu from WPInternal.
I have one of those Windows Phone 10 (Lumia 640) in perfect condition, and after more than 3 years I still get monthly update (too bad the M$ Store was a failure compared to Google's App Store, because the WP10 OS was really well finished... and now I'm back to Android ! And because I wasn't able to do what I'm going to succeed today, and because Snapdragon CPU weren't mainlined, I had to buy a new phone for getting a new software. This is going to change soon, believe me ! :wink: that's also why I'm working so hard to get things working on my laptop shaped smartphone. I also have some plan for this WP10 phone, because showing a computer to get surrounded on a smart-phone project may be isn't enough to get attention. Anyway it doesn't support USB On The Go so I'll have to boot with an SD Card (it has a SD Card Reader).

------------------

Just for information, for configuring grub to make a GRUB-EFI bootable ISO of an existing Debian/Ubuntu CD (even if you customized it just before) with your own version of grub (make installed into /usr/local/bin, sbin etc) you can place yourself in your new grub's folder and follow this few lines : https://www.gnu.org/software/grub/manua ... 2dROM.html

ISO files should be extracted into a little folder, and grub-mkrescue will manage to repack them using the new grub version, and taking grub.cfg into account to have correctly configured grub entries.
apt install xorriso mtools
./grub-mkrescue -o debian-buster-JR-customgrub.iso iso

But I think there is still something wrong with the Linux kernel, now...
It hangs again. I verified with "e" key, entries are correct, it finds the kernel and initrd files (if not there is an error message), so the problem is likely to be inside the kernel.
Image
Tried with official buster, my own unofficial last version of Buster NETINST with every non free inside, with Ubuntu server ARM64 too... it freezes.

But this is another subject :wink: I'll try to find were are the Android Images files used for Qualcomm developers / integrator and try to play with it, now that I have an (almost) perfect mastering of Grub !

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#26 Post by llivv »

after ddg.gg ing "boot linux on a snapdragon 835"
I found a thread at HP and this permalink is to the last post in that HP envy thread
https://h30434.www3.hp.com/t5/Notebook- ... ue#M548069
this post links to a github project that includes workinprogress for the cortex (semy?) gpu and ACPI used in the envy

this next link is to, at least one of the specific parts of that work at github (to the best of my understanding anyways)
https://github.com/aarch64-laptops/linu ... tion/arm64

quoting post #13 of 20 in the HP envy thread
JohnLinford wrote:Update: I'll be meeting some folks from Linaro and possibly Qualcomm at ISC'18 in Frankfurt to maybe get some progress on this, but don't get your hopes up.

From conversations with Linaro and Qualcomm it sounds like there are some pretty big holes in Linux support on this device. The Snapdragon 850 is a varient of the 845, which Linaro is doing upstream work for, but there is no open source for 850 so Linaro can't discuss it. Furthermore, the HP Envy x2 12-e011nr uses ACPI, which is neither used nor supported in the embedded/mobile Snapdragon. That explains the black-screen hang I'm seeing. So, there is likely a significant amount of work required to get Linux to boot on this device, let alone run.

If someone wants to make it happen they'll have to reverse engineer Qualcomm's boot process, implement ACPI support, and upstream it to the open source. Legal problems asside, this is a huge effort and there's no market case for Linux on this device so you won't get support from the commercial sector.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#27 Post by jrobin28260 »

Hi,

New feature in Linux 4.20 : - Qualcomm Snapdragon 835 SoC support

YES, YES an YES !!
Do you know what Linux Kernel is going to be selected and kept for Debian Buster final version ? I saw that 4.19 is supposed to be an LTS version. That's sad :lol:

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1404
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 68 times

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#28 Post by None1975 »

jrobin28260 wrote:Do you know what Linux Kernel is going to be selected and kept for Debian Buster final version ? I saw that 4.19 is supposed to be an LTS version. That's sad :lol:
It is still a long time to go (I mean we don't know the specific date when Buster will be released). So don't speculate on that.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#29 Post by Head_on_a_Stick »

None1975 wrote:It is still a long time to go (I mean we don't know the specific date when Buster will be released).
The transition freeze is in 10 days so buster should be generally usable (for bug testers) at that point.

The soft freeze is in February with the full freeze a month later:

https://release.debian.org/buster/freeze_policy.html

FWIW, I reckon buster will have kernel 4.21 but that's just a wild guess :)
deadbang

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1404
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 68 times

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#30 Post by None1975 »

Head_on_a_Stick wrote:The transition freeze is in 10 days so buster should be generally usable (for bug testers) at that point.The soft freeze is in February with the full freeze a month later
Thanks for the info.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github


jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#32 Post by jibberjabber »

That would be fine, except , we were talking about Debian here, not Ubuntu,
Are those Prebuilt images safe for Debian, do they even work on Debian ?

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: [SOLVED] How to rebuild GRUB (efi) with modifications

#33 Post by jrobin28260 »

In fact even if aarch64-laptops is driving their work around Ubuntu, last week I managed to customize a Debian 10 ARM64 Installation (using QEMU and placing aarch64-laptops stuff) to have it booting on the NovaGo, I guess even the more "Debian only" guys of you could be interested at taking a look at it !
https://image.noelshack.com/fichiers/20 ... 220747.jpg

(Since it's related about discussion we had previously on this topic)

More information here for the how to :
https://github.com/aarch64-laptops/prebuilt/issues/15

Post Reply