Right. The fix is not included in the image yet Iām investigating this now, will keep you posted.
@marcodip Iāve tested build #37 and it works fine. Please try it out!
http://snapshots.linaro.org/96boards/hikey/linaro/debian/latest/
@Mani It works fine, thanks!
Is there any chance to have a SD image with 5.1/5.2 Kernel? Iāve tried many times to update but it cannot work.
@marcodip I havenāt tested mainline kernel recently but I remember having some issues with 5.1 (canāt remember what exact issue though). If you can share the problem I will have a look.
Thanks,
Mani
Thanks @Mani for this thread.
I am able to build and boot from kernel source.
root@linaro-developer:~# cat /proc/version
Linux version 4.19.5-ga20633b (sreenad@OptiPlex) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #4 SMP PREEMPT Thu Aug 22 21:25:44 IST 2019
root@linaro-developer:~#
I copied images to board using pendrive. I donāt have usb to ethernet adapter.
So I would like to use the type-C port as ethernet device. So that I can update image using scp to board.
Tried some configs (RNDIS etc etc) and it is creating Ether device on my host PC. But not on hikey960.
Long back I had tried it on raspberry pi or beaglebone.
Forgot the exact configurations required for it. If somebody knows the configs or the kind of USB_GADGET mode, pls let me know.
BTW, while working in debian, how developers are updating image on /boot?
Regards,
Sreenad.
@Mani
Thanks for the quick reply.
I dont have wifi AP too. Thats why i am trying to configure for usb gadget ether.
Sorry. By āupdating /bootā ,I meant how images are copied to board.Just wanted check something like adb is there in debian.
I guess most of the developers might be using wifi.
Regards,
Sreenad.
@Mani
Iāve tested AOSP with Kernel 5.2 and it works fine.
Now Iāve built 5.2 and trying to update Kernel on SD following the doc you posted.
If I select 4.19.5 from grub, it still works.
If I select 5.2, there are two different behaviour.
- Default grub settings:
echo 'Loading Linux 5.2.0-hikey-linaro ...' linux /boot/vmlinuz-5.2.0-hikey-linaro root=UUID=98411cf7-02\e9-48b4-ae8d-fcff6684da06 ro echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-5.2.0-hikey-linaro
console just blocks here:
Loading Linux 5.2.0-hikey-linaro ā¦
Loading initial ramdisk ā¦
Loading driver at 0x000B67C3000 EntryPoint=0x000B7AE97E4
Loading driver at 0x000B67C3000 EntryPoint=0x000B7AE97E4
EFI stub: Booting Linux Kernelā¦
EFI stub: EFI_RNG_PROTOCOL unavailable, no randomness supplied
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address mapā¦
- Adding this row to grub:
devicetree /boot/hi3660-hikey960.dtb
The console stops at the same point but in this case the green LED starts blinking.
@marcodip, FYI. Regarding your 5.2.0 booting with debian.
For my work, today I checked, mainline kernel (Commit: a55aa89 Linux 5.3-rc6).
Its booting fine with debian.
Replaced only kernel and dtb with all modules built-in.
Observations:
-
I can see wifi interface in ifconfig.
-
USB not working. (I think I have to pull USB realted patches from 4.19.5 Maniās repo.)
root@linaro-developer:~# cat /proc/version
Linux version 5.3.0-rc6 (sreenad@OptiPlex) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #3 SMP PREEMPT Mon Aug 26 13:28:56 IST 2019
root@linaro-developer:~#
root@linaro-developer:~# cat /proc/device-tree/model
HiKey960root@linaro-developer:~#
Regards,
Sreenad.
You are right! Or you can apply the latest patches from mailing list: https://patchwork.kernel.org/cover/10909961/
I usually do rsync
to copy the files using network. If you donāt have network, then use uSD.
@marcodip You should update devicetree at grub every time. But the kernel shouldnāt stop at boot. Did you built the UFS drivers into the kernel or as modules?
Hi @Mani,
I used the default HiKey960 configuration:
$ export RAMDISK=ramdisk.img
$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- hikey960_defconfig
$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- deb-pkg
@marcodip There is no hikey960_defconfig in mainline. Did you export it from Hikey kernel? In any case, you need to make UFS drivers as builtin.
CONFIG_SCSI_UFSHCD=y
CONFIG_SCSI_UFSHCD_PLATFORM=y
CONFIG_SCSI_UFS_HISI=y
Recollecting my steps for booting with 5.3-rc6 + debian.
Updated low level firmwares.
git clone https://android.googlesource.com/device/linaro/hikey
cd installer/hikey960
Board in fastboot mode, flashed UFS. (no sdcard present)
(I am flashing few firmwares after a long time. So to ensure certain firmware are updated. May be you can skip this.)
./uefi-flash-all.sh
./flash-all.sh
Flashed bootloader, boot image and rootfs image from Debian Downloads for HiKey960 - 96Boards (build 37)
Cloned mainline kernel
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
(While I am checking, HEAD is at, a55aa89 Linux 5.3-rc6)
Compliation:
export ARCH=arm64
export CROSS_COMPILE=your toolchain
make defconfig
Replaced ā=mā to ā=yā in .config using search and replace in my editor.
(If anyone reading this know some better method for including all modules to builtin, Let me know.)
make olddefconfig
make Image.gz dtbs
Copied Image.gz and hi3660-hikey960.dtb to /boot on board.
Created a custom kernel entry in /boot/grub/grub.cfg
menuentry 'Custom kernel' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-aab08174-8c3f-45f8-9749-79e1f1ced14b' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root aab08174-8c3f-45f8-9749-79e1f1ced14b
else
search --no-floppy --fs-uuid --set=root aab08174-8c3f-45f8-9749-79e1f1ced14b
fi
echo 'Loading Linux 4.19.5-hikey ...'
linux /boot/Image.gz root=UUID=aab08174-8c3f-45f8-9749-79e1f1ced14b rw no_console_suspend
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.5-hikey
devicetree /boot/hi3660-hikey960.dtb
}
Booted using the custom entry in grub.
@Mani
I am using this Linaro snapshot: https://git.linaro.org/people/john.stultz/android-dev.git/snapshot/android-dev-dev/hikey960-5.2.tar.gz
All modules have y.
$ grep SCSI_UFS .config
CONFIG_SCSI_UFSHCD=y
# CONFIG_SCSI_UFSHCD_PCI is not set
CONFIG_SCSI_UFSHCD_PLATFORM=y
# CONFIG_SCSI_UFS_CDNS_PLATFORM is not set
# CONFIG_SCSI_UFS_DWC_TC_PLATFORM is not set
CONFIG_SCSI_UFS_HISI=y
# CONFIG_SCSI_UFS_BSG is not set
@marcodip, you are using the AOSP kernel (donāt know why). If you donāt have any requirements to use AOSP kernel, Iād recommend you to use mainline kernel directly as per @sreenadās reply.
Hi @Mani,
Mani:
I usually dorsync
to copy the files using network. If you donāt have network, then use uSD.
As it is difficult to always plug and unplug devices for copying files to board, I though of setting up a network via USB.
I could setup usb gadget ethernet on type-c.
Now I am using it to scp kernel image.
Capturing diffconfig:
$ scripts/diffconfig .config config_with_g_ether_working
-USB_CONFIGFS_ACM n
-USB_CONFIGFS_ECM n
-USB_CONFIGFS_ECM_SUBSET n
-USB_CONFIGFS_EEM n
-USB_CONFIGFS_F_FS n
-USB_CONFIGFS_F_HID n
-USB_CONFIGFS_F_LB_SS n
-USB_CONFIGFS_F_MIDI n
-USB_CONFIGFS_F_PRINTER n
-USB_CONFIGFS_F_UAC1 n
-USB_CONFIGFS_F_UAC1_LEGACY n
-USB_CONFIGFS_F_UAC2 n
-USB_CONFIGFS_F_UVC n
-USB_CONFIGFS_MASS_STORAGE n
-USB_CONFIGFS_NCM n
-USB_CONFIGFS_OBEX n
-USB_CONFIGFS_RNDIS n
-USB_CONFIGFS_SERIAL n
-USB_F_ACM m
-USB_F_MASS_STORAGE m
-USB_F_OBEX m
-USB_F_RNDIS m
-USB_F_SERIAL m
-USB_F_SS_LB m
-USB_G_WEBCAM n
-USB_U_SERIAL m
-USB_ZERO_HNPTEST n
-U_SERIAL_CONSOLE n
USB_CONFIGFS m -> n
USB_ETH m -> y
USB_ETH_RNDIS y -> n
USB_F_ECM m -> y
USB_F_SUBSET m -> y
USB_G_SERIAL m -> n
USB_LIBCOMPOSITE m -> y
USB_MASS_STORAGE m -> n
USB_U_ETHER m -> y
USB_ZERO m -> n
Regards,
Sreenad.
Hi @Mani,
Today I had to check hikey960 with 4.9 kernel + debian.
I took kernel source from:
Repo: git://github.com/96boards-hikey/linux.git
Branch: remotes/origin/hikey960-v4.9
Configuration: hikey960_defconfig
For mounting root device, I had to enable CONFIG_DEVTMPFS.
Am I using the right repo for 4.9 kernel which can work with debian in hikey960?
Regards,
Sreenad.