Legacy Uboot (Working) =====
Total Page:16
File Type:pdf, Size:1020Kb
2021/09/23 21:05 1/4 legacy kernel 4.2 (partially working) <code bash> 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 </code> 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 http://postmarketos.brixit.nl/postmarketos/master/armhf/linux-samsung-i9100-3.0.101-r13.apk <code bash> 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/6c02dad36b8a76a6f5 0d26ff1b9abb0d30aacbc9/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=../ </code> * archlinuxarm https://archlinuxarm.org/forum/viewtopic.php?f=27&t=5284 * https://github.com/Sekilsgs2/i9100_kernel_mainline_port/issues/1 postmarketos binaries chroot <code> gio: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped </code> archlinuxarm binary http://os.archlinuxarm.org/os/ArchLinuxARM-odroid-x-latest.tar.gz <code> 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 </code> * rootfs armv7? <code bash> 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 </code> * 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 * https://github.com/Talustus/i9100-uboot * https://github.com/astarasikov <code bash> heimdall flash –KERNEL u-boot.bin heimdall flash –RECOVERY uImage </code> <code> 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. </code> convert zImage into uImage <code bash> mkimage -A arm -O linux - T kernel -C none -a 0x40008000 -e 0x40008000 -n Linux-android-sucks -d zImage uImage </code> u-boot trats https://forum.xda-developers.com/galaxy-s2/general/boot-sources-i9100-t1694523 <code bash> Project-Insanity - https://wiki.project-insanity.org/ Last update: 2021/09/21 12:13 samsung-i9100 https://wiki.project-insanity.org/samsung-i9100 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 </code> ===== 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) <code bash> 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 </code> prepare rootfs <code bash> heimdall flash –FACTORYFS … </code> http://os.archlinuxarm.org/os/ArchLinuxARM-odroid-latest.tar.gz http://de4.mirror.archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz try <code bash> "console=ttyS0,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro no_console_suspend vdaccfg=0xa000 logo=osd" </code> <code> 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 </code> <code> 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} </code> Next steps Move everything to local and make bash script flash.sh https://github.com/postmarketOS/pmbootstrap/blob/master/aports/main/heimdall/heimdal l_wait_for_device.sh try with mmcblk0p11 https://github.com/Sekilsgs2/i9100_kernel_mainline_port/issues/1#issuecomment-566525856 uboot debugging, if mmc rescan https://archlinuxarm.org/forum/viewtopic.php?f=33&t=8292#p44462 check archlinuxarm bootparams for uboot make serial access https://wiki.project-insanity.org/ Printed on 2021/09/23 21:05 2021/09/23 21:05 3/4 legacy kernel 4.2 (partially working) <code> CONFIG_USB_ETH=y CONFIG_USB_ETH_RNDIS=y CONFIG_USB_ETH_EEM=y </code> <file - /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 </file> https://wiki.postmarketos.org/wiki/Kernel_configuration#CONFIG_USB_ETH BCM4330 https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SII_(samsung- i9100)#WiFi_.2F_Bluetooth_.2F_FM_radio https://archlinuxarm.org/packages/armv7h/firmware-brcm43xx micro-usb-usb-dongle keyboard :D https://raw.githubusercontent.com/TheMuppets/proprietary_vendor_samsung/cm-14.1/i9100/pro prietary/system/etc/wifi/nvram_net.txt https://github.com/respeaker/rkbin/raw/master/firmware/bluetooth/BCM4330B1.hcd http://mirror.archlinuxarm.org/aarch64/core/wireless-regdb-2019.06.03-2-any.pkg.tar.xz https://github.com/TheMuppets/proprietary_vendor_samsung/tree/lineage-17.0/i9100/proprietar y/system/etc/wifi https://github.com/TheMuppets/proprietary_vendor_samsung/raw/lineage-17.0/i9100/proprietar y/system/etc/wifi/bcmdhd_sta.bin as brcmfmac4330-sdio.bin <code bash> pacman-key –init pacman-key –populate archlinuxarm </code> 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 <code bash> systemctl enable –now iwd systemd-networkd systemd-resolved sshd ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf </code> <file - /etc/systemd/network/wlan0.network> [Match] Name=< name of your wifi interface or * for every interface > [Network] DHCP=yes IPv6PrivacyExtensions=true </file> <code> RFKILL=y CONFIG_KEY_DH_OPERATIONS=y </code> <code bash> 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 </code> <code bash> pacman -S phosh gnome-session gnome-shell </code> 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; Project-Insanity - https://wiki.project-insanity.org/ Last update: 2021/09/21 12:13 samsung-i9100 https://wiki.project-insanity.org/samsung-i9100