Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ofgwrite fails to create bootpartion on SD card #18

Open
mihaip1948 opened this issue May 19, 2023 · 19 comments
Open

Ofgwrite fails to create bootpartion on SD card #18

mihaip1948 opened this issue May 19, 2023 · 19 comments

Comments

@mihaip1948
Copy link

Tested on OpenATV 7.3 under Dreambox ONE.
I've create a SD card OpenATV 7.3 using Ofgwrite
... rootfs partition was created OK ! but Boot partition
event reported OK ! is bad and tge SD card does not boot !

@betacentauri
Copy link
Contributor

What did you exactly do? Which command did you execute? Please attach ofgwrite log.
How is the SD card formatted?

As I have no Dreambox I cannot test.

@mihaip1948
Copy link
Author

Welcome to openATV for dreamone
openatv 7.3 dreamone

dreamone login: root
Password:
Last login: Tue May 16 05:11:59 CEST 2023 on pts/0
root@dreamone:~# ofgwrite -kmmcblk1p1 -rmmcblk1p2 /media/hdd/dreamone
mkdir: can't create directory '/newroot': File exists

ofgwrite Utility v4.6.5
Author: Betacentauri
Based upon: mtd-utils-native-1.5.1 and busybox 1.24.1
Use at your own risk! Make always a backup before use!
Don't use it if you use multiple ubi volumes in ubi layer!

Flashing kernel with arg mmcblk1p1
Flashing rootfs with arg mmcblk1p2
Searching image files in /media/hdd/dreamone resolved to /media/hdd/dreamone
Found kernel file: /media/hdd/dreamone/kernel.bin
Found rootfs file: /media/hdd/dreamone/rootfs.tar.bz2
Found EXT4 rootfs
Found mounted /newroot
Found mounted /newroot
Found mountpoint for rootfs file: /media/hdd

Found /proc/mtd entries:
Device: Size: Erasesize: Name: Image:
Using kernel mtd device:
Using rootfs mtd device:
Read /proc/cmdline
Kexec mode is:
Current rootfs is: /dev/mmcblk0p7
Current kernel is:
Current root sub dir is:

Execute: fdisk -l
Found valid GPT with protective MBR; using GPT

No matching partition names are found. Use current kernel and rootfs devices
Using /dev/mmcblk1p2 as rootfs device
Using /dev/mmcblk1p1 as kernel device
Flashing currently not running image

FBIO_SET_MANUAL_BLIT: Operation not permitted
Syncing filesystem
Mount rootfs
Mount to /oldroot_remount/ successful
Creating directory recursively
Flash rootfs unpack
Delete rootfs: rm -r -f /oldroot_ remount/
rm: can't remove '/oldroot_remount': Device or resource busy
can't remove '/oldroot_remount': Device or resource busy
Untar: tar xf /media/hdd/dreamone/rootfs.tar.bz2
Flashing kernel ...
Successfully flashed kernel!
Successfully flashed rootfs! Rebooting in 3 seconds...
FBIO_SET_MANUAL_BLIT: Operation not permitted
root@dreamone:~ #

@mihaip1948
Copy link
Author

mihaip1948 commented May 20, 2023

The SD card was an old one used by Gemnini SD card image for Dream ONE !

  • first partition FAT 32 Mb
  • second EXT4
    I've tried also with clean partitions !

The boot partition isn't understood by OpenATV

https://i.ibb.co/jRkGb6Y/1-0-19-283-D-3-FB-1-C00000-0-0-0-20230516062059.jpg

@mihaip1948
Copy link
Author

mihaip1948 commented May 20, 2023

I "solved" the problem ... leaving Boot partition "as is"
from Gemini and creating only the rootfs partition.
But the issue remains !!!

You can read it on my Forum translating from romanian !

https://www.sat-support.tv/forum/viewtopic.php?p=208748#p208748

@mihaip1948
Copy link
Author

mihaip1948 commented May 20, 2023

You can test this on any other STB ! Dreambox ONE is not relevant !
You must download Dream ONE OpenATV 7.3 from here 👍

http://images.mynonpublic.com/openatv/7.3/index.php?open=dreamone

it contains the Kernel and the rootfs you need ! then let Enigma2 to
mount your SD card and try to examine the partitions !

@betacentauri
Copy link
Contributor

Maybe dream works different than other boxes. Is the boot partition from Gemini really FAT32 formatted? Can you mount it? If yes, which files are present?

Non Dreamboxes use a "raw" boot partition without filesystem. So the kernel will be written just into the device. Maybe this is the difference.
(By the way: ofgwrite was never developed for dreamboxes! Doesn't say it should not work there, but only to tell you, that it was never tested by me)

@mihaip1948
Copy link
Author

mihaip1948 commented May 21, 2023 via email

@betacentauri
Copy link
Contributor

And if you use gemini kernel file and flash that with ofgwrite. Does that work?

Sorry, I need to know how gemini creates the kernel partition and how it fill it. Then I can maybe help.

@mihaip1948
Copy link
Author

mihaip1948 commented May 21, 2023 via email

@betacentauri
Copy link
Contributor

Please try to mount the fat16 boot partition (the one that works) in the dream box:
mkdir /tmp/b
mount /dev/mmcblk1p1 /tmp/b
ls -la /tmp/b
What is the output?

@mihaip1948
Copy link
Author

mihaip1948 commented May 21, 2023 via email

@betacentauri
Copy link
Contributor

Ok, so a partition with filesystem which non dreamboxes don't have.
It includes a autoexec.img and a gemini.bmp. And something something with 10MB size.
The text formatting is very bad and some parts are missing. See here:
#18
Can you post it via browser and not via email?

@mihaip1948
Copy link
Author

mihaip1948 commented May 21, 2023 via email

@mihaip1948
Copy link
Author

OK ! I'm on the browser now !!!

@mihaip1948
Copy link
Author

mihaip1948 commented May 21, 2023

Autoexec.img has in front some binary code !
then set the environments variables , displays
some image , witch can be changed ! and loads
the kernel and boot it ! Kernel is just the binary
code ... we have it !
I think is enough to expect SD card to be formatted as :

  • FAT 16 GPT partition of some 32 Mb big enough to accommodate
    the Kernel witch is not greater than 20 Mb
  • EXT4 GPT partition for rootfs

You must only copy into the boot partition the sample
autoexec.img , a bootlogo , and the Kernel as provided !
then unpack the rootfs into dedicated partition !
Eventually the user can supply his own bootlogo !!
Possible autoexec.img can be edited and eliminate
the display of a bootlogo !

@mihaip1948
Copy link
Author

Hi Betacentauri !
Can you add at the archive known types : .tar.xz ?
this is the extension for all DreamOS like images !

@betacentauri
Copy link
Contributor

betacentauri commented May 24, 2023

Can you add at the archive known types : .tar.xz ?

Please create new issue for it. It's possible, but not so easy as you might think and I have at the moment only very limited time for this. That's also why this issue isn't fixed yet.

Can you attach autoexeg.img here? Does dreambox two use the same one?
I don't really want to deliver bootlogo and several files with ofgwrite. Can you test whether it also works without bootlogo?

@mihaip1948
Copy link
Author

mihaip1948 commented May 25, 2023 via email

@mihaip1948
Copy link
Author

mihaip1948 commented May 25, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants