samsung-i9100
−Table of Contents
pacman -S arm-none-eabi-gcc uboot-tools git clone https://github.com/Sekilsgs2/i9100_kernel_mainline_port.git cd i9100_kernel_mainline_port export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make i9100_defconfig make -j6 sh mk.sh sh mod.sh # heimdall flash --KERNEL boot.img
- xda method flashing kernel: https://forum.xda-developers.com/galaxy-s2/general/uboot-bootloader-true-multiboot-t1680898
- postmarketos aports https://gitlab.com/postmarketOS/pmaports/tree/master/device/linux-samsung-i9100
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git cd linux-stable git checkout tags/5.4.5 wget 'https://raw.githubusercontent.com/Sekilsgs2/i9100_kernel_mainline_port/6c02dad36b8a76a6f50d26ff1b9abb0d30aacbc9/arch/arm/configs/i9100_defconfig' -O arch/arm/configs/i9100_defconfig wget 'https://raw.githubusercontent.com/Sekilsgs2/i9100_kernel_mainline_port/master/arch/arm/boot/dts/exynos4210-i9100.dts' -O arch/arm/boot/dts/exynos4210-i9100.dts wget 'https://raw.githubusercontent.com/Sekilsgs2/i9100_kernel_mainline_port/master/arch/arm/boot/dts/exynos4210.dtsi' -O arch/arm/boot/dts/exynos4210.dtsi # patch file arch/arm/boot/dts/Makefile export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make i9100_defconfig make -j6 make dtbs cat arch/arm/boot/zImage arch/arm/boot/dts/exynos4210-i9100.dtb > zimage mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n Linux-android-sucks -d zimage boot.img make modules_install INSTALL_MOD_PATH=../
postmarketos binaries chroot
gio: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped
archlinuxarm binary http://os.archlinuxarm.org/os/ArchLinuxARM-odroid-x-latest.tar.gz
gio: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=6c5eae3cb78debe406df57f20e99c2462f764c85, for GNU/Linux 3.2.0, stripped
- rootfs armv7?
pacman -U dtc-1.4.1-1-x86_64.pkg.tar.xz # downgrade to older version pacman -S gcc-arm-none-eabi-bin-49 git clone https://github.com/Sekilsgs2/i9100-uboot.git git clone https://github.com/Sekilsgs2/toolchain_for_old_uboot.git cd i9100-uboot export PATH='/usr/local/arm/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH' # set -gx PATH /usr/local/arm/gcc-arm-none-eabi-4_9-2015q3/bin $PATH export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make galaxys2_config make galaxys2 # heimdall flash --kernel u-boot.bin
- bug report using mainline kernel galaxy s2 https://github.com/Sekilsgs2/i9100_kernel_mainline_port/issues/1#issuecomment-565706956
- xda post mainline kernel samsun s2 https://forum.xda-developers.com/galaxy-s2/general/port-run-mainline-linux-kernel-t3901190
- uboot 9100 sources
heimdall flash --KERNEL u-boot.bin heimdall flash --RECOVERY uImage
Well, to boot the custom kernel, you need to put it to the '/sdcard/boot/vmlinux.uimg', not to the external sd card. The rootfs should be put to the second partition of the external microSD (mmcblk1p2), but you can recompile the kernel and put any cmline there.
convert zImage into uImage
mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n Linux-android-sucks -d zImage uImage
u-boot trats https://forum.xda-developers.com/galaxy-s2/general/boot-sources-i9100-t1694523
git clone git://git.denx.de/u-boot.git cd u-boot export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make trats_config make all
===== legacy uboot (working) =====
pacman -U dtc-1.4.1-1-x86_64.pkg.tar.xz # downgrade to older version pacman -S gcc-arm-none-eabi-bin-49 git clone https://github.com/Sekilsgs2/i9100-uboot.git git clone https://github.com/Sekilsgs2/toolchain_for_old_uboot.git cd i9100-uboot export PATH="/usr/local/arm/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH" # set -gx PATH /usr/local/arm/gcc-arm-none-eabi-4_9-2015q3/bin $PATH export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make galaxys2_config make galaxys2 heimdall flash --KERNEL u-boot.bin
legacy kernel 4.2 (partially working)
git clone https://github.com/Sekilsgs2/i9100_kernel_mainline_port.git cd i9100_kernel_mainline_port export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make i9100_defconfig make -j6 cat arch/arm/boot/zImage arch/arm/boot/dts/exynos4210-i9100.dtb > zimage mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n Linux-android-sucks -d zimage boot.img make modules_install INSTALL_MOD_PATH=../ heimdall flash --RECOVERY boot.img
prepare rootfs
heimdall flash --FACTORYFS ...
try
'console=ttyS0,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro no_console_suspend vdaccfg=0xa000 logo=osd'
setenv loadaddr 0x70800000 setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 ip=none rootfstype=ext4' setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 0; mmc read ${loadaddr} 0x800 0x1800; bootm' setenv bootcmd 'run bootcmd_mmc' saveenv
bootpart=1:1 devtype=mmc bootdir= bootfile=zImage bootpartition=mmcblk1p2 set_bootargs=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} rw rootfstype=ext4 rootwait uenvcmd=run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr}
Next steps
- Move everything to local and make bash script flash.sh
- uboot debugging, if mmc rescan https://archlinuxarm.org/forum/viewtopic.php?f=33&t=8292#p44462
- check archlinuxarm bootparams for uboot
- make serial access
CONFIG_USB_ETH=y CONFIG_USB_ETH_RNDIS=y CONFIG_USB_ETH_EEM=y
- /etc/systemd/network/usb0.network
[Match] Name=usb0 [Network] DNS=192.168.2.1 IPv6PrivacyExtensions=true [Address] Address=192.168.7.18/30 [Route] Gateway=192.168.7.17
- BCM4330 https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SII_(samsung-i9100)#WiFi_.2F_Bluetooth_.2F_FM_radio
- micro-usb-usb-dongle keyboard :D
pacman-key --init pacman-key --populate archlinuxarm
- create package linux-firmware-samsung-i9100 or something
- use mainline kernel supplied by archlinuxarm, using dtb kernel boot args
- document everything we have so far
- iwd & sshd
systemctl enable --now iwd systemd-networkd systemd-resolved sshd ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
- /etc/systemd/network/wlan0.network
[Match] Name=< name of your wifi interface or * for every interface > [Network] DHCP=yes IPv6PrivacyExtensions=true
RFKILL=y CONFIG_KEY_DH_OPERATIONS=y
dd of=archlinuxarm.img bs=1 seek=10G count=0 mkfs.ext4 -F archlinuxarm.img mount archlinuxarm.img arm-chroot pacman -S qemu-arm-static systemctl start systemd-binfmt wget 'http://de4.mirror.archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz' bsdtar -xpf ArchLinuxARM-armv7-latest.tar.gz -C arm-chroot arch-chroot arm-chroot # pacman-key --init # pacman-key --populate archlinuxarm # pacman -Syu base-devel
pacman -S phosh gnome-session gnome-shell
- check patched files by Sekilsgs2
- as i said before: start just phoc to get that running first: e.g. phoc -E 'weston-terminal' once that works you can then start phosh from that terminal and once that works bring gnome-session into the mix. that allows us to debug all parts independently.
- @lcd dts: flip-horizontal;, flip-vertical;
u-boot porting
instructions for archlinux
git clone https://git.project-insanity.org/onny/i9100-uboot.git pacman -U i9100-uboot/dtc-1.4.1-1-x86_64.pkg.tar.xz i9100-uboot/gcc-arm-none-eabi-bin-49-4.9_2015_q3_update-3-x86_64.pkg.tar.xz wget 'https://github.com/u-boot/u-boot/archive/v2012.04.tar.gz' tar xvf v2012.04.tar.gz cd u-boot-2012.04 patch -p1 -i ../i9100-uboot/i9100-uboot-2012.04.patch patch -p1 -i ../i9100-uboot/i9100-uboot-2012.04-bootarchlinux.patch export PATH='/usr/local/arm/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH' export ARCH=arm export CROSS_COMPILE=arm-none-eabi- make galaxys2 ../i9100-uboot/flash.sh
boards.cfg drivers/misc/Makefile drivers/mmc/s5p_mmc.c (no file)
interessante datei in uboot upstream: include/configs/exynos5250-dt.h
- modifiziert
- galaxys2.c
- galaxys2.h
https://github.com/u-boot/u-boot/commits/master?after=d16e18ca6c4d81ac142acd529b1acb55b0c96dfc+45035
git checkout 51bdad67cb6738c5d0e78084cf3e3baa216f4d2f
samsung-i9100.txt · Last modified: 2022/03/11 00:21 by 2a01:4f8:192:214e::2