Skip to content
This repository has been archived by the owner. It is now read-only.

New gp-peak device (Geeksphone Peak) #1214

Merged
merged 1 commit into from Feb 12, 2018

Conversation

Projects
None yet
4 participants
@Rudloff
Copy link
Contributor

commented Feb 8, 2018

Hello,

The Geeksphone Peak is one of the very first Firefox OS phones. Now that Firefox OS is discontinued, it is not really useful anymore so postmarketOS is a great oppotunity to use it again.

This is my first port so I'm learning as I go.
It currently boots and SSH over USB works but the screen stays black.
(weston fails with this error: Failed to open frame buffer device ‘/dev/fb0’: Permission denied)

@Rudloff Rudloff force-pushed the Rudloff:feature/gp-peak branch 2 times, most recently from faea5b8 to 572f10e Feb 8, 2018

@alive4ever
Copy link
Contributor

left a comment

You should add make modules_install during kernel packaging.

CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y

This comment has been minimized.

Copy link
@alive4ever

alive4ever Feb 9, 2018

Contributor

CONFIG_MODULES is enabled. There should be make modules_install action during kernel packaging.

if ! [ -e "$_target" ]; then
error "Could not find zImage in $PWD!"
return 1
fi

This comment has been minimized.

Copy link
@alive4ever

alive4ever Feb 9, 2018

Contributor

Since you have CONFIG_MODULES enabled, there should be make modules_install during packaging. This is an example on how to install kernel modules.

	# External modules install
	cd "$builddir"
	make ARCH="$_carch" CC="${CC:-gcc}" \
		KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
		INSTALL_MOD_PATH="$pkgdir" modules_install \
		|| return 1

@Rudloff Rudloff force-pushed the Rudloff:feature/gp-peak branch from 572f10e to 1856f8a Feb 9, 2018

@Rudloff

This comment has been minimized.

Copy link
Contributor Author

commented Feb 9, 2018

I added your code to APKBUILD and now I see the modules in ~/.local/var/pmbootstrap/chroot_native/home/pmos/build/pkg/linux-gp-peak/lib/modules/3.0.21/kernel.

However, after I flash this new image on my device, I don't have any /lib/modules/ folder and the linux-gp-peak package does not seem to contain any module:

linux-gp-peak-3.0.21-r0 contains:
boot/vmlinuz-gp-peak
usr/share/kernel/gp-peak/kernel.release

Am I missing something?

@MartijnBraam

This comment has been minimized.

Copy link
Member

commented Feb 9, 2018

Maybe you need to zap the device chroot for it to work

@ollieparanoid

This comment has been minimized.

Copy link
Member

commented Feb 9, 2018

@alive4ever: The || return 1 is not needed in abuild anymore (it was required earlier, thus it is still present in some APKBUILD files). Thanks for pointing out the missing external modules install. So far we have not paid attention to it, and only installed missing modules when we were actually using them.

@Rudloff: thanks for making the port and creating the PR! It would be nice if you could create a device specific wiki page and add your device to the device overview, then others could see your work and build upon it. I'll look into why the modules installation did not work for you.

@ollieparanoid
Copy link
Member

left a comment

Some minor things commented.

Regarding the modules, I've built the kernel locally, and can confirm that the built package contains the kernel modules (at least one file librasdioif.ko).

I guess you have run pmbootstrap build --force linux-gp-peak, and then pmbootstrap flasher flash_system or something similar? This is not enough, the install step is what rebuilds the image, that will get flashed with flasher. This should always work:

pmbootstrap build --force linux-gp-peak
pmbootstrap zap
pmbootstrap install
pmbootstrap flasher flash_system

If that was the issue, do you have an idea where we could make that easier to understand in the wiki or in the pmbootstrap output?

@@ -0,0 +1,22 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-gp-peak"
pkgdesc="Peak"

This comment has been minimized.

Copy link
@ollieparanoid

ollieparanoid Feb 9, 2018

Member

How about: Geeksphone Peak

# Please use double quotes only. You can source this file in shell scripts.

deviceinfo_format_version="0"
deviceinfo_name="Peak"

This comment has been minimized.

Copy link
@ollieparanoid

ollieparanoid Feb 9, 2018

Member

How about: Geeksphone Peak (the full name, as in the reference)

make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" modules_install \
|| return 1

This comment has been minimized.

Copy link
@ollieparanoid

ollieparanoid Feb 9, 2018

Member

The \ || return 1 is not necessary anymore.

@Rudloff

This comment has been minimized.

Copy link
Contributor Author

commented Feb 11, 2018

I used zap and now the modules are correctly installed, thanks!
I was only running this:

pmbootstrap build --force linux-gp-peak
pmbootstrap install --no-fde
pmbootstrap flasher flash_system
pmbootstrap flasher flash_kernel

Maybe you could add a section explaining what to run after each change here: https://wiki.postmarketos.org/wiki/Porting_to_a_new_device

@Rudloff Rudloff force-pushed the Rudloff:feature/gp-peak branch from 1856f8a to 192fce0 Feb 11, 2018

feat: New gp-peak device (Geeksphone Peak)
It boots and SSH works but the screen stays black.

@Rudloff Rudloff force-pushed the Rudloff:feature/gp-peak branch from 192fce0 to e5423d9 Feb 11, 2018

@Rudloff

This comment has been minimized.

Copy link
Contributor Author

commented Feb 12, 2018

@ollieparanoid I made the changes you requested.

@ollieparanoid
Copy link
Member

left a comment

Thanks again @Rudloff! Good idea with explaining how to modify the installation in the guide. Here's what I came up with:
https://wiki.postmarketos.org/wiki/Porting_to_a_new_device#Changing_your_installation
Please improve it if it is unclear somewhere. Thanks creating the device page - if you have a minute it would be nice if you could move it up to the booting devices table (having screen working is not a requirement to be in that list, it just needs to boot).

Let us know (chat or an issue) if you need further help with troubleshooting the display.

@ollieparanoid ollieparanoid merged commit 42fadee into postmarketOS:master Feb 12, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.4%) to 74.586%
Details

postmarketOS-Wiki pushed a commit to postmarketOS/wiki that referenced this pull request Feb 12, 2018

PureTryOut added a commit that referenced this pull request Feb 21, 2018

New gp-peak device (Geeksphone Peak) (#1214)
It boots and SSH works but the screen stays black.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.