Bangkok aftermath: 'Not the Thailand we know anymore'

Thursday, May 20, 2010

Bangkok's Ratchaprasong area. The smoldering building in the 
background on the right is the Central World mall.
  • Polish native: 'Face of Thailand is changing
  • Other Bangkok residents upset, shocked
  • At least 44 people have been killed in clashes in the last several weeks
  • One resident: Not surprised if there is more violence
Bangkok, Thailand (CNN) -- Some Bangkok residents ventured out on Thursday to shop and take stock of the damage done to their city one day after the government evicted thousands of anti-government protesters from a downtown district, triggering fires, riots and intense street battles.
Some shoppers at the Emporium mall -- which was not set on fire like the popular Central World mall -- drank lattes, got their hair styled or perused books. But one sign reminded them that the venue would close at 6 p.m. to leave enough time for patrons to get home ahead of a second night of a citywide curfew.
"I feel very upset. I can't believe this happened in Thailand. Killing is not acceptable in Buddhism," said Siripattra Sitisak, a 30-year-old hotelier. "I'm nervous about attacks from underground organizations that might bomb other buildings or set fire to them."
iReport: Are you there? Send your images, video
Another mall patron, Bogna Szukalska, a 25-year-old from Poland, who has lived in Bangkok for four years, said Wednesday's events showed the "face of Thailand is changing."
"When I first came here as a tourist it was to have a relaxed and good time in a safe country. It was rare to see any aggression between Thais or against foreigners," she said. "Now, I'm just very shocked. I and two of my other friends are thinking of leaving the country. It's not the Thailand we know anymore."

Torpedo accusation raises Korean security stakes


Following weeks of investigation, leaked evidence and diplomatic huddles, South Korea on Thursday publicly accused North Korea of firing a torpedo that sank a naval patrol ship and killed 46 crewmen in March, significantly raising the security stakes on an already tense Korean Peninsula.
» Don't miss a thing. Get breaking news alerts delivered to your inbox.

Following weeks of investigation, leaked evidence and diplomatic huddles, South Korea on Thursday publicly accused North Korea of firing a torpedo that sank a naval patrol ship and killed 46 crewmen in March, significantly raising the security stakes on an already tense Korean Peninsula.
The international community responded with concern and condemnation for Kim Jong Il's isolationist regime. United Nations Secretary-General Ban Ki-moon called the case "deeply troubling," and Australian Prime Minister Kevin Rudd insisted that the North's "hostile and unprovoked act" should be met with swift and immediate retaliation.
Yet troublesome questions remain: What response can the South and its allies, including the U.S., give to warn North Korea against further provocations without inciting continued violence? Denying culpability, Pyongyang has already rattled its sabers, warning that any retaliation would lead to "all-out war."
The U.S Thursday stood behind South Korea, with the White House issuing a statement that said the "act of aggression is one more instance of North Korea's unacceptable behavior and defiance of international law."
Citing what it called overwhelming evidence, a joint civilian-military multinational team determined that fragments and markings from a torpedo found amid the wreckage of the downed naval vessel matched that of a North Korean-made weapon already in the South's possession.
The report concluded that "there is no other plausible explanation" than the North's involvement.
North Korea on Thursday called the probe's findings a "fabrication" and said it would send its own inspection team to the South to consider the evidence, according to a statement released through the North's state-run Korean Central News Agency. It wasn't clear whether the South would allow such a trip.
Analysts predict that the cold war between North and South is about to get a lot colder.
"While a military war is less likely, I think an all-out economic war is certain," said Ahn Yin-hay, an international studies professor at Korea University in Seoul. "Relations between North and South will reach a stalemate. The U.S. may even put North Korea on its terrorist list again. But all this means that relations between the U.S. and South Korea with be strengthened."

Poorlad's menu implemented; Porting issues resolved

Wednesday, May 19, 2010

Yesterday night, I merged in a branch I was working on for poorlad's menu. A version of that beautiful menu is now in Git. His menu included a version string at the bottom. We didn't have any way to keep track of versions and builds before, so this was actually a good idea that I had to implement. Because I didn't want to implement support for non-fixed width fonts, or add another space-consuming font, I just used the console font I was already using for that part. I also had to brighten the gradient on the bottom of the screen, since it was basically invisible due to gamma issues otherwise.

The border between the gradient and the "black" is clearly visible on my device. This is probably because of a gamma issue. When poorlad comes back, we can ask him to calibrate it more.

Otherwise, it looks pretty good! In order to make this possible, I added in stb_images.c, a great tiny little image library that can read PNG, JPEGs and even PSD files and does zlib decompression as an added bonus. This will be a great help if we decide to change things or need to add more stuff that consumes a lot of space. I also added in a basic function to perform alpha blending (albeit comparatively slowly).

Sadly, while I was busy making these changes, ius from IRC actually begun to implement poorlad's menu without me knowing about it, so we ened up duplicating each other's efforts. He was able to compile in zlib and libpng, but the cost was to inflate the final binary to 347 KB. Whereas taking out the old menu images, and adding small, compressed PNGs and the stb_images library instead actually made openiboot smaller than it was before! His decision to preblend the images, rather than attempt alpha blending on the device, was probably more optimal from a performance perspective.

Steven Troughton-Smith told me on Twitter that he has actually implemented his own boot menu as well. I'm not sure if he used the new PNG code or not, but the new code makes it pretty easy for a competent programmer to add in whatever menu they would like. I'd tell everyone to skin away, but we should keep as few wild branches of this project as possible, since everyone randomly installing openiboot just for kicks (especially a modified version) and then coming to us (read: me, ultimately) for support is something we don't have the resources to handle at this moment.

On the porting side, the issues with installation, optimizing NOR access on iPhone 3G, NAND access on a few devices all seem to have been fixed, so we can basically scratch the first two items off of the list I put up in the last post. I'm pleasantly surprised at how relatively easy it was.

Anyway, now for the kernel. Well, if I don't get distracted by writing to NAND.

International bank switches from BlackBerry to Apple iPhone

Standard Chartered, a British bank with nearly 75,000 employees in more than 70 countries, has switched its standard corporate communications device from RIM's BlackBerry to Apple's iPhone.

According to Reuters, the London-based bank is replacing the BlackBerry with the iPhone as its phone of choice. Workers who already use a BlackBerry have been given the option of switching to the iPhone. The company will pay monthly billing for business-related telephone and data services on Apple's handset.

The Asia-focused bank has nearly 75,000 employees, though it is not known how many of them currently have a BlackBerry issued by the company. The switch is unique for the financial industry, where other institutions like HSBC Holdings and Morgan Stanley remain BlackBerry-only.

"If more companies switch to the iPhone, this is of course bad news for RIM," Lu Chialin, an IT industry analyst at Macquarie Securities in Taipei, told Reuters. "However, it will take a long time for companies to do their own internal testing before deciding to change, so it will be a while before it has any effect on RIM."

Apple has made inroads in the enterprise market, but still faces a number of obstacles in a number of industries that are tied to devices like the BlackBerry. Apple hopes to make further progress in the enterprise market with the release of iPhone OS 4 this summer, which will bring data protection, wireless app distribution, SSL VPN support and more to the handset.

Last year, it was projected that Apple had a 7 percent share of the enterprise smartphone market. That was well up from the 2 percent share seen by the company in 2008.

Starting last June, Apple became more aggressive in courting potential enterprise customers. It was last summer that the Cupertino, Calif., company released a guide designed to help system administrators deploy iPhones throughout large businesses.

In the first quarter of 2010, Apple sold 8.75 million iPhones, good for a 16.1 percent worldwide market share, taken somewhat at the expense of the BlackBerry. RIM's smartphone lost market share when compared to the first quarter of 2009 -- the only company among the top five brands to do so.

Apple issues iPhone OS 4 beta 4, may support AT&T US tethering

The next beta of iPhone OS 4 has dropped, inching Apple toward its final release, which is expected to coincide with WWDC in June.

The new release appears to invoke tethering options for AT&T in the US. iPhone OS 3 introduced tethering support in software, but AT&T has been among the carriers failing to support the feature.

A new configuration panel appears to indicate that AT&T has worked out its issues related to refusing to support tethering on the iPhone (it supports tethering with other phones, but apparently fears that iPhone users would overwhelm its network) and will have a billing program in place by the time iPhone OS 4 ships.

The new Internet Tethering setup panel directs users to call AT&T or visit its website to setup tethering on their account.

Other new features spotted by beta testers as noted by Gizmodo include the ability to view photo Camera Rolls in landscape, more useful wallpaper images, an option to turn off group MMS messaging, and a generally faster interface throughout, ranging from call dialing to Maps.

iPhone OS 4 beta 4

iPod touch with 2MP camera spotted in yet another Vietnam leak

Pictures of a new iPod touch sporting a new 2 megapixel camera have surfaced in Vietnam, though it's unknown whether the device was a scrapped 2009 prototype or a forthcoming product release.

Vietnamese site Tinhte once again has the scoop, with photos and video of the hardware running software diagnostics rather than the iPhone OS. The hardware has a camera centered on its back, much like the iPod touch model Apple was expected to announce last September, until the camera addition was quietly scrapped.

A sticker on the back of the device reveals the camera, part OV2665-6s, manufactured by Omnivision. That's the same company that provides the 3.2 megapixel camera for Apple's iPhone 3GS.

The device also sports 64GB of capacity (it reads '64G' and the iPod touch relies on a pair of 32GB Samsung NAND flash modules), and has a serial number identical to the September 2009 model, making it unclear whether the device is a 2009 prototype (some of which previously leaked into the wild), or a new, upcoming product from Apple.

Last year, AppleInsider first reported that technical issues caused Apple to remove the camera from the latest iPod touch revision, even though numerous third-party cases made it clear the product was in Apple's pipeline. A teardown of the third-generation iPod touch post-release revealed that the device contains space for a camera inside its hardware. People familiar with the matter have maintained that a camera-equipped iPod touch remained in Apple's pipeline.

Tinhte has been the source of a number of major Apple-related leaks in recent weeks. A week ago, the website obtained a fourth-generation iPhone prototype, and tore down the hardware to reveal an Apple A4 processor inside. Then, over the weekend, they showed off a refresh of Apple's 13-inch MacBook, complete with retail packaging. That product was formally released on Tuesday.




iPod touch


iPod touch


iPod touch


iPod touch


iPod touch


iPod touch


iPod touch

Fourth-generation iPhone cases match Apple's prototype design

Photos of new iPhone third-party protective cases show accessories that were designed to meet the physical form factor of Apple's prototype fourth-generation handset.

As first discovered by HardMac, the cases from China feature the same rounded corners found in two prototype iPhones that leaked to the public. The back of the case features a larger space for both the camera and accompanying flash, and the side features holes for two rounded volume buttons.

The report noted that the cases are ready to ship, even though the next-generation iPhone has not yet been formally announced. Apple is expected to introduce the device at its annual Worldwide Developers Conference, set to kick off on June 7.

The purported design of Apple's forthcoming iPhone has been photographed extensively, thanks to two high-profile leaks of the hardware. Most recently, a Vietnamese website obtained a prototype handset and dismantled it, revealing an A4 microprocessor and 256MB of system RAM powering the device. Prior to that, Gizmodo bought a prototype left at a bar for $5,000 and also disassembled the device to confirm it was made by Apple.

The new hardware features a forward-facing camera, an improved rear camera (believed to be 5 megapixels), a higher resolution display expected to be 960x640 pixels, and a second microphone expected to be used for noise canceling. Like the iPad, it relies on a Micro-SIM card for connectivity with a GSM wireless cellular network.

The new cases from China are designed to fit the shape of the prototype, which has a back that is completely flat, and reportedly made of a new material to improve cell reception. The new hardware also has split buttons for volume, which some have theorized could serve as a physical camera shutter button.


iPhone 4G case


iPhone 4 takeapart

iPhone OS 4: orientation lock, iPod controls in fast app switcher


iphone_4_fast_app_switcher_orientation_lock_ipod_controls

Today’s iPhone OS 4 beta 3 update has brought with it some interesting new features, including a soft-version of the iPad’s orientation lock and iPod controls added into the fast app switcher (multitasking) UI.

When you double click the home button to bring up the fast app switcher, you can now scroll all the way to the left to get the new orientation lock and iPod controls. The default on the orientation is off but a tap will turn on, or turn off, the lock. (Home screen doesn’t sound like it rotates, however).

iPod controls include back, play/pause, and forward, with the name of the current track written beneath.
The background for the app switcher (and for folders) has also changed from the rubbery, pock-mocked, dark gray of beta 1 and 2 to a new cross-hatched medium gray.

Debian on iPhone Linux

Tuesday, May 18, 2010

NAND writing is now semi-reliable (although one has to be VERY careful not to interrupt the device in the middle of a write operation), but it is enough to have something akin to a full-functional OS, backed by non-volatile storage.

People interested in the project should be familiar with the myriads of Linux "distributions" floating around. An operating system consists of two major domains: one is the kernel, which is what manages the hardware, and one is the userland which contains things like shells and other UIs, package managers, etc. Software that help users install and run useful programs. Ubuntu is a popular distribution that I run on my personal machine. Android could also be considered a distribution (though I believe it has some apparently messy kernel patches).

I decided that Debian would be an interesting thing to try, since we would then instantly have a userland and a pool of ready-compiled applications. Using a slightly dated root filesystem here: http://lists.debian.org/debian-arm/2007/01/msg00034.html, a initrd and further kernel configurations were sufficient to get it to run. Thus, we can now compile programs for iPhone Linux on iPhone Linux. The process is rather slow due to the processor and inefficient NAND device driver (pending a real FTL), but at least theoretically, iPhone Linux is now self-hosting.

This should be pretty much enough for those who are more into the userland development side of things to come in, possibly using Debian as a base to build anything else (as I believe it is standard enough).

I will be offering instructions on how to get this all to work soon. The (modified for gadget serial terminal) rootfs is fairly hefty (around 130 MB), so I'm not sure how we'll handle distribution of that.

Starting iPhonelinux Wishlist

Monday, May 17, 2010

Planetbeing's words from the iphonelinux github:
"This is just my personal WISHLIST. You might have different priorities. If you want to help, just submit patches that you think are helpful. If you need ideas, just refer to this list. Take it off the list in your patch when you finish something off the list. I'll try to give as much help and guidance as I have time to (which may not be much). 
This is not an exhaustive list, but just stuff I think people can actually deliver on reasonable timescales. For example, notice the conspicuous absence of "figure out how to make phone calls". It's roughly divided based on skillset.  
Jobs for C coders that may not have much RE or driver experience:  
1. Simplify driver code: An early goal of this project is to remain faithful to how the iPhone firmware operates the hardware. Some of it does not actually make sense or is otherwise not very efficient. We have a better understanding of the hardware now and can afford to write better drivers with that understanding. This is essentially refactoring.  
2. Refactor openiboot: I'm not sure I like the way openiboot is laid out right now. There's got to be a neater way to organize this. I'd like something that has less messy defines and a more consistent style so it's easier to read, perhaps individual folders for each module, and the ability to easily include or not include any individual module. An emphasis should be put on ease of porting. 
3. Add multitasking: A great project for students in or just out of OS classes. I've been too lazy to add true multithreading primitives: mutexes, semaphores, condition variables, and also multitasking in general. A lot of stuff is run in interrupt contexes or interrupt-disabled contexes. Writing drivers requiring blocking I/O is a pain. It's time for a true multitasking kernel. Should be done in coordination with #2.  
4. Write a gdb stub for openiboot: Those things are tiny and it shouldn't be that bad. Just have it communicate over the existing USB driver now. We wouldn't be able to debug interrupt contexts for now, but it's better than nothing.  
5. Someone needs to MAINTAIN the build script for the toolchain. Or else figure out if/how we can just build everything using Apple's or the community's iPhone OS toolchain. I'm pretty sure we can. It's not like we use the elf wrapper currently.  
6. It might be cool to be able to parse the iPhone's own device tree for some of base addresses. Might make porting less of a pain.  
7. With help from CPICH, we've determined the vibrator and speaker controls are in the baseband, both controlled through the at+xdrv command. Knowing this, the next step is to make sure we can talk to the baseband through the UARTs. This shouldn't be that bad since iBoot used to do it, and we already have UART code.  
8. I've implemented the firmware upload part of Libertas WLAN driver for Marvell 8686 to test out the SDIO functionality. It appears to work. Therefore, we have validated readb, writeb and writesb. More of it should be implemented to validate SDIO device interrupt handling and also readsb. After that, we will definitely have enough to support working wi-fi in the Linux kernel!  
Jobs for people who want to get their hands dirty with drivers:  
1. Look at TheSeven's NAND FTL code in Rockbox and CPICH's reverse engineering efforts to figure out the FTL write code and get it working.  
2. Write a new USB driver: I hate the current one. TheSeven might have some better code.  
3. Can we steal some code from that userland bluetooth stack and put it on top of our UART code? It might be even cleaner than USB, ironically, since we can probably do it all without interrupts.  
Jobs for reverse engineers:  
1. Port openiboot to unsupported platforms like ipt2g, ipt3g and iPhone 3GS.  
 2. For some reason, the NAND chips stop working after the iPhone is on for a long time. They're fine after a reboot. Figure out why that's happening.  
3. Get multitouch working for Zephyr2. It's a subclass of the Zephyr1 that I investigated, and at least some functions are shared, so it shouldn't be terrible.  
4. Figure out how to talk to the light sensor. It's a TSL2561 according to the ioreg. The slave address is 0x92/0x93 according to the ioreg "reg" setting and is one of the slave addresses allowed on the TSL2561. It's on i2c0 according to ioreg. It all looks good except for the fact I cannot get a response out of this part. I even bruteforced all the slave addresses on i2c0 and only got responses from the PMU, the accelerometer and the Wolfson, stuff we already know how to talk to. What's going on? Is it just my 2G is broken?  
5. Figure out the new FTL they're using on the newer devices. That's going to be a pain.  
Thanks for reading all this. I'm impressed."