samsung-janice: Switch to mainline (MR 2779)

[ci:skip-build] already built successfully in CI
This commit is contained in:
Jonas Heinrich 2022-01-29 05:06:36 +01:00 committed by Clayton Craft
parent 5519ec85d3
commit a22a5e8891
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
17 changed files with 72 additions and 3275 deletions

View file

@ -1,38 +0,0 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-i9070
pkgver=1
pkgrel=34
pkgdesc="Samsung Galaxy S Advance"
url="https://postmarketos.org"
arch="armhf"
license="MIT"
depends="postmarketos-base linux-samsung-i9070 mesa-dri-swrast"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
install="$pkgname.post-install"
source="
deviceinfo
initfs-hook.sh
modules-load.conf
"
options="!check !archcheck"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-samsung-i9070"
mkdir "$subpkgdir"
}
sha512sums="
35ced13758b09fcdbd256da6b5c2b82cc08069d9e889e242560fec2c42932a6550305006469fd458975ef34566bbbfc185677f089a2b006b42e1762ecfb9a8d5 deviceinfo
449e5047f9c15d536233fe2836cf10ae3dd2bf46f1c12ad0423f098bd54bff357438747a3c23aec9b1d8826146f87ff39d657c2b48247fb5ac4ebdeed65634fa initfs-hook.sh
61e8becbf6fa7c1c6c42e481083f5981ae7af33a48cbc53e817d8ac2c6a8e4f67a54b32ae3b8f5f25f7b412165a849dc93a629110dc47b0d16927bf2a12eb7e1 modules-load.conf
"

View file

@ -1,6 +0,0 @@
#!/bin/sh
# Enable swclock OpenRC service
rc-update -q add swclock boot
exit 0

View file

@ -1,22 +0,0 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy S Advance"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-i9070"
deviceinfo_year="2012"
deviceinfo_external_storage="true"
deviceinfo_flash_method="heimdall-isorec"
deviceinfo_arch="armhf"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_screen_width="480"
deviceinfo_screen_height="800"
deviceinfo_dev_touchscreen="/dev/input/event2"
# Heimdall related
deviceinfo_flash_heimdall_partition_kernel="Kernel"
deviceinfo_flash_heimdall_partition_initfs="Kernel2"

View file

@ -1,11 +0,0 @@
#!/bin/sh
# set usb properties
echo 0 > /sys/class/android_usb/android0/enable
echo samsung > /sys/class/android_usb/android0/iManufacturer
echo i9070 > /sys/class/android_usb/android0/iProduct
echo 1 > /sys/class/android_usb/android0/enable
# start the usb enumeration process from userspace
echo 1 > /sys/devices/platform/ab8500-i2c.0/ab8500-usb.0/boot_time_device

View file

@ -1,6 +0,0 @@
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# wifi module
dhd

View file

@ -0,0 +1,35 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-janice
pkgdesc="Samsung Galaxy S Advance"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base mkbootimg linux-postmarketos-stericsson mesa-dri-gallium"
makedepends="devicepkg-dev"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
"
source="
deviceinfo
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-samsung-janice"
mkdir "$subpkgdir"
}
sha512sums="
b8ec29123c88b62ab25550b71d3c4e0d4d3679bf41f44410b4540e69592f97f59b64dd6bf4d3f8b45419f79d951c5e4bab655f8be4f356c5581b26abecaeb81f deviceinfo
"

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy S Advance"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-janice"
deviceinfo_year="2012"
deviceinfo_dtb="ste-ux500-samsung-janice"
deviceinfo_arch="armv7"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="480"
deviceinfo_screen_height="800"
deviceinfo_getty="ttyAMA2;115200"
deviceinfo_dev_touchscreen="/dev/input/event2"
deviceinfo_kernel_cmdline_mainline="console=ttyAMA2,115200 PMOS_NO_OUTPUT_REDIRECT"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_dtb_second="true"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"

View file

@ -1,10 +1,10 @@
pkgname=firmware-samsung-i9070
pkgname=firmware-samsung-janice
pkgver=1
pkgrel=2
pkgrel=0
_commit="e24d9687e7fda4f94fc6652d137ed8e703930c3a"
pkgdesc="Samsung Galaxy S Advance Firmware"
url="https://github.com/Epirex/android_vendor_samsung_u8500"
arch="armhf"
arch="armv7"
license="proprietary"
source="$pkgname-$_commit.tar.gz::https://github.com/Epirex/android_vendor_samsung_u8500/archive/$_commit.tar.gz"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
@ -18,4 +18,4 @@ package() {
done
}
sha512sums="0f1a0ab978662728311cde4d055be9e1162e5eb71eda7117b6b5eba335e373cabd70ee3005755bd469c18eea872ccbf2bf9d09a357c825fd3e5b96060ba19137 firmware-samsung-i9070-e24d9687e7fda4f94fc6652d137ed8e703930c3a.tar.gz"
sha512sums="0f1a0ab978662728311cde4d055be9e1162e5eb71eda7117b6b5eba335e373cabd70ee3005755bd469c18eea872ccbf2bf9d09a357c825fd3e5b96060ba19137 firmware-samsung-janice-e24d9687e7fda4f94fc6652d137ed8e703930c3a.tar.gz"

View file

@ -1,49 +0,0 @@
From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Wed, 24 Sep 2014 01:06:46 +0100
Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 39eb16b0066f2..bfe2a2f5a644e 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd86885dd..f6aa84d5b93c9 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);

View file

@ -1,17 +0,0 @@
diff --git a/usr/u8500_initramfs.list b/usr/u8500_initramfs.list
index 35e8d68..bc8c3c5 100644
--- a/usr/u8500_initramfs.list
+++ b/usr/u8500_initramfs.list
@@ -24,10 +24,8 @@ nod /dev/block/mmcblk1p1 600 0 0 b 179 19
slink /init /stage1/init 777 0 0
dir /proc 755 0 0
dir /stage1 755 0 0
-file /stage1/busybox source/usr/u8500_initramfs_files/busybox 755 0 0
-file /stage1/init source/usr/u8500_initramfs_files/init 755 0 0
+file /stage1/busybox usr/u8500_initramfs_files/busybox 755 0 0
+file /stage1/init usr/u8500_initramfs_files/init 755 0 0
dir /sys 755 0 0
dir /mnt 755 0 0
dir /mnt/.lfs 755 0 0
-file /stage1/boot.cpio ../../ramdisk.cpio 644 0 0
-file /stage1/recovery.cpio ../../ramdisk-recovery.cpio 644 0 0

View file

@ -1,26 +0,0 @@
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index a7ca009..808091b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -259,7 +259,7 @@ cmd_lzma = (cat $(filter-out FORCE,$^) | \
quiet_cmd_lzo = LZO $@
cmd_lzo = (cat $(filter-out FORCE,$^) | \
- lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
+ lzop -6 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
# XZ
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index b482f16..c4e08c5 100644
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -245,7 +245,7 @@ case "$arg" in
echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f"
echo "$output_file" | grep -q "\.xz$" && \
compr="xz --check=crc32 --lzma2=dict=1MiB"
- echo "$output_file" | grep -q "\.lzo$" && compr="lzop -9 -f"
+ echo "$output_file" | grep -q "\.lzo$" && compr="lzop -6 -f"
echo "$output_file" | grep -q "\.cpio$" && compr="cat"
shift
;;

View file

@ -1,16 +0,0 @@
diff --git a/Makefile b/Makefile
index a91053a..17ceb4a 100644
--- a/Makefile
+++ b/Makefile
@@ -687,9 +687,9 @@ export INSTALL_PATH ?= /boot
# makefile but the argument can be passed to make if needed.
#
-#MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
+MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
#MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))
-MODLIB = $(INSTALL_MOD_PATH)/lib/modules
+#MODLIB = $(INSTALL_MOD_PATH)/lib/modules
export MODLIB
#

View file

@ -1,15 +0,0 @@
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index ed549c3..09e83f6 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -361,8 +361,8 @@ uint dhd_download_fw_on_driverload = TRUE;
/* Definitions to provide path to the firmware and nvram
* example nvram_path[MOD_PARAM_PATHLEN]="/projects/wlan/nvram.txt"
*/
-char firmware_path[MOD_PARAM_PATHLEN]="/system/etc/wifi/bcmdhd_sta.bin";
-char nvram_path[MOD_PARAM_PATHLEN]="/system/etc/wifi/nvram_net.txt";
+char firmware_path[MOD_PARAM_PATHLEN]="/lib/firmware/postmarketos/bcmdhd_sta.bin";
+char nvram_path[MOD_PARAM_PATHLEN]="/lib/firmware/postmarketos/nvram_net.txt";
/* information string to keep firmware, chio, cheip version info visiable from log */
char info_string[MOD_PARAM_INFOLEN];

View file

@ -1,36 +0,0 @@
diff --git a/arch/arm/mach-ux500/board-janice-mcde.c b/arch/arm/mach-ux500/board-janice-mcde.c
index 00417c38..7b8d8b31 100644
--- a/arch/arm/mach-ux500/board-janice-mcde.c
+++ b/arch/arm/mach-ux500/board-janice-mcde.c
@@ -222,7 +222,7 @@ static struct mcde_display_device generic_display0 = {
.port = &port0,
.chnl_id = MCDE_CHNL_A,
.fifo = MCDE_FIFO_A,
- .default_pixel_format = MCDE_OVLYPIXFMT_RGBA8888,//support RGBA888 for janice
+ .default_pixel_format = MCDE_OVLYPIXFMT_RGB888,//support RGBA888 for janice
.x_res_padding = 0,
.y_res_padding = 0,
.native_x_res = 480,
@@ -243,7 +243,7 @@ static int display_postregistered_callback(struct notifier_block *nb,
{
struct mcde_display_device *ddev = dev;
u16 width, height;
- u16 virtual_height;
+ u16 virtual_width, virtual_height;
struct fb_info *fbi;
#if defined(CONFIG_DISPDEV) || defined(CONFIG_COMPDEV)
struct mcde_fb *mfb;
@@ -256,10 +256,11 @@ static int display_postregistered_callback(struct notifier_block *nb,
return 0;
mcde_dss_get_native_resolution(ddev, &width, &height);
- virtual_height = height * 3;
+ virtual_width = width * 2;
+ virtual_height = height * 2;
/* Create frame buffer */
- fbi = mcde_fb_create(ddev, width, height, width, virtual_height,
+ fbi = mcde_fb_create(ddev, width, height, virtual_width, virtual_height,
ddev->default_pixel_format, FB_ROTATE_UR);
if (IS_ERR(fbi)) {

View file

@ -1,84 +0,0 @@
# Kernel config based on: arch/arm/configs/janice_defconfig
pkgname=linux-samsung-i9070
pkgver=3.0.101
pkgrel=15
pkgdesc="Samsung Galaxy S Advance kernel from Epirex"
arch="armhf"
_carch="arm"
_flavor="samsung-i9070"
url="https://github.com/Epirex/Samsung_STE_Kernel"
license="GPL2"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev busybox-static-armhf gcc6"
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
# request if you find out that it is booting working with newer GCCs as
# well. See <https://postmarketos.org/vendorkernel> for instructions.
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="Samsung_STE_Kernel"
_commit="ac7219c4b8dcec7bc5a598d42c6be0db4aa36332"
_config="config-$_flavor.armhf"
source="
$pkgname-$_commit.tar.gz::https://github.com/Epirex/$_repository/archive/$_commit.tar.gz
$_config
00_fix_return_address.patch
01_remove_ramdisks_from_initramfs.patch
02_reduce_lzo_compression.patch
03_change_modules_install_dir.patch
04_change_dhd_firmware_dir.patch
05_fix_fb_rgb_mode.patch
init
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
. downstreamkernel_prepare
# Use Alpine's busybox.static instead of the pre-compiled busybox shipped
# with the source
cp -v /usr/$(arch_to_hostspec $arch)/bin/busybox.static \
"$builddir"/usr/u8500_initramfs_files/busybox
# use custom init script in the initramfs which loads the initramfs from
# the kernel2 partition ("isorec")
cp -v "$srcdir"/init "$builddir"/usr/u8500_initramfs_files/init
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS"
# the 'no-pic' flag is necessary to avoid the
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
make ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" modules
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
# Modules
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \
modules_install
}
sha512sums="bb8218d803ec27f983449a43d14df75122311609a39e5b57095f4e8933752a2699fa0d4df1674aeee7d6e3a439551dacc9af3cab26b6e3e71f0441a4f16693df linux-samsung-i9070-ac7219c4b8dcec7bc5a598d42c6be0db4aa36332.tar.gz
803896d20e7a26214652daf3848c6b0db015477525e02ccb7299029c3d4dd97a45c164af7dde869325e51599baa4491491a56f9b7c358d7b68d505fdae730a44 config-samsung-i9070.armhf
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
3c8e15644eced6f73c5c7d3df0437f3a9f750f4ec32d744c9e4266ccccef9e38316a898227a898a9fc0696bee0281c0e14312de2944e27a696f18a42deabb383 01_remove_ramdisks_from_initramfs.patch
ef5b912c26fea4ab882592bdf7487942c64b123de8d25d08d976f29743f311742ee2f773bf2d110ddb5095f254dbb0bd4487c5cfce77311929082599199e7ebd 02_reduce_lzo_compression.patch
27bba6d070db6f499d030680c020906fc3238dc60d90a9b2f0f3a355ef15beb227c1cf48b7858156264fe10f7943772ed00a837be36ba4b80de8199f0383e688 03_change_modules_install_dir.patch
47533412cc91d2ead046039c90180ebc459e157017be85dca69cd882a183963448beb973f2cb7eaccbcd35354b0ed6a668131cd39ea30393dd52fd93b7e26815 04_change_dhd_firmware_dir.patch
67278735e21c00d4208e76788d3d99ff1bd9c628608f60a73004f6deb8a4bc75fdf7c1e43108010c57aa6da06aa5e49292b109a2c4421212e181abaca45ea44d 05_fix_fb_rgb_mode.patch
ef01c51c138239a49c1d00ae0074a07fed267d64934cf3d436a8ff057b91692ee2d040a45eacbb0dc62d5017a708c4dca2fadc282c850fa72aeebcfa787e2cbc init"

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
#!/stage1/busybox sh
# Samsung kernels come with their own initramfs, which extract and load another
# initramfs. Usually that depends on the recovery key combination being pressed
# or not. For simplicity, we always boot the recovery image (from the kernel2
# partition) here.
_PATH="$PATH"
export PATH=/stage1
busybox cd /
busybox date >>boot.txt
exec >>boot.txt 2>&1
busybox rm init
busybox mount -t proc proc /proc
busybox mount -t sysfs sysfs /sys
# always use the "isorec"-style lzop compressed initramfs
# from the kernel2 partition
load_image=/stage1/isorec.cpio
busybox lzop -dc /dev/block/mmcblk0p17 > ${load_image}
busybox cpio -i < ${load_image}
busybox umount /sys
busybox umount /proc
busybox date >>boot.txt
busybox rm -fr /stage1 /dev/*
export PATH="${_PATH}"
exec /init