[Q] USB HOST support SiyahKernel 3.0beta6 - Galaxy S II Q&A, Help & Troubleshooting

Dear Friends,
I have been building custom USB devices for Android as a hobby during my spare time since the end of last year. I have been succesfully using until now Siyah kernel V2.5.2-VWM + Android 2.3.5 in order to test my hardware prototypes with my SGS2. This version of Siyah kernel was compiled with some flags (CONFIG_SEC_WHITELIST=n) that disabled a white-list placed by Samsung that prevented third-party USB devices from connecting to the phone.
I updated yesterday to Siyah-v3.0b6 and CM9 and found that my USB devices are not working (OTG devices like my USB memory stick still works). I tracked the problem using the "lsusb" terminal command and the "USB Device Info" app, and I found that my devices are not enumerated correctly anymore. This is a symptom that the Samsung white-list is enabled and it is filtering USB devices that are not found in the list.
I may be wrong, but I think the workaround is only in the compilation flag above described. Does anyone of you people know of any kernel supporting ICS that is working with custom USB devices, or HID devices (joysticks, keyboards, mouse, gamepads, etc)?
I dont have enough credits to post this in the developer Forum so that Gokhanmoral can receive this feedback. I hope he may eventually read this post.
Thanks in advance for your help,
Saul

Did you try Beta 5? I had problems with Beta 6, I could not access the phone via adb or see any of the drives on my PC via MTP. Maybe there are general USB problems in that version. Going back to Beta 5 solved it.

rovo89 said:
Did you try Beta 5? I had problems with Beta 6, I could not access the phone via adb or see any of the drives on my PC via MTP. Maybe there are general USB problems in that version. Going back to Beta 5 solved it.
Click to expand...
Click to collapse
Thanks a lot for the suggestion. I am digging on this issue and found that it is more related to a compilation flag of the new kernel for ICS.
regards,
Saul

USB Host support for custom devices
Hello Saul,
I am experiencing a similar problem with my custom USB device. I have a rooted Samsung Galaxy S2 (GT-I9100) with android 4.0.3.
Did you manage to complie a kernel that works? I downloaded the GT-I9200_ICS_Opensource_Update4.zip kernel source files from opensource.samsung.com but I am not able to compile it. I got the error:
Code:
drivers/media/video/samsung/mali/linux/mali_osk_mali.c:23:98: error: arch/config.h: No such file or directory
Any ideas or guidance would be greatly appreciated.
Model: GT-I9100
Android version: 4.0.3
Baseband: I9100BULP6
Kernel: [email protected]#3
Compilation: IML74K.BULPC

Hi Saul and everybody,
I figured out what the problem was; this is just in case it's useful to someone.
It seems the "make clean" and "make mrproper" routines in the Makefile created by Samsund does not work properley and you need to unzip the entire source code again and restart the proces from scratch every time you want to change the .config and re-compile.
Afterwards, I also noticed the image won't work because I needed to exctract an initramfs for my device and to link it to the new kernel during the kernel compilation process and setting the CONFIG_INITRAMFS_SOURCE .config parameter pointing to the location where it was extracted.
In order to extract my initramfs, I applied the following script (which is an adaptation I made to this one http://forum.xda-developers.com/wiki/Extract_initramfs_from_zImage) to a zImage kernel included in a stockrom that worked fine in my device:
Code:
#!/bin/bash
#
#Source: http://forum.xda-developers.com/wiki/Extract_initramfs_from_zImage
#
#Extract initramfs from zImage
#
#initramfs provides the rootfs when booting a Linux kernel on a mobile device.
#Below script may be helpful if you are interested in extracting such an image from a zImage kernel file.
#Tested on Ubuntu for Samsung Galaxy S firmware. Other zImages may have different archiving options - would require a #modification to the script...
#
#After extracting the initramfs, it can be unpacked into the local directory with
#
#cpio -v -i --no-absolute-filenames < <path-to-initramfs.img>
#
zImage=$1
#========================================================
# find start of gziped kernel object in the zImage file:
#========================================================
#
# Next two lines modified by Federico Linares
#
p1=`perl -e 'print "\x1F\x8B\x08"'` # Added by Federico Liares
pos=`grep -P -a -b --only-matching $p1 $zImage | cut -f 1 -d :` # Modified by Federico Linares
echo "-I- Extracting kernel image from $zImage (start = $pos)"
#========================================================================
# the cpio archive might be gzipped too, so two gunzips could be needed:
#========================================================================
dd if=$zImage bs=1 skip=$pos | gunzip > /tmp/kernel.img
pos=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' /tmp/kernel.img | cut -f 1 -d :`
#===========================================================================
# find start and end of the "cpio" initramfs image inside the kernel object:
# ASCII cpio header starts with '070701'
# The end of the cpio archive is marked with an empty file named TRAILER!!!
#===========================================================================
if [ ! $pos = "" ]; then
echo "-I- Extracting compressed cpio image from kernel image (start = $pos)"
dd if=/tmp/kernel.img bs=1 skip=$pos | gunzip > /tmp/cpio.img
start=`grep -a -b -m 1 --only-matching '070701' /tmp/cpio.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/cpio.img | head -1 | cut -f 1 -d :`
inputfile=/tmp/cpio.img
else
echo "-I- Already uncompressed cpio.img, not decompressing"
start=`grep -a -b -m 1 --only-matching '070701' /tmp/kernel.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/kernel.img | head -1 | cut -f 1 -d :`
inputfile=/tmp/kernel.img
fi
# 11 bytes = length of TRAILER!!! zero terminated string, fixes premature end of file warning in CPIO
end=$((end + 11))
count=$((end - start))
if (($count < 0)); then
echo "-E- Couldn't match start/end of the initramfs image."
exit
fi
echo "-I- Extracting initramfs image from $inputfile (start = $start, end = $end)"
dd if=$inputfile bs=1 skip=$start count=$count > initramfs.cpio
And that's almost all. At this point everything works fine except the Wifi. I think I have to link it to the kernel as a module, but I am not sure where to get the module from.
Any help would be greatly appreciated.
______________________________
Device: GT-I9100
Android version: 4.0.3
Baseband: I9100BULP6
Kernel: 3.0.15-I9100G
Compilation: IML74K.BULPC

Related

Editing the initrd (ramdisk)?

Anyone know how to do that and bundle it back up into a zImage we can flash on the Vibrant/Galaxy S? HTC's boot.img was reasonably simple to mod, but I haven't found any good data on re-assembling the zImage Samsung uses. I have been able to extract the initrd, but nothing on putting it back together.
I'd prefer not to completely build the kernel, as I'd like to keep using JACs and he hasn't posted the source. And I'd have to build the cross-compiler as well, time consuming.
Irritating, the Samsung kernel source build works but doesn't do this bit either. No initrd... grrrr...
No doubt there is a way to reverse-engineer the way the kernel and ramdisk is put together, but it's way beyond my capability at the moment. With that said, if we can take it apart, we can probably put it back together.
i too am looking for instructions how to repack and/or split this
Jr33 said:
i too am looking for instructions how to repack and/or split this
Click to expand...
Click to collapse
Here's how you pull the initrd out from a Vibrant image, well, JAC OCv4 anyway.. Based on a thread and script in the international Galaxy S forum. I still don't know how to re-assemble it, but Wes put some stuff in git that might help, I'm still building after a repo sync. After you run the script with the zImage as the only parameter, you should get an initrd directory with the extracted contents of the ramdisk.
Code:
#!/bin/sh
zImage=$1
#=======================================================
# find start of gziped kernel object in the zImage file:
#=======================================================
pos=`grep -a -b --only-matching $'\x1F\x8B\x08' $zImage | cut -f 1 -d :`
echo "-I- Extracting kernel image from $zImage (start = $pos)"
# dd if=$zImage bs=1 skip=$pos | gunzip > kernel.img
#===========================================================================
# find start and end of the "cpio" initramfs image inside the kernel object:
# ASCII cpio header starts with '070701'
# The end of the cpio archive is marked with an empty file named TRAILER!!!
#===========================================================================
search=`perl -e'print "\x1F\x8B\x08"'`
start=`grep -a -b --only-matching $search kernel.img | head -1 | cut -f 1 -d :`
echo "-I- Extracting initramfs image from kernel.img (start = $start, end = $end)"
dd if=kernel.img bs=1 skip=$start | gzip -d -c > initramfs.img
mkdir initrd
cd initrd
cpio -i --no-absolute-filenames < ../initramfs.img

[Q] Has anybody know how to root GT-I9001

Hi,
Is there some way to root I9001 now or I have to wait.
Firmware I9001XXKE8
Android 2.3.3
Kernel 2.6.35.7
I tried several methods (Superoneclick 1.7, 1.9.1, Gingerbreak 1.2) available for I9000 but nothing positive.
If someone can guide me in this process will be very appreciated.
Go here for step by step instructions: http://androidhogger.com/how-to-root-samsung-galaxy-s2-heres-the-tutorial.html.
Hi,
It is guide for I9100 but I have I9001 it is completely different hardware, so I doubt that the same guide can be applied to I9001.
Any news on rooting? Have you sucseeded?
No, still waiting, but it starts to sell to mass in Russia so soon will get news.
Since yesterday the new 2.3.4 firmware is out:
http://netload.in/datei5X4ZyAkNkO/I9001XXKP4_v2.3.4.rar.htm
(edit: maybe its not 2.3.4 ... samfirmware write 2.3.3)
... but we wait still for the root...
SPOOKY
afaik 2.3.x cannot be rooted. only 2.2.x
sweetnsour said:
afaik 2.3.x cannot be rooted. only 2.2.x
Click to expand...
Click to collapse
Say what? Ofcourse 2.3.x can be rooted. We just have to get more attention to the 9001 so that the rom builders actively start devving this device.
Any one knows how to root this device?
Sent from my GT-I9001 using XDA Premium App
I'm looking for a solution as well, please don't make me use Touchwiz..
Have tried to look into ways to root this phone. It looks like it'll need to be root in similar way to i9100. So guess will need to wait for dev to come up with a special kernel for rooting.
İ hope they they ll come up with new karnel as soon.as possible
Sent from my GT-I9001 using Tapatalk
sweetnsour said:
afaik 2.3.x cannot be rooted. only 2.2.x
Click to expand...
Click to collapse
Here http://forum.xda-developers.com/archive/index.php/t-1136781.html is afaik 2.3.3 rotted. I think there is a posibility to root I9001.
I hope so ....! Did u try this method?
Sent from my GT-I9001 using Tapatalk
westcrip said:
I hope so ....! Did u try this method?
Sent from my GT-I9001 using Tapatalk
Click to expand...
Click to collapse
Nope but I will try in this weekend. I found how to restore phone when you brick it (if something happen) , and it's not so hard. That's why I will use different method to root it. I just wonder if one of brick is avilable or more. I only know how to unbrick by this method http://www.youtube.com/watch?v=2qB4RNoXTd8 . Its very simple just install software downoladed from http://www.samfirmware.com/WEBPROTECT-i9001.htm our software is in the middle I9001XXKF8 ##. Odin as well recognize my phone.
I have managed it to root the i9001. So far it is very complicated, and the detailed guide as well as the analysis of SMD archives is only in German available:
http://www.android-hilfe.de/samsung...g-galaxy-s-plus-i9001-rooten.html#post1911955
As always: You are responsible for your Phone! If someone bricks his device using this guide, I am not responsible for that! Bad Luck, I have warned you! Its a dangerous job! You really shouldn't do it.
In short:
- extract the PDA SMD File
- mount system.ext4
- copy su binary and Superuser.apk into the mounted image
- adjust the file permissions (especially the suid bit for su)
- umount system.ext4
- repack the PDA SMD.
I have created two Linux bash scripts for extracting and packing SMD Archives. Warning: I'm not very experienced in bash scripting. If someone is here who is capable of making a nice script of it, feel free! The scripts are working, that's all so far. They won't win a price in a beauty contest.
First the extract.sh:
Code:
#!/bin/bash
base=0
length=1
while (( length > 0 ))
do
# calculate Length
let "skip = base + 18"
length=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "length = length * 65536"
let "skip = base + 16"
length2=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "length += length2"
let "length = length / 512" # Number of 512-Byte blocks
# calculate offset
let "skip = base + 22"
offset=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "offset = offset * 65536"
let "skip = base + 20"
offset2=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "offset += offset2"
let "offset = offset / 512" # Number of 512-Byte blocks
# save header in case of first loop
if (( base == 0 ))
then
dd if=${1} bs=512 of=header count=${offset}
fi
# extract filename
let "skip = base + 32"
filename=`dd if=${1} skip=${skip} count=16 bs=1 2>/dev/null`
# and finally: extract image
if (( length > 0 ))
then
echo "Length: ${length}"
echo "Offset: ${offset}"
echo "Filename: ${filename}"
dd if=${1} bs=512 of=${filename} skip=${offset} count=${length} 2>/dev/null
fi
# next header
let "base += 64"
done
Syntax: ./extract.sh Archive.smd
The script will extract the archive and create a lot of local files (system.ext, boot.img and so on). Well, the content of the Archive obviously.
Root the system.ext4:
I have used the newest su and Superuser.apk from here (3.0-beta4 at the moment. Newer ones should be ok):
http://goo-inside.me/superuser
The steps for rooting a system.ext4:
Code:
mkdir system
sudo mount -o loop system.ext4 system
sudo cp su system/xbin/
sudo chown 0.0 system/xbin/su
sudo chmod 4755 system/xbin/su
sudo cp Superuser.apk system/app/
sudo chown 0.0 system/app/Superuser.apk
sudo chmod 644 system/app/Superuser.apk
sudo umount system
And the pack.sh. Note: The pack.sh so far expects an existing "header" file created from an extract action and all files to be added into the archive. The resulting archive will have the same contents, as the starting archive (of course with a modified system.ext4). MD5 Checksums in the archive are calculated automatically.
Code:
#!/bin/bash
base=16
length=0
filename=dummy
# save the beginning
dd if=header of=newheader bs=1 count=16 2>/dev/null
# First create the MD5 checksums of all included (and maybe modified) files and generate the new header
while [ ! -z "${filename}" ]
do
# Length, offset, etc. is unchanged, just copy it.
let "skip = base"
dd if=header of=newheadertmp bs=1 skip=${skip} count=32 2>/dev/null
cat newheadertmp >> newheader
rm newheadertmp
# extract filename
let "skip = base + 16"
filename=`dd if=header skip=${skip} count=16 bs=1 2>/dev/null`
if [ ! -z "${filename}" ]
then
echo "creating MD5Sum of: ${filename}"
checksum=`md5sum ${filename} | tr '[a-z]' '[A-Z]'`
echo -n ${checksum:0:32} >> newheader
fi
# next header
let "base += 64"
done
# save the rest of the old header.
filesize=$(stat -c%s header)
let "base -= 32"
let "size = filesize - base"
dd if=header of=newheadertmp bs=1 skip=${base} count=${size} 2>/dev/null
cat newheadertmp >> newheader
rm newheadertmp
# the new header is the first content of the new archive.
cat newheader > ${1}
# now add all files to the archive.
filename=dummy
base=16
while [ ! -z "${filename}" ]
do
# extract filename
let "skip = base + 16"
filename=`dd if=header skip=${skip} count=16 bs=1 2>/dev/null`
if [ ! -z "${filename}" ]
then
echo "Adding: ${filename}"
cat ${filename} >> ${1}
fi
# next header
let "base += 64"
done
rm newheader
Syntax: ./pack.sh Archive.smd
Flash the resulting .smd files using Odin Multi Downloader an be happy about a rooted SGS Plus.
Note: The procedure has been tested with European KF6 and KP4 firmware. the scripts are capable of extracting and packing other SMD Archives as well, like Modem or CSC SMDs. But you don't need it for rooting (but maybe for debranding or customizing ROMs).
I'm thinking about an simpler root method like a modified kernel with a "magic" initramfs (like CF Root is working). This would make rooting of course much easier. But I have to investigate a lot of things handling boot.imgs.
Nice one RiverSource! Let's hope this is the start of more to come (ie. easier root, custom roms..).
Hello,
ok, next step for rooting the SGS Plus: The FMROOT (hehe). FMROOT is the original untouched Samsung Kernel with a modified init.rc. The init.rc calls a script which places the su binary and the Superuser.apk into the /system partition.
As always: You are responsible for your Phone! If someone bricks his device using this guide, I am not responsible for that! Bad Luck, I have warned you! Its a dangerous job! You really shouldn't do it.
Howto:
Download the appropriate file for your firmware.
Extract it
There should be 2 Files: AriesVE.ops and FMROOT_?????.smd
Use Odin Multi Downloader
Put "AriesVE.ops" in OPS
Put "FMROOT_?????.smd" in PDA
Flash. Wait 5 Seconds. Phone reboots. Phone is rooted. Normally without loosing data or settings.
Please ask here, if your Firmware is not available. It should be possible to create an appropriate FMROOT Kernel.
Credits:
astuermer for pointing me to the correct su and Superuser binaries.
Chainfire here from XDA Developers. My script is based on the CF-Root
Paul from Madaco. I had a closer look into his "superboot".
Lots and Lots of Custom ROM Developers for i9000 and i9100. I have learned a lot about Android Images on Samsung phones from them.
For the developers: the FMBOOT Script called by init.rc:
Code:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p15 /system
rm /system/xbin/su
rm /system/bin/su
mkdir /system/xbin
cat /fmboot/su > /system/xbin/su
chmod 4755 /system/xbin/su
cat /fmboot/Superuser.apk > /system/app/Superuser.apk
mount -o ro,remount -t ext4 /dev/block/mmcblk0p15 /system
And the calling code inside the init.rc:
Code:
start fmboot
class_start default
## Daemon processes to be run by init.
##
service fmboot /system/bin/sh /fmboot/fmboot.sh
user root
group root
oneshot
If someone is interested, I can post a howto on modifying boot.imgs for SGS Plus. Don't hesitate to ask. BTW, i have also coded a script which is capable of generating SMD archives with any content (not based on a previous SMD archive). I can also post it, if someone is interested.
I think, I will optimize the script in the future. Checking if the phone is already rooted and skip the thing for example. Or adding busybox. Are there any additional ideas?
Thank you very [email protected]@@@ Come on!
THX, THX,..
It works, rooted..!!

[Q] How to make zimage and initramfs.cpio.lzo

Hi,
My first post into this forum
So, I have installed Plasma active on my Archos 80 G9 with 250G Hard disk using this guide :
h tt p:/ /share.basyskom.com/plasma-active/archos_gen9.h t m l
Then, I installed it on my 1.6 G data partition, but it wasn't working well .. so I checked the disk space remaining in it and it was near zero.
My question now,
at the bottom of the plasma active installation guide you can see "Setup a Android™ and Plasma Active dual Boot System" , where the plasma active files can be put on the SD card and this was possible by just changing the zimage file
1- is there any sde zimage and initramfs.cpio.lzo that can boot from the hard disk ? ( Dynamic multiboot menu says it can but it doesn't at all )
2- Is there any guide on how to create/edit zimage file ?
Thanks ..
regards,
Mostafa
shalkam said:
Hi,
My first post into this forum
So, I have installed Plasma active on my Archos 80 G9 with 250G Hard disk using this guide :
h tt p:/ /share.basyskom.com/plasma-active/archos_gen9.h t m l
Then, I installed it on my 1.6 G data partition, but it wasn't working well .. so I checked the disk space remaining in it and it was near zero.
My question now,
at the bottom of the plasma active installation guide you can see "Setup a Android™ and Plasma Active dual Boot System" , where the plasma active files can be put on the SD card and this was possible by just changing the zimage file
1- is there any sde zimage and initramfs.cpio.lzo that can boot from the hard disk ? ( Dynamic multiboot menu says it can but it doesn't at all )
2- Is there any guide on how to create/edit zimage file ?
Thanks ..
regards,
Mostafa
Click to expand...
Click to collapse
Hi There
You'll find a rough guide to unpacking and repacking here here
Hope that helps!
trevd said:
Hi There
You'll find a rough guide to unpacking and repacking here here
Hope that helps!
Click to expand...
Click to collapse
Thanks for your post!! Finally I have been able to make some progress after googling around for a couple of weeks
I went through the guide you posted and it turned out to be very helpful ..
I ended up with the file -> new_initrd.lzo
and I have been able to edit the init file
Code:
#!/bin/sh
# kr's init script.
if [ -e /etc/debug_build ] ; then
debug=1
verbose=1
enable_adb=1
#set -x
else
debug=0
verbose=0
enable_adb=0
fi
# source init_lib
. /etc/scripts/init_lib.sh
# source recovery_lib
. /etc/scripts/recovery_lib.sh
if [ -e /etc/scripts/platform_lib.sh ] ; then
. /etc/scripts/platform_lib.sh
fi
# archosboxes
ACAT=/bin/acat
ADBD=/bin/adbd
ADEV=/bin/adev
AOSPARSER=/bin/aosparser
AUI=/bin/aui
AUID=/bin/auid
AUTODIM=/bin/autodim
CREATE_SYSID=/bin/create_sysid
FB_WRITE=/bin/fb_write
FLASH_PARTITION_ERASE=/bin/flash_partition_erase
FSCK_EXT3_PARSER=/bin/fsck.ext3_parser
GET_INFO=/bin/get_info
KD_FLASHER=/bin/kd_flasher
KX_CHECKER=/bin/kx_checker
MKFSEXT3_PARSER=/bin/mkfs.ext3_parser
REBOOT_INTO=/bin/reboot_into
RFBI_REFRESH=/bin/rfbi_refresh
USB_TS_CALIB=/bin/usb_ts_calib
FSCK_EXT3=/sbin/e2fsck.static
FSCK_VFAT=/sbin/dosfsck.static
# busybox
CAT=/bin/cat
CHMOD=/bin/chmod
DD=/bin/dd
INSMOD=/sbin/insmod
LOSETUP=/sbin/losetup
MKDIR=/bin/mkdir
MOUNT=/bin/mount
RM=/bin/rm
RMMOD=/sbin/rmmod
TOUCH=/bin/touch
UMOUNT=/bin/umount
ZCAT=/bin/zcat
AAS_PRESENT=0
# Prepare filesystem
mount_pseudo_fs
ln -s /proc/mounts /etc/mtab
# Get board and product information
PRODUCT_NAME=`$GET_INFO p`
PRODUCT_REVISION=`$GET_INFO r`
PRODUCT_PK=`$GET_INFO P`
AOS_FILENAME=`$GET_INFO f`
AOS_EXTENSION="aos"
log "recovery get_info - PRODUCT $PRODUCT_NAME ($PRODUCT_REVISION) - AOSFILENAME $AOS_FILENAME"
$ADEV -d
platform_init
wait_block_devices rawfs
mount_p rawfs
display_banner $PRODUCT_NAME $PRODUCT_REVISION
$KX_CHECKER -f /mnt/rawfs/init
ki_status=$?
$KX_CHECKER -m -f /mnt/rawfs/custom
kd_status=$?
umount_p rawfs
auid_start $PRODUCT_NAME $PRODUCT_REVISION
$AUI -c message -T "Archos $PRODUCT_NAME" -a centered -t "~ Hello world ~"
wait_block_devices storage
if [ "$ki_status" = "0" ] && [ "$kd_status" = "0" ] ; then
recovery_cmd="boot_menu"
else
recovery_cmd="-"
fi
if [ $enable_adb -eq 1 ] ; then
$ADBD
fi
# enter recovery app main loop :
# check for automatic tasks and process, or ask user what to do
#
# if manual or auto task fail, recovery_loop will try to repair
# (for $COUNTER times) and reloop...
#
COUNTER=4
while [ $COUNTER -gt 0 ]; do
# check for automatic update to perform.
# repair disk silently if AAS present. (double update case)
mount_p storage
aas_fullfilename=`get_mount_info p storage`"/firmware_$AOS_FILENAME.aas"
if [ -e $aas_fullfilename ] ; then
recovery_cmd="flash_aas $aas_fullfilename"
fi
umount_p storage
do_recovery_loop $recovery_cmd
result=$?
case "$result" in
$RECOVERY_RECOVERED)
log "recovery recovered system ($COUNTER)"
;;
$RECOVERY_DONE)
COUNTER=4
;;
$RECOVERY_FINISH)
log "recovery_loop go reboot"
COUNTER=0
;;
$RECOVERY_FINISH_HALT)
log "recovery_loop go shutdown"
COUNTER=0
;;
$RECOVERY_FINISH_NO_NOTIFICATION)
log "recovery_loop go reboot"
COUNTER=0
;;
*)
log "recovery_loop failed go reboot"
if [ $debug -eq 1 ] ; then
# give debug informations
COUNTER=0
else
COUNTER=0
fi
;;
esac
recovery_cmd="-"
let COUNTER-=1
done
case "$result" in
"$RECOVERY_FINISH_NO_NOTIFICATION")
log_and_reboot "reboot"
;;
"$RECOVERY_FINISH_HALT")
aui_message "Device will now halt."
log_and_shutdown "shutdown"
;;
*)
aui_message "Device will now reboot."
log_and_reboot "reboot"
;;
esac
# EOF
all the changes that I made are
Code:
$AUI -c message -T "Archos $PRODUCT_NAME" -a centered -t "~ Hello world ~"
just added "hello world" instead of "starting..." just for now.
So what I need to know is :
1- how to use the "new_initrd.lzo" file should I get renamed to "initramfs.cpio.lzo" and create an empty file called zimage then do the "Flash Kernel and Initramfs"
2- I guess the guide was made before sde was released for archos g9, so do I need to keep all the coding for the recovery menu or just keep the code for mounting the hard disk and loading the system/image ?
3- could you post an example code of how to mount the hard disk and boot from there if you can ?
Thanks
I renamed the files and it worked just fine, So everything is clear for me now.
and if you have any examples of the "init" file coding, the would be the happy ending for me
shalkam said:
Thanks for your post!! Finally I have been able to make some progress after googling around for a couple of weeks
I went through the guide you posted and it turned out to be very helpful ..
I ended up with the file -> new_initrd.lzo and I have been able to edit the init file
...
So what I need to know is :
1- how to use the "new_initrd.lzo" file should I get renamed to "initramfs.cpio.lzo" and create an empty file called zimage then do the "Flash Kernel and Initramfs"
2- I guess the guide was made before sde was released for archos g9, so do I need to keep all the coding for the recovery menu or just keep the code for mounting the hard disk and loading the system/image ?
3- could you post an example code of how to mount the hard disk and boot from there if you can ?
Click to expand...
Click to collapse
Hi
1. To use the initramfs you need a kernel Image as well, look at posts in the development section, there's quite a few kernel variants, ( overclocked etc ), you're best off sticking with the 3.0.8 kernel, folks have experienced some problems with archos' latest release.
You then need to hold volume down while powering on to get into the maintenance mode, from there it's "recovery menu"/"developer edition menu"/"flash kernel and initramfs" this will mount a device on you PC which you copy the initramfs.cpio.lzo and zImage.
2. "We" pretty much had an unofficial sde from day one thanks to some reverse engineering and I can only assume knowledge gained from the previous generation of archos tablets. you don't really need to keep the recovery code but it's probably easier to leave it. It might be worth your while repacking a MultiBoot initramfs.cpio to suit your needs It should be just a case of getting it to look on your hard drive for images instead of/as well as the Internal SD.
3. the mount_p calls take care of mounting partitions, It's a function defined in one of the scripts in the etc/scripts directory in your initramfs, The file you're probably after editing however is etc/mountpoints.
Like I say have a good look around the development section, especially at some of the earlier posts, there's only four pages but some good knowledge and useful info to be had!
trevd said:
It might be worth your while repacking a MultiBoot initramfs.cpio to suit your needs It should be just a case of getting it to look on your hard drive for images instead of/as well as the Internal SD.
Click to expand...
Click to collapse
I repaced the MultiBoot initramfs.cpio and did the following :-
before
Code:
#Build boot menu string
MENULIST="\`$AUI -C \"0x000000,0xdbdac9\" -c select -T \"Archos $PRODUCT_NAME - Multi Boot Menu $BOOTVER\" -a centered -C \"0x000000,0xf1f0dd\" -t \"Please select an image :\" "
IMGLOC1="/data/media/"
IMGLOC2="/data/local/"
after :
Code:
mount_p storage_A80H
#Build boot menu string
MENULIST="\`$AUI -C \"0x000000,0xdbdac9\" -c select -T \"Archos $PRODUCT_NAME - Multi Boot Menu $BOOTVER\" -a centered -C \"0x000000,0xf1f0dd\" -t \"Please select an image :\" "
IMGLOC1="/data/media/"
IMGLOC2="/mnt/storage/
and it worked loaded all the .ext4 files in /mnt/storage/ .
the file for icsblue worked but the file for ubuntu from this topic ->http://forum.xda-developers.com/showthread.php?t=1392167
didn't work
anyway you can find a shell script for unpacking-editing-packing attached to make things easier if anyone wants to edit these files instead of the "rough guide to unpacking and repacking"

[Q] tf201 android/ubuntu duel boot?

i like my android for home use ,but as a IT maneger it will be nice to have linux on my prime as well. thar is any toturial that expline how to make my prime duel boot this 2 OS?
Overview
Follow this thread: Ubuntu | How-to install it on the Prime . NOTICE: developer-thread
Mainly there are 2 methods:
Flash-boot:
The thread starts with LilStevies work from Androidroot. There you have to flash the correspondent boot-kernel to start either android or linux. So far I don't know of an existing LilStevie rom with the kexec/kexecboot method (kexec: Linux as bootloader).
SDCard-existence-driven-init
Running linux with root_chooser_v1/2/3 form tux_mind which starts around thead-page 35 uses a modified init. Dualboot: with SDCard in slot -> linux | without SDCard in slot -> Android
See: Gentoo Wiki and hack-job if you are on Asus stock rom.
You can also use chroot method - but it's not dualboot.
I had method 1 running. But for me it is not working for daily useage. (reflashing s*c*s :angel
Now i will use the SDCard-existence-driven-init
I can't use the posted boot-blob because I'm not on the Asus stock kernel so Android starts but many processes crash so that it is not useable. I use the Energy-Rom with the Clemsyn-kernel. (Prime is unlocked, nvflash-activated and rooted)
Be warned: You could damage/ brick your device following the instructions. Backup all!! A whole nvflash backup is reccomended. Be carful. Use your brain. I'm not responsible for any damages.
Up to now I tested my own 'unchanged' fastboot boot-blob:
Enter APX-Mode: put in USB cable + hold [Vol up]+[Power] (until vibrating, screen stays black)
Code:
$ sudo wheelie -r --blob blob.bin
$ sudo nvflash -r --read 6 blobNv.LNX
$ sudo nvflash -r --go
Unpack blob:
Code:
$ abootimg -x blobNv.LNX
repack blob (be sure you have blobpack for TF201 i.e. from CM10 repo):
Code:
$ abootimg --create testNv.LNX -k zImage -r initrd.gz -f bootimg.cfg
$ blobpackTF201 testFb.blob LNX testNv.LNX
start into fastboot-mode: put in USB cable [Vol down]+[Power] (until you can choose fastboot/USB symbol)
Code:
$ fastboot -i 0x0b05 flash boot testFb.blob
$ fastboot -i 0x0b05 reboot
The blob flashes well - I can see the blue progerss-bar. By the way: this produces a backup blob of the bootpartition which you can reflash via fastboot to start android if sth went wrong.
Now I need to insert the root_chooser init into the ramdisk to get linux from SDCard started...
I got a half working root_chooser. It starts android but not linux.
Here is what I did to modify the boot-loader with Clemsyn kernel and the modified init from tux_mind:
At first I read the LNX patition from the TF201 (unlocked, nvflash-able/wheelie, rooted):
Boot into APX-mode:
Code:
$ sudo bin/wheelie -r --blob bin/blob.bin
$ sudo bin/nvflash -r --read 6 blobNv.LNX
$ sudo bin/nvflash -r --go
Unpack the blob:
Code:
$ abootimg -x blobNv.LNX
You will get bootimg.cfg, initrd.img and zImage.
Now unpack the initial ramdisk:
Code:
$ mkdir ramdisk
$ cd ramdisk
$ gzip -dc ../initrd.img | cpio -i
Clone tux_minds data and copy your extracted custom rom ramdisk to newroot:
Code:
$ cd ..
$ git clone https://github.com/tux-mind/tf201-dev.git
$ rm -r tf201-dev/initramfs/newroot/*
$ cp -r ramdisk/* tf201-dev/initramfs/newroot/
[I][SIZE="2"]#edit 22 feb 2013[/SIZE][/I]
$ cd tf201-dev/initramfs
$ mkdir data && mkdir dev && mkdir sys
$ cd ../../..
[I][SIZE="2"]#edit end[/SIZE][/I]
OPTIONAL start compile root_chooser/init via crosscompile
Change the compiler in Makefile. I use Ubuntu with arm-linux-gnueabi-gcc (maybe it would be better to use arm-linux-gnueabihf-gcc) from the repo for crosscompiling:
Edit Makefile in tf201-dev/root_chooser:
Code:
#--Head-------------------- snip
CC=arm-linux-gnueabi-gcc
LD=arm-linux-gnueabi-ld
#CC=arm-unknown-linux-gnueabi-gcc
#LD=arm-unknown-linux-gnueabi-ld
#-------------------------- snap
Now compile and copy it to the initramfs:
Code:
$ make v2
$ cp root_chooser ../initramfs/init
OPTIONAL end
Now pack the initrd, make a blob and flash it to the TP
Code:
$ cd tf201-dev/initramfs
$ find . | cpio --create --format='newc' > ../../myinitrd
$ cd ../..
$ gzip myinitrd
$ chmod 777 myinitrd.gz
$ abootimg --create testNv.LNX -k zImage -r myinitrd.gz
$ bin/blobpackTF201 testFb.blob LNX testNv.LNX
Start into fastbootmode:
Code:
$ fastboot -i 0x0b05 flash boot testFb.blob
$ fastboot -i 0x0b05 reboot
Start into andorid open Terminal Emulator and type:
Code:
$ su
# vi /data/.boot
/dev/mmcblk1p1:/:/sbin/init
[esc] :wq
I followed this guide to set up my sdCard. That's it. Insert sdCard, reboot.
Android starts but not Linux from the sdCard. I got the following message back in android:
Code:
[I][B]FIXED[/B][SIZE="2"] see edit 22 feb 2013[/SIZE][/I]
[COLOR="Silver"]$ cat /boot_chooser.log
unable to mount /sys - No such file or directory[/COLOR]
New error message (inserted sdCard occurs boot-loops, remove sdCard to start android):
Code:
$ cat /boot_chooser.log
unable to mount /dev/mmcblk1p1 on /newroot - No such file or directory
I'm feeling so close to fire up Linux on my Transformer. Who can give me hint?
gophix said:
New error message (inserted sdCard occurs boot-loops, remove sdCard to start android):
Code:
$ cat /boot_chooser.log
unable to mount /dev/mmcblk1p1 on /newroot - No such file or directory
Click to expand...
Click to collapse
got it yeah! linux and android starting up! BUT VERY INSTABILE !!!
I had to use another sdCard and recompiled the kernel with some flags activated:
My hama 16GB class 10 doesn't seem to work well with the TP. I copied some data to the sdcard in android, there the I/O stream had several stops while copying data. Some forum members reported I/O errors in the system log (dmesg). I didn't have that errors but a variing throughput while copyint to sdCard.
The kernel I prepared this way:
Code:
downloading Clemsyn-kernel source:
$ wget https://www.dropbox.com/s/pjqd2b1edn6fiwu/tfcombofinal.zip
$ unzip tfcombofinal.zip
Get the actual kernel .config form the TP via adb and compile the kernel (I didn't patch, because I got error while compiling the kernel). I diffed my config to tux_minds and aktivated some flags.
Code:
$ adb pull /proc/config.gz
$ gzip -d config.gz
$ cp config tfcombofinal/.config
$ cd tfcombofinal
// patching should be like this:
// $ wget https://github.com/tux-mind/tf201-dev/raw/master/v2/kernel/JB15.patch
// $ patch -p1 < ../JB15.patch(v1/v2?) !!! do not patch !!!
$ make menuconfig
$ make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
I didn't compile the modules.
After that I packed my kernel from tfcombo/arch/arm/boot/zImage into the blob ($ abootimg --create testNv.LNX -k zImage -r myinitrd.gz)
VERY INSTABILE !!! means: the linux starting kernel was compiled with hardfloat (arm-linux-gnueabihf-).Linux starts up and responds "a littel bit"; android starts up; work 5 mins and reboots.
So both are working the developer way
I will test an own armSF kernel next time (the way described in this post, up to now I run instable on armHF) and report if this makes android stable and additionally starts up linux.
The dual-boot works fine.
Look at lifeinarootshell.
The actual version root_chooser v6 starts linux (from SDcard, microSDcard, USB, loop-device, internal folder) and android with different kernels
It has a cofigurable bootloader via kexec.
Linux distributions (gentoo, ubuntu, arch linux, ...) are also available and are growing more and more in stability and performance.
gophix said:
The dual-boot works fine.
Look at lifeinarootshell.
The actual version root_chooser v6 starts linux (from SDcard, microSDcard, USB, loop-device, internal folder) and android with different kernels
It has a cofigurable bootloader via kexec.
Linux distributions (gentoo, ubuntu, arch linux, ...) are also available and are growing more and more in stability and performance.
Click to expand...
Click to collapse
Getting xorg to work on archlinux is somewhat messy at the moment. The tegra3 driver is built for an old xorg-server, and is not compatible with the new one in the archlinux repositories. I was able to make it work by recompiling xorg-server, though. I guess it would be easier if someone made an aur package with the old xorg-server.
Thank you very much gophix for your nice guide in the second post :fingers-crossed:
However, since the first attempts to get linux based distributions working on the TF201 like ubuntu or arch linux, there was not much progress anymore I feel this is somehow pitty due to the fact that the Prime is still a good and reasonable tablet. And it could be much more if there would be not these horrible restrictions set by Asus like encrypted bootloader.
But I don't want to criticise mainly in my post. Instead, I would like to promote a constructive discussion so that the TF201 receives new life
How about creating a new ubuntu image based on 14.04 since it receives long term support? Unfortunately, my knowledge is still rather limitted so far to do this by myself.
And what is your opinion, to go alternatively another way by using the xubuntu installation (13.04) developed for the TF300tg as shown here:
http://forum.xda-developers.com/showthread.php?t=2190847
As far as I know, both devices are quite similar. Or are there any good arguments to deny this idea?

[DEV] Ubuntu 18.04 LTS Bionic (Linux for Tegra) for SHIELD Android TV

This is a full featured port of NVIDIA L4T R32.7.2 (Ubuntu 18.04) for the SHIELD TV (2015, 2017). It has full hardware support including:
GPU acceleration
Wifi/Bluetooh
USB 3.0
HDMI with audio
microSD (supported models)
Power management
etc
Download​Download Latest (R32.7.2, 07/09/22)
Details​The main challenge in this port was getting the right kernel version to match with the on-device DTB. The DTB is structured in a way that Cboot must be able to parse (and modify it) and then Linux kernel must be able to parse it as well. There are various issue with previous documented methods of flashing a Jetson DTB. NVIDIA stopped distributing SHIELD TV (Foster) DTBs with L4T releases years ago so you would have to manually port a newer DTB or be stuck with an older kernel. Flashing an (years) older DTB is not an option because a newer Cboot will fail to parse it and you'll end up with a brick. Flashing a custom DTB is dangerous for this reason as well. Flashing an older Cboot is not possible due to signature requirements even on an unlocked device. So we are stuck with one option: build a L4T kernel around the device's Android DTB.
NVIDIA maintains two forks of Linux for Tegra X1. The L4T kernel and the Android (downstream) kernel are not 1-to-1 compatible. DTB property names can differ, ioctl structure sizes can differ, etc. I tried various ways to cleanly merge the two and ended up with the following working strategy:
Kernel 4.9 + NVIDIA drivers from Android fork
Build config from L4T release hand merged with options from the Android TV kernel
NVGPU drivers from L4T fork (due to lack of source for and need for compatibility with userland drivers)
Initramfs from L4T release
I also had to port some patches from one fork to the other (especially for NVGPU). The end result is a kernel that combines both forks and therefore is relatively stable and fully featured.
Booting​
The build is tested with the 9.0.0 and 9.1.0 release. It is recommended that you update to 9.0.0.
Note that once you update Cboot, you cannot downgrade to a lower version anymore! If you do not update, some things may not work properly due to the DTB differences noted above however, any relatively "modern" build may still work.
You need a USB drive with at least 8GB of free space. Flash rootfs.img to the first partition (replace sdX1 with your USB drive partition):
Code:
$ sudo dd if=rootfs.img of=/dev/sdX1 bs=1MiB
Make sure your SHIELD TV is unlocked and connected to fastboot.
Either boot the kernel directly:
Code:
$ fastboot boot boot.img
Or you may also flash the kernel if you want to:
Code:
$ fastboot flash boot boot.img
$ fastboot reboot
The initramfs will attempt to boot from the following devices (in order):
1. sda1: First partition of external USB on 16GB model
2. sdb1: First partition of external USB on 500GB model
3. mmcblk2p1: First partition of microSD on supported models
4. mmcblk0p29: Userdata partition of eMMC on 16GB model
5. sda32: Userdata partition of HDD on 500GB model
6. sda33: Partition 33 of HDD on 500GB model (partition table modification needed)
7. sda34: Partition 34 of HDD on 500GB model (partition table modification needed)
8. mmcblk0p19: System partition of eMMC on 16GB model (too small to hold rootfs unless partition table is modified)
After installation, you should resize the partition if your device is > 8GB (replace sdX1 with your installation device).
Code:
$ sudo e2fsck -f /dev/sdX1
$ sudo resize2fs /dev/sdX1
Flashing to internal eMMC​
If you wish to flash rootfs to your internal eMMC, you need to first install to a USB and boot into Ubuntu. Flashing from fastboot will NOT work due to some eMMC issues (I think Cboot does not respect the block remap).
The following will flash to the userdata partition and will WIPE any existing data on the device!
Code:
$ sudo dd if=rootfs.img of=/dev/mmcblk0p29 bs=1MiB
$ sudo e2fsck -f /dev/mmcblk0p29
$ sudo resize2fs /dev/mmcblk0p29
You can follow similar steps to flash to sda32 on a 500GB model. Follow the steps in the first section to flash boot.img.
Uninstalling​
As long as you didn't touch the other partitions, you can easily restore Android TV with the recovery images.
Code:
$ fastboot erase userdata
$ fastboot flash boot nv-recovery-image-shield-atv-9.0.0/boot.img
​Troubleshooting​The USB/microSD does not boot and is stuck at a blinking cursor
Make sure you wait long enough (at least five minutes).
Make sure your USB drive (or microSD) is formatted with MBR with a single partition. You should be writing to /dev/sdX1 (X is some letter) with a "1" at the end. Do not write to /dev/sdX.
Try to mark the first partition as bootable.
Manual Build​Download Latest (R32.7.2, 07/09/22)
Prerequisite​
Linux for Tegra R32.7.2
Linux for Tegra R32.7.2 Sources
Linux for Tegra R32.7.2 Root Filesystem
Jetson GCC Toolchain 32.2
NVIDIA SHIELD ANDROID TV 2015 Recovery OS Image 9.0.0
Utilities (apt install): simg2img, git, fastboot, abootimg
Building the kernel​
1. Install the toolchain.
Code:
$ wget -O toolchain.tar.xz https://developer.nvidia.com/embedded/dlc/l4t-gcc-7-3-1-toolchain-64-bit
$ tar xpf toolchain.tar.xz
$ sudo mv gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu /opt/l4t-toolchain
2. Fetch the SHIELD TV Android kernel sources.
Code:
$ git clone --depth 1 https://nv-tegra.nvidia.com/r/linux-4.9.git -b rel-shield-r-9.0.2-opensource-4.9 linux-4.9
$ git clone --depth 1 https://nv-tegra.nvidia.com/r/linux-nvidia.git -b rel-shield-r-9.0.2-opensource nvidia
3. Fetch the Linux For Tegra NVGPU sources.
Code:
$ wget https://developer.nvidia.com/embedded/l4t/r32_release_v7.2/sources/t210/public_sources.tbz2
$ tar xpf public_sources.tbz2
$ tar xpf Linux_for_Tegra/source/public/kernel_src.tbz2
$ mv kernel/nvgpu nvgpu
You should have three directories: linux-4.9, nvidia, and nvgpu
4. Patch the sources.
Code:
$ cat patches/kernel-4.9/*.patch | patch -p1 -dlinux-4.9
$ cat patches/nvidia/*.patch | patch -p1 -dnvidia
$ cat patches/nvgpu/*.patch | patch -p1 -dnvgpu
5. Build the kernel and install the modules.
Code:
$ export CROSS_COMPILE=/opt/l4t-toolchain/bin/aarch64-linux-gnu-
$ export ARCH=arm64
$ mkdir -p Linux_for_Tegra/rootfs/
$ pushd linux-4.9
$ make shieldtv_defconfig
$ make -j$(nproc) zImage
$ make -j$(nproc) modules
$ make modules_install INSTALL_MOD_PATH=../Linux_for_Tegra/rootfs/
$ sudo chown -R root:root ../Linux_for_Tegra/rootfs/lib
$ popd
Building Root Filesystem​
1. Extract jetson-210_linux_r32.7.2_aarch64.tbz2 and tegra_linux_sample-root-filesystem_r32.7.2_aarch64.tbz2.
Code:
$ tar xpf jetson-210_linux_r32.7.2_aarch64.tbz2
$ pushd Linux_for_Tegra/rootfs/
$ sudo tar xpf ../../tegra_linux_sample-root-filesystem_r32.7.2_aarch64.tbz2
$ sudo touch etc/nv_boot_control.conf
Note the use of sudo for the last two commands. This is required for file permissions to be correct. The touch at the end resolves a bug in NVIDIA's code that resulted in the installer not launching.
2. Install the filesystem.
Code:
$ cd ..
$ sudo ./apply_binaries.sh
$ popd
3. To enable Wifi and NVDEC, need to first convert vendor.img downlaoded from the SHIELD recovery image to an ext4 image.
Code:
$ simg2img nv-recovery-image-shield-atv-9.0.0/vendor.img vendor-raw.img
4. Next mount the image.
Code:
$ mkdir vendor
$ sudo mount -o loop vendor-raw.img vendor
5. Copy the firmware over.
Code:
$ sudo cp vendor/firmware/bcmdhd_clm_foster.blob Linux_for_Tegra/rootfs/lib/firmware/brcm/bcmdhd.clm_blob
$ sudo cp vendor/firmware/fw_bcmdhd.bin Linux_for_Tegra/rootfs/lib/firmware/brcm/fw_bcmdhd.bin
$ sudo cp vendor/firmware/nvram_foster_e_4354.txt Linux_for_Tegra/rootfs/lib/firmware/brcm/nvram.txt
$ sudo cp vendor/firmware/tegra21x/* Linux_for_Tegra/rootfs/lib/firmware/tegra21x/
$ sudo cp vendor/firmware/tegra21x/vic04_ucode.bin Linux_for_Tegra/rootfs/lib/firmware/nvidia/tegra210/
$ sudo umount vendor
6. Create and mount a new ext4 image. Note that we will create 8GiB image which should be enough to hold the root filesystem. After you flash it to your device and boot successfully, you'll want to run resize2fs.
Code:
$ dd if=/dev/zero of=rootfs.img bs=1MiB count=8196
$ mkfs.ext4 rootfs.img
$ mkdir mount
$ sudo mount -o loop rootfs.img mount
7. Copy the filesystem to the disk image.
Code:
$ sudo mv Linux_for_Tegra/rootfs/* mount/
$ sudo umount mount
Building boot image​
1. Extract the existing initramfs.
Code:
$ mkdir initramfs
$ pushd initramfs
$ cat Linux_for_Tegra/bootloader/l4t_initrd.img | gunzip -c | cpio -i
2. Patch init.
Code:
$ cp patches/initramfs/init init
3. Rebuild the image.
Code:
$ find ./ | cpio -H newc -o -R root:root | gzip -9 -c > ../initramfs.img
4. Build boot.img
Code:
$ abootimg --create boot.img -f patches/bootimg.cfg -k linux-4.9/arch/arm64/boot/zImage -r initramfs.img
I've updated the download to fix an issue I found with connecting to 5GHz wifi. Using the other nvram.txt fixed it. I also noticed that NVENC/NVDEC doesn't work properly and am unsure if it's a kernel issue or a L4T issue. I tried building with nvdec bootloader disabled and used L4T's ns firmware and it still didn't work.
EDIT: Made another update to fix the NVENC/NVDEC issue. Additionally, the led lightbar control driver is added in. I also made the following systemd script to disable the lightbar at boot.
Code:
[Unit]
Description=Disable the lightbar
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=-/bin/sh -c "/sbin/rmmod leds-cy8c && /sbin/modprobe leds-cy8c"
ExecStart=/bin/sh -c "echo 0 > /sys/class/leds/led_lightbar/brightness"
ExecStop=/bin/sh -c "echo 255 > /sys/class/leds/led_lightbar/brightness"
[Install]
WantedBy=multi-user.target
Is this a fully working ubuntu desktop OS experience or is this a Kernel for the shield?
EgomafiaX said:
Is this a fully working ubuntu desktop OS experience or is this a Kernel for the shield?
Click to expand...
Click to collapse
Full Ubuntu 18.04, it’s not just a kernel. I’ve been using it for the past week and haven’t run into any issues so far. You can try it out without modifying anything by flashing rootfs.img to a usb drive and booting the kernel from fastboot.
Very Interesting, I just got my shield last week and i wanna try some few things on it. Don’t have any experience with flashing whatsoever
What's performance like? I was thinking of buying a new SBC but this could be just what I am looking for
moshtin said:
What's performance like? I was thinking of buying a new SBC but this could be just what I am looking for
Click to expand...
Click to collapse
Nvidia SHIELD TV Benchmarks in Ubuntu Shows Core i3 Like Performance - CNX Software
Nvidia SHIELD Android TV was announced this March with Nvidia Tegra X1 octa-core Cortex A57 + A53 processor. So far, I had not seen any Ubuntu or other
www.cnx-software.com
Hi!
Thanks for your work.
This seems promising. Any chance anything similar should work on SHIELD TV Pro (2019)?
I compared recovery images provided by NVIDIA and I did not come across many differences between vendor binaries so I guess there is won't be any issue with the roottfs and kernel.
However on the SHIELD TV Pro, the boot.img is twice as big and the recovery image seems to contain a DTB image (mdarcy.dtb.img) and a vbmeta.img. I suspect the boot process to be somewhat different on this plateform.
Did anyone manage to get anything working on a SHIELD TV Pro?
yifanlu said:
$ pushd kernel-4.9
Click to expand...
Click to collapse
I guess you meant:
Code:
$ pushd linux-4.9
yifanlu said:
$ sudo mv Linux_for_Tegra/rootfs/rootfs/* mount/
Click to expand...
Click to collapse
and
Code:
$ sudo mv Linux_for_Tegra/rootfs/* mount/
Also the shieldtv_defconfig is located in arm/ instead of arm64/ in the patches you provide.
I tried the instructions from the first post on a Shield TV (2017) model and after doing "fastboot boot boot.img" the screen goes black with a blinking underscore on the top left and gets stuck there.
Any idea on what could be wrong? I dd'ed the rootfs.img to a usb stick attached to the usb port adjacent to the hdmi port. The usb A->A cable for fastboot/adb is attached to the usb port away from the hdmi cable.
chaitan3 said:
I tried the instructions from the first post on a Shield TV (2017) model and after doing "fastboot boot boot.img" the screen goes black with a blinking underscore on the top left and gets stuck there.
Any idea on what could be wrong? I dd'ed the rootfs.img to a usb stick attached to the usb port adjacent to the hdmi port. The usb A->A cable for fastboot/adb is attached to the usb port away from the hdmi cable.
Click to expand...
Click to collapse
I also seem to have hit same roadblock, did you succed with this.
kihmathi said:
I also seem to have hit same roadblock, did you succed with this.
Click to expand...
Click to collapse
No, I have not been able to proceed. @yifanlu any hints on what we could do to debug?
I only have a 2015 shieldtv but I read the hardware are the same. Maybe I was wrong and there’s some kernel changes needed. I would diff the defconfig between the latest android release for both and see what the differences are. Then add those to the config.
EDIT: I downloaded the recovery image for 2017 and compared the kernel defconfig and it’s identical. That means the kernel isn’t the issue. My next guess would be the init script I wrote. Maybe the dev number is different on 2017?
Can confirm, I have the same issue on model P2897 not pro.
In my init script, I wait 10s for the root device to show up before giving up and trying the next one. Perhaps this isn’t long enough?
If you update the init file inside the initramfs, there is on line 71 “while [ ${count} -lt 20 ]” maybe change that to “while [ ${count} -lt 100 ]” to try 100 times (with 0.2s in between).
Could anyone here running this image try out https://github.com/cobalt2727/L4T-Megascript? It's been tested against the base model Nintendo Switch and a Jetson Nano, but no Shield hardware so far (although it should perfectly support it in theory)
yifanlu said:
In my init script, I wait 10s for the root device to show up before giving up and trying the next one. Perhaps this isn’t long enough?
If you update the init file inside the initramfs, there is on line 71 “while [ ${count} -lt 20 ]” maybe change that to “while [ ${count} -lt 100 ]” to try 100 times (with 0.2s in between).
Click to expand...
Click to collapse
I tried this on my 2017 shield, didn't fix the issue, there is a blinking underscore on the top left. Is there any way to get logs, or show some debug messages on the screen?

Categories

Resources